Пример #1
0
def _CommonArgs(parser, cli):
  """Register parser args common to all tracks."""
  metadata_utils.AddMetadataArgs(parser)
  instance_utils.AddDiskArgs(parser)
  instance_utils.AddLocalSsdArgs(parser)
  instance_utils.AddImageArgs(parser)
  instance_utils.AddCanIpForwardArgs(parser)
  instance_utils.AddAddressArgs(parser, instances=True)
  instance_utils.AddMachineTypeArgs(parser)
  instance_utils.AddMaintenancePolicyArgs(parser)
  instance_utils.AddNetworkArgs(parser)
  instance_utils.AddNoRestartOnFailureArgs(parser)
  instance_utils.AddPreemptibleVmArgs(parser)
  instance_utils.AddScopeArgs(parser)
  instance_utils.AddTagsArgs(parser)

  parser.add_argument(
      '--description',
      help='Specifies a textual description of the instances.')

  parser.add_argument(
      'names',
      metavar='NAME',
      nargs='+',
      help='The names of the instances to create.')

  utils.AddZoneFlag(
      parser,
      resource_type='instances',
      operation_type='create',
      cli=cli)
Пример #2
0
    def Args(parser):
        metadata_utils.AddMetadataArgs(parser)

        instance_utils.AddDiskArgs(parser)
        instance_utils.AddImageArgs(parser)
        instance_utils.AddCanIpForwardArgs(parser)
        instance_utils.AddAddressArgs(parser)
        instance_utils.AddMachineTypeArgs(parser)
        instance_utils.AddMaintenancePolicyArgs(parser)
        instance_utils.AddNetworkArgs(parser)
        instance_utils.AddNoRestartOnFailureArgs(parser)
        instance_utils.AddScopeArgs(parser)
        instance_utils.AddTagsArgs(parser)

        parser.add_argument(
            '--description',
            help='Specifies a textual description of the instances.')

        parser.add_argument('names',
                            metavar='NAME',
                            nargs='+',
                            help='The names of the instances to create.')

        utils.AddZoneFlag(parser,
                          resource_type='instances',
                          operation_type='create')
Пример #3
0
    def Args(parser):
        metadata_utils.AddMetadataArgs(parser)

        instance_utils.AddDiskArgs(parser)
        instance_utils.AddImageArgs(parser)
        instance_utils.AddCanIpForwardArgs(parser)
        instance_utils.AddAddressArgs(parser)
        instance_utils.AddMachineTypeArgs(parser)
        instance_utils.AddMaintenancePolicyArgs(parser)
        instance_utils.AddNetworkArgs(parser)
        instance_utils.AddNoRestartOnFailureArgs(parser)
        instance_utils.AddScopeArgs(parser)
        instance_utils.AddTagsArgs(parser)

        parser.add_argument(
            '--description',
            help='Specifies a textual description for the instance template.')

        parser.add_argument(
            'name',
            metavar='NAME',
            help='The name of the instance template to create.')