def Run(self, args): """Run 'services list'. Args: args: argparse.Namespace, The arguments that this command was invoked with. Returns: The list of managed services for this project. """ client = services_util.GetClientInstance() # Default mode is --enabled, so if no flags were specified, # turn on the args.enabled flag. if not (args.enabled or args.available): args.enabled = True validated_project = services_util.GetValidatedProject(args.project) if args.enabled: request = services_util.GetEnabledListRequest(validated_project) elif args.available: request = services_util.GetAvailableListRequest() return list_pager.YieldFromList( client.services, request, limit=args.limit, batch_size_attribute='pageSize', batch_size=args.page_size, field='services')
def Run(self, args): """Run 'services list'. Args: args: argparse.Namespace, The arguments that this command was invoked with. Returns: The list of services for this project. """ # Default mode is --enabled, so if no flags were specified, # turn on the args.enabled flag. if not (args.enabled or args.available): args.enabled = True project = services_util.GetValidatedProject(args.project) return serviceusage.ListServices(project, args.enabled, args.page_size, args.limit)