func (cmd *upload) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) }
func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) }
func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) }
func NewPermissionFlag(ctx context.Context) (*PermissionFlag, context.Context) { f := &PermissionFlag{} f.List.f = f f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) f.OutputFlag, ctx = flags.NewOutputFlag(ctx) return f, ctx }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) }
func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.long, "l", false, "Long listing format") }
func (cmd *env) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) f.BoolVar(&cmd.extra, "x", false, "Output variables for each GOVC_URL component") }
func (cmd *assigned) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.StringVar(&cmd.id, "id", "", "Entity ID") }
func (cmd *list) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.StringVar(&cmd.feature, "feature", "", featureUsage) }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx) cmd.DatacenterFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.pools, "p", true, "List resource pools") f.BoolVar(&cmd.apps, "a", false, "List virtual app resource pools") }
func (cmd *ip) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools") }
func (cmd *cp) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) f.BoolVar(&cmd.force, "f", false, "If true, overwrite any identically named file at the destination") }
func (cmd *about) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.Long, "l", false, "Include service content") }
func (cmd *cert) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.show, "show", false, "Show PEM encoded server certificate only") f.BoolVar(&cmd.thumbprint, "thumbprint", false, "Output host hash and thumbprint only") }
func (cmd *ip) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools") f.BoolVar(&cmd.all, "a", false, "Wait for an IP address on all NICs") f.BoolVar(&cmd.v4, "v4", false, "Only report IPv4 addresses") }
func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.long, "l", false, "Long listing format") f.BoolVar(&cmd.slash, "p", false, "Write a slash (`/') after each filename if that file is a directory") f.BoolVar(&cmd.all, "a", false, "Include entries whose names begin with a dot (.)") }
func (cmd *vmdk) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.upload, "upload", true, "Upload specified disk") f.BoolVar(&cmd.force, "force", false, "Overwrite existing disk") f.BoolVar(&cmd.keep, "keep", false, "Keep uploaded disk after import") }
func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) f.BoolVar(&cmd.long, "l", false, "Long listing format") f.BoolVar(&cmd.slash, "p", false, "Append / indicator to directories") f.BoolVar(&cmd.all, "a", false, "Do not ignore entries starting with .") f.BoolVar(&cmd.recurse, "R", false, "List subdirectories recursively") }
func (cmd *ps) Register(ctx context.Context, f *flag.FlagSet) { cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.GuestFlag, ctx = newGuestFlag(ctx) cmd.GuestFlag.Register(ctx, f) cmd.uids = make(map[string]bool) f.BoolVar(&cmd.every, "e", false, "Select all processes") f.BoolVar(&cmd.wait, "X", false, "Wait for process to exit") f.Var(&cmd.pids, "p", "Select by process ID") f.Var(&cmd.uids, "U", "Select by process UID") }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) err := cmd.typ.Set("lun") if err != nil { panic(err) } f.Var(&cmd.typ, "t", fmt.Sprintf("Type (%s)", strings.Join(infoTypes, ","))) }
func (cmd *assign) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.StringVar(&cmd.name, "name", "", "Display name") f.BoolVar(&cmd.remove, "remove", false, "Remove assignment") }
func (cmd *find) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) f.BoolVar(&cmd.check, "c", true, "Check if esx firewall is enabled") f.BoolVar(&cmd.enabled, "enabled", true, "Find enabled rule sets if true, disabled if false") f.StringVar((*string)(&cmd.Direction), "direction", string(types.HostFirewallRuleDirectionOutbound), "Direction") f.StringVar((*string)(&cmd.PortType), "type", string(types.HostFirewallRulePortTypeDst), "Port type") f.StringVar((*string)(&cmd.Protocol), "proto", string(types.HostFirewallRuleProtocolTcp), "Protocol") f.Var(flags.NewInt32(&cmd.Port), "port", "Port") }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) err := cmd.typ.Set("lun") if err != nil { panic(err) } f.Var(&cmd.typ, "t", fmt.Sprintf("Type (%s)", strings.Join(infoTypes, ","))) f.BoolVar(&cmd.rescan, "rescan", false, "Rescan for new storage devices") }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.ClientFlag, ctx = flags.NewClientFlag(ctx) cmd.ClientFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines) cmd.SearchFlag.Register(ctx, f) f.BoolVar(&cmd.WaitForIP, "waitip", false, "Wait for VM to acquire IP address") f.BoolVar(&cmd.General, "g", true, "Show general summary") f.BoolVar(&cmd.ExtraConfig, "e", false, "Show ExtraConfig") f.BoolVar(&cmd.Resources, "r", false, "Show resource summary") }
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) err := (&cmd.Bytes).Set("10G") if err != nil { panic(err) } f.StringVar(&cmd.controller, "controller", "", "Disk controller") f.StringVar(&cmd.Name, "name", "", "Name for new disk") f.Var(&cmd.Bytes, "size", "Size of new disk") }
func (cmd *ovfx) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx) cmd.HostSystemFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx) cmd.ResourcePoolFlag.Register(ctx, f) cmd.ArchiveFlag, ctx = newArchiveFlag(ctx) cmd.ArchiveFlag.Register(ctx, f) cmd.OptionsFlag, ctx = newOptionsFlag(ctx) cmd.OptionsFlag.Register(ctx, f) cmd.FolderFlag, ctx = newFolderFlag(ctx) cmd.FolderFlag.Register(ctx, f) f.StringVar(&cmd.Name, "name", "", "Name to use for new entity") }
func (cmd *create) Register(ctx context.Context, f *flag.FlagSet) { cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx) cmd.DatastoreFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx) cmd.VirtualMachineFlag.Register(ctx, f) err := (&cmd.Bytes).Set("10G") if err != nil { panic(err) } f.StringVar(&cmd.controller, "controller", "", "Disk controller") f.StringVar(&cmd.Name, "name", "", "Name for new disk") f.Var(&cmd.Bytes, "size", "Size of new disk") f.BoolVar(&cmd.Thick, "thick", false, "Thick provision new disk") f.BoolVar(&cmd.Eager, "eager", false, "Eagerly scrub new disk") f.StringVar(&cmd.DiskMode, "mode", "persistent", fmt.Sprintf("Disk mode (%s)", strings.Join(vdmTypes, "|"))) }
func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) { cmd.AutostartFlag, ctx = newAutostartFlag(ctx) cmd.AutostartFlag.Register(ctx, f) cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx) cmd.OutputFlag.Register(ctx, f) }