def Run(self, args):
     fleetclient = client.FleetClient(release_track=base.ReleaseTrack.ALPHA)
     project = args.project
     if project is None:
         project = properties.VALUES.core.project.Get()
     org = args.organization
     # If no args provided, use active project org
     if org is None and args.project is None:
         org = self.GetOrg(project)
     parent = org if org is not None else project
     parenttype = 'organization' if org is not None else 'project'
     log.status.Print('Listing fleets from {0} {1}:'.format(
         parenttype, parent))
     return fleetclient.ListFleets(project, org)
示例#2
0
 def Run(self, args):
     project = arg_utils.GetFromNamespace(args,
                                          '--project',
                                          use_defaults=True)
     fleetclient = client.FleetClient(release_track=base.ReleaseTrack.ALPHA)
     return fleetclient.UpdateNamespace(args.NAME, project)
 def Run(self, args):
     fleetclient = client.FleetClient(release_track=base.ReleaseTrack.ALPHA)
     project = args.project
     if project is None:
         project = properties.VALUES.core.project.Get()
     return fleetclient.ListNamespaces(project)