def _GenApiConfigCallback(args, api_func=GenApiConfig):
 (service_class_names, output_path, hostname) = (args.service, args.output, args.hostname)
 service_configs = api_func(service_class_names, hostname=hostname)
 for (service_class_name, config) in service_configs.iteritems():
  (_, base_service_class_name) = service_class_name.rsplit('.', 1)
  api_name = (base_service_class_name + '.api')
  _WriteFile(output_path, api_name, config)

def _GenApiConfigCallback ( args , api_func = GenApiConfig ) : ( service_class_names , output_path , hostname ) = ( args . service , args . output , args . hostname ) service_configs = api_func ( service_class_names , hostname = hostname ) for ( service_class_name , config ) in service_configs . iteritems ( ) : ( _ , base_service_class_name ) = service_class_name . rsplit ( '.' , 1 ) api_name = ( base_service_class_name + '.api' ) _WriteFile ( output_path , api_name , config )
generate an api file .