func (cmd *rename) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) }
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.configSpec = new(types.VMwareDVSConfigSpec) cmd.DVSCreateSpec.ConfigSpec = cmd.configSpec }
func (cmd *add) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.HostConnectFlag, ctx = flags.NewHostConnectFlag(ctx) cmd.HostConnectFlag.Register(ctx, f) f.BoolVar(&cmd.connect, "connect", true, "Immediately connect to host") }
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.configSpec = new(types.VMwareDVSConfigSpec) cmd.DVSCreateSpec.ConfigSpec = cmd.configSpec cmd.DVSCreateSpec.ProductInfo = new(types.DistributedVirtualSwitchProductSpec) f.StringVar(&cmd.ProductInfo.Version, "product-version", "", "DVS product version") }
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.StoragePodFlag, ctx = flags.NewStoragePodFlag(ctx) cmd.StoragePodFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) f.IntVar(&cmd.memory, "m", 1024, "Size in MB of memory") f.IntVar(&cmd.cpus, "c", 1, "Number of CPUs") f.StringVar(&cmd.guestID, "g", "otherGuest", "Guest OS") f.BoolVar(&cmd.link, "link", true, "Link specified disk") f.BoolVar(&cmd.on, "on", true, "Power on VM. Default is true if -disk argument is given.") f.BoolVar(&cmd.force, "force", false, "Create VM if vmx already exists") f.StringVar(&cmd.controller, "disk.controller", "scsi", "Disk controller type") f.StringVar(&cmd.iso, "iso", "", "ISO path") cmd.isoDatastoreFlag, ctx = flags.NewCustomDatastoreFlag(ctx) f.StringVar(&cmd.isoDatastoreFlag.Name, "iso-datastore", "", "Datastore for ISO file") f.StringVar(&cmd.disk, "disk", "", "Disk path (to use existing) OR size (to create new, e.g. 20GB)") cmd.diskDatastoreFlag, ctx = flags.NewCustomDatastoreFlag(ctx) f.StringVar(&cmd.diskDatastoreFlag.Name, "disk-datastore", "", "Datastore for disk file") }
func (cmd *register) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Name of the VM") f.BoolVar(&cmd.template, "as-template", false, "Mark VM as template") }
func (cmd *clone) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.StoragePodFlag, ctx = flags.NewStoragePodFlag(ctx) cmd.StoragePodFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.NetworkFlag, ctx = flags.NewNetworkFlag(ctx) cmd.NetworkFlag.Register(ctx, f) cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) f.IntVar(&cmd.memory, "m", 0, "Size in MB of memory") f.IntVar(&cmd.cpus, "c", 0, "Number of CPUs") f.BoolVar(&cmd.on, "on", true, "Power on VM") f.BoolVar(&cmd.force, "force", false, "Create VM if vmx already exists") f.BoolVar(&cmd.template, "template", false, "Create a Template") f.StringVar(&cmd.customization, "customization", "", "Customization Specification Name") f.BoolVar(&cmd.waitForIP, "waitip", false, "Wait for VM to acquire IP address") f.IntVar(&cmd.amount, "amount", 1, "Amount of clones needed") }
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.FolderFlag, ctx = flags.NewFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) }