flags

package
v0.0.0-...-f7d25c1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2015 License: Apache-2.0 Imports: 20 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() (*govmomi.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

type DatacenterFlag

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

func (*DatacenterFlag) Datacenter

func (flag *DatacenterFlag) Datacenter() (*govmomi.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() (*govmomi.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() (*govmomi.HostNetworkSystem, error)

func (*HostSystemFlag) HostSystem

func (flag *HostSystemFlag) HostSystem() (*govmomi.HostSystem, error)

func (*HostSystemFlag) HostSystemIfSpecified

func (flag *HostSystemFlag) HostSystemIfSpecified() (*govmomi.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() (govmomi.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() (*govmomi.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() (*govmomi.HostSystem, error)

func (*SearchFlag) HostSystems

func (flag *SearchFlag) HostSystems(args []string) ([]*govmomi.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() (*govmomi.VirtualMachine, error)

func (*SearchFlag) VirtualMachines

func (flag *SearchFlag) VirtualMachines(args []string) ([]*govmomi.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() (*govmomi.VirtualMachine, error)

Jump to

Keyboard shortcuts

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