예제 #1
0
def AddFlags(parser, is_ga):
    """Helper function for adding flags dependant on the release track."""
    base_classes.BaseDescriber.Args(parser)
    base_classes.AddFieldsFlag(parser, 'operations')

    scope = parser.add_mutually_exclusive_group()

    scope.add_argument(
        '--global',
        action='store_true',
        help=('If provided, it is assumed that the requested operation is '
              'global.'))

    scope.add_argument('--region',
                       help='The region of the operation to fetch.',
                       action=actions.StoreProperty(
                           properties.VALUES.compute.region))

    scope.add_argument('--zone',
                       help='The zone of the operation to fetch.',
                       action=actions.StoreProperty(
                           properties.VALUES.compute.zone))

    if not is_ga:
        scope.add_argument(
            '--user-accounts',
            action='store_true',
            help=('If provided, it is assumed that the requested operation is '
                  'a Compute User Accounts operation.'))
예제 #2
0
    def Args(parser):
        base_classes.AddFieldsFlag(parser, 'targetPoolInstanceHealth')

        utils.AddRegionFlag(parser,
                            resource_type='target pool',
                            operation_type='get health information for')

        parser.add_argument('name', help='The name of the target pool.')
예제 #3
0
    def Args(parser):
        base_classes.BaseDescriber.Args(parser)
        base_classes.AddFieldsFlag(parser, 'operations')

        scope = parser.add_mutually_exclusive_group()

        scope.add_argument(
            '--global',
            action='store_true',
            help=('If provided, it is assumed that the requested operation is '
                  'global.'))

        scope.add_argument('--region',
                           help='The region of the operation to fetch.')

        scope.add_argument('--zone',
                           help='The zone of the operation to fetch.')
예제 #4
0
 def Args(parser):
   base_classes.GlobalDescriber.Args(parser)
   base_classes.AddFieldsFlag(parser, 'SSL certificates')
예제 #5
0
 def Args(parser):
     cli = Describe.GetCLIGenerator()
     base_classes.ZonalDescriber.Args(parser, 'compute.instances', cli)
     base_classes.AddFieldsFlag(parser, 'instances')
예제 #6
0
 def Args(parser):
   cli = Describe.GetCLIGenerator()
   base_classes.GlobalDescriber.Args(parser, 'compute.networks', cli)
   base_classes.AddFieldsFlag(parser, 'networks')
예제 #7
0
 def Args(parser):
     base_classes.AddFieldsFlag(parser, 'projects')
예제 #8
0
 def Args(parser):
   base_classes.GlobalDescriber.Args(
       parser, 'compute.firewalls', list_command_path='compute.firewall-rules')
   base_classes.AddFieldsFlag(parser, 'firewalls')
예제 #9
0
 def Args(parser):
   base_classes.GlobalDescriber.Args(parser)
   base_classes.AddFieldsFlag(parser, 'zones')
예제 #10
0
 def Args(parser):
     base_classes.ZonalDescriber.Args(parser, 'compute.machineTypes')
     base_classes.AddFieldsFlag(parser, 'machineTypes')
예제 #11
0
 def Args(parser):
     base_classes.RegionalDescriber.Args(parser)
     base_classes.AddFieldsFlag(parser, 'targetPools')
예제 #12
0
  def Args(parser):
    base_classes.AddFieldsFlag(parser, 'backendServiceGroupHealth')

    parser.add_argument(
        'name',
        help='The name of the backend service.')
예제 #13
0
 def Args(parser):
     cli = Describe.GetCLIGenerator()
     base_classes.RegionalDescriber.Args(parser, 'compute.urlMaps', cli,
                                         'compute.url-maps')
     base_classes.AddFieldsFlag(parser, 'urlMaps')
예제 #14
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser, 'compute.httpHealthChecks')
     base_classes.AddFieldsFlag(parser, 'httpHealthChecks')
예제 #15
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser)
     base_classes.AddFieldsFlag(parser, 'instanceTemplates')
예제 #16
0
 def Args(parser):
     cli = Describe.GetCLIGenerator()
     base_classes.ZonalDescriber.Args(parser, 'compute.machineTypes', cli,
                                      'compute.machine-types')
     base_classes.AddFieldsFlag(parser, 'machineTypes')
예제 #17
0
    def Args(parser):
        """Adds arguments to the supplied parser."""

        base_classes.RegionalDescriber.Args(parser)
        base_classes.AddFieldsFlag(parser, 'targetVpnGateways')
예제 #18
0
 def Args(parser):
   base_classes.ZonalDescriber.Args(parser, 'compute.disks')
   base_classes.AddFieldsFlag(parser, 'disks')
예제 #19
0
 def Args(parser):
     base_classes.ZonalDescriber.Args(parser)
     base_classes.AddFieldsFlag(parser, 'diskTypes')
예제 #20
0
 def Args(parser):
   cli = Describe.GetCLIGenerator()
   base_classes.GlobalDescriber.Args(parser, 'compute.backendServices', cli,
                                     'compute.backend-services')
   base_classes.AddFieldsFlag(parser, 'backendServices')
예제 #21
0
 def Args(parser):
     base_classes.ZonalDescriber.Args(parser, 'compute.targetInstances')
     base_classes.AddFieldsFlag(parser, 'targetInstances')
예제 #22
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser, 'compute.snapshots')
     base_classes.AddFieldsFlag(parser, 'snapshots')
예제 #23
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser, 'compute.images')
     base_classes.AddFieldsFlag(parser, 'images')
예제 #24
0
    def Args(parser):
        """Adds arguments to the supplied parser."""

        base_classes.RegionalDescriber.Args(parser)
        base_classes.AddFieldsFlag(parser, 'vpnTunnels')
예제 #25
0
 def Args(parser):
     base_classes.ZonalDescriber.Args(parser)
     base_classes.AddFieldsFlag(parser, 'instances')
예제 #26
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser, 'compute.regions')
     base_classes.AddFieldsFlag(parser, 'regions')
예제 #27
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser, 'compute.targetHttpProxies')
     base_classes.AddFieldsFlag(parser, 'targetHttpProxies')
예제 #28
0
 def Args(parser):
     base_classes.GlobalDescriber.Args(parser, 'compute.networks')
     base_classes.AddFieldsFlag(parser, 'networks')
예제 #29
0
 def Args(parser):
   cli = Describe.GetCLIGenerator()
   base_classes.GlobalDescriber.Args(
       parser, 'compute.targetHttpsProxies', cli,
       'compute.target-https-proxies')
   base_classes.AddFieldsFlag(parser, 'targetHttpsProxies')
예제 #30
0
 def Args(parser):
     cli = Describe.GetCLIGenerator()
     base_classes.RegionalDescriber.Args(parser, 'compute.targetPools', cli,
                                         'compute.target-pools')
     base_classes.AddFieldsFlag(parser, 'targetPools')