Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultConfig ¶
func GetDefaultConfig() string
func PowerChange ¶
func PowerChange(conf *Config, v *VirtualMachine, state string) error
Types ¶
type Config ¶
type Config struct { GovcURL string `mapstructure:"GOVC_URL"` GovcUsername string `mapstructure:"GOVC_USERNAME"` GovcPassword string `mapstructure:"GOVC_PASSWORD"` GovcInsecure bool `mapstructure:"GOVC_INSECURE"` GovcDataCenter string `mapstructure:"GOVC_DATACENTER"` GovcDataStore string `mapstructure:"GOVC_DATASTORE"` GovcNetwork string `mapstructure:"GOVC_NETWORK"` }
func LoadConfig ¶
type HostSystem ¶
type HostSystem struct { Name string UsedCPU float64 TotalCPU float64 FreeCPU float64 MemUsage units.ByteSize FreeMemory units.ByteSize Storage int32 // contains filtered or unexported fields }
func GethostInfos ¶
func GethostInfos(conf *Config) ([]*HostSystem, error)
type VirtualMachine ¶
type VirtualMachine struct { Name string OS string IP string CPU int32 Mem int32 Hostname string // contains filtered or unexported fields }
func GetVM ¶
func GetVM(conf *Config, name string) (*VirtualMachine, error)
GetVM - Retrieve a VirtualMachine from the given name
func ListVMs ¶
func ListVMs(conf *Config) []*VirtualMachine
func (*VirtualMachine) GetPowerState ¶
func (v *VirtualMachine) GetPowerState() string
func (*VirtualMachine) IsTemplate ¶
func (v *VirtualMachine) IsTemplate() bool
Click to show internal directories.
Click to hide internal directories.