in cli_tools/gce_onestep_image_import/onestep_importer/importer.go [107:239]
func (args *OneStepImportArguments) registerFlags(flagSet *flag.FlagSet) {
flagSet.Var((*flags.TrimmedString)(&args.AWSAccessKeyID), awsAccessKeyIDFlag,
"The access key ID for an AWS credential. "+
"This credential is associated with an IAM user or role. "+
"This IAM user must have permissions to import images.")
flagSet.Var((*flags.TrimmedString)(&args.AWSAMIID), awsAMIIDFlag,
"The AWS AMI ID of the image to import.")
flagSet.Var((*flags.TrimmedString)(&args.AWSAMIExportLocation), awsAMIExportLocationFlag,
"The AWS S3 Bucket location where you want to export the image.")
flagSet.Var((*flags.TrimmedString)(&args.AWSSourceAMIFilePath), awsSourceAMIFilePathFlag,
"The S3 resource path of the exported image file.")
flagSet.Var((*flags.TrimmedString)(&args.AWSRegion), awsRegionFlag,
"The AWS region for the image that you want to import.")
flagSet.Var((*flags.TrimmedString)(&args.AWSSessionToken), awsSessionTokenFlag,
"The session token for your AWS credential. "+
"This credential is associated with an IAM user or role. "+
"This IAM user must have permissions to import images.")
flagSet.Var((*flags.TrimmedString)(&args.AWSSecretAccessKey), awsSecretAccessKeyFlag,
"The secret access key for your AWS credential. "+
"This credential is associated with an IAM user or role. "+
"This IAM user must have permissions to import images.")
flagSet.Var((*flags.LowerTrimmedString)(&args.ClientID), clientFlag,
"Identifies the client of the importer, e.g. 'gcloud', 'pantheon', or 'api'.")
flagSet.Var((*flags.TrimmedString)(&args.ClientVersion), "client_version",
"Identifies the version of the client of the importer.")
flagSet.Var((*flags.TrimmedString)(args.ProjectPtr), "project",
"The project where workflows will be run, and where the resulting image will be stored.")
flagSet.Var((*flags.TrimmedString)(&args.Network), "network",
"Name of the network in your project to use for the image import. "+
"The network must have access to Google Cloud Storage. "+
"If not specified, the network named default is used.")
flagSet.Var((*flags.TrimmedString)(&args.Subnet), "subnet",
"Name of the subnetwork in your project to use for the image import. "+
"If the network resource is in legacy mode, do not provide this property. "+
"If the network is in auto subnet mode, providing the subnetwork is optional. "+
"If the network is in custom subnet mode, then this field should be specified. "+
"Zone should be specified if this field is specified.")
flagSet.Var((*flags.LowerTrimmedString)(&args.Zone), "zone",
"The zone where workflows will be run, and where the resulting image will be stored.")
flagSet.Var((*flags.TrimmedString)(&args.ScratchBucketGcsPath), "scratch_bucket_gcs_path",
"A system-generated bucket name will be used if omitted. "+
"If the bucket doesn't exist, it will be created. If it does exist, it will be reused.")
flagSet.Var((*flags.TrimmedString)(&args.Oauth), "oauth",
"Path to oauth json file.")
flagSet.Var((*flags.TrimmedString)(&args.ComputeEndpoint), "compute_endpoint_override",
"API endpoint to override default.")
flagSet.Var((*flags.TrimmedString)(&args.ComputeServiceAccount), "compute_service_account",
"Compute service account to be used by importer Virtual Machine. When empty, the Compute Engine default service account is used.")
flagSet.BoolVar(&args.GcsLogsDisabled, "disable_gcs_logging", false,
"Do not store logs in GCS.")
flagSet.BoolVar(&args.CloudLogsDisabled, "disable_cloud_logging", false,
"Do not store logs in Cloud Logging.")
flagSet.BoolVar(&args.StdoutLogsDisabled, "disable_stdout_logging", false,
"Do not write logs to stdout.")
flagSet.BoolVar(&args.NoExternalIP, "no_external_ip", false,
"VPC doesn't allow external IPs.")
flagSet.Bool("kms_key", false, "Reserved for future use.")
flagSet.Bool("kms_keyring", false, "Reserved for future use.")
flagSet.Bool("kms_location", false, "Reserved for future use.")
flagSet.Bool("kms_project", false, "Reserved for future use.")
flagSet.Var((*flags.LowerTrimmedString)(&args.ImageName), imageNameFlag,
"Name of the disk image to create.")
flagSet.Var((*flags.TrimmedString)(&args.Family), "family",
"Family to set for the imported image.")
flagSet.Var((*flags.TrimmedString)(&args.Description), "description",
"Description to set for the imported image.")
flagSet.Var((*flags.KeyValueString)(&args.Labels), "labels",
"List of label KEY=VALUE pairs to add. "+
"For more information, see: https://cloud.google.com/compute/docs/labeling-resources")
flagSet.Var((*flags.LowerTrimmedString)(&args.StorageLocation), "storage_location",
"Specifies a Cloud Storage location, either regional or multi-regional, "+
"where image content is to be stored. If not specified, the multi-region "+
"location closest to the source is chosen automatically.")
flagSet.Var((*flags.LowerTrimmedString)(&args.OS), osFlag,
"Specifies the OS of the disk image being imported. "+
"This must be specified if cloud provider is specified. "+
"OS must be one of: "+strings.Join(daisyutils.GetSortedOSIDs(), ", ")+".")
flagSet.BoolVar(&args.NoGuestEnvironment, "no_guest_environment", false,
"When enabled, the Google Guest Environment will not be installed.")
flagSet.BoolVar(&args.NestedVirtualizationEnabled, "enable_nested_virtualization", true,
"When enabled, temporary worker VMs will be created with enabled nested virtualization. "+
"See https://cloud.google.com/compute/docs/instances/nested-virtualization/enabling for details.")
flagSet.Var((*flags.StringArrayFlag)(&args.WorkerMachineSeries), "worker_machine_series",
"The import tool automatically selects the machine series for temporary worker VMs based on the execution context. "+
"The argument overrides this behavior and specifies the machine series to use for worker VMs. "+
"Additionally it is possible to specify fallback machine series by setting this argument twice. "+
"For example, -worker_machine_series n1 -worker_machine_series n2")
flagSet.DurationVar(&args.Timeout, "timeout", time.Hour*2,
"Maximum time a build can last before it is failed as TIMEOUT. For example, "+
"specifying 2h will fail the process after 2 hours. See $ gcloud topic datetimes "+
"for information on duration formats.")
flagSet.Var((*flags.TrimmedString)(&args.CustomWorkflow), "custom_translate_workflow",
"A Daisy workflow JSON file to use for translation.")
flagSet.BoolVar(&args.UefiCompatible, "uefi_compatible", false,
"Enables UEFI booting, which is an alternative system boot method. "+
"Most public images use the GRUB bootloader as their primary boot method.")
flagSet.BoolVar(&args.SysprepWindows, "sysprep_windows", false,
"Whether to generalize image using Windows Sysprep. Only applicable to Windows.")
}