Documentation ¶
Index ¶
- Constants
- type API
- func (api *API) CreateVM(options *CreateVMOptions) error
- func (api *API) DeleteVM(node string, id int) error
- func (api *API) GetVMStatus(node string, id int) (*VM, error)
- func (api *API) ListNodes() ([]Node, error)
- func (api *API) ListVMsOnNode(node string) ([]VM, error)
- func (api *API) ResetVM(node string, id int) error
- func (api *API) StartVM(node string, id int) error
- func (api *API) StopVM(node string, id int) error
- func (api *API) VNCProxy(node string, id int) error
- type AuthenticateResponse
- type CreateVMOptions
- type NetworkDriver
- type Node
- type OSType
- type VM
Constants ¶
View Source
const ( OtherOS OSType = "other" MSWindowsXP = "wxp" MSWindows2000 = "w2k" MSWindows2003 = "w2k3" MSWindows2008 = "w2k8" MSWindowsVista = "wvista" MSWindows7 = "win7" MSWindows8 = "win8" Linux24 = "l24" Linux26 = "l26" Solaris = "solaris" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { BaseURL string Username string Password string Client *http.Client // contains filtered or unexported fields }
func (*API) CreateVM ¶
func (api *API) CreateVM(options *CreateVMOptions) error
type AuthenticateResponse ¶
type CreateVMOptions ¶
type CreateVMOptions struct { ID int Node string Name string // Number of cores per socket Cores int // Amount of RAM in MB Memory int // Operating system type, to enable special optimization/features for specific OS OSType OSType // ISO identifier, like "local:iso/ubuntu.iso" ISO string // Storage destination, defaults to "local" Storage string // Disk capacity in GB DiskSize int // Network bridge name, if empty then uses default NAT setup NetworkBridge string // Network driver, defaults to e1000 NetworkDriver NetworkDriver }
type NetworkDriver ¶
type NetworkDriver string
const ( E1000 NetworkDriver = "e1000" VirtioNet = "virtio" )
Click to show internal directories.
Click to hide internal directories.