Documentation ¶
Overview ¶
Copyright (c) 2015-2016 VMware, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func NewInt32(v *int32) flag.Value
- func NewOptionalBool(v **bool) flag.Value
- func ParseVersion(s string) (version, error)
- type ClientFlag
- func (flag *ClientFlag) Client() (*vim25.Client, error)
- func (flag *ClientFlag) Environ(extra bool) []string
- 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) Set(s string) error
- func (flag *ClientFlag) String() string
- func (flag *ClientFlag) URLWithoutPassword() *url.URL
- type DatacenterFlag
- func (flag *DatacenterFlag) Datacenter() (*object.Datacenter, error)
- func (flag *DatacenterFlag) Finder() (*find.Finder, 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 (f *DatastoreFlag) Datastore() (*object.Datastore, error)
- func (f *DatastoreFlag) DatastorePath(name string) (string, error)
- func (f *DatastoreFlag) DatastoreURL(path string) (*url.URL, error)
- 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
- type EmptyFlag
- type FolderFlag
- type HostConnectFlag
- func (flag *HostConnectFlag) AcceptThumbprint(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())
- type HostSystemFlag
- 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 (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 (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) *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) WriteResult(result OutputWriter) error
- func (flag *OutputFlag) WriteString(s string) (int, error)
- type OutputWriter
- type ResourcePoolFlag
- 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)
- type SearchFlag
- 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 (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 VirtualAppFlag
- 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 (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 ¶
This section is empty.
Functions ¶
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 ParseVersion ¶
Types ¶
type ClientFlag ¶
type ClientFlag struct { *DebugFlag // contains filtered or unexported fields }
func NewClientFlag ¶
func NewClientFlag(ctx context.Context) (*ClientFlag, context.Context)
func (*ClientFlag) Environ ¶
func (flag *ClientFlag) Environ(extra bool) []string
Environ returns the govc environment variables for this connection
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) Set ¶
func (flag *ClientFlag) Set(s string) error
func (*ClientFlag) String ¶
func (flag *ClientFlag) String() string
func (*ClientFlag) URLWithoutPassword ¶
func (flag *ClientFlag) URLWithoutPassword() *url.URL
type DatacenterFlag ¶
type DatacenterFlag struct { *ClientFlag *OutputFlag // 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) ManagedObjects ¶
func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, 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) DatastorePath ¶
func (f *DatastoreFlag) DatastorePath(name string) (string, error)
func (*DatastoreFlag) DatastoreURL ¶
func (f *DatastoreFlag) DatastoreURL(path string) (*url.URL, 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 (*DebugFlag) ProcessOnce ¶
func (*DebugFlag) RegisterOnce ¶
func (c *DebugFlag) RegisterOnce(fn func())
type FolderFlag ¶
type FolderFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewFolderFlag ¶
func NewFolderFlag(ctx context.Context) (*FolderFlag, context.Context)
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) AcceptThumbprint ¶
func (flag *HostConnectFlag) AcceptThumbprint(err error) error
AcceptThumbprint returns nil if the given error is an SSLVerifyFault and -noverify is true. In which case, flag.SslThumbprint is set to fault.Thumbprint and the caller should retry the task.
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())
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) 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) 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) 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 ¶
func NewOutputFlag ¶
func NewOutputFlag(ctx context.Context) (*OutputFlag, context.Context)
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) ProcessOnce ¶
func (*OutputFlag) ProgressLogger ¶
func (flag *OutputFlag) ProgressLogger(prefix string) *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) WriteResult ¶
func (flag *OutputFlag) WriteResult(result OutputWriter) error
func (*OutputFlag) WriteString ¶
func (flag *OutputFlag) WriteString(s string) (int, error)
type OutputWriter ¶
type ResourcePoolFlag ¶
type ResourcePoolFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewResourcePoolFlag ¶
func NewResourcePoolFlag(ctx context.Context) (*ResourcePoolFlag, context.Context)
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)
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) 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) 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 VirtualAppFlag ¶
type VirtualAppFlag struct { *DatacenterFlag *SearchFlag // contains filtered or unexported fields }
func NewVirtualAppFlag ¶
func NewVirtualAppFlag(ctx context.Context) (*VirtualAppFlag, context.Context)
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)