Skip to content

Commit

Permalink
Added boot disk size to cli create command
Browse files Browse the repository at this point in the history
Signed-off-by: Johnny Yip <jcyip@google.com>
  • Loading branch information
yippyyipyip authored and ser-io committed Jan 28, 2025
1 parent 0c20352 commit c2f1042
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const (
const (
gcpMachineTypeFlag = "gcp_machine_type"
gcpMinCPUPlatformFlag = "gcp_min_cpu_platform"
gcpBootDiskSizeGB = "gcp_boot_disk_size_gb"
gcpBootDiskSizeGBFlag = "gcp_boot_disk_size_gb"
gcpAcceleratorFlag = "gcp_accelerator"
)

Expand Down Expand Up @@ -514,7 +514,7 @@ func hostCommand(opts *subCommandOpts) *cobra.Command {
opts.InitialConfig.DefaultService().Host.GCP.MachineType, gcpMachineTypeFlagDesc)
create.Flags().StringVar(&createFlags.GCP.MinCPUPlatform, gcpMinCPUPlatformFlag,
opts.InitialConfig.DefaultService().Host.GCP.MinCPUPlatform, gcpMinCPUPlatformFlagDesc)
create.Flags().Int64Var(&createFlags.GCP.BootDiskSizeGB, gcpBootDiskSizeGB,
create.Flags().Int64Var(&createFlags.GCP.BootDiskSizeGB, gcpBootDiskSizeGBFlag,
opts.InitialConfig.DefaultService().Host.GCP.BootDiskSizeGB, gcpBootDiskSizeGBDesc)
list := &cobra.Command{
Use: "list",
Expand Down Expand Up @@ -652,6 +652,8 @@ func cvdCommands(opts *subCommandOpts) []*cobra.Command {
create.Flags().StringVar(f.ValueRef, name, f.Default, f.Desc)
create.MarkFlagsMutuallyExclusive(hostFlag, name)
}
create.Flags().Int64Var(&createFlags.GCP.BootDiskSizeGB, "host_"+gcpBootDiskSizeGBFlag,
opts.InitialConfig.DefaultService().Host.GCP.BootDiskSizeGB, gcpBootDiskSizeGBDesc)
create.Flags().StringSliceVar(&gcpAcceleratorFlagValues, "host_"+gcpAcceleratorFlag,
opts.InitialConfig.DefaultService().Host.GCP.AcceleratorConfigs, acceleratorFlagDesc)
// List command
Expand Down

0 comments on commit c2f1042

Please sign in to comment.