package flags
import "github.com/vmware/govmomi/cli/flags"
Index ¶
- Constants
- Variables
- func ContentLibrary(ctx context.Context, c *rest.Client, path string) (*library.Library, error)
- func ContentLibraryItem(ctx context.Context, c *rest.Client, path string) (*library.Item, error)
- func ContentLibraryResult(ctx context.Context, c *rest.Client, kind string, path string) (finder.FindResult, error)
- func NewInt32(v *int32) flag.Value
- func NewInt64(v *int64) flag.Value
- func NewOptionalBool(v **bool) flag.Value
- func NewOptionalInt32(v **int32) flag.Value
- func NewOptionalInt64(v **int64) flag.Value
- func NewOptionalString(v **string) flag.Value
- func ParseVersion(s string) (version, error)
- type ClientFlag
- func NewClientFlag(ctx context.Context) (*ClientFlag, context.Context)
- func (flag *ClientFlag) Client() (*vim25.Client, error)
- func (flag *ClientFlag) CnsClient() (*cns.Client, error)
- func (flag *ClientFlag) ConfigureTLS(sc *soap.Client) error
- func (flag *ClientFlag) Environ(extra bool) []string
- func (flag *ClientFlag) KeepAlive(client cache.Client)
- func (flag *ClientFlag) Logout(ctx context.Context) error
- func (flag *ClientFlag) PbmClient() (*pbm.Client, error)
- func (flag *ClientFlag) Process(ctx context.Context) error
- func (c *ClientFlag) ProcessOnce(fn func() error) (err error)
- func (flag *ClientFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *ClientFlag) RegisterOnce(fn func())
- func (flag *ClientFlag) RestClient() (*rest.Client, error)
- func (flag *ClientFlag) RoundTripper(c *soap.Client) soap.RoundTripper
- func (flag *ClientFlag) Set(s string) error
- func (flag *ClientFlag) SetRootCAs(c *soap.Client) error
- func (flag *ClientFlag) String() string
- func (flag *ClientFlag) WithCancel(ctx context.Context, f func(context.Context) error) error
- type ClusterFlag
- func NewClusterFlag(ctx context.Context) (*ClusterFlag, context.Context)
- func (f *ClusterFlag) Cluster() (*object.ClusterComputeResource, error)
- func (f *ClusterFlag) ClusterIfSpecified() (*object.ClusterComputeResource, error)
- func (f *ClusterFlag) Names(ctx context.Context, refs []types.ManagedObjectReference) (map[types.ManagedObjectReference]string, error)
- func (f *ClusterFlag) ObjectList(ctx context.Context, kind string, names []string) ([]types.ManagedObjectReference, error)
- func (f *ClusterFlag) Process(ctx context.Context) error
- func (c *ClusterFlag) ProcessOnce(fn func() error) (err error)
- func (f *ClusterFlag) Reconfigure(ctx context.Context, spec types.BaseComputeResourceConfigSpec) error
- func (f *ClusterFlag) Register(ctx context.Context, fs *flag.FlagSet)
- func (c *ClusterFlag) RegisterOnce(fn func())
- func (f *ClusterFlag) RegisterPlacement(ctx context.Context, fs *flag.FlagSet)
- type DatacenterFlag
- func NewDatacenterFlag(ctx context.Context) (*DatacenterFlag, context.Context)
- func (flag *DatacenterFlag) Datacenter() (*object.Datacenter, error)
- func (flag *DatacenterFlag) DatacenterIfSpecified() (*object.Datacenter, error)
- func (flag *DatacenterFlag) Finder(all ...bool) (*find.Finder, error)
- func (flag *DatacenterFlag) ManagedObject(ctx context.Context, arg string) (types.ManagedObjectReference, error)
- func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, error)
- func (flag *DatacenterFlag) Process(ctx context.Context) error
- func (c *DatacenterFlag) ProcessOnce(fn func() error) (err error)
- func (flag *DatacenterFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *DatacenterFlag) RegisterOnce(fn func())
- type DatastoreFlag
- func NewCustomDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context)
- func NewDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context)
- func (f *DatastoreFlag) Args(args []string) []object.DatastorePath
- func (f *DatastoreFlag) Datastore() (*object.Datastore, error)
- func (flag *DatastoreFlag) DatastoreIfSpecified() (*object.Datastore, error)
- func (f *DatastoreFlag) DatastorePath(name string) (string, error)
- func (f *DatastoreFlag) FileBacking(ctx context.Context, file string, stat bool) (string, error)
- func (flag *DatastoreFlag) IsSet() bool
- func (f *DatastoreFlag) Process(ctx context.Context) error
- func (c *DatastoreFlag) ProcessOnce(fn func() error) (err error)
- func (f *DatastoreFlag) Register(ctx context.Context, fs *flag.FlagSet)
- func (c *DatastoreFlag) RegisterOnce(fn func())
- func (f *DatastoreFlag) Stat(ctx context.Context, file string) (types.BaseFileInfo, error)
- type DebugFlag
- func NewDebugFlag(ctx context.Context) (*DebugFlag, context.Context)
- func (flag *DebugFlag) Process(ctx context.Context) error
- func (c *DebugFlag) ProcessOnce(fn func() error) (err error)
- func (flag *DebugFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *DebugFlag) RegisterOnce(fn func())
- func (flag *DebugFlag) Verbose() bool
- type EmptyFlag
- func (flag *EmptyFlag) Process(ctx context.Context) error
- func (flag *EmptyFlag) Register(ctx context.Context, f *flag.FlagSet)
- type EnvBrowser
- func (cmd *EnvBrowser) Browser(ctx context.Context) (*object.EnvironmentBrowser, error)
- func (cmd *EnvBrowser) Process(ctx context.Context) error
- func (cmd *EnvBrowser) Register(ctx context.Context, f *flag.FlagSet)
- type FolderFlag
- func NewFolderFlag(ctx context.Context) (*FolderFlag, context.Context)
- func (flag *FolderFlag) Folder() (*object.Folder, error)
- func (flag *FolderFlag) FolderIfSpecified() (*object.Folder, error)
- func (flag *FolderFlag) FolderOrDefault(kind string) (*object.Folder, error)
- func (flag *FolderFlag) IsSet() bool
- func (flag *FolderFlag) Process(ctx context.Context) error
- func (c *FolderFlag) ProcessOnce(fn func() error) (err error)
- func (flag *FolderFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *FolderFlag) RegisterOnce(fn func())
- type HostConnectFlag
- func NewHostConnectFlag(ctx context.Context) (*HostConnectFlag, context.Context)
- func (flag *HostConnectFlag) Fault(err error) error
- func (flag *HostConnectFlag) Process(ctx context.Context) error
- func (c *HostConnectFlag) ProcessOnce(fn func() error) (err error)
- func (flag *HostConnectFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *HostConnectFlag) RegisterOnce(fn func())
- func (flag *HostConnectFlag) Spec(c *vim25.Client) types.HostConnectSpec
- type HostSystemFlag
- func NewHostSystemFlag(ctx context.Context) (*HostSystemFlag, context.Context)
- func (flag *HostSystemFlag) HostNetworkSystem() (*object.HostNetworkSystem, error)
- func (flag *HostSystemFlag) HostSystem() (*object.HostSystem, error)
- func (flag *HostSystemFlag) HostSystemIfSpecified() (*object.HostSystem, error)
- func (flag *HostSystemFlag) Process(ctx context.Context) error
- func (c *HostSystemFlag) ProcessOnce(fn func() error) (err error)
- func (flag *HostSystemFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *HostSystemFlag) RegisterOnce(fn func())
- type NetworkFlag
- func NewNetworkFlag(ctx context.Context) (*NetworkFlag, context.Context)
- func (flag *NetworkFlag) Change(device types.BaseVirtualDevice, update types.BaseVirtualDevice)
- func (flag *NetworkFlag) Device() (types.BaseVirtualDevice, error)
- func (flag *NetworkFlag) IsSet() bool
- func (flag *NetworkFlag) Network() (object.NetworkReference, error)
- func (flag *NetworkFlag) Process(ctx context.Context) error
- func (c *NetworkFlag) ProcessOnce(fn func() error) (err error)
- func (flag *NetworkFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *NetworkFlag) RegisterOnce(fn func())
- func (flag *NetworkFlag) Set(name string) error
- func (flag *NetworkFlag) String() string
- type OutputFlag
- func NewOutputFlag(ctx context.Context) (*OutputFlag, context.Context)
- func (flag *OutputFlag) All() bool
- func (flag *OutputFlag) Log(s string) (int, error)
- func (flag *OutputFlag) Process(ctx context.Context) error
- func (c *OutputFlag) ProcessOnce(fn func() error) (err error)
- func (flag *OutputFlag) ProgressLogger(prefix string) *progress.ProgressLogger
- func (flag *OutputFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *OutputFlag) RegisterOnce(fn func())
- func (flag *OutputFlag) Write(b []byte) (int, error)
- func (flag *OutputFlag) WriteAny(val any) error
- func (flag *OutputFlag) WriteError(err error) bool
- func (flag *OutputFlag) WriteResult(result OutputWriter) error
- func (flag *OutputFlag) WriteString(s string) (int, error)
- type OutputWriter
- type ResourceAllocationFlag
- func NewResourceAllocationFlag(cpu, mem *types.ResourceAllocationInfo) *ResourceAllocationFlag
- func (s *ResourceAllocationFlag) Process(ctx context.Context) error
- func (r *ResourceAllocationFlag) Register(ctx context.Context, f *flag.FlagSet)
- type ResourcePoolFlag
- func NewResourcePoolFlag(ctx context.Context) (*ResourcePoolFlag, context.Context)
- func (flag *ResourcePoolFlag) IsSet() bool
- func (flag *ResourcePoolFlag) Process(ctx context.Context) error
- func (c *ResourcePoolFlag) ProcessOnce(fn func() error) (err error)
- func (flag *ResourcePoolFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *ResourcePoolFlag) RegisterOnce(fn func())
- func (flag *ResourcePoolFlag) ResourcePool() (*object.ResourcePool, error)
- func (flag *ResourcePoolFlag) ResourcePoolIfSpecified() (*object.ResourcePool, error)
- type SearchFlag
- func NewSearchFlag(ctx context.Context, t int) (*SearchFlag, context.Context)
- func (flag *SearchFlag) HostSystem() (*object.HostSystem, error)
- func (flag *SearchFlag) HostSystems(args []string) ([]*object.HostSystem, error)
- func (flag *SearchFlag) IsSet() bool
- func (flag *SearchFlag) Process(ctx context.Context) error
- func (c *SearchFlag) ProcessOnce(fn func() error) (err error)
- func (flag *SearchFlag) Register(ctx context.Context, fs *flag.FlagSet)
- func (c *SearchFlag) RegisterOnce(fn func())
- func (flag *SearchFlag) VirtualApp() (*object.VirtualApp, error)
- func (flag *SearchFlag) VirtualApps(args []string) ([]*object.VirtualApp, error)
- func (flag *SearchFlag) VirtualMachine() (*object.VirtualMachine, error)
- func (flag *SearchFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error)
- type StoragePodFlag
- func NewStoragePodFlag(ctx context.Context) (*StoragePodFlag, context.Context)
- func (f *StoragePodFlag) Isset() bool
- func (f *StoragePodFlag) Process(ctx context.Context) error
- func (c *StoragePodFlag) ProcessOnce(fn func() error) (err error)
- func (f *StoragePodFlag) Register(ctx context.Context, fs *flag.FlagSet)
- func (c *StoragePodFlag) RegisterOnce(fn func())
- func (f *StoragePodFlag) StoragePod() (*object.StoragePod, error)
- type StorageProfileFlag
- func NewStorageProfileFlag(ctx context.Context, option ...string) (*StorageProfileFlag, context.Context)
- func (c StorageProfileFlag) ProcessOnce(fn func() error) (err error)
- func (flag *StorageProfileFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c StorageProfileFlag) RegisterOnce(fn func())
- func (e *StorageProfileFlag) Set(value string) error
- func (flag *StorageProfileFlag) StorageProfile(ctx context.Context) (string, error)
- func (flag *StorageProfileFlag) StorageProfileList(ctx context.Context) ([]string, error)
- func (flag *StorageProfileFlag) StorageProfileSpec(ctx context.Context) ([]types.BaseVirtualMachineProfileSpec, error)
- func (e *StorageProfileFlag) String() string
- type StringList
- type VirtualAppFlag
- func NewVirtualAppFlag(ctx context.Context) (*VirtualAppFlag, context.Context)
- func (flag *VirtualAppFlag) Process(ctx context.Context) error
- func (c *VirtualAppFlag) ProcessOnce(fn func() error) (err error)
- func (flag *VirtualAppFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *VirtualAppFlag) RegisterOnce(fn func())
- func (flag *VirtualAppFlag) VirtualApp() (*object.VirtualApp, error)
- type VirtualMachineFlag
- func NewVirtualMachineFlag(ctx context.Context) (*VirtualMachineFlag, context.Context)
- func (flag *VirtualMachineFlag) Process(ctx context.Context) error
- func (c *VirtualMachineFlag) ProcessOnce(fn func() error) (err error)
- func (flag *VirtualMachineFlag) Register(ctx context.Context, f *flag.FlagSet)
- func (c *VirtualMachineFlag) RegisterOnce(fn func())
- func (flag *VirtualMachineFlag) VirtualMachine() (*object.VirtualMachine, error)
Constants ¶
const ( SearchVirtualMachines = iota + 1 SearchHosts SearchVirtualApps )
Variables ¶
var ( BuildVersion = "v0.0.0" // govc-test requires an (arbitrary) version set BuildCommit string BuildDate string )
Functions ¶
func ContentLibrary ¶
ContentLibrary attempts to find a content library with the given path, asserting 1 match of type library.Library.
func ContentLibraryItem ¶
ContentLibraryItem attempts to find a content library with the given path, asserting 1 match of type library.Item.
func ContentLibraryResult ¶
func ContentLibraryResult(ctx context.Context, c *rest.Client, kind string, path string) (finder.FindResult, error)
func NewInt32 ¶
NewInt32 behaves as flag.IntVar, but using an int32 type.
func NewInt64 ¶
NewInt64 behaves as flag.IntVar, but using an int64 type.
func NewOptionalBool ¶
NewOptionalBool returns a flag.Value implementation where there is no default value. This avoids sending a default value over the wire as using flag.BoolVar() would.
func NewOptionalInt32 ¶
func NewOptionalInt64 ¶
func NewOptionalString ¶
NewOptionalString returns a flag.Value implementation where there is no default value. This avoids sending a default value over the wire as using flag.StringVar() would.
func ParseVersion ¶
Types ¶
type ClientFlag ¶
type ClientFlag struct { *DebugFlag Session cache.Session // contains filtered or unexported fields }
func NewClientFlag ¶
func NewClientFlag(ctx context.Context) (*ClientFlag, context.Context)
func (*ClientFlag) Client ¶
func (flag *ClientFlag) Client() (*vim25.Client, error)
func (*ClientFlag) CnsClient ¶
func (flag *ClientFlag) CnsClient() (*cns.Client, error)
func (*ClientFlag) ConfigureTLS ¶
func (flag *ClientFlag) ConfigureTLS(sc *soap.Client) error
func (*ClientFlag) Environ ¶
func (flag *ClientFlag) Environ(extra bool) []string
Environ returns the govc environment variables for this connection
func (*ClientFlag) KeepAlive ¶
func (flag *ClientFlag) KeepAlive(client cache.Client)
func (*ClientFlag) Logout ¶
func (flag *ClientFlag) Logout(ctx context.Context) error
func (*ClientFlag) PbmClient ¶
func (flag *ClientFlag) PbmClient() (*pbm.Client, error)
func (*ClientFlag) Process ¶
func (flag *ClientFlag) Process(ctx context.Context) error
func (*ClientFlag) ProcessOnce ¶
func (*ClientFlag) Register ¶
func (flag *ClientFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*ClientFlag) RegisterOnce ¶
func (c *ClientFlag) RegisterOnce(fn func())
func (*ClientFlag) RestClient ¶
func (flag *ClientFlag) RestClient() (*rest.Client, error)
func (*ClientFlag) RoundTripper ¶
func (flag *ClientFlag) RoundTripper(c *soap.Client) soap.RoundTripper
func (*ClientFlag) Set ¶
func (flag *ClientFlag) Set(s string) error
func (*ClientFlag) SetRootCAs ¶
func (flag *ClientFlag) SetRootCAs(c *soap.Client) error
func (*ClientFlag) String ¶
func (flag *ClientFlag) String() string
func (*ClientFlag) WithCancel ¶
WithCancel calls the given function, returning when complete or canceled via SIGINT.
type ClusterFlag ¶
type ClusterFlag struct { *DatacenterFlag Name string // contains filtered or unexported fields }
func NewClusterFlag ¶
func NewClusterFlag(ctx context.Context) (*ClusterFlag, context.Context)
func (*ClusterFlag) Cluster ¶
func (f *ClusterFlag) Cluster() (*object.ClusterComputeResource, error)
func (*ClusterFlag) ClusterIfSpecified ¶
func (f *ClusterFlag) ClusterIfSpecified() (*object.ClusterComputeResource, error)
func (*ClusterFlag) Names ¶
func (f *ClusterFlag) Names(ctx context.Context, refs []types.ManagedObjectReference) (map[types.ManagedObjectReference]string, error)
func (*ClusterFlag) ObjectList ¶
func (f *ClusterFlag) ObjectList(ctx context.Context, kind string, names []string) ([]types.ManagedObjectReference, error)
func (*ClusterFlag) Process ¶
func (f *ClusterFlag) Process(ctx context.Context) error
func (*ClusterFlag) ProcessOnce ¶
func (*ClusterFlag) Reconfigure ¶
func (f *ClusterFlag) Reconfigure(ctx context.Context, spec types.BaseComputeResourceConfigSpec) error
func (*ClusterFlag) Register ¶
func (f *ClusterFlag) Register(ctx context.Context, fs *flag.FlagSet)
func (*ClusterFlag) RegisterOnce ¶
func (c *ClusterFlag) RegisterOnce(fn func())
func (*ClusterFlag) RegisterPlacement ¶
func (f *ClusterFlag) RegisterPlacement(ctx context.Context, fs *flag.FlagSet)
RegisterPlacement registers the -cluster flag without using GOVC_CLUSTER env as the default value, usage is specific to VM placement.
type DatacenterFlag ¶
type DatacenterFlag struct { *ClientFlag *OutputFlag Name string // contains filtered or unexported fields }
func NewDatacenterFlag ¶
func NewDatacenterFlag(ctx context.Context) (*DatacenterFlag, context.Context)
func (*DatacenterFlag) Datacenter ¶
func (flag *DatacenterFlag) Datacenter() (*object.Datacenter, error)
func (*DatacenterFlag) DatacenterIfSpecified ¶
func (flag *DatacenterFlag) DatacenterIfSpecified() (*object.Datacenter, error)
func (*DatacenterFlag) Finder ¶
func (flag *DatacenterFlag) Finder(all ...bool) (*find.Finder, error)
func (*DatacenterFlag) ManagedObject ¶
func (flag *DatacenterFlag) ManagedObject(ctx context.Context, arg string) (types.ManagedObjectReference, error)
func (*DatacenterFlag) ManagedObjects ¶
func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, error)
func (*DatacenterFlag) Process ¶
func (flag *DatacenterFlag) Process(ctx context.Context) error
func (*DatacenterFlag) ProcessOnce ¶
func (*DatacenterFlag) Register ¶
func (flag *DatacenterFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*DatacenterFlag) RegisterOnce ¶
func (c *DatacenterFlag) RegisterOnce(fn func())
type DatastoreFlag ¶
type DatastoreFlag struct { *DatacenterFlag Name string // contains filtered or unexported fields }
func NewCustomDatastoreFlag ¶
func NewCustomDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context)
NewCustomDatastoreFlag creates and returns a new DatastoreFlag without trying to retrieve an existing one from the specified context.
func NewDatastoreFlag ¶
func NewDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context)
func (*DatastoreFlag) Args ¶
func (f *DatastoreFlag) Args(args []string) []object.DatastorePath
func (*DatastoreFlag) Datastore ¶
func (f *DatastoreFlag) Datastore() (*object.Datastore, error)
func (*DatastoreFlag) DatastoreIfSpecified ¶
func (flag *DatastoreFlag) DatastoreIfSpecified() (*object.Datastore, error)
func (*DatastoreFlag) DatastorePath ¶
func (f *DatastoreFlag) DatastorePath(name string) (string, error)
func (*DatastoreFlag) FileBacking ¶
FileBacking converts the given file path for use as VirtualDeviceFileBackingInfo.FileName.
func (*DatastoreFlag) IsSet ¶
func (flag *DatastoreFlag) IsSet() bool
func (*DatastoreFlag) Process ¶
func (f *DatastoreFlag) Process(ctx context.Context) error
func (*DatastoreFlag) ProcessOnce ¶
func (*DatastoreFlag) Register ¶
func (f *DatastoreFlag) Register(ctx context.Context, fs *flag.FlagSet)
func (*DatastoreFlag) RegisterOnce ¶
func (c *DatastoreFlag) RegisterOnce(fn func())
func (*DatastoreFlag) Stat ¶
func (f *DatastoreFlag) Stat(ctx context.Context, file string) (types.BaseFileInfo, error)
type DebugFlag ¶
type DebugFlag struct {
// contains filtered or unexported fields
}
func NewDebugFlag ¶
func (*DebugFlag) Process ¶
func (*DebugFlag) ProcessOnce ¶
func (*DebugFlag) Register ¶
func (*DebugFlag) RegisterOnce ¶
func (c *DebugFlag) RegisterOnce(fn func())
func (*DebugFlag) Verbose ¶
type EmptyFlag ¶
type EmptyFlag struct{}
func (*EmptyFlag) Process ¶
func (*EmptyFlag) Register ¶
type EnvBrowser ¶
type EnvBrowser struct { *ClusterFlag *HostSystemFlag *VirtualMachineFlag }
func (*EnvBrowser) Browser ¶
func (cmd *EnvBrowser) Browser(ctx context.Context) (*object.EnvironmentBrowser, error)
func (*EnvBrowser) Process ¶
func (cmd *EnvBrowser) Process(ctx context.Context) error
func (*EnvBrowser) Register ¶
func (cmd *EnvBrowser) Register(ctx context.Context, f *flag.FlagSet)
type FolderFlag ¶
type FolderFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewFolderFlag ¶
func NewFolderFlag(ctx context.Context) (*FolderFlag, context.Context)
func (*FolderFlag) Folder ¶
func (flag *FolderFlag) Folder() (*object.Folder, error)
func (*FolderFlag) FolderIfSpecified ¶
func (flag *FolderFlag) FolderIfSpecified() (*object.Folder, error)
func (*FolderFlag) FolderOrDefault ¶
func (flag *FolderFlag) FolderOrDefault(kind string) (*object.Folder, error)
func (*FolderFlag) IsSet ¶
func (flag *FolderFlag) IsSet() bool
func (*FolderFlag) Process ¶
func (flag *FolderFlag) Process(ctx context.Context) error
func (*FolderFlag) ProcessOnce ¶
func (*FolderFlag) Register ¶
func (flag *FolderFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*FolderFlag) RegisterOnce ¶
func (c *FolderFlag) RegisterOnce(fn func())
type HostConnectFlag ¶
type HostConnectFlag struct { types.HostConnectSpec // contains filtered or unexported fields }
func NewHostConnectFlag ¶
func NewHostConnectFlag(ctx context.Context) (*HostConnectFlag, context.Context)
func (*HostConnectFlag) Fault ¶
func (flag *HostConnectFlag) Fault(err error) error
Fault checks if error is SSLVerifyFault, including the thumbprint if so
func (*HostConnectFlag) Process ¶
func (flag *HostConnectFlag) Process(ctx context.Context) error
func (*HostConnectFlag) ProcessOnce ¶
func (*HostConnectFlag) Register ¶
func (flag *HostConnectFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*HostConnectFlag) RegisterOnce ¶
func (c *HostConnectFlag) RegisterOnce(fn func())
func (*HostConnectFlag) Spec ¶
func (flag *HostConnectFlag) Spec(c *vim25.Client) types.HostConnectSpec
Spec attempts to fill in SslThumbprint if empty. First checks GOVC_TLS_KNOWN_HOSTS, if not found and noverify=true then use object.HostCertificateInfo to get the thumbprint.
type HostSystemFlag ¶
type HostSystemFlag struct { *ClientFlag *DatacenterFlag *SearchFlag // contains filtered or unexported fields }
func NewHostSystemFlag ¶
func NewHostSystemFlag(ctx context.Context) (*HostSystemFlag, context.Context)
func (*HostSystemFlag) HostNetworkSystem ¶
func (flag *HostSystemFlag) HostNetworkSystem() (*object.HostNetworkSystem, error)
func (*HostSystemFlag) HostSystem ¶
func (flag *HostSystemFlag) HostSystem() (*object.HostSystem, error)
func (*HostSystemFlag) HostSystemIfSpecified ¶
func (flag *HostSystemFlag) HostSystemIfSpecified() (*object.HostSystem, error)
func (*HostSystemFlag) Process ¶
func (flag *HostSystemFlag) Process(ctx context.Context) error
func (*HostSystemFlag) ProcessOnce ¶
func (*HostSystemFlag) Register ¶
func (flag *HostSystemFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*HostSystemFlag) RegisterOnce ¶
func (c *HostSystemFlag) RegisterOnce(fn func())
type NetworkFlag ¶
type NetworkFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewNetworkFlag ¶
func NewNetworkFlag(ctx context.Context) (*NetworkFlag, context.Context)
func (*NetworkFlag) Change ¶
func (flag *NetworkFlag) Change(device types.BaseVirtualDevice, update types.BaseVirtualDevice)
Change applies update backing and hardware address changes to the given network device.
func (*NetworkFlag) Device ¶
func (flag *NetworkFlag) Device() (types.BaseVirtualDevice, error)
func (*NetworkFlag) IsSet ¶
func (flag *NetworkFlag) IsSet() bool
func (*NetworkFlag) Network ¶
func (flag *NetworkFlag) Network() (object.NetworkReference, error)
func (*NetworkFlag) Process ¶
func (flag *NetworkFlag) Process(ctx context.Context) error
func (*NetworkFlag) ProcessOnce ¶
func (*NetworkFlag) Register ¶
func (flag *NetworkFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*NetworkFlag) RegisterOnce ¶
func (c *NetworkFlag) RegisterOnce(fn func())
func (*NetworkFlag) Set ¶
func (flag *NetworkFlag) Set(name string) error
func (*NetworkFlag) String ¶
func (flag *NetworkFlag) String() string
type OutputFlag ¶
type OutputFlag struct { JSON bool XML bool TTY bool Dump bool Out io.Writer Spec bool // contains filtered or unexported fields }
func NewOutputFlag ¶
func NewOutputFlag(ctx context.Context) (*OutputFlag, context.Context)
func (*OutputFlag) All ¶
func (flag *OutputFlag) All() bool
func (*OutputFlag) Log ¶
func (flag *OutputFlag) Log(s string) (int, error)
Log outputs the specified string, prefixed with the current time. A newline is not automatically added. If the specified string starts with a '\r', the current line is cleared first.
func (*OutputFlag) Process ¶
func (flag *OutputFlag) Process(ctx context.Context) error
func (*OutputFlag) ProcessOnce ¶
func (*OutputFlag) ProgressLogger ¶
func (flag *OutputFlag) ProgressLogger(prefix string) *progress.ProgressLogger
func (*OutputFlag) Register ¶
func (flag *OutputFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*OutputFlag) RegisterOnce ¶
func (c *OutputFlag) RegisterOnce(fn func())
func (*OutputFlag) Write ¶
func (flag *OutputFlag) Write(b []byte) (int, error)
func (*OutputFlag) WriteAny ¶
func (flag *OutputFlag) WriteAny(val any) error
func (*OutputFlag) WriteError ¶
func (flag *OutputFlag) WriteError(err error) bool
func (*OutputFlag) WriteResult ¶
func (flag *OutputFlag) WriteResult(result OutputWriter) error
func (*OutputFlag) WriteString ¶
func (flag *OutputFlag) WriteString(s string) (int, error)
type OutputWriter ¶
type ResourceAllocationFlag ¶
type ResourceAllocationFlag struct { ExpandableReservation bool // contains filtered or unexported fields }
func NewResourceAllocationFlag ¶
func NewResourceAllocationFlag(cpu, mem *types.ResourceAllocationInfo) *ResourceAllocationFlag
func (*ResourceAllocationFlag) Process ¶
func (s *ResourceAllocationFlag) Process(ctx context.Context) error
func (*ResourceAllocationFlag) Register ¶
func (r *ResourceAllocationFlag) Register(ctx context.Context, f *flag.FlagSet)
type ResourcePoolFlag ¶
type ResourcePoolFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewResourcePoolFlag ¶
func NewResourcePoolFlag(ctx context.Context) (*ResourcePoolFlag, context.Context)
func (*ResourcePoolFlag) IsSet ¶
func (flag *ResourcePoolFlag) IsSet() bool
func (*ResourcePoolFlag) Process ¶
func (flag *ResourcePoolFlag) Process(ctx context.Context) error
func (*ResourcePoolFlag) ProcessOnce ¶
func (*ResourcePoolFlag) Register ¶
func (flag *ResourcePoolFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*ResourcePoolFlag) RegisterOnce ¶
func (c *ResourcePoolFlag) RegisterOnce(fn func())
func (*ResourcePoolFlag) ResourcePool ¶
func (flag *ResourcePoolFlag) ResourcePool() (*object.ResourcePool, error)
func (*ResourcePoolFlag) ResourcePoolIfSpecified ¶
func (flag *ResourcePoolFlag) ResourcePoolIfSpecified() (*object.ResourcePool, error)
type SearchFlag ¶
type SearchFlag struct { *ClientFlag *DatacenterFlag // contains filtered or unexported fields }
func NewSearchFlag ¶
func (*SearchFlag) HostSystem ¶
func (flag *SearchFlag) HostSystem() (*object.HostSystem, error)
func (*SearchFlag) HostSystems ¶
func (flag *SearchFlag) HostSystems(args []string) ([]*object.HostSystem, error)
func (*SearchFlag) IsSet ¶
func (flag *SearchFlag) IsSet() bool
func (*SearchFlag) Process ¶
func (flag *SearchFlag) Process(ctx context.Context) error
func (*SearchFlag) ProcessOnce ¶
func (*SearchFlag) Register ¶
func (flag *SearchFlag) Register(ctx context.Context, fs *flag.FlagSet)
func (*SearchFlag) RegisterOnce ¶
func (c *SearchFlag) RegisterOnce(fn func())
func (*SearchFlag) VirtualApp ¶
func (flag *SearchFlag) VirtualApp() (*object.VirtualApp, error)
func (*SearchFlag) VirtualApps ¶
func (flag *SearchFlag) VirtualApps(args []string) ([]*object.VirtualApp, error)
func (*SearchFlag) VirtualMachine ¶
func (flag *SearchFlag) VirtualMachine() (*object.VirtualMachine, error)
func (*SearchFlag) VirtualMachines ¶
func (flag *SearchFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error)
type StoragePodFlag ¶
type StoragePodFlag struct { *DatacenterFlag Name string // contains filtered or unexported fields }
func NewStoragePodFlag ¶
func NewStoragePodFlag(ctx context.Context) (*StoragePodFlag, context.Context)
func (*StoragePodFlag) Isset ¶
func (f *StoragePodFlag) Isset() bool
func (*StoragePodFlag) Process ¶
func (f *StoragePodFlag) Process(ctx context.Context) error
func (*StoragePodFlag) ProcessOnce ¶
func (*StoragePodFlag) Register ¶
func (f *StoragePodFlag) Register(ctx context.Context, fs *flag.FlagSet)
func (*StoragePodFlag) RegisterOnce ¶
func (c *StoragePodFlag) RegisterOnce(fn func())
func (*StoragePodFlag) StoragePod ¶
func (f *StoragePodFlag) StoragePod() (*object.StoragePod, error)
type StorageProfileFlag ¶
type StorageProfileFlag struct { *ClientFlag Name []string // contains filtered or unexported fields }
func NewStorageProfileFlag ¶
func NewStorageProfileFlag(ctx context.Context, option ...string) (*StorageProfileFlag, context.Context)
func (StorageProfileFlag) ProcessOnce ¶
func (*StorageProfileFlag) Register ¶
func (flag *StorageProfileFlag) Register(ctx context.Context, f *flag.FlagSet)
func (StorageProfileFlag) RegisterOnce ¶
func (c StorageProfileFlag) RegisterOnce(fn func())
func (*StorageProfileFlag) Set ¶
func (e *StorageProfileFlag) Set(value string) error
func (*StorageProfileFlag) StorageProfile ¶
func (flag *StorageProfileFlag) StorageProfile(ctx context.Context) (string, error)
func (*StorageProfileFlag) StorageProfileList ¶
func (flag *StorageProfileFlag) StorageProfileList(ctx context.Context) ([]string, error)
func (*StorageProfileFlag) StorageProfileSpec ¶
func (flag *StorageProfileFlag) StorageProfileSpec(ctx context.Context) ([]types.BaseVirtualMachineProfileSpec, error)
func (*StorageProfileFlag) String ¶
func (e *StorageProfileFlag) String() string
type StringList ¶
type StringList []string
func (*StringList) Set ¶
func (l *StringList) Set(value string) error
func (*StringList) String ¶
func (l *StringList) String() string
type VirtualAppFlag ¶
type VirtualAppFlag struct { *DatacenterFlag *SearchFlag // contains filtered or unexported fields }
func NewVirtualAppFlag ¶
func NewVirtualAppFlag(ctx context.Context) (*VirtualAppFlag, context.Context)
func (*VirtualAppFlag) Process ¶
func (flag *VirtualAppFlag) Process(ctx context.Context) error
func (*VirtualAppFlag) ProcessOnce ¶
func (*VirtualAppFlag) Register ¶
func (flag *VirtualAppFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*VirtualAppFlag) RegisterOnce ¶
func (c *VirtualAppFlag) RegisterOnce(fn func())
func (*VirtualAppFlag) VirtualApp ¶
func (flag *VirtualAppFlag) VirtualApp() (*object.VirtualApp, error)
type VirtualMachineFlag ¶
type VirtualMachineFlag struct { *ClientFlag *DatacenterFlag *SearchFlag // contains filtered or unexported fields }
func NewVirtualMachineFlag ¶
func NewVirtualMachineFlag(ctx context.Context) (*VirtualMachineFlag, context.Context)
func (*VirtualMachineFlag) Process ¶
func (flag *VirtualMachineFlag) Process(ctx context.Context) error
func (*VirtualMachineFlag) ProcessOnce ¶
func (*VirtualMachineFlag) Register ¶
func (flag *VirtualMachineFlag) Register(ctx context.Context, f *flag.FlagSet)
func (*VirtualMachineFlag) RegisterOnce ¶
func (c *VirtualMachineFlag) RegisterOnce(fn func())
func (*VirtualMachineFlag) VirtualMachine ¶
func (flag *VirtualMachineFlag) VirtualMachine() (*object.VirtualMachine, error)
Source Files ¶
client.go cluster.go common.go datacenter.go datastore.go debug.go empty.go env.go folder.go host_connect.go host_system.go int32.go int64.go library.go list.go network.go optional_bool.go optional_string.go output.go resource_allocation_info.go resource_pool.go search.go storage_pod.go storage_profile.go version.go virtual_app.go virtual_machine.go
- Version
- v0.51.0 (latest)
- Published
- May 23, 2025
- Platform
- linux/amd64
- Imports
- 43 packages
- Last checked
- 1 week ago –
Tools for package owners.