Documentation ¶
Index ¶
- Constants
- func DiskSizeGB(dcSize interface{}) float64
- func Itob(i int) bool
- func ParseSubConf(element string, separator string) (key string, value interface{})
- type ClusterStatus
- type Cpuinfo
- type InstanceVnc
- type Intermediate
- type Ksm
- type Memory
- type ProxmoxClientConfig
- type ProxmoxError
- type ProxmoxTags
- type QemuDevice
- type QemuDeviceParam
- type QemuDevices
- type Rootfs
- type SClusterResource
- type SDisk
- func (self *SDisk) CreateISnapshot(ctx context.Context, name, desc string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) Delete(ctx context.Context) error
- func (self *SDisk) GetAccessPath() string
- func (self *SDisk) GetCacheMode() string
- func (self *SDisk) GetDiskFormat() string
- func (self *SDisk) GetDiskSizeMB() int
- func (self *SDisk) GetDiskType() string
- func (self *SDisk) GetDriver() string
- func (self *SDisk) GetFsFormat() string
- func (self *SDisk) GetGlobalId() string
- func (self *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
- func (self *SDisk) GetId() string
- func (self *SDisk) GetIsAutoDelete() bool
- func (self *SDisk) GetIsNonPersistent() bool
- func (self *SDisk) GetMountpoint() string
- func (self *SDisk) GetName() string
- func (self *SDisk) GetStatus() string
- func (self *SDisk) GetTemplateId() string
- func (self *SDisk) Rebuild(ctx context.Context) error
- func (self *SDisk) Refresh() error
- func (self *SDisk) Reset(ctx context.Context, snapshotId string) (string, error)
- func (self *SDisk) Resize(ctx context.Context, sizeMb int64) error
- type SHost
- func (self *SHost) CreateVM(opts *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetAccessIp() string
- func (self *SHost) GetAccessMac() string
- func (self *SHost) GetCpuCmtbound() float32
- func (self *SHost) GetCpuCount() int
- func (self *SHost) GetCpuDesc() string
- func (self *SHost) GetCpuMhz() int
- func (self *SHost) GetEnabled() bool
- func (self *SHost) GetGlobalId() string
- func (self *SHost) GetHostStatus() string
- func (self *SHost) GetHostType() string
- func (host *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)
- func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)
- func (self *SHost) GetId() string
- func (self *SHost) GetIsMaintenance() bool
- func (self *SHost) GetMemCmtbound() float32
- func (self *SHost) GetMemSizeMB() int
- func (self *SHost) GetName() string
- func (self *SHost) GetNodeCount() int8
- func (self *SHost) GetReservedMemoryMb() int
- func (self *SHost) GetSN() string
- func (self *SHost) GetStatus() string
- func (self *SHost) GetStorageSizeMB() int64
- func (self *SHost) GetStorageType() string
- func (self *SHost) GetSysInfo() jsonutils.JSONObject
- func (self *SHost) GetVersion() string
- type SImage
- func (self *SImage) Delete(ctx context.Context) error
- func (img *SImage) GetBios() cloudprovider.TBiosType
- func (img *SImage) GetFullOsName() string
- func (self *SImage) GetGlobalId() string
- func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SImage) GetId() string
- func (self *SImage) GetImageFormat() string
- func (self *SImage) GetImageStatus() string
- func (self *SImage) GetImageType() cloudprovider.TImageType
- func (self *SImage) GetMinOsDiskSizeGb() int
- func (self *SImage) GetMinRamSizeMb() int
- func (self *SImage) GetName() string
- func (img *SImage) GetOsArch() string
- func (img *SImage) GetOsDist() string
- func (img *SImage) GetOsLang() string
- func (img *SImage) GetOsType() cloudprovider.TOsType
- func (img *SImage) GetOsVersion() string
- func (self *SImage) GetSizeByte() int64
- func (self *SImage) GetStatus() string
- type SInstance
- func (self *SInstance) AttachDisk(ctx context.Context, diskId string) error
- func (self *SInstance) ChangeConfig(ctx context.Context, opts *cloudprovider.SManagedVMChangeConfig) error
- func (self *SInstance) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)
- func (self *SInstance) DeleteVM(ctx context.Context) error
- func (self *SInstance) DeployVM(ctx context.Context, opts *cloudprovider.SInstanceDeployOptions) error
- func (self *SInstance) DetachDisk(ctx context.Context, diskId string) error
- func (self *SInstance) GetBios() cloudprovider.TBiosType
- func (self *SInstance) GetBootOrder() string
- func (self *SInstance) GetError() error
- func (self *SInstance) GetFullOsName() string
- func (self *SInstance) GetGlobalId() string
- func (self *SInstance) GetHostname() string
- func (self *SInstance) GetHypervisor() string
- func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)
- func (self *SInstance) GetIHost() cloudprovider.ICloudHost
- func (self *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)
- func (self *SInstance) GetId() string
- func (self *SInstance) GetInstanceType() string
- func (self *SInstance) GetMachine() string
- func (self *SInstance) GetName() string
- func (ins *SInstance) GetOsArch() string
- func (ins *SInstance) GetOsDist() string
- func (ins *SInstance) GetOsLang() string
- func (self *SInstance) GetOsType() cloudprovider.TOsType
- func (ins *SInstance) GetOsVersion() string
- func (self *SInstance) GetProjectId() string
- func (self *SInstance) GetSecurityGroupIds() ([]string, error)
- func (self *SInstance) GetStatus() string
- func (self *SInstance) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
- func (self *SInstance) GetVcpuCount() int
- func (self *SInstance) GetVdi() string
- func (self *SInstance) GetVga() string
- func (self *SInstance) GetVmemSizeMB() int
- func (self *SInstance) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
- func (self *SInstance) Refresh() error
- func (self *SInstance) SetSecurityGroups(secgroupIds []string) error
- func (self *SInstance) StartVM(ctx context.Context) error
- func (self *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
- func (self *SInstance) UpdateUserData(userData string) error
- func (self *SInstance) UpdateVM(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) error
- func (self *SInstance) VMIdExists(vmId int) (bool, error)
- type SInstanceDisk
- type SInstanceNic
- func (self *SInstanceNic) AssignAddress(ipAddrs []string) error
- func (self *SInstanceNic) GetDriver() string
- func (self *SInstanceNic) GetINetworkId() string
- func (self *SInstanceNic) GetIP() string
- func (self *SInstanceNic) GetId() string
- func (self *SInstanceNic) GetMAC() string
- func (self *SInstanceNic) GetSubAddress() ([]string, error)
- func (self *SInstanceNic) InClassicNetwork() bool
- type SNetwork
- func (self *SNetwork) Contains(_ip string) bool
- func (self *SNetwork) Delete() error
- func (self *SNetwork) GetAllocTimeoutSeconds() int
- func (self *SNetwork) GetGateway() string
- func (self *SNetwork) GetGlobalId() string
- func (self *SNetwork) GetIWire() cloudprovider.ICloudWire
- func (self *SNetwork) GetId() string
- func (self *SNetwork) GetIpEnd() string
- func (self *SNetwork) GetIpMask() int8
- func (self *SNetwork) GetIpStart() string
- func (self *SNetwork) GetName() string
- func (self *SNetwork) GetProjectId() string
- func (self *SNetwork) GetPublicScope() rbacscope.TRbacScope
- func (self *SNetwork) GetServerType() string
- func (self *SNetwork) GetStatus() string
- func (self *SNetwork) Refresh() error
- type SNodeResource
- type SProxmoxClient
- func (self *SProxmoxClient) GetAccountId() string
- func (self *SProxmoxClient) GetCapabilities() []string
- func (self *SProxmoxClient) GetIRegions() []cloudprovider.ICloudRegion
- func (self *SProxmoxClient) GetImages(node, storageName string) ([]SImage, error)
- func (self *SProxmoxClient) GetRegion() *SRegion
- func (self *SProxmoxClient) GetRegions() ([]SRegion, error)
- func (self *SProxmoxClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- type SRegion
- func (self *SRegion) ChangeConfig(vmId int, cpu int, memMb int) error
- func (self *SRegion) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error)
- func (self *SRegion) CreateIVpc(conf *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) DeleteVM(vmId int) error
- func (self *SRegion) DetachDisk(node string, vmId int, driver string) error
- func (self *SRegion) GenVM(name, node string, cores, memMB int) (*SInstance, error)
- func (self *SRegion) GetCapabilities() []string
- func (self *SRegion) GetClient() *SProxmoxClient
- func (self *SRegion) GetCloudEnv() string
- func (self *SRegion) GetClusterAllResources() ([]SClusterResource, error)
- func (self *SRegion) GetClusterNodeResources() (map[string]SNodeResource, error)
- func (self *SRegion) GetClusterResources(resType string) ([]SClusterResource, error)
- func (self *SRegion) GetClusterVmMaxId() int
- func (self *SRegion) GetClusterVmResources() (map[int]SVmResource, error)
- func (self *SRegion) GetDisks(node, storageName string) ([]SDisk, error)
- func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo
- func (self *SRegion) GetGlobalId() string
- func (self *SRegion) GetHost(id string) (*SHost, error)
- func (self *SRegion) GetHosts() ([]SHost, error)
- func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable
- func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SRegion) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error)
- func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
- func (self *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)
- func (self *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error)
- func (region *SRegion) GetIVMs() ([]cloudprovider.ICloudVM, error)
- func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)
- func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
- func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)
- func (self *SRegion) GetId() string
- func (self *SRegion) GetImages(node, storageName string) ([]SImage, error)
- func (self *SRegion) GetInstance(id string) (*SInstance, error)
- func (self *SRegion) GetInstances(hostId string) ([]SInstance, error)
- func (self *SRegion) GetName() string
- func (self *SRegion) GetNetwork(id string) (*SNetwork, error)
- func (self *SRegion) GetNetworks() ([]SNetwork, error)
- func (self *SRegion) GetProvider() string
- func (self *SRegion) GetQemuConfig(node string, VmId int) (*SInstance, error)
- func (self *SRegion) GetStatus() string
- func (self *SRegion) GetStorage(id string) (*SStorage, error)
- func (self *SRegion) GetStorages() ([]SStorage, error)
- func (self *SRegion) GetStoragesByHost(node string) ([]SStorage, error)
- func (self *SRegion) GetVNCInfo(node string, vmId int) (*InstanceVnc, error)
- func (self *SRegion) GetVmAgentNetworkInterfaces(node string, VmId int) (map[string]string, error)
- func (self *SRegion) GetVmPowerStatus(node string, VmId int) string
- func (self *SRegion) GetWire() (*SWire, error)
- func (self *SRegion) GetWires() ([]SWire, error)
- func (self *SRegion) GetZone() (*SZone, error)
- func (self *SRegion) Refresh() error
- func (self *SRegion) ResetVmPassword(vmId int, username, password string) error
- func (self *SRegion) ResizeDisk(node string, vmId string, driver string, sizeGb int) error
- func (self *SRegion) StartVm(vmId int) error
- func (self *SRegion) StopVm(vmId int) error
- func (self *SRegion) UploadImage(node, storage, filename string, reader io.Reader) (*SImage, error)
- type SStorage
- func (self *SStorage) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetCapacityMB() int64
- func (self *SStorage) GetCapacityUsedMB() int64
- func (self *SStorage) GetEnabled() bool
- func (self *SStorage) GetGlobalId() string
- func (self *SStorage) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SStorage) GetIZone() cloudprovider.ICloudZone
- func (self *SStorage) GetId() string
- func (self *SStorage) GetMediumType() string
- func (self *SStorage) GetMountPoint() string
- func (self *SStorage) GetName() string
- func (self *SStorage) GetStatus() string
- func (self *SStorage) GetStorageConf() jsonutils.JSONObject
- func (self *SStorage) GetStorageType() string
- func (self *SStorage) IsSysDiskStore() bool
- func (self *SStorage) Refresh() error
- type SStorageResource
- type SStoragecache
- func (self *SStoragecache) GetGlobalId() string
- func (self *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)
- func (seflf *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetIImageById(id string) (cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetId() string
- func (self *SStoragecache) GetName() string
- func (self *SStoragecache) GetPath() string
- func (self *SStoragecache) GetStatus() string
- func (self *SStoragecache) UploadImage(ctx context.Context, opts *cloudprovider.SImageCreateOption, ...) (string, error)
- type STask
- type SVmResource
- type SVpc
- func (self *SVpc) Delete() error
- func (self *SVpc) GetCidrBlock() string
- func (self *SVpc) GetGlobalId() string
- func (self *SVpc) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)
- func (self *SVpc) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)
- func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)
- func (self *SVpc) GetIWireById(id string) (cloudprovider.ICloudWire, error)
- func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SVpc) GetId() string
- func (self *SVpc) GetIsDefault() bool
- func (self *SVpc) GetName() string
- func (self *SVpc) GetRegion() cloudprovider.ICloudRegion
- func (self *SVpc) GetStatus() string
- func (self *SVpc) IsEmulated() bool
- type SWire
- func (self *SWire) CreateINetwork(opts *cloudprovider.SNetworkCreateOptions) (cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetBandwidth() int
- func (self *SWire) GetGlobalId() string
- func (self *SWire) GetINetworkById(id string) (cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetIVpc() cloudprovider.ICloudVpc
- func (self *SWire) GetIZone() cloudprovider.ICloudZone
- func (self *SWire) GetId() string
- func (self *SWire) GetName() string
- func (self *SWire) GetStatus() string
- type SZone
- func (self *SZone) GetGlobalId() string
- func (self *SZone) GetI18n() cloudprovider.SModelI18nTable
- func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)
- func (self *SZone) GetIRegion() cloudprovider.ICloudRegion
- func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SZone) GetId() string
- func (self *SZone) GetName() string
- func (self *SZone) GetStatus() string
- type Swap
- type VmBase
Constants ¶
View Source
const ( CLOUD_PROVIDER_PROXMOX = api.CLOUD_PROVIDER_PROXMOX AUTH_ADDR = "/access/ticket" )
Variables ¶
This section is empty.
Functions ¶
func DiskSizeGB ¶
func DiskSizeGB(dcSize interface{}) float64
Convert a disk-size string to a GB float
func ParseSubConf ¶
ParseSubConf - Parse standard sub-conf strings `key=value`.
Types ¶
type ClusterStatus ¶
type ClusterStatus struct { Nodes int `json:"nodes,omitempty"` Quorate int `json:"quorate,omitempty"` Version int `json:"version,omitempty"` Type string `json:"type"` ID string `json:"id"` Name string `json:"name"` Online int `json:"online,omitempty"` Level string `json:"level,omitempty"` Nodeid int `json:"nodeid,omitempty"` Local int `json:"local,omitempty"` IP string `json:"ip,omitempty"` }
type InstanceVnc ¶
type Intermediate ¶
type Intermediate struct { HardwareAddress string `json:"hardware-address"` IPAddresses []struct { IPAddress string `json:"ip-address"` IPAddressType string `json:"ip-address-type"` Prefix int `json:"prefix"` } `json:"ip-addresses"` Name string `json:"name"` Statistics map[string]int64 `json:"statistics"` }
type ProxmoxClientConfig ¶
type ProxmoxClientConfig struct {
// contains filtered or unexported fields
}
func NewProxmoxClientConfig ¶
func NewProxmoxClientConfig(username, password, host string, port int) *ProxmoxClientConfig
func (*ProxmoxClientConfig) CloudproviderConfig ¶
func (self *ProxmoxClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *ProxmoxClientConfig
func (*ProxmoxClientConfig) Debug ¶
func (self *ProxmoxClientConfig) Debug(debug bool) *ProxmoxClientConfig
type ProxmoxError ¶
func (ProxmoxError) Error ¶
func (self ProxmoxError) Error() string
func (*ProxmoxError) ParseErrorFromJsonResponse ¶
func (ce *ProxmoxError) ParseErrorFromJsonResponse(statusCode int, status string, body jsonutils.JSONObject) error
type ProxmoxTags ¶
type ProxmoxTags struct { }
func (*ProxmoxTags) GetSysTags ¶
func (self *ProxmoxTags) GetSysTags() map[string]string
type QemuDevice ¶
type QemuDevice map[string]interface{}
func ParseConf ¶
func ParseConf( kvString string, confSeparator string, subConfSeparator string, implicitFirstKey string, ) QemuDevice
ParseConf - Parse standard device conf string `key1=val1,key2=val2`.
func ParsePMConf ¶
func ParsePMConf( kvString string, implicitFirstKey string, ) QemuDevice
type QemuDeviceParam ¶
type QemuDeviceParam []string
type QemuDevices ¶
type SClusterResource ¶
type SClusterResource struct { Maxcpu int `json:"maxcpu,omitempty"` Uptime int `json:"uptime,omitempty"` Template int `json:"template,omitempty"` Netin int `json:"netin,omitempty"` Mem int `json:"mem,omitempty"` Node string `json:"node"` VmId int `json:"vmid,omitempty"` Maxdisk int64 `json:"maxdisk"` Netout int `json:"netout,omitempty"` Diskwrite int `json:"diskwrite,omitempty"` Diskread int `json:"diskread,omitempty"` Maxmem int64 `json:"maxmem,omitempty"` Disk int `json:"disk"` CPU int `json:"cpu,omitempty"` Id string `json:"id"` Type string `json:"type"` Status string `json:"status"` Name string `json:"name,omitempty"` Level string `json:"level,omitempty"` Storage string `json:"storage,omitempty"` Plugintype string `json:"plugintype,omitempty"` Content string `json:"content,omitempty"` }
type SDisk ¶
type SDisk struct { multicloud.SDisk ProxmoxTags Format string `json:"format"` Size int64 `json:"size"` Vmid string VolId string `json:"volid"` Name string `json:"name"` Parent string `json:"parent"` Content string `json:"content"` // contains filtered or unexported fields }
func (*SDisk) CreateISnapshot ¶
func (self *SDisk) CreateISnapshot(ctx context.Context, name, desc string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetAccessPath ¶
func (*SDisk) GetCacheMode ¶
func (*SDisk) GetDiskFormat ¶
func (*SDisk) GetDiskSizeMB ¶
func (*SDisk) GetDiskType ¶
func (*SDisk) GetFsFormat ¶
func (*SDisk) GetGlobalId ¶
func (*SDisk) GetISnapshot ¶
func (self *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetISnapshots ¶
func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetIStorage ¶
func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
func (*SDisk) GetIsAutoDelete ¶
func (*SDisk) GetIsNonPersistent ¶
func (*SDisk) GetMountpoint ¶
func (*SDisk) GetTemplateId ¶
type SHost ¶
type SHost struct { multicloud.SHostBase ProxmoxTags Id string Node string Uptime int `json:"uptime"` Wait int `json:"wait"` Idle int `json:"idle"` Kversion string `json:"kversion"` Pveversion string `json:"pveversion"` CPU int `json:"cpu"` Loadavg []string `json:"loadavg"` Rootfs Rootfs `json:"rootfs"` Swap Swap `json:"swap"` Memory Memory `json:"memory"` Cpuinfo Cpuinfo `json:"cpuinfo"` Ksm Ksm `json:"ksm"` // contains filtered or unexported fields }
func (*SHost) CreateVM ¶
func (self *SHost) CreateVM(opts *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
func (*SHost) GetAccessIp ¶
func (*SHost) GetAccessMac ¶
func (*SHost) GetCpuCmtbound ¶
func (*SHost) GetCpuCount ¶
func (*SHost) GetCpuDesc ¶
func (*SHost) GetEnabled ¶
func (*SHost) GetGlobalId ¶
func (*SHost) GetHostStatus ¶
func (*SHost) GetHostType ¶
func (*SHost) GetIHostNics ¶
func (host *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)
func (*SHost) GetIStorageById ¶
func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SHost) GetIStorages ¶
func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SHost) GetIVMById ¶
func (self *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, error)
func (*SHost) GetIsMaintenance ¶
func (*SHost) GetMemCmtbound ¶
func (*SHost) GetMemSizeMB ¶
func (*SHost) GetNodeCount ¶
func (*SHost) GetReservedMemoryMb ¶
func (*SHost) GetStorageSizeMB ¶
func (*SHost) GetStorageType ¶
func (*SHost) GetSysInfo ¶
func (self *SHost) GetSysInfo() jsonutils.JSONObject
func (*SHost) GetVersion ¶
type SImage ¶
type SImage struct { multicloud.SImageBase ProxmoxTags Volid string Size int64 Ctime int64 Content string Format string // contains filtered or unexported fields }
func (*SImage) GetBios ¶
func (img *SImage) GetBios() cloudprovider.TBiosType
func (*SImage) GetFullOsName ¶
func (*SImage) GetGlobalId ¶
func (*SImage) GetIStoragecache ¶
func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SImage) GetImageFormat ¶
func (*SImage) GetImageStatus ¶
func (*SImage) GetImageType ¶
func (self *SImage) GetImageType() cloudprovider.TImageType
func (*SImage) GetMinOsDiskSizeGb ¶
func (*SImage) GetMinRamSizeMb ¶
func (*SImage) GetOsType ¶
func (img *SImage) GetOsType() cloudprovider.TOsType
func (*SImage) GetOsVersion ¶
func (*SImage) GetSizeByte ¶
type SInstance ¶
type SInstance struct { multicloud.SInstanceBase ProxmoxTags QemuNetworks []SInstanceNic PowerState string Node string VmID int `json:"vmid"` Name string `json:"name"` Description string `json:"desc"` Pool string `json:"pool,omitempty"` Bios string `json:"bios"` EFIDisk QemuDevice `json:"efidisk,omitempty"` Machine string `json:"machine,omitempty"` Onboot bool `json:"onboot"` Startup string `json:"startup,omitempty"` Tablet bool `json:"tablet"` Agent int `json:"agent"` Memory int `json:"memory"` Balloon int `json:"balloon"` QemuOs string `json:"ostype"` QemuCores int `json:"cores"` QemuSockets int `json:"sockets"` QemuVcpus int `json:"vcpus"` QemuCpu string `json:"cpu"` QemuNuma bool `json:"numa"` QemuKVM bool `json:"kvm"` Hotplug string `json:"hotplug"` QemuIso string `json:"iso"` QemuPxe bool `json:"pxe"` FullClone *int `json:"fullclone"` Boot string `json:"boot"` BootDisk string `json:"bootdisk,omitempty"` Scsihw string `json:"scsihw,omitempty"` QemuDisks map[string][]struct { Driver string DiskId string } `json:"disk"` QemuUnusedDisks QemuDevices `json:"unused_disk"` QemuVga QemuDevice `json:"vga,omitempty"` QemuSerials QemuDevices `json:"serial,omitempty"` QemuUsbs QemuDevices `json:"usb,omitempty"` Hookscript string `json:"hookscript,omitempty"` Tags string `json:"tags"` Args string `json:"args"` // Deprecated single disk. DiskSize float64 `json:"diskGB"` Storage string `json:"storage"` StorageType string `json:"storageType"` // virtio|scsi (cloud-init defaults to scsi) // Deprecated single nic. QemuNicModel string `json:"nic"` QemuBridge string `json:"bridge"` QemuVlanTag int `json:"vlan"` QemuMacAddr string `json:"mac"` // cloud-init options CIuser string `json:"ciuser"` CIpassword string `json:"cipassword"` CIcustom string `json:"cicustom"` Searchdomain string `json:"searchdomain"` Nameserver string `json:"nameserver"` Sshkeys string `json:"sshkeys"` // contains filtered or unexported fields }
func (*SInstance) AttachDisk ¶
func (*SInstance) ChangeConfig ¶
func (self *SInstance) ChangeConfig(ctx context.Context, opts *cloudprovider.SManagedVMChangeConfig) error
func (*SInstance) CreateDisk ¶
func (self *SInstance) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)
func (*SInstance) DeployVM ¶
func (self *SInstance) DeployVM(ctx context.Context, opts *cloudprovider.SInstanceDeployOptions) error
func (*SInstance) DetachDisk ¶
func (*SInstance) GetBios ¶
func (self *SInstance) GetBios() cloudprovider.TBiosType
func (*SInstance) GetBootOrder ¶
func (*SInstance) GetFullOsName ¶
func (*SInstance) GetGlobalId ¶
func (*SInstance) GetHostname ¶
func (*SInstance) GetHypervisor ¶
func (*SInstance) GetIDisks ¶
func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SInstance) GetIHost ¶
func (self *SInstance) GetIHost() cloudprovider.ICloudHost
func (*SInstance) GetInstanceType ¶
func (*SInstance) GetMachine ¶
func (*SInstance) GetOsType ¶
func (self *SInstance) GetOsType() cloudprovider.TOsType
func (*SInstance) GetOsVersion ¶
func (*SInstance) GetProjectId ¶
func (*SInstance) GetSecurityGroupIds ¶
func (*SInstance) GetVNCInfo ¶
func (self *SInstance) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
func (*SInstance) GetVcpuCount ¶
func (*SInstance) GetVmemSizeMB ¶
func (*SInstance) RebuildRoot ¶
func (self *SInstance) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
func (*SInstance) SetSecurityGroups ¶
func (*SInstance) StopVM ¶
func (self *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
func (*SInstance) UpdateUserData ¶
func (*SInstance) UpdateVM ¶
func (self *SInstance) UpdateVM(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) error
type SInstanceDisk ¶
type SInstanceNic ¶
type SInstanceNic struct { cloudprovider.DummyICloudNic MacAddr string IpAddr string NicId string Model string NetworkId string // contains filtered or unexported fields }
func (*SInstanceNic) AssignAddress ¶
func (self *SInstanceNic) AssignAddress(ipAddrs []string) error
func (*SInstanceNic) GetDriver ¶
func (self *SInstanceNic) GetDriver() string
func (*SInstanceNic) GetINetworkId ¶
func (self *SInstanceNic) GetINetworkId() string
func (*SInstanceNic) GetIP ¶
func (self *SInstanceNic) GetIP() string
func (*SInstanceNic) GetId ¶
func (self *SInstanceNic) GetId() string
func (*SInstanceNic) GetMAC ¶
func (self *SInstanceNic) GetMAC() string
func (*SInstanceNic) GetSubAddress ¶
func (self *SInstanceNic) GetSubAddress() ([]string, error)
func (*SInstanceNic) InClassicNetwork ¶
func (self *SInstanceNic) InClassicNetwork() bool
type SNetwork ¶
type SNetwork struct { multicloud.SResourceBase ProxmoxTags Id string Priority int `json:"priority"` Families []string `json:"families"` Method string `json:"method"` Autostart int `json:"autostart,omitempty"` Iface string `json:"iface"` BridgeFd string `json:"bridge_fd,omitempty"` Method6 string `json:"method6"` BridgePorts string `json:"bridge_ports,omitempty"` Type string `json:"type"` Active int `json:"active"` BridgeStp string `json:"bridge_stp,omitempty"` BridgeVids string `json:"bridge_vids,omitempty"` Netmask string `json:"netmask,omitempty"` Address string `json:"address,omitempty"` BridgeVlanAware int `json:"bridge_vlan_aware,omitempty"` Gateway string `json:"gateway,omitempty"` Cidr string `json:"cidr,omitempty"` Exists int `json:"exists,omitempty"` Options []string `json:"options,omitempty"` // contains filtered or unexported fields }
func (*SNetwork) GetAllocTimeoutSeconds ¶
func (*SNetwork) GetGateway ¶
func (*SNetwork) GetGlobalId ¶
func (*SNetwork) GetIWire ¶
func (self *SNetwork) GetIWire() cloudprovider.ICloudWire
func (*SNetwork) GetIpStart ¶
func (*SNetwork) GetProjectId ¶
func (*SNetwork) GetPublicScope ¶
func (self *SNetwork) GetPublicScope() rbacscope.TRbacScope
func (*SNetwork) GetServerType ¶
type SNodeResource ¶
type SProxmoxClient ¶
type SProxmoxClient struct {
*ProxmoxClientConfig
}
func NewProxmoxClient ¶
func NewProxmoxClient(cfg *ProxmoxClientConfig) (*SProxmoxClient, error)
func (*SProxmoxClient) GetAccountId ¶
func (self *SProxmoxClient) GetAccountId() string
func (*SProxmoxClient) GetCapabilities ¶
func (self *SProxmoxClient) GetCapabilities() []string
func (*SProxmoxClient) GetIRegions ¶
func (self *SProxmoxClient) GetIRegions() []cloudprovider.ICloudRegion
func (*SProxmoxClient) GetImages ¶
func (self *SProxmoxClient) GetImages(node, storageName string) ([]SImage, error)
func (*SProxmoxClient) GetRegion ¶
func (self *SProxmoxClient) GetRegion() *SRegion
func (*SProxmoxClient) GetRegions ¶
func (self *SProxmoxClient) GetRegions() ([]SRegion, error)
func (*SProxmoxClient) GetSubAccounts ¶
func (self *SProxmoxClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
type SRegion ¶
type SRegion struct { multicloud.SRegion multicloud.SRegionEipBase multicloud.SNoObjectStorageRegion multicloud.SRegionLbBase // contains filtered or unexported fields }
func (*SRegion) ChangeConfig ¶
func (*SRegion) CreateISecurityGroup ¶
func (self *SRegion) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error)
func (*SRegion) CreateIVpc ¶
func (self *SRegion) CreateIVpc(conf *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, error)
func (*SRegion) DetachDisk ¶
func (*SRegion) GetCapabilities ¶
func (*SRegion) GetClient ¶
func (self *SRegion) GetClient() *SProxmoxClient
func (*SRegion) GetCloudEnv ¶
func (*SRegion) GetClusterAllResources ¶
func (self *SRegion) GetClusterAllResources() ([]SClusterResource, error)
func (*SRegion) GetClusterNodeResources ¶
func (self *SRegion) GetClusterNodeResources() (map[string]SNodeResource, error)
func (*SRegion) GetClusterResources ¶
func (self *SRegion) GetClusterResources(resType string) ([]SClusterResource, error)
func (*SRegion) GetClusterVmMaxId ¶
func (*SRegion) GetClusterVmResources ¶
func (self *SRegion) GetClusterVmResources() (map[int]SVmResource, error)
func (*SRegion) GetGeographicInfo ¶
func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo
func (*SRegion) GetGlobalId ¶
func (*SRegion) GetI18n ¶
func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable
func (*SRegion) GetIHostById ¶
func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SRegion) GetISecurityGroupById ¶
func (self *SRegion) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error)
func (*SRegion) GetIStorageById ¶
func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SRegion) GetIStoragecacheById ¶
func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
func (*SRegion) GetIStoragecaches ¶
func (self *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)
func (*SRegion) GetIVMById ¶
func (self *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error)
func (*SRegion) GetIVpcById ¶
func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
func (*SRegion) GetIZoneById ¶
func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
func (*SRegion) GetIZones ¶
func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)
func (*SRegion) GetInstances ¶
func (*SRegion) GetNetworks ¶
func (*SRegion) GetProvider ¶
func (*SRegion) GetQemuConfig ¶
func (*SRegion) GetStorages ¶
func (*SRegion) GetStoragesByHost ¶
func (*SRegion) GetVNCInfo ¶
func (self *SRegion) GetVNCInfo(node string, vmId int) (*InstanceVnc, error)
func (*SRegion) GetVmAgentNetworkInterfaces ¶
func (*SRegion) GetVmPowerStatus ¶
func (*SRegion) ResetVmPassword ¶
func (*SRegion) ResizeDisk ¶
type SStorage ¶
type SStorage struct { multicloud.SStorageBase ProxmoxTags Storage string `json:"storage"` Status string Id string Node string Content string `json:"content"` MaxDisk int64 `json:"maxdisk"` Disk int64 `json:"disk"` PluginType string `json:"plugintype"` // contains filtered or unexported fields }
func (*SStorage) CreateIDisk ¶
func (self *SStorage) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)
func (*SStorage) GetCapacityMB ¶
func (*SStorage) GetCapacityUsedMB ¶
func (*SStorage) GetEnabled ¶
func (*SStorage) GetGlobalId ¶
func (*SStorage) GetIDiskById ¶
func (self *SStorage) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)
func (*SStorage) GetIDisks ¶
func (self *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SStorage) GetIStoragecache ¶
func (self *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SStorage) GetIZone ¶
func (self *SStorage) GetIZone() cloudprovider.ICloudZone
func (*SStorage) GetMediumType ¶
func (*SStorage) GetMountPoint ¶
func (*SStorage) GetStorageConf ¶
func (self *SStorage) GetStorageConf() jsonutils.JSONObject
func (*SStorage) GetStorageType ¶
func (*SStorage) IsSysDiskStore ¶
type SStorageResource ¶
type SStoragecache ¶
type SStoragecache struct { multicloud.SResourceBase ProxmoxTags Node string // contains filtered or unexported fields }
func (*SStoragecache) GetGlobalId ¶
func (self *SStoragecache) GetGlobalId() string
func (*SStoragecache) GetICloudImages ¶
func (self *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)
func (*SStoragecache) GetICustomizedCloudImages ¶
func (seflf *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)
func (*SStoragecache) GetIImageById ¶
func (self *SStoragecache) GetIImageById(id string) (cloudprovider.ICloudImage, error)
func (*SStoragecache) GetId ¶
func (self *SStoragecache) GetId() string
func (*SStoragecache) GetName ¶
func (self *SStoragecache) GetName() string
func (*SStoragecache) GetPath ¶
func (self *SStoragecache) GetPath() string
func (*SStoragecache) GetStatus ¶
func (self *SStoragecache) GetStatus() string
func (*SStoragecache) UploadImage ¶
func (self *SStoragecache) UploadImage(ctx context.Context, opts *cloudprovider.SImageCreateOption, callback func(float32)) (string, error)
type SVmResource ¶
type SVpc ¶
type SVpc struct { multicloud.SVpc ProxmoxTags // contains filtered or unexported fields }
func (*SVpc) GetCidrBlock ¶
func (*SVpc) GetGlobalId ¶
func (*SVpc) GetIRouteTableById ¶
func (self *SVpc) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)
func (*SVpc) GetIRouteTables ¶
func (self *SVpc) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)
func (*SVpc) GetISecurityGroups ¶
func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)
func (*SVpc) GetIWireById ¶
func (self *SVpc) GetIWireById(id string) (cloudprovider.ICloudWire, error)
func (*SVpc) GetIWires ¶
func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SVpc) GetIsDefault ¶
func (*SVpc) GetRegion ¶
func (self *SVpc) GetRegion() cloudprovider.ICloudRegion
func (*SVpc) IsEmulated ¶
type SWire ¶
type SWire struct { multicloud.SResourceBase ProxmoxTags // contains filtered or unexported fields }
func (*SWire) CreateINetwork ¶
func (self *SWire) CreateINetwork(opts *cloudprovider.SNetworkCreateOptions) (cloudprovider.ICloudNetwork, error)
func (*SWire) GetBandwidth ¶
func (*SWire) GetGlobalId ¶
func (*SWire) GetINetworkById ¶
func (self *SWire) GetINetworkById(id string) (cloudprovider.ICloudNetwork, error)
func (*SWire) GetINetworks ¶
func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)
func (*SWire) GetIVpc ¶
func (self *SWire) GetIVpc() cloudprovider.ICloudVpc
func (*SWire) GetIZone ¶
func (self *SWire) GetIZone() cloudprovider.ICloudZone
type SZone ¶
type SZone struct { multicloud.SResourceBase ProxmoxTags Name string Nodes int Quorate int Version int // contains filtered or unexported fields }
func (*SZone) GetGlobalId ¶
func (*SZone) GetI18n ¶
func (self *SZone) GetI18n() cloudprovider.SModelI18nTable
func (*SZone) GetIHostById ¶
func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SZone) GetIHosts ¶
func (self *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)
func (*SZone) GetIRegion ¶
func (self *SZone) GetIRegion() cloudprovider.ICloudRegion
func (*SZone) GetIStorageById ¶
func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SZone) GetIStorages ¶
func (self *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)
type VmBase ¶
type VmBase struct { Name string `json:"name"` Description string `json:"Description"` Tags string `json:"tags"` Args string `json:"args"` Bios string `json:"bios"` OnBoot int `json:"onboot"` Startup string `json:"startup"` Tablet int `json:"tablet"` Ostype string `json:"ostype"` Memory int64 `json:"memory"` Balloon int64 `json:"balloon"` Cores int64 `json:"cores"` Vcpus int64 `json:"vcpus"` Sockets int64 `json:"sockets"` Cpu string `json:"cpu"` Numa int `json:"numa"` Hotplug string `json:"hotplug"` Boot string `json:"boot"` Bootdisk string `json:"bootdisk"` Kvm int `json:"kvm"` Scsihw string `json:"scsihw"` Hookscript string `json:"hookscript"` Machine string `json:"machine"` Ide2 string `json:"ide2,omitempty"` Ciuser string `json:"ciuser"` Cipassword string `json:"cipassword"` Cicustom string `json:"cicustom"` Searchdomain string `json:"searchdomain"` Nameserver string `json:"nameserver"` Sshkeys string `json:"sshkeys"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.