Versions in this module Expand all Collapse all v1 v1.0.1 Jan 9, 2023 Changes in this version + const TaskStatusCheckInterval + var Debug = new(bool) + func AddToList(list, newItem string) string + func ArrayToCSV(array interface{}) (csv string) + func ArrayToStringType(inputarray []interface{}) (array []string) + func BoolInvert(b bool) bool + func CSVtoArray(csv string) []string + func DeleteSnapshot(c *Client, vmr *VmRef, snapshot string) (exitStatus string, err error) + func DiskSizeGB(dcSize interface{}) float64 + func ErrorItemExists(item, text string) error + func ErrorItemNotExists(item, text string) error + func ErrorKeyEmpty(text string) error + func ErrorKeyNotSet(text string) error + func FormatDiskParam(disk QemuDevice) string + func FormatUsbParam(usb QemuDevice) string + func ItemInKeyOfArray(array []interface{}, key, value string) (existance bool) + func Itob(i int) bool + func ListSnapshots(c *Client, vmr *VmRef) (taskResponse []interface{}, err error) + func MaxVmId(client *Client) (max int, err error) + func ParamsToBody(params map[string]interface{}) (body []byte) + func ParamsToBodyWithAllEmpty(params map[string]interface{}) (body []byte) + func ParamsToBodyWithEmpty(params map[string]interface{}, allowedEmpty []string) (body []byte) + func ParamsToValues(params map[string]interface{}) (vals url.Values) + func ParamsToValuesWithAllEmpty(params map[string]interface{}, allowedEmpty []string, allowEmpty bool) (vals url.Values) + func ParamsToValuesWithEmpty(params map[string]interface{}, allowedEmpty []string) (vals url.Values) + func ParseSubConf(element string, separator string) (key string, value interface{}) + func PointerBool(boolean bool) *bool + func PointerInt(number int) *int + func PointerString(text string) *string + func RemoveSshForwardUsernet(vmr *VmRef, client *Client) (err error) + func ResponseJSON(resp *http.Response) (jbody map[string]interface{}, err error) + func RollbackSnapshot(c *Client, vmr *VmRef, snapshot string) (exitStatus string, err error) + func SendKeysString(vmr *VmRef, client *Client, keys string) (err error) + func SshForwardUsernet(vmr *VmRef, client *Client) (sshPort string, err error) + func TypedResponse(resp *http.Response, v interface{}) error + func UpdateSnapshotDescription(c *Client, vmr *VmRef, snapshot, description string) (err error) + func ValidateArrayEven(array interface{}, text string) error + func ValidateArrayNotEmpty(array interface{}, text string) error + func ValidateFilePath(path, text string) error + func ValidateIntGreater(min, value int, text string) error + func ValidateIntGreaterOrEquals(min, value int, text string) error + func ValidateIntInRange(min, max, value int, text string) error + func ValidateStringInArray(array []string, value, text string) error + func ValidateStringNotEmpty(value, text string) error + func ValidateStringsEqual(value1, value2, text string) error + func ValidateUserPassword(password string) error + func WaitForShutdown(vmr *VmRef, client *Client) (err error) + type AgentNetworkInterface struct + IPAddresses []net.IP + MACAddress string + Name string + Statistics map[string]int64 + func (a *AgentNetworkInterface) UnmarshalJSON(b []byte) error + type Client struct + ApiUrl string + Otp string + Password string + TaskTimeout int + Username string + func NewClient(apiUrl string, hclient *http.Client, http_headers string, tls *tls.Config, ...) (client *Client, err error) + func (c *Client) AddQemuIPSet(vmr *VmRef, name string, params map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) CheckAcmePluginExistance(id string) (existance bool, err error) + func (c *Client) CheckMetricServerExistance(id string) (existance bool, err error) + func (c *Client) CheckStorageExistance(id string) (existance bool, err error) + func (c *Client) CheckTask(resp *http.Response) (exitStatus string, err error) + func (c *Client) CheckUserExistance(id string) (existance bool, err error) + func (c *Client) CheckVmRef(vmr *VmRef) (err error) + func (c *Client) CloneLxcContainer(vmr *VmRef, vmParams map[string]interface{}) (exitStatus string, err error) + func (c *Client) CloneQemuVm(vmr *VmRef, vmParams map[string]interface{}) (exitStatus string, err error) + func (c *Client) CreateAcmeAccount(params map[string]interface{}) (exitStatus string, err error) + func (c *Client) CreateAcmePlugin(params map[string]interface{}) error + func (c *Client) CreateItemReturnStatus(params map[string]interface{}, url string) (exitStatus string, err error) + func (c *Client) CreateLxcContainer(node string, vmParams map[string]interface{}) (exitStatus string, err error) + func (c *Client) CreateMetricServer(id string, params map[string]interface{}) error + func (c *Client) CreateNetwork(node string, params map[string]interface{}) (exitStatus string, err error) + func (c *Client) CreateNewDisk(vmr *VmRef, disk string, volume string) (exitStatus interface{}, err error) + func (c *Client) CreatePool(poolid string, comment string) error + func (c *Client) CreateQemuIPSet(vmr *VmRef, params map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) CreateQemuSnapshot(vmr *VmRef, snapshotName string) (exitStatus string, err error) + func (c *Client) CreateQemuVm(node string, vmParams map[string]interface{}) (exitStatus string, err error) + func (c *Client) CreateStorage(params map[string]interface{}) error + func (c *Client) CreateTemplate(vmr *VmRef) error + func (c *Client) CreateUser(params map[string]interface{}) (err error) + func (c *Client) CreateVMDisk(nodeName string, storageName string, fullDiskName string, ...) error + func (c *Client) CreateVNCProxy(vmr *VmRef, params map[string]interface{}) (vncProxyRes map[string]interface{}, err error) + func (c *Client) Delete(url string) (err error) + func (c *Client) DeleteAcmeAccount(id string) (exitStatus string, err error) + func (c *Client) DeleteAcmePlugin(id string) (err error) + func (c *Client) DeleteMetricServer(id string) error + func (c *Client) DeleteNetwork(node string, iface string) (exitStatus string, err error) + func (c *Client) DeletePool(poolid string) error + func (c *Client) DeleteQemuIPSet(vmr *VmRef, IPSetName string) (exitStatus interface{}, err error) + func (c *Client) DeleteQemuIPSetNetwork(vmr *VmRef, IPSetName string, network string, params map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) DeleteQemuSnapshot(vmr *VmRef, snapshotName string) (exitStatus string, err error) + func (c *Client) DeleteStorage(id string) error + func (c *Client) DeleteUser(id string) (err error) + func (c *Client) DeleteVMDisks(node string, disks []string) error + func (c *Client) DeleteVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) DeleteVmParams(vmr *VmRef, params map[string]interface{}) (exitStatus string, err error) + func (c *Client) DeleteVolume(vmr *VmRef, storageName string, volumeName string) (exitStatus interface{}, err error) + func (c *Client) DeleteWithTask(url string) (exitStatus string, err error) + func (c *Client) EnableStorage(id string) error + func (c *Client) GetAcmeAccountConfig(id string) (config map[string]interface{}, err error) + func (c *Client) GetAcmeAccountList() (accounts map[string]interface{}, err error) + func (c *Client) GetAcmeDirectoriesUrl() (url []string, err error) + func (c *Client) GetAcmePluginConfig(id string) (config map[string]interface{}, err error) + func (c *Client) GetAcmePluginList() (accounts map[string]interface{}, err error) + func (c *Client) GetAcmeTosUrl() (url string, err error) + func (c *Client) GetExecStatus(vmr *VmRef, pid string) (status map[string]interface{}, err error) + func (c *Client) GetItemConfig(url, text, message string) (config map[string]interface{}, err error) + func (c *Client) GetItemConfigInterfaceArray(url, text, message string) ([]interface{}, error) + func (c *Client) GetItemConfigMapStringInterface(url, text, message string) (map[string]interface{}, error) + func (c *Client) GetItemConfigString(url, text, message string) (string, error) + func (c *Client) GetItemList(url string) (list map[string]interface{}, err error) + func (c *Client) GetJsonRetryable(url string, data *map[string]interface{}, tries int) error + func (c *Client) GetMetricServerConfig(id string) (config map[string]interface{}, err error) + func (c *Client) GetMetricsServerList() (metricServers map[string]interface{}, err error) + func (c *Client) GetNetworkInterface(node string, iface string) (exitStatus string, err error) + func (c *Client) GetNetworkList(node string, typeFilter string) (exitStatus string, err error) + func (c *Client) GetNextID(currentID int) (nextID int, err error) + func (c *Client) GetNodeList() (list map[string]interface{}, err error) + func (c *Client) GetPoolInfo(poolid string) (poolInfo map[string]interface{}, err error) + func (c *Client) GetPoolList() (pools map[string]interface{}, err error) + func (c *Client) GetQemuFirewallOptions(vmr *VmRef) (firewallOptions map[string]interface{}, err error) + func (c *Client) GetQemuIPSet(vmr *VmRef) (ipsets map[string]interface{}, err error) + func (c *Client) GetResourceList(resourceType string) (list map[string]interface{}, err error) + func (c *Client) GetStorageConfig(id string) (config map[string]interface{}, err error) + func (c *Client) GetStorageContent(vmr *VmRef, storageName string) (data map[string]interface{}, err error) + func (c *Client) GetStorageList() (metricServers map[string]interface{}, err error) + func (c *Client) GetStorageStatus(vmr *VmRef, storageName string) (storageStatus map[string]interface{}, err error) + func (c *Client) GetTaskExitstatus(taskUpid string) (exitStatus interface{}, err error) + func (c *Client) GetUserConfig(id string) (config map[string]interface{}, err error) + func (c *Client) GetUserList() (users map[string]interface{}, err error) + func (c *Client) GetUserPermissions(id string, path string) (permissions []string, err error) + func (c *Client) GetVersion() (data map[string]interface{}, err error) + func (c *Client) GetVmAgentNetworkInterfaces(vmr *VmRef) ([]AgentNetworkInterface, error) + func (c *Client) GetVmConfig(vmr *VmRef) (vmConfig map[string]interface{}, err error) + func (c *Client) GetVmInfo(vmr *VmRef) (vmInfo map[string]interface{}, err error) + func (c *Client) GetVmList() (list map[string]interface{}, err error) + func (c *Client) GetVmRefByName(vmName string) (vmr *VmRef, err error) + func (c *Client) GetVmRefsByName(vmName string) (vmrs []*VmRef, err error) + func (c *Client) GetVmSpiceProxy(vmr *VmRef) (vmSpiceProxy map[string]interface{}, err error) + func (c *Client) GetVmState(vmr *VmRef) (vmState map[string]interface{}, err error) + func (c *Client) HandleTaskError(resp *http.Response) (exitStatus string) + func (c *Client) HibernateVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) ListQemuSnapshot(vmr *VmRef) (taskResponse map[string]interface{}, exitStatus string, err error) + func (c *Client) Login(username string, password string, otp string) (err error) + func (c *Client) MigrateNode(vmr *VmRef, newTargetNode string, online bool) (exitStatus interface{}, err error) + func (c *Client) MonitorCmd(vmr *VmRef, command string) (monitorRes map[string]interface{}, err error) + func (c *Client) MoveLxcDisk(vmr *VmRef, disk string, storage string) (exitStatus interface{}, err error) + func (c *Client) MoveQemuDisk(vmr *VmRef, disk string, storage string) (exitStatus interface{}, err error) + func (c *Client) MoveQemuDiskToVM(vmrSource *VmRef, disk string, vmrTarget *VmRef) (exitStatus interface{}, err error) + func (c *Client) PauseVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) Post(Params map[string]interface{}, url string) (err error) + func (c *Client) PostWithTask(Params map[string]interface{}, url string) (exitStatus string, err error) + func (c *Client) Put(Params map[string]interface{}, url string) (err error) + func (c *Client) PutWithTask(Params map[string]interface{}, url string) (exitStatus string, err error) + func (c *Client) QemuAgentExec(vmr *VmRef, params map[string]interface{}) (result map[string]interface{}, err error) + func (c *Client) QemuAgentFileWrite(vmr *VmRef, params map[string]interface{}) (err error) + func (c *Client) QemuAgentPing(vmr *VmRef) (pingRes map[string]interface{}, err error) + func (c *Client) QemuAgentSetUserPassword(vmr *VmRef, params map[string]interface{}) (result map[string]interface{}, err error) + func (c *Client) ReadVMHA(vmr *VmRef) (err error) + func (c *Client) RebootNode(node string) (exitStatus string, err error) + func (c *Client) ResetVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) ResizeQemuDisk(vmr *VmRef, disk string, moreSizeGB int) (exitStatus interface{}, err error) + func (c *Client) ResizeQemuDiskRaw(vmr *VmRef, disk string, size string) (exitStatus interface{}, err error) + func (c *Client) ResumeVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) RevertNetwork(node string) (exitStatus string, err error) + func (c *Client) RollbackQemuVm(vmr *VmRef, snapshot string) (exitStatus string, err error) + func (c *Client) Sendkey(vmr *VmRef, qmKey string) error + func (c *Client) SetAPIToken(userID, token string) + func (c *Client) SetLxcConfig(vmr *VmRef, vmParams map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) SetQemuFirewallOptions(vmr *VmRef, fwOptions map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) SetVmConfig(vmr *VmRef, params map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) ShutdownNode(node string) (exitStatus string, err error) + func (c *Client) ShutdownVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) StartVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) StatusChangeVm(vmr *VmRef, params map[string]interface{}, setStatus string) (exitStatus string, err error) + func (c *Client) StopVm(vmr *VmRef) (exitStatus string, err error) + func (c *Client) UpdateAcmeAccountEmails(id, emails string) (exitStatus string, err error) + func (c *Client) UpdateAcmePlugin(id string, params map[string]interface{}) error + func (c *Client) UpdateItemReturnStatus(params map[string]interface{}, url string) (exitStatus string, err error) + func (c *Client) UpdateMetricServer(id string, params map[string]interface{}) error + func (c *Client) UpdateNetwork(node string, iface string, params map[string]interface{}) (exitStatus string, err error) + func (c *Client) UpdatePoolComment(poolid string, comment string) error + func (c *Client) UpdateStorage(id string, params map[string]interface{}) error + func (c *Client) UpdateUser(id string, params map[string]interface{}) error + func (c *Client) UpdateUserPassword(userid string, password string) error + func (c *Client) UpdateVMHA(vmr *VmRef, haState string, haGroup string) (exitStatus interface{}, err error) + func (c *Client) UpdateVMPool(vmr *VmRef, pool string) (exitStatus interface{}, err error) + func (c *Client) Upload(node string, storage string, contentType string, filename string, ...) error + func (c *Client) VMIdExists(vmID int) (exists bool, err error) + func (c *Client) VzDump(vmr *VmRef, params map[string]interface{}) (exitStatus interface{}, err error) + func (c *Client) WaitForCompletion(taskResponse map[string]interface{}) (waitExitStatus string, err error) + func (c Client) ApplyNetwork(node string) (exitStatus string, err error) + type ConfigAcmeAccount struct + Contact []string + Directory string + Name string + Tos bool + func NewConfigAcmeAccountFromApi(id string, client *Client) (config *ConfigAcmeAccount, err error) + func NewConfigAcmeAccountFromJson(input []byte) (config *ConfigAcmeAccount, err error) + func (config ConfigAcmeAccount) CreateAcmeAccount(acmeid string, client *Client) (err error) + type ConfigAcmePlugin struct + API string + Data string + Enable bool + ID string + Nodes []string + ValidationDelay int + func NewConfigAcmePluginFromApi(id string, client *Client) (config *ConfigAcmePlugin, err error) + func NewConfigAcmePluginFromJson(input []byte) (config *ConfigAcmePlugin, err error) + func (config ConfigAcmePlugin) CreateAcmePlugin(client *Client) (err error) + func (config ConfigAcmePlugin) MapAcmePluginValues() (params map[string]interface{}) + func (config ConfigAcmePlugin) SetAcmePlugin(pluginid string, client *Client) (err error) + func (config ConfigAcmePlugin) UpdateAcmePlugin(client *Client) (err error) + type ConfigLxc struct + Arch string + BWLimit int + CMode string + CPULimit int + CPUUnits int + Clone string + CloneStorage string + Console bool + Cores int + Description string + Features QemuDevice + Force bool + Full bool + HaGroup string + HaState string + Hookscript string + Hostname string + IgnoreUnpackErrors bool + Lock string + Memory int + Mountpoints QemuDevices + Nameserver string + Networks QemuDevices + OnBoot bool + OsType string + Ostemplate string + Password string + Pool string + Protection bool + Restore bool + RootFs QemuDevice + SSHPublicKeys string + SearchDomain string + Snapname string + Start bool + Startup string + Storage string + Swap int + Tags string + Template bool + Tty int + Unique bool + Unprivileged bool + Unused []string + func NewConfigLxc() ConfigLxc + func NewConfigLxcFromApi(vmr *VmRef, client *Client) (config *ConfigLxc, err error) + func NewConfigLxcFromJson(input []byte) (config ConfigLxc, err error) + func (config ConfigLxc) CloneLxc(vmr *VmRef, client *Client) (err error) + func (config ConfigLxc) CreateLxc(vmr *VmRef, client *Client) (err error) + func (config ConfigLxc) UpdateConfig(vmr *VmRef, client *Client) (err error) + type ConfigMetrics struct + Enable bool + Graphite *ConfigMetricsGraphite + InfluxDB *ConfigMetricsInfluxDB + MTU int + Name string + Port int + Server string + Timeout int + Type string + func InstantiateConfigMetrics() *ConfigMetrics + func NewConfigMetricsFromApi(metricsid string, client *Client) (config *ConfigMetrics, err error) + func NewConfigMetricsFromJson(input []byte) (config *ConfigMetrics, err error) + func (config *ConfigMetrics) CreateMetrics(client *Client) (err error) + func (config *ConfigMetrics) MapMetricsToApiValues(create bool) (params map[string]interface{}) + func (config *ConfigMetrics) RemoveMetricsNestedStructs() + func (config *ConfigMetrics) SetMetrics(metricsid string, client *Client) (err error) + func (config *ConfigMetrics) UpdateMetrics(client *Client) (err error) + func (config *ConfigMetrics) ValidateMetrics() (err error) + type ConfigMetricsGraphite struct + Path string + Protocol string + type ConfigMetricsInfluxDB struct + ApiPathPrefix string + Bucket string + MaxBodySize int + Organization string + Protocol string + Token string + VerifyCertificate bool + type ConfigNetwork struct + Address string + Address6 string + Autostart bool + BondMode string + BondPrimary string + BondXmitHashPolicy string + BridgePorts string + BridgeVlanAware bool + CIDR string + CIDR6 string + Comments string + Comments6 string + Gateway string + Gateway6 string + Iface string + MTU int + Netmask string + Netmask6 int + Node string + OVSBonds string + OVSBridge string + OVSOptions string + OVSPorts string + OVSTag int + Slaves string + Type string + VlanID int + VlanRawDevice string + func NewConfigNetworkFromJSON(input []byte) (config *ConfigNetwork, err error) + func (config ConfigNetwork) CreateNetwork(client *Client) (err error) + func (config ConfigNetwork) MapToAPIParams() map[string]interface{} + func (config ConfigNetwork) UpdateNetwork(client *Client) (err error) + type ConfigQemu struct + Agent int + Args string + Balloon int + Bios string + Boot string + BootDisk string + CIcustom string + CIpassword string + CIuser string + Description string + EFIDisk QemuDevice + FullClone *int + HaGroup string + HaState string + Hookscript string + Hotplug string + Ipconfig IpconfigMap + Machine string + Memory int + Name string + Nameserver string + Onboot *bool + Pool string + QemuCores int + QemuCpu string + QemuDisks QemuDevices + QemuIso string + QemuKVM *bool + QemuNetworks QemuDevices + QemuNuma *bool + QemuOs string + QemuPCIDevices QemuDevices + QemuPxe bool + QemuSerials QemuDevices + QemuSmbios1 QemuSmbios1Param + QemuSockets int + QemuUnusedDisks QemuDevices + QemuUsbs QemuDevices + QemuVcpus int + QemuVga QemuDevice + Scsihw string + Searchdomain string + Sshkeys string + Startup string + Tablet *bool + Tags string + VmID int + func NewConfigQemuFromApi(vmr *VmRef, client *Client) (config *ConfigQemu, err error) + func NewConfigQemuFromJson(input []byte) (config *ConfigQemu, err error) + func (c ConfigQemu) CreateIpconfigParams(vmID int, params map[string]interface{}) error + func (c ConfigQemu) CreateQemuDisksParams(vmID int, params map[string]interface{}, cloned bool) error + func (c ConfigQemu) CreateQemuEfiParams(params map[string]interface{}) error + func (c ConfigQemu) CreateQemuMachineParam(params map[string]interface{}) error + func (c ConfigQemu) CreateQemuNetworksParams(vmID int, params map[string]interface{}) error + func (c ConfigQemu) CreateQemuPCIsParams(vmID int, params map[string]interface{}) error + func (c ConfigQemu) CreateQemuSerialsParams(vmID int, params map[string]interface{}) error + func (c ConfigQemu) CreateQemuSmbios1Param(params map[string]interface{}) error + func (c ConfigQemu) CreateQemuUsbsParams(vmID int, params map[string]interface{}) error + func (c ConfigQemu) String() string + func (config ConfigQemu) CloneVm(sourceVmr *VmRef, vmr *VmRef, client *Client) (err error) + func (config ConfigQemu) CreateVm(vmr *VmRef, client *Client) (err error) + func (config ConfigQemu) HasCloudInit() bool + func (config ConfigQemu) UpdateConfig(vmr *VmRef, client *Client) (err error) + type ConfigSnapshot struct + Description string + Name string + VmState bool + func (config *ConfigSnapshot) CreateSnapshot(c *Client, guestId uint) (err error) + type ConfigStorage struct + BackupRetention *ConfigStorageBackupRetention + CephFS *ConfigStorageCephFS + Content *ConfigStorageContent + Directory *ConfigStorageDirectory + Enable bool + GlusterFS *ConfigStorageGlusterFS + ID string + ISCSI *ConfigStorageISCSI + LVM *ConfigStorageLVM + LVMThin *ConfigStorageLVMThin + NFS *ConfigStorageNFS + Nodes []string + PBS *ConfigStoragePBS + RBD *ConfigStorageRBD + SMB *ConfigStorageSMB + Type string + ZFS *ConfigStorageZFS + ZFSoverISCSI *ConfigStorageZFSoverISCSI + func NewConfigStorageFromApi(storageid string, client *Client) (config *ConfigStorage, err error) + func NewConfigStorageFromJson(input []byte) (config *ConfigStorage, err error) + func (config *ConfigStorage) Create(id string, errorSupression bool, client *Client) (err error) + func (config *ConfigStorage) CreateWithValidate(id string, client *Client) (err error) + func (config *ConfigStorage) MapToApiValues(create bool) (params map[string]interface{}) + func (config *ConfigStorage) RemapFromAPI() + func (config *ConfigStorage) RemapToAPI() + func (config *ConfigStorage) SetDefaults() + func (config *ConfigStorage) Update(id string, client *Client) (err error) + func (config *ConfigStorage) UpdateWithValidate(id string, client *Client) (err error) + func (newConfig *ConfigStorage) Validate(id string, create bool, client *Client) (err error) + type ConfigStorageBackupRetention struct + Daily *int + Hourly *int + Last *int + Monthly *int + Weekly *int + Yearly *int + func (b *ConfigStorageBackupRetention) AllNil() bool + func (b *ConfigStorageBackupRetention) MapStorageBackupRetention() string + func (b *ConfigStorageBackupRetention) Validate() (err error) + type ConfigStorageCephFS struct + FSname string + Monitors []string + SecretKey *string + Username string + type ConfigStorageContent struct + Backup *bool + Container *bool + DiskImage *bool + Iso *bool + Snippets *bool + Template *bool + func (c *ConfigStorageContent) MapStorageContent(array []bool) (list string) + func (c *ConfigStorageContent) Validate(storageType string) error + type ConfigStorageDirectory struct + Path string + Preallocation *string + Shared bool + func (directory *ConfigStorageDirectory) SetDefaults() + type ConfigStorageGlusterFS struct + Preallocation *string + Server1 string + Server2 string + Volume string + func (glusterfs *ConfigStorageGlusterFS) SetDefaults() + type ConfigStorageISCSI struct + Portal string + Target string + type ConfigStorageLVM struct + Shared bool + VGname string + type ConfigStorageLVMThin struct + Thinpool string + VGname string + type ConfigStorageNFS struct + Export string + Preallocation *string + Server string + Version *string + func (nfs *ConfigStorageNFS) SetDefaults() + type ConfigStoragePBS struct + Datastore string + Fingerprint string + Namespace string + Password *string + Port *int + Server string + Username string + func (pbs *ConfigStoragePBS) SetDefaults() + type ConfigStorageRBD struct + KRBD bool + Keyring *string + Monitors []string + Namespace string + Pool string + Username string + type ConfigStorageSMB struct + Domain string + Password *string + Preallocation *string + Server string + Share string + Username string + Version *string + func (smb *ConfigStorageSMB) SetDefaults() + type ConfigStorageZFS struct + Blocksize *string + Pool string + Thinprovision bool + func (zfs *ConfigStorageZFS) SetDefaults() + type ConfigStorageZFSoverISCSI struct + Blocksize *string + Comstar *ConfigStorageZFSoverISCSI_Comstar + ISCSIprovider string + Istgt *ConfigStorageZFSoverISCSI_istgt + LIO *ConfigStorageZFSoverISCSI_LIO + Pool string + Portal string + Target string + Thinprovision bool + func (zfsoveriscsi *ConfigStorageZFSoverISCSI) RemapFromAPI() + func (zfsoveriscsi *ConfigStorageZFSoverISCSI) RemapToAPI() + func (zfsoveriscsi *ConfigStorageZFSoverISCSI) SetDefaults() + type ConfigStorageZFSoverISCSI_Comstar struct + HostGroup string + TargetGroup string + Writecache bool + type ConfigStorageZFSoverISCSI_LIO struct + TargetPortalGroup string + type ConfigStorageZFSoverISCSI_istgt struct + Writecache bool + type ConfigUser struct + Comment string + Email string + Enable bool + Expire int + Firstname string + Groups []string + Keys string + Lastname string + UserID string + func NewConfigUserFromApi(userid string, client *Client) (config *ConfigUser, err error) + func NewConfigUserFromJson(input []byte) (config *ConfigUser, err error) + func (config *ConfigUser) SetUser(userid string, password string, client *Client) (err error) + func (config *ConfigUser) UpdateUser(client *Client) (err error) + func (config ConfigUser) CreateUser(password string, client *Client) (err error) + func (config ConfigUser) MapUserValues() (params map[string]interface{}) + type IpconfigMap map[int]interface + type QemuDevice map[string]interface + func ParseConf(kvString string, confSeparator string, subConfSeparator string, ...) QemuDevice + func ParseLxcDisk(diskStr string) QemuDevice + func ParsePMConf(kvString string, implicitFirstKey string) QemuDevice + type QemuDeviceParam []string + type QemuDevices map[int]map[string]interface + type QemuSmbios1Param map[string]interface + type Response struct + Body []byte + Resp *http.Response + type Session struct + ApiUrl string + AuthTicket string + AuthToken string + CsrfToken string + Headers http.Header + func NewSession(apiUrl string, hclient *http.Client, proxyString string, tls *tls.Config) (session *Session, err error) + func (s *Session) Delete(url string, params *url.Values, headers *http.Header) (resp *http.Response, err error) + func (s *Session) Do(req *http.Request) (*http.Response, error) + func (s *Session) Get(url string, params *url.Values, headers *http.Header) (resp *http.Response, err error) + func (s *Session) GetJSON(url string, params *url.Values, headers *http.Header, ...) (resp *http.Response, err error) + func (s *Session) Head(url string, params *url.Values, headers *http.Header) (resp *http.Response, err error) + func (s *Session) Login(username string, password string, otp string) (err error) + func (s *Session) NewRequest(method, url string, headers *http.Header, body io.Reader) (req *http.Request, err error) + func (s *Session) Post(url string, params *url.Values, headers *http.Header, body *[]byte) (resp *http.Response, err error) + func (s *Session) PostJSON(url string, params *url.Values, headers *http.Header, body interface{}, ...) (resp *http.Response, err error) + func (s *Session) Put(url string, params *url.Values, headers *http.Header, body *[]byte) (resp *http.Response, err error) + func (s *Session) Request(method string, url string, params *url.Values, headers *http.Header, ...) (resp *http.Response, err error) + func (s *Session) RequestJSON(method string, url string, params *url.Values, headers *http.Header, ...) (resp *http.Response, err error) + func (s *Session) SetAPIToken(userID, token string) + type Snapshot struct + Children []*Snapshot + Description string + Name string + Parent string + SnapTime uint + VmState bool + func FormatSnapshotsList(taskResponse []interface{}) (list []*Snapshot) + func FormatSnapshotsTree(taskResponse []interface{}) (tree []*Snapshot) + type VmRef struct + func NewVmRef(vmId int) (vmr *VmRef) + func (vmr *VmRef) GetVmType() string + func (vmr *VmRef) HaGroup() string + func (vmr *VmRef) HaState() string + func (vmr *VmRef) Node() string + func (vmr *VmRef) Pool() string + func (vmr *VmRef) SetNode(node string) + func (vmr *VmRef) SetPool(pool string) + func (vmr *VmRef) SetVmType(vmType string) + func (vmr *VmRef) VmId() int