flags

package
v0.1.1-0...-7d2441d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2015 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SearchVirtualMachines = iota + 1
	SearchHosts
)

Variables

View Source
var (
	ErrDatastoreDirNotExist  = errors.New("datastore directory does not exist")
	ErrDatastoreFileNotExist = errors.New("datastore file does not exist")
)

Functions

func ParseVersion

func ParseVersion(s string) (version, error)

Types

type ClientFlag

type ClientFlag struct {
	*DebugFlag
	// contains filtered or unexported fields
}

func (*ClientFlag) Client

func (flag *ClientFlag) Client() (*vim25.Client, error)

func (*ClientFlag) Process

func (flag *ClientFlag) Process() error

func (*ClientFlag) Register

func (flag *ClientFlag) Register(f *flag.FlagSet)

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 (*DatacenterFlag) Datacenter

func (flag *DatacenterFlag) Datacenter() (*object.Datacenter, error)

func (*DatacenterFlag) Finder

func (flag *DatacenterFlag) Finder() (*find.Finder, error)

func (*DatacenterFlag) Process

func (flag *DatacenterFlag) Process() error

func (*DatacenterFlag) Register

func (flag *DatacenterFlag) Register(f *flag.FlagSet)

type DatastoreFlag

type DatastoreFlag struct {
	*DatacenterFlag
	// contains filtered or unexported fields
}

func (*DatastoreFlag) Datastore

func (flag *DatastoreFlag) Datastore() (*object.Datastore, error)

func (*DatastoreFlag) DatastorePath

func (flag *DatastoreFlag) DatastorePath(name string) (string, error)

func (*DatastoreFlag) DatastoreURL

func (flag *DatastoreFlag) DatastoreURL(path string) (*url.URL, error)

func (*DatastoreFlag) Process

func (flag *DatastoreFlag) Process() error

func (*DatastoreFlag) Register

func (flag *DatastoreFlag) Register(f *flag.FlagSet)

func (*DatastoreFlag) Stat

func (flag *DatastoreFlag) Stat(file string) (types.BaseFileInfo, error)

type DebugFlag

type DebugFlag struct {
	// contains filtered or unexported fields
}

func (*DebugFlag) Process

func (flag *DebugFlag) Process() error

func (*DebugFlag) Register

func (flag *DebugFlag) Register(f *flag.FlagSet)

type EmptyFlag

type EmptyFlag struct{}

func (*EmptyFlag) Process

func (flag *EmptyFlag) Process() error

func (*EmptyFlag) Register

func (flag *EmptyFlag) Register(f *flag.FlagSet)

type HostSystemFlag

type HostSystemFlag struct {
	*ClientFlag
	*DatacenterFlag
	*SearchFlag
	// contains filtered or unexported fields
}

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() error

func (*HostSystemFlag) Register

func (flag *HostSystemFlag) Register(f *flag.FlagSet)

type NetworkFlag

type NetworkFlag struct {
	*DatacenterFlag
	// contains filtered or unexported fields
}

func NewNetworkFlag

func NewNetworkFlag() *NetworkFlag

func (*NetworkFlag) Device

func (flag *NetworkFlag) Device() (types.BaseVirtualDevice, error)

func (*NetworkFlag) Network

func (flag *NetworkFlag) Network() (object.NetworkReference, error)

func (*NetworkFlag) Process

func (flag *NetworkFlag) Process() error

func (*NetworkFlag) Register

func (flag *NetworkFlag) Register(f *flag.FlagSet)

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
	TTY  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() error

func (*OutputFlag) ProgressLogger

func (flag *OutputFlag) ProgressLogger(prefix string) *progressLogger

func (*OutputFlag) Register

func (flag *OutputFlag) Register(f *flag.FlagSet)

func (*OutputFlag) Write

func (flag *OutputFlag) Write(b []byte) (int, error)

func (*OutputFlag) WriteResult

func (flag *OutputFlag) WriteResult(result OutputWriter) error

func (*OutputFlag) WriteString

func (flag *OutputFlag) WriteString(s string) (int, error)

type OutputWriter

type OutputWriter interface {
	Write(io.Writer) error
}

type ResourcePoolFlag

type ResourcePoolFlag struct {
	*DatacenterFlag
	// contains filtered or unexported fields
}

func (*ResourcePoolFlag) Process

func (flag *ResourcePoolFlag) Process() error

func (*ResourcePoolFlag) Register

func (flag *ResourcePoolFlag) Register(f *flag.FlagSet)

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 NewSearchFlag(t int) *SearchFlag

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() error

func (*SearchFlag) Register

func (flag *SearchFlag) Register(fs *flag.FlagSet)

func (*SearchFlag) VirtualMachine

func (flag *SearchFlag) VirtualMachine() (*object.VirtualMachine, error)

func (*SearchFlag) VirtualMachines

func (flag *SearchFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error)

type VirtualMachineFlag

type VirtualMachineFlag struct {
	*ClientFlag
	*DatacenterFlag
	*SearchFlag
	// contains filtered or unexported fields
}

func (*VirtualMachineFlag) Process

func (flag *VirtualMachineFlag) Process() error

func (*VirtualMachineFlag) Register

func (flag *VirtualMachineFlag) Register(f *flag.FlagSet)

func (*VirtualMachineFlag) VirtualMachine

func (flag *VirtualMachineFlag) VirtualMachine() (*object.VirtualMachine, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL