def list_services(self, project_id):
"""Lists services of a project.
Args:
project_id (str): The id of the project.
Returns:
list: A list of Service resource dicts for a project_id.
"""
try:
paged_results = self.repository.app_services.list(project_id)
return api_helpers.flatten_list_results(paged_results, 'services')
except (errors.HttpError, HttpLib2Error) as e:
if isinstance(e, errors.HttpError) and e.resp.status == 404:
return []
raise api_errors.ApiExecutionError(project_id, e)
评论列表
文章目录