Documentation ¶
Index ¶
- Constants
- Variables
- func FetchAnonymousFieldValue(val interface{}, target interface{}) bool
- func InitEsxiConfig(opt EsxiOptions) error
- func NewAHCIDev(key, ctlKey int32) types.BaseVirtualDevice
- func NewCDROMDev(path string, key, ctlKey int32) types.BaseVirtualDevice
- func NewDiskDev(sizeMb int64, config SDiskConfig) *types.VirtualDisk
- func NewIDEDev(key, index int32) types.BaseVirtualDevice
- func NewSCSIDev(key, ctlKey int32, driver string) types.BaseVirtualDevice
- func NewSVGADev(key, ctlKey int32) types.BaseVirtualDevice
- func NewUSBController(key *int32) types.BaseVirtualDevice
- func NewVNICDev(host *SHost, mac, driver string, bridge string, vlanId int32, ...) (types.BaseVirtualDevice, error)
- func Properties(c *vim25.Client, ctx context.Context, r types.ManagedObjectReference, ...) error
- type ESXiClientConfig
- func (cfg *ESXiClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *ESXiClientConfig
- func (cfg *ESXiClientConfig) Debug(debug bool) *ESXiClientConfig
- func (cfg *ESXiClientConfig) Format(format string) *ESXiClientConfig
- func (cfg *ESXiClientConfig) Managed(managed bool) *ESXiClientConfig
- type EsxiOptions
- type IDiskBackingInfo
- type INetworkInfo
- type IPV4Range
- type IVMNetwork
- type IVirtualSwitch
- type ImportParams
- type SCdromInfo
- type SCluster
- type SCreateVMParam
- type SDatacenter
- func (dc *SDatacenter) FetchFakeTempateVMs(regex string) ([]*SVirtualMachine, error)
- func (dc *SDatacenter) FetchNoTemplateHostEntityReferens() ([]types.ManagedObjectReference, error)
- func (dc *SDatacenter) FetchNoTemplateVMEntityReferens() ([]types.ManagedObjectReference, error)
- func (dc *SDatacenter) FetchNoTemplateVMs() ([]*SVirtualMachine, error)
- func (dc *SDatacenter) FetchTemplateVMById(id string) (*SVirtualMachine, error)
- func (dc *SDatacenter) FetchTemplateVMs() ([]*SVirtualMachine, error)
- func (dc *SDatacenter) FetchVMById(id string) (*SVirtualMachine, error)
- func (dc *SDatacenter) FetchVMs() ([]*SVirtualMachine, error)
- func (dc *SDatacenter) GetCluster(cluster string) (*SCluster, error)
- func (dc *SDatacenter) GetIHostByMoId(idstr string) (cloudprovider.ICloudHost, error)
- func (dc *SDatacenter) GetIHosts() ([]cloudprovider.ICloudHost, error)
- func (dc *SDatacenter) GetIStorageByMoId(idstr string) (cloudprovider.ICloudStorage, error)
- func (dc *SDatacenter) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (dc *SDatacenter) GetNetworks() ([]IVMNetwork, error)
- func (dc *SDatacenter) GetResourcePools() ([]cloudprovider.ICloudProject, error)
- func (dc *SDatacenter) GetTemplateVMs() ([]*SVirtualMachine, error)
- func (dc *SDatacenter) ListClusters() ([]*SCluster, error)
- type SDatastore
- func (self *SDatastore) CheckDirC(remotePath string) error
- func (self *SDatastore) CheckFile(ctx context.Context, remotePath string) (*SDatastoreFileInfo, error)
- func (self *SDatastore) CheckVmdk(ctx context.Context, remotePath string) error
- func (self *SDatastore) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)
- func (self *SDatastore) Delete(ctx context.Context, remotePath string) error
- func (self *SDatastore) Delete2(ctx context.Context, remotePath string, isNamespace, force bool) error
- func (self *SDatastore) DeleteVmdk(ctx context.Context, remotePath string) error
- func (self *SDatastore) Download(ctx context.Context, remotePath string, writer io.Writer) error
- func (self *SDatastore) FetchFakeTempateVMById(id string, regex string) (*SVirtualMachine, error)
- func (self *SDatastore) FetchFakeTempateVMs(regex string) ([]*SVirtualMachine, error)
- func (self *SDatastore) FetchNoTemplateVMs() ([]*SVirtualMachine, error)
- func (self *SDatastore) FetchTemplateVMById(id string) (*SVirtualMachine, error)
- func (self *SDatastore) FetchTemplateVMs() ([]*SVirtualMachine, error)
- func (self *SDatastore) FileGetContent(ctx context.Context, remotePath string) ([]byte, error)
- func (self *SDatastore) FilePutContent(ctx context.Context, remotePath string, content string) error
- func (self *SDatastore) GetAttachedHosts() ([]cloudprovider.ICloudHost, error)
- func (self *SDatastore) GetCapacityMB() int64
- func (self *SDatastore) GetCapacityUsedMB() int64
- func (self *SDatastore) GetEnabled() bool
- func (self *SDatastore) GetFullPath(remotePath string) string
- func (self *SDatastore) GetGlobalId() string
- func (self *SDatastore) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)
- func (self *SDatastore) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SDatastore) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SDatastore) GetIZone() cloudprovider.ICloudZone
- func (self *SDatastore) GetMediumType() string
- func (self *SDatastore) GetMountPoint() string
- func (self *SDatastore) GetName() string
- func (self *SDatastore) GetPathUrl(remotePath string) string
- func (self *SDatastore) GetRelName() string
- func (self *SDatastore) GetStatus() string
- func (self *SDatastore) GetStorageConf() jsonutils.JSONObject
- func (self *SDatastore) GetStorageType() string
- func (self *SDatastore) GetUrl() string
- func (self *SDatastore) GetVmdkInfo(ctx context.Context, remotePath string) (*vmdkutils.SVMDKInfo, error)
- func (self *SDatastore) HasFile(remotePath string) bool
- func (self *SDatastore) ImportISO(ctx context.Context, isoFile, remotePath string, host *SHost) error
- func (self *SDatastore) ImportVM(ctx context.Context, diskFile, name string, host *SHost) (*object.VirtualMachine, error)
- func (self *SDatastore) ImportVMDK(ctx context.Context, diskFile, remotePath string, host *SHost) error
- func (self *SDatastore) IsEmulated() bool
- func (self *SDatastore) IsSysDiskStore() bool
- func (self *SDatastore) ListDir(ctx context.Context, remotePath string) ([]SDatastoreFileInfo, error)
- func (self *SDatastore) ListPath(ctx context.Context, remotePath string) ([]types.HostDatastoreBrowserSearchResults, error)
- func (self *SDatastore) MakeDir(remotePath string) error
- func (self *SDatastore) MoveVmdk(ctx context.Context, srcPath string, dstPath string) error
- func (self *SDatastore) Refresh() error
- func (self *SDatastore) RemoveDir(ctx context.Context, remotePath string) error
- func (self *SDatastore) Upload(ctx context.Context, remotePath string, body io.Reader) error
- type SDatastoreFileInfo
- type SDatastoreImageCache
- func (self *SDatastoreImageCache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)
- func (self *SDatastoreImageCache) GetGlobalId() string
- func (self *SDatastoreImageCache) GetICloudImages() ([]cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) GetIImageInImagecache() ([]cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) GetIImageInTemplateVMs() ([]cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) GetIImageInTemplateVMsById(id string) (cloudprovider.ICloudImage, error)
- func (self *SDatastoreImageCache) GetId() string
- func (self *SDatastoreImageCache) GetName() string
- func (self *SDatastoreImageCache) GetPath() string
- func (self *SDatastoreImageCache) GetStatus() string
- func (self *SDatastoreImageCache) IsEmulated() bool
- func (self *SDatastoreImageCache) Refresh() error
- func (self *SDatastoreImageCache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (string, error)
- type SDiskConfig
- type SDiskInfo
- type SDistributedVirtualPortgroup
- func (net *SDistributedVirtualPortgroup) AddHostToDVS(host *SHost) (err error)
- func (net *SDistributedVirtualPortgroup) ContainHost(host *SHost) bool
- func (net *SDistributedVirtualPortgroup) FindPort() (*types.DistributedVirtualPort, error)
- func (net *SDistributedVirtualPortgroup) GetActivePorts() []string
- func (net *SDistributedVirtualPortgroup) GetDVSUuid() (string, error)
- func (net *SDistributedVirtualPortgroup) GetName() string
- func (net *SDistributedVirtualPortgroup) GetNumPorts() int32
- func (net *SDistributedVirtualPortgroup) GetType() string
- func (net *SDistributedVirtualPortgroup) GetVlanId() int32
- func (net *SDistributedVirtualPortgroup) GetVlanMode() string
- func (net *SDistributedVirtualPortgroup) SetHostPortGroup(pg types.HostPortGroup)
- func (net *SDistributedVirtualPortgroup) Uplink() bool
- type SDistributedVirtualSwitch
- type SESXiClient
- func NewESXiClient(cfg *ESXiClientConfig) (*SESXiClient, error)
- func NewESXiClient2(cfg *ESXiClientConfig) (*SESXiClient, error)
- func NewESXiClientFromAccessInfo(ctx context.Context, accessInfo *vcenter.SVCenterAccessInfo) (*SESXiClient, error)
- func NewESXiClientFromJson(ctx context.Context, input jsonutils.JSONObject) (*SESXiClient, *vcenter.SVCenterAccessInfo, error)
- func (cli *SESXiClient) About() jsonutils.JSONObject
- func (cli *SESXiClient) AllHostIP() (map[string]string, []mo.HostSystem, error)
- func (cli *SESXiClient) CopyDisk(ctx context.Context, src, dst string, isForce bool) error
- func (cli *SESXiClient) DoExtendDiskOnline(_vm *SVirtualMachine, _disk *SVirtualDisk, newSizeMb int64) error
- func (cli *SESXiClient) ExtendDisk(url string, newSizeMb int64) error
- func (cli *SESXiClient) FindDatacenterByMoId(dcId string) (*SDatacenter, error)
- func (cli *SESXiClient) FindHostByIp(hostIp string) (*SHost, error)
- func (cli *SESXiClient) FindHostByMoId(moId string) (cloudprovider.ICloudHost, error)
- func (cli *SESXiClient) FindVMByPrivateID(idstr string) (*SVirtualMachine, error)
- func (cli *SESXiClient) GetAccountId() string
- func (cli *SESXiClient) GetCapabilities() []string
- func (cli *SESXiClient) GetDatacenters() ([]*SDatacenter, error)
- func (self *SESXiClient) GetEcsMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
- func (self *SESXiClient) GetHostMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
- func (cli *SESXiClient) GetI18n() cloudprovider.SModelI18nTable
- func (self *SESXiClient) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)
- func (cli *SESXiClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (cli *SESXiClient) GetIHosts() ([]cloudprovider.ICloudHost, error)
- func (cli *SESXiClient) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error)
- func (cli *SESXiClient) GetIProjects() ([]cloudprovider.ICloudProject, error)
- func (cli *SESXiClient) GetISkus() ([]cloudprovider.ICloudSku, error)
- func (cli *SESXiClient) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (cli *SESXiClient) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (cli *SESXiClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (cli *SESXiClient) GetIStoragecacheById(idstr string) (cloudprovider.ICloudStoragecache, error)
- func (cli *SESXiClient) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)
- func (cli *SESXiClient) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (cli *SESXiClient) GetIVMById(id string) (cloudprovider.ICloudVM, error)
- func (self *SESXiClient) GetMetricTypes() (jsonutils.JSONObject, error)
- func (self *SESXiClient) GetMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
- func (cli *SESXiClient) GetProvider() string
- func (cli *SESXiClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- func (cli *SESXiClient) GetUUID() string
- func (cli *SESXiClient) GetVersion() string
- func (cli *SESXiClient) HostVmIPs(ctx context.Context) (SNetworkInfo, error)
- func (cli *SESXiClient) HostVmIPsInCluster(ctx context.Context, cluster *SCluster) (SNetworkInfo, error)
- func (cli *SESXiClient) HostVmIPsInDc(ctx context.Context, dc *SDatacenter) (SNetworkInfo, error)
- func (cli *SESXiClient) HostVmIPsPro(ctx context.Context) (SNetworkInfoPro, error)
- func (cli *SESXiClient) IsHostIpExists(hostIp string) (bool, error)
- func (cli *SESXiClient) IsVCenter() bool
- func (cli *SESXiClient) IsValid() bool
- func (cli *SESXiClient) MoveDisk(ctx context.Context, src, dst string, isForce bool) error
- func (cli *SESXiClient) SearchTemplateVM(id string) (*SVirtualMachine, error)
- func (cli *SESXiClient) SearchVM(id string) (*SVirtualMachine, error)
- func (cli *SESXiClient) VMIP(host mo.HostSystem) (map[string][]string, error)
- func (cli *SESXiClient) VMIP2() ([]SVMIPInfo, error)
- type SEsxiImageInfo
- type SEsxiInstanceSnapshotInfo
- type SHost
- func (host *SHost) CloneVM(ctx context.Context, from *SVirtualMachine, ...) (*SVirtualMachine, error)
- func (self *SHost) CreateVM(desc *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
- func (self *SHost) CreateVM2(ctx context.Context, ds *SDatastore, params SCreateVMParam) (needDeploy bool, vm *SVirtualMachine, err error)
- func (self *SHost) DoCreateVM(ctx context.Context, ds *SDatastore, params SCreateVMParam) (needDeploy bool, vm *SVirtualMachine, err error)
- func (host *SHost) FileUrlPathToDsPath(path string) (string, error)
- func (host *SHost) FindDataStoreById(id string) (*SDatastore, error)
- func (host *SHost) FindNetworkByVlanID(vlanID int32) (IVMNetwork, error)
- func (self *SHost) GetAccessIp() string
- func (self *SHost) GetAccessMac() string
- func (host *SHost) GetCluster() (*SCluster, error)
- func (self *SHost) GetCpuCount() int
- func (self *SHost) GetCpuDesc() string
- func (self *SHost) GetCpuMhz() int
- func (host *SHost) GetDataStores() ([]cloudprovider.ICloudStorage, error)
- 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 (host *SHost) GetIHostNicsInternal(debug bool) ([]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) GetIVMs2() ([]cloudprovider.ICloudVM, error)
- func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SHost) GetIsMaintenance() bool
- func (host *SHost) GetManagementServerIp() string
- func (self *SHost) GetMemSizeMB() int
- func (self *SHost) GetName() string
- func (host *SHost) GetNetworks() ([]IVMNetwork, error)
- func (self *SHost) GetNodeCount() int8
- func (host *SHost) GetResourcePool() (*object.ResourcePool, error)
- func (host *SHost) GetResourcePools() ([]mo.ResourcePool, error)
- func (self *SHost) GetSN() string
- func (self *SHost) GetSchedtags() ([]string, error)
- func (host *SHost) GetSiblingHosts() ([]*SHost, error)
- func (self *SHost) GetStatus() string
- func (self *SHost) GetStorageInfo() []SHostStorageInfo
- func (self *SHost) GetStorageSizeMB() int
- func (self *SHost) GetStorageType() string
- func (self *SHost) GetSysInfo() jsonutils.JSONObject
- func (self *SHost) GetTemplateVMById(id string) (*SVirtualMachine, error)
- func (self *SHost) GetTemplateVMs() ([]*SVirtualMachine, error)
- func (self *SHost) GetVersion() string
- func (host *SHost) GetoHostSystem() *object.HostSystem
- func (host *SHost) IsActiveVlanID(vlanID int32) bool
- func (self *SHost) IsEmulated() bool
- func (host *SHost) IsManagedByVCenter() bool
- func (self *SHost) Refresh() error
- func (host *SHost) SyncResourcePool(name string) (*object.ResourcePool, error)
- type SHostNicInfo
- func (nic *SHostNicInfo) GetBridge() string
- func (nic *SHostNicInfo) GetDVPortGroup() string
- func (nic *SHostNicInfo) GetDevice() string
- func (nic *SHostNicInfo) GetDriver() string
- func (nic *SHostNicInfo) GetIndex() int8
- func (nic *SHostNicInfo) GetIpAddr() string
- func (nic *SHostNicInfo) GetIpAddr6() string
- func (nic *SHostNicInfo) GetIpAddr6PrefixLen() int8
- func (nic *SHostNicInfo) GetIpAddrPrefixLen() int8
- func (nic *SHostNicInfo) GetMac() string
- func (nic *SHostNicInfo) GetMtu() int32
- func (nic *SHostNicInfo) GetNicType() string
- func (nic *SHostNicInfo) IsLinkUp() tristate.TriState
- type SHostStorageAdapterInfo
- type SHostStorageDriverInfo
- type SHostStorageEnclosureInfo
- type SHostStorageInfo
- type SIPPool
- type SIPProc
- type SIPVlan
- type SImage
- func (self *SImage) Delete(ctx context.Context) error
- func (img *SImage) GetBios() cloudprovider.TBiosType
- func (self *SImage) GetCreatedAt() time.Time
- 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
- func (self *SImage) IsEmulated() bool
- func (self *SImage) Refresh() error
- type SMacIps
- type SManagedObject
- func (self *SManagedObject) GetDatacenter() (*SDatacenter, error)
- func (self *SManagedObject) GetDatacenterPath() []string
- func (self *SManagedObject) GetDatacenterPathString() string
- func (self *SManagedObject) GetId() string
- func (self *SManagedObject) GetName() string
- func (self *SManagedObject) GetPath() []string
- func (self *SManagedObject) GetType() string
- type SNetwork
- func (net *SNetwork) ContainHost(host *SHost) bool
- func (net *SNetwork) GetActivePorts() []string
- func (net *SNetwork) GetName() string
- func (net *SNetwork) GetNumPorts() int32
- func (net *SNetwork) GetType() string
- func (net *SNetwork) GetVlanId() int32
- func (net *SNetwork) GetVlanMode() string
- func (net *SNetwork) SetHostPortGroup(pg types.HostPortGroup)
- type SNetworkInfo
- type SNetworkInfoBase
- type SNetworkInfoPro
- type SOsInfo
- type SResourcePool
- type SSimpleHostDev
- type SSimpleVM
- type SSysInfo
- type SVMIPInfo
- type SVMTemplate
- func (t *SVMTemplate) Delete(ctx context.Context) error
- func (t *SVMTemplate) GetBios() cloudprovider.TBiosType
- func (t *SVMTemplate) GetCreatedAt() time.Time
- func (t *SVMTemplate) GetFullOsName() string
- func (t *SVMTemplate) GetGlobalId() string
- func (t *SVMTemplate) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (t *SVMTemplate) GetId() string
- func (t *SVMTemplate) GetImageFormat() string
- func (t *SVMTemplate) GetImageStatus() string
- func (t *SVMTemplate) GetImageType() cloudprovider.TImageType
- func (t *SVMTemplate) GetMinOsDiskSizeGb() int
- func (t *SVMTemplate) GetMinRamSizeMb() int
- func (t *SVMTemplate) GetName() string
- func (t *SVMTemplate) GetOsArch() string
- func (t *SVMTemplate) GetOsDist() string
- func (t *SVMTemplate) GetOsLang() string
- func (t *SVMTemplate) GetOsType() cloudprovider.TOsType
- func (t *SVMTemplate) GetOsVersion() string
- func (t *SVMTemplate) GetSizeByte() int64
- func (t *SVMTemplate) GetStatus() string
- func (t *SVMTemplate) GetSubImages() []cloudprovider.SSubImage
- func (t *SVMTemplate) IsEmulated() bool
- func (t *SVMTemplate) Refresh() error
- type SVirtualCdrom
- type SVirtualDevice
- type SVirtualDisk
- func (disk *SVirtualDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)
- func (disk *SVirtualDisk) Delete(ctx context.Context) error
- func (disk *SVirtualDisk) GetAccessPath() string
- func (disk *SVirtualDisk) GetBillingType() string
- func (disk *SVirtualDisk) GetCacheMode() string
- func (disk *SVirtualDisk) GetCreatedAt() time.Time
- func (disk *SVirtualDisk) GetDiskFormat() string
- func (disk *SVirtualDisk) GetDiskSizeMB() int
- func (disk *SVirtualDisk) GetDiskType() string
- func (disk *SVirtualDisk) GetDriver() string
- func (disk *SVirtualDisk) GetExpiredAt() time.Time
- func (disk *SVirtualDisk) GetFilename() string
- func (disk *SVirtualDisk) GetFsFormat() string
- func (disk *SVirtualDisk) GetGlobalId() string
- func (disk *SVirtualDisk) GetISnapshot(idStr string) (cloudprovider.ICloudSnapshot, error)
- func (disk *SVirtualDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (disk *SVirtualDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
- func (disk *SVirtualDisk) GetId() string
- func (disk *SVirtualDisk) GetIsAutoDelete() bool
- func (disk *SVirtualDisk) GetIsNonPersistent() bool
- func (disk *SVirtualDisk) GetMountpoint() string
- func (disk *SVirtualDisk) GetName() string
- func (disk *SVirtualDisk) GetProjectId() string
- func (disk *SVirtualDisk) GetStatus() string
- func (disk *SVirtualDisk) GetTemplateId() string
- func (disk *SVirtualDisk) IsEmulated() bool
- func (disk *SVirtualDisk) MatchId(id string) bool
- func (disk *SVirtualDisk) Rebuild(ctx context.Context) error
- func (disk *SVirtualDisk) Refresh() error
- func (disk *SVirtualDisk) Reset(ctx context.Context, snapshotId string) (string, error)
- func (disk *SVirtualDisk) Resize(ctx context.Context, newSizeMb int64) error
- func (disk *SVirtualDisk) ResizePartition(ctx context.Context, accessInfo vcenter.SVCenterAccessInfo) error
- type SVirtualMachine
- func (self *SVirtualMachine) AssignSecurityGroup(secgroupId string) error
- func (self *SVirtualMachine) AttachDisk(ctx context.Context, diskId string) error
- func (self *SVirtualMachine) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error
- func (self *SVirtualMachine) CheckFileInfo(ctx context.Context) error
- func (self *SVirtualMachine) ConvertPublicIpToEip() error
- func (self *SVirtualMachine) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)
- func (self *SVirtualMachine) CreateInstanceSnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudInstanceSnapshot, error)
- func (self *SVirtualMachine) DeleteVM(ctx context.Context) error
- func (self *SVirtualMachine) DeployVM(ctx context.Context, name string, username string, password string, ...) error
- func (self *SVirtualMachine) DetachDisk(ctx context.Context, diskId string) error
- func (self *SVirtualMachine) DoCustomize(ctx context.Context, params jsonutils.JSONObject) error
- func (self *SVirtualMachine) DoRebuildRoot(ctx context.Context, imagePath string, uuid string) error
- func (self *SVirtualMachine) DoRename(ctx context.Context, name string) error
- func (self *SVirtualMachine) ExportTemplate(ctx context.Context, idx int, diskPath string) error
- func (self *SVirtualMachine) FindController(ctx context.Context, driver string) ([]SVirtualDevice, error)
- func (self *SVirtualMachine) FindDiskByDriver(drivers ...string) []SVirtualDisk
- func (self *SVirtualMachine) FindMinDiffKey(limit int32) int32
- func (self *SVirtualMachine) GetBillingType() string
- func (vm *SVirtualMachine) GetBios() cloudprovider.TBiosType
- func (self *SVirtualMachine) GetBootOrder() string
- func (self *SVirtualMachine) GetCreatedAt() time.Time
- func (self *SVirtualMachine) GetError() error
- func (self *SVirtualMachine) GetExpiredAt() time.Time
- func (vm *SVirtualMachine) GetFullOsName() string
- func (self *SVirtualMachine) GetGlobalId() string
- func (self *SVirtualMachine) GetGuestFamily() string
- func (self *SVirtualMachine) GetGuestFullName() string
- func (self *SVirtualMachine) GetGuestId() string
- func (self *SVirtualMachine) GetGuestState() string
- func (self *SVirtualMachine) GetGuestToolsRunningStatus() string
- func (self *SVirtualMachine) GetGuestToolsStatus() string
- func (self *SVirtualMachine) GetHostname() string
- func (self *SVirtualMachine) GetHypervisor() string
- func (self *SVirtualMachine) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)
- func (self *SVirtualMachine) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SVirtualMachine) GetIEIP() (cloudprovider.ICloudEIP, error)
- func (self *SVirtualMachine) GetIHost() cloudprovider.ICloudHost
- func (self *SVirtualMachine) GetIHostId() string
- func (self *SVirtualMachine) GetINics() ([]cloudprovider.ICloudNic, error)
- func (self *SVirtualMachine) GetInstanceSnapshot(idStr string) (cloudprovider.ICloudInstanceSnapshot, error)
- func (self *SVirtualMachine) GetInstanceSnapshots() ([]cloudprovider.ICloudInstanceSnapshot, error)
- func (self *SVirtualMachine) GetInstanceType() string
- func (self *SVirtualMachine) GetIps() []string
- func (self *SVirtualMachine) GetMachine() string
- func (self *SVirtualMachine) GetMoid() string
- func (vm *SVirtualMachine) GetOsArch() string
- func (vm *SVirtualMachine) GetOsDist() string
- func (vm *SVirtualMachine) GetOsLang() string
- func (vm *SVirtualMachine) GetOsType() cloudprovider.TOsType
- func (vm *SVirtualMachine) GetOsVersion() string
- func (self *SVirtualMachine) GetProjectId() string
- func (self *SVirtualMachine) GetSecurityGroupIds() ([]string, error)
- func (self *SVirtualMachine) GetSerialOutput(port int) (string, error)
- func (self *SVirtualMachine) GetStatus() string
- func (self *SVirtualMachine) GetSysTags() map[string]string
- func (self *SVirtualMachine) GetToolsVersion() string
- func (self *SVirtualMachine) GetVGADevice() string
- func (self *SVirtualMachine) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
- func (self *SVirtualMachine) GetVcpuCount() int
- func (self *SVirtualMachine) GetVdi() string
- func (self *SVirtualMachine) GetVersion() string
- func (self *SVirtualMachine) GetVga() string
- func (self *SVirtualMachine) GetVmemSizeMB() int
- func (self *SVirtualMachine) GetVmrcInfo() (*cloudprovider.ServerVncOutput, error)
- func (self *SVirtualMachine) GetWebmksInfo() (*cloudprovider.ServerVncOutput, error)
- func (self *SVirtualMachine) IsAutoRenew() bool
- func (self *SVirtualMachine) IsEmulated() bool
- func (self *SVirtualMachine) IsTemplate() bool
- func (self *SVirtualMachine) LiveMigrateVM(hostId string) error
- func (self *SVirtualMachine) MigrateVM(hostId string) error
- func (self *SVirtualMachine) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
- func (self *SVirtualMachine) Refresh() error
- func (self *SVirtualMachine) Renew(bc billing.SBillingCycle) error
- func (self *SVirtualMachine) ResetToInstanceSnapshot(ctx context.Context, idStr string) error
- func (self *SVirtualMachine) ResumeVM(ctx context.Context) error
- func (self *SVirtualMachine) SetAutoRenew(bc billing.SBillingCycle) error
- func (self *SVirtualMachine) SetSecurityGroups(secgroupIds []string) error
- func (self *SVirtualMachine) StartVM(ctx context.Context) error
- func (self *SVirtualMachine) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
- func (self *SVirtualMachine) SuspendVM(ctx context.Context) error
- func (self *SVirtualMachine) UpdateUserData(userData string) error
- func (self *SVirtualMachine) UpdateVM(ctx context.Context, name string) error
- type SVirtualMachineSnapshot
- func (s *SVirtualMachineSnapshot) Delete() error
- func (s *SVirtualMachineSnapshot) GetDescription() string
- func (s *SVirtualMachineSnapshot) GetGlobalId() string
- func (s *SVirtualMachineSnapshot) GetId() string
- func (s *SVirtualMachineSnapshot) GetName() string
- func (s *SVirtualMachineSnapshot) GetProjectId() string
- func (s *SVirtualMachineSnapshot) GetStatus() string
- func (s *SVirtualMachineSnapshot) IsEmulated() bool
- func (s *SVirtualMachineSnapshot) Refresh() error
- type SVirtualNIC
- type SVirtualSwitch
- type SVirtualSwitchMap
- type SVirtualSwitchSpec
- type SVirtualVGA
- type TOSArch
- type TOSType
- type VMFetcher
Constants ¶
const ( LINUX = TOSType("Linux") WINDOWS = TOSType("Windows") MACOS = TOSType("macOS") FREEBSD = TOSType("FreeBSD") SOLARIS = TOSType("Solaris") VMWARE = TOSType("VMware") X86 = TOSArch("x86") X86_64 = TOSArch("x86_64") )
const ( MONTYPE_HOSTSYSTEM = "HostSystem" MONTYPE_VIRTUALMACHINE = "VirtualMachine" )
const ( NET_TYPE_NETWORK = "network" NET_TYPE_DVPORTGROUP = "dvportgroup" VLAN_MODE_NONE = "none" VLAN_MODE_VLAN = "vlan" VLAN_MODE_PVLAN = "pvlan" VLAN_MODE_TRUNK = "trunk" )
const (
CLOUD_PROVIDER_VMWARE = api.CLOUD_PROVIDER_VMWARE
)
const (
IMAGE_CACHE_DIR_NAME = "image_cache"
)
Variables ¶
var ( SIMPLE_HOST_PROPS = []string{"name", "config.network", "vm"} SIMPLE_VM_PROPS = []string{"name", "guest.net", "config.template", "config.hardware.device"} SIMPLE_DVPG_PROPS = []string{"key", "config.defaultPortConfig", "config.distributedVirtualSwitch"} SIMPLE_DVS_PROPS = []string{"name", "config"} SIMPLE_NETWORK_PROPS = []string{"name"} )
var DATACENTER_PROPS = []string{"name", "parent", "datastore", "network"}
var DATASTORE_PROPS = []string{"name", "parent", "info", "summary", "host", "vm"}
var DVPORTGROUP_PROPS = []string{"name", "parent", "host", "config", "key"}
var DVS_PROPS = []string{"name"}
var (
ErrInvalidFormat = errors.Error("vmdk: invalid format (must be streamOptimized)")
)
var ErrTimeConsuming = errors.Error("time consuming")
var (
GuestOsInfo = map[string]SOsInfo{}/* 134 elements not displayed */
)
var HOST_PROPS = []string{"name", "config.network", "vm"}
var HOST_SYSTEM_PROPS []string
var NETWORK_PROPS = []string{"name", "parent", "host"}
var RESOURCEPOOL_PROPS = []string{"name", "parent", "host"}
var VIRTUAL_MACHINE_PROPS = []string{"name", "parent", "resourcePool", "snapshot", "config"}
var VM_PROPS = []string{"name", "guest.net", "config.template", "summary.config.uuid", "summary.runtime.powerState"}
Functions ¶
func FetchAnonymousFieldValue ¶
func FetchAnonymousFieldValue(val interface{}, target interface{}) bool
func InitEsxiConfig ¶
func InitEsxiConfig(opt EsxiOptions) error
func NewAHCIDev ¶
func NewAHCIDev(key, ctlKey int32) types.BaseVirtualDevice
func NewCDROMDev ¶
func NewCDROMDev(path string, key, ctlKey int32) types.BaseVirtualDevice
func NewDiskDev ¶
func NewDiskDev(sizeMb int64, config SDiskConfig) *types.VirtualDisk
func NewIDEDev ¶
func NewIDEDev(key, index int32) types.BaseVirtualDevice
func NewSCSIDev ¶
func NewSCSIDev(key, ctlKey int32, driver string) types.BaseVirtualDevice
func NewSVGADev ¶
func NewSVGADev(key, ctlKey int32) types.BaseVirtualDevice
func NewUSBController ¶
func NewUSBController(key *int32) types.BaseVirtualDevice
func NewVNICDev ¶
func Properties ¶
Types ¶
type ESXiClientConfig ¶
type ESXiClientConfig struct {
// contains filtered or unexported fields
}
func NewESXiClientConfig ¶
func NewESXiClientConfig(host string, port int, account, password string) *ESXiClientConfig
func (*ESXiClientConfig) CloudproviderConfig ¶
func (cfg *ESXiClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *ESXiClientConfig
func (*ESXiClientConfig) Debug ¶
func (cfg *ESXiClientConfig) Debug(debug bool) *ESXiClientConfig
func (*ESXiClientConfig) Format ¶
func (cfg *ESXiClientConfig) Format(format string) *ESXiClientConfig
func (*ESXiClientConfig) Managed ¶
func (cfg *ESXiClientConfig) Managed(managed bool) *ESXiClientConfig
type EsxiOptions ¶
type IDiskBackingInfo ¶
type IDiskBackingInfo interface { GetParent() IDiskBackingInfo GetUuid() string GetDiskMode() string GetWriteThrough() bool GetFileName() string GetDatastore() *types.ManagedObjectReference }
type INetworkInfo ¶
type INetworkInfo interface { Insert(SIPProc, netutils.IPV4Addr) AppendVMs(name string, IpVlans []SIPVlan) }
func NewNetworkInfo ¶
func NewNetworkInfo(dvs bool, size int) INetworkInfo
type IVMNetwork ¶
type IVirtualSwitch ¶
type IVirtualSwitch interface {
FindNetworkByVlanID(vlanID int32) (IVMNetwork, error)
}
type ImportParams ¶
type ImportParams struct { Path string Logger progress.Sinker Type types.VirtualDiskType Force bool Datacenter *object.Datacenter Pool *object.ResourcePool Folder *object.Folder Host *object.HostSystem }
ImportParams contains the set of optional params to the Import function. Note that "optional" may depend on environment, such as ESX or vCenter.
type SCluster ¶
type SCluster struct {
SManagedObject
}
func NewCluster ¶
func NewCluster(manager *SESXiClient, cluster *mo.ClusterComputeResource, dc *SDatacenter) *SCluster
func (*SCluster) CreateResourcePool ¶
func (cluster *SCluster) CreateResourcePool(name string) (*mo.ResourcePool, error)
func (*SCluster) ListResourcePools ¶
func (cluster *SCluster) ListResourcePools() ([]mo.ResourcePool, error)
func (*SCluster) SyncResourcePool ¶
func (cluster *SCluster) SyncResourcePool(name string) (*mo.ResourcePool, error)
type SCreateVMParam ¶
type SCreateVMParam struct { Name string Uuid string OsName string Cpu int Mem int Bios string Cdrom SCdromInfo Disks []SDiskInfo Nics []jsonutils.JSONObject ResourcePool string InstanceSnapshotInfo SEsxiInstanceSnapshotInfo }
type SDatacenter ¶
type SDatacenter struct { SManagedObject Name string // contains filtered or unexported fields }
func (*SDatacenter) FetchFakeTempateVMs ¶
func (dc *SDatacenter) FetchFakeTempateVMs(regex string) ([]*SVirtualMachine, error)
func (*SDatacenter) FetchNoTemplateHostEntityReferens ¶
func (dc *SDatacenter) FetchNoTemplateHostEntityReferens() ([]types.ManagedObjectReference, error)
func (*SDatacenter) FetchNoTemplateVMEntityReferens ¶
func (dc *SDatacenter) FetchNoTemplateVMEntityReferens() ([]types.ManagedObjectReference, error)
func (*SDatacenter) FetchNoTemplateVMs ¶
func (dc *SDatacenter) FetchNoTemplateVMs() ([]*SVirtualMachine, error)
func (*SDatacenter) FetchTemplateVMById ¶
func (dc *SDatacenter) FetchTemplateVMById(id string) (*SVirtualMachine, error)
func (*SDatacenter) FetchTemplateVMs ¶
func (dc *SDatacenter) FetchTemplateVMs() ([]*SVirtualMachine, error)
func (*SDatacenter) FetchVMById ¶
func (dc *SDatacenter) FetchVMById(id string) (*SVirtualMachine, error)
func (*SDatacenter) FetchVMs ¶
func (dc *SDatacenter) FetchVMs() ([]*SVirtualMachine, error)
func (*SDatacenter) GetCluster ¶
func (dc *SDatacenter) GetCluster(cluster string) (*SCluster, error)
func (*SDatacenter) GetIHostByMoId ¶
func (dc *SDatacenter) GetIHostByMoId(idstr string) (cloudprovider.ICloudHost, error)
func (*SDatacenter) GetIHosts ¶
func (dc *SDatacenter) GetIHosts() ([]cloudprovider.ICloudHost, error)
func (*SDatacenter) GetIStorageByMoId ¶
func (dc *SDatacenter) GetIStorageByMoId(idstr string) (cloudprovider.ICloudStorage, error)
func (*SDatacenter) GetIStorages ¶
func (dc *SDatacenter) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SDatacenter) GetNetworks ¶
func (dc *SDatacenter) GetNetworks() ([]IVMNetwork, error)
func (*SDatacenter) GetResourcePools ¶
func (dc *SDatacenter) GetResourcePools() ([]cloudprovider.ICloudProject, error)
func (*SDatacenter) GetTemplateVMs ¶
func (dc *SDatacenter) GetTemplateVMs() ([]*SVirtualMachine, error)
func (*SDatacenter) ListClusters ¶
func (dc *SDatacenter) ListClusters() ([]*SCluster, error)
type SDatastore ¶
type SDatastore struct { multicloud.SStorageBase SManagedObject // contains filtered or unexported fields }
func NewDatastore ¶
func NewDatastore(manager *SESXiClient, ds *mo.Datastore, dc *SDatacenter) *SDatastore
func (*SDatastore) CheckDirC ¶
func (self *SDatastore) CheckDirC(remotePath string) error
CheckDirC will check that Dir 'remotePath' is exist, if not, create one.
func (*SDatastore) CheckFile ¶
func (self *SDatastore) CheckFile(ctx context.Context, remotePath string) (*SDatastoreFileInfo, error)
func (*SDatastore) CheckVmdk ¶
func (self *SDatastore) CheckVmdk(ctx context.Context, remotePath string) error
func (*SDatastore) CreateIDisk ¶
func (self *SDatastore) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)
func (*SDatastore) Delete ¶
func (self *SDatastore) Delete(ctx context.Context, remotePath string) error
func (*SDatastore) Delete2 ¶
func (self *SDatastore) Delete2(ctx context.Context, remotePath string, isNamespace, force bool) error
Delete2 can delete file from this Datastore. isNamespace: remotePath is uuid of namespace on vsan datastore force: ignore nonexistent files and arguments
func (*SDatastore) DeleteVmdk ¶
func (self *SDatastore) DeleteVmdk(ctx context.Context, remotePath string) error
func (*SDatastore) FetchFakeTempateVMById ¶
func (self *SDatastore) FetchFakeTempateVMById(id string, regex string) (*SVirtualMachine, error)
func (*SDatastore) FetchFakeTempateVMs ¶
func (self *SDatastore) FetchFakeTempateVMs(regex string) ([]*SVirtualMachine, error)
func (*SDatastore) FetchNoTemplateVMs ¶
func (self *SDatastore) FetchNoTemplateVMs() ([]*SVirtualMachine, error)
func (*SDatastore) FetchTemplateVMById ¶
func (self *SDatastore) FetchTemplateVMById(id string) (*SVirtualMachine, error)
func (*SDatastore) FetchTemplateVMs ¶
func (self *SDatastore) FetchTemplateVMs() ([]*SVirtualMachine, error)
func (*SDatastore) FileGetContent ¶
func (*SDatastore) FilePutContent ¶
func (*SDatastore) GetAttachedHosts ¶
func (self *SDatastore) GetAttachedHosts() ([]cloudprovider.ICloudHost, error)
func (*SDatastore) GetCapacityMB ¶
func (self *SDatastore) GetCapacityMB() int64
func (*SDatastore) GetCapacityUsedMB ¶
func (self *SDatastore) GetCapacityUsedMB() int64
func (*SDatastore) GetEnabled ¶
func (self *SDatastore) GetEnabled() bool
func (*SDatastore) GetFullPath ¶
func (self *SDatastore) GetFullPath(remotePath string) string
func (*SDatastore) GetGlobalId ¶
func (self *SDatastore) GetGlobalId() string
func (*SDatastore) GetIDiskById ¶
func (self *SDatastore) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)
func (*SDatastore) GetIDisks ¶
func (self *SDatastore) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SDatastore) GetIStoragecache ¶
func (self *SDatastore) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SDatastore) GetIZone ¶
func (self *SDatastore) GetIZone() cloudprovider.ICloudZone
func (*SDatastore) GetMediumType ¶
func (self *SDatastore) GetMediumType() string
func (*SDatastore) GetMountPoint ¶
func (self *SDatastore) GetMountPoint() string
func (*SDatastore) GetName ¶
func (self *SDatastore) GetName() string
func (*SDatastore) GetPathUrl ¶
func (self *SDatastore) GetPathUrl(remotePath string) string
func (*SDatastore) GetRelName ¶
func (self *SDatastore) GetRelName() string
func (*SDatastore) GetStatus ¶
func (self *SDatastore) GetStatus() string
func (*SDatastore) GetStorageConf ¶
func (self *SDatastore) GetStorageConf() jsonutils.JSONObject
func (*SDatastore) GetStorageType ¶
func (self *SDatastore) GetStorageType() string
func (*SDatastore) GetUrl ¶
func (self *SDatastore) GetUrl() string
func (*SDatastore) GetVmdkInfo ¶
func (*SDatastore) HasFile ¶
func (self *SDatastore) HasFile(remotePath string) bool
func (*SDatastore) ImportVM ¶
func (self *SDatastore) ImportVM(ctx context.Context, diskFile, name string, host *SHost) (*object.VirtualMachine, error)
ImportVM will import a vm by uploading a local vmdk
func (*SDatastore) ImportVMDK ¶
func (self *SDatastore) ImportVMDK(ctx context.Context, diskFile, remotePath string, host *SHost) error
ImportVMDK will upload local vmdk 'diskFile' to the 'remotePath' of remote datastore
func (*SDatastore) IsEmulated ¶
func (self *SDatastore) IsEmulated() bool
func (*SDatastore) IsSysDiskStore ¶
func (self *SDatastore) IsSysDiskStore() bool
func (*SDatastore) ListDir ¶
func (self *SDatastore) ListDir(ctx context.Context, remotePath string) ([]SDatastoreFileInfo, error)
func (*SDatastore) ListPath ¶
func (self *SDatastore) ListPath(ctx context.Context, remotePath string) ([]types.HostDatastoreBrowserSearchResults, error)
func (*SDatastore) MakeDir ¶
func (self *SDatastore) MakeDir(remotePath string) error
func (*SDatastore) Refresh ¶
func (self *SDatastore) Refresh() error
type SDatastoreFileInfo ¶
type SDatastoreImageCache ¶
type SDatastoreImageCache struct { multicloud.SResourceBase multicloud.STagBase // contains filtered or unexported fields }
func (*SDatastoreImageCache) CreateIImage ¶
func (self *SDatastoreImageCache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) DownloadImage ¶
func (self *SDatastoreImageCache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)
func (*SDatastoreImageCache) GetGlobalId ¶
func (self *SDatastoreImageCache) GetGlobalId() string
func (*SDatastoreImageCache) GetICloudImages ¶
func (self *SDatastoreImageCache) GetICloudImages() ([]cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) GetICustomizedCloudImages ¶
func (self *SDatastoreImageCache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) GetIImageById ¶
func (self *SDatastoreImageCache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) GetIImageInImagecache ¶
func (self *SDatastoreImageCache) GetIImageInImagecache() ([]cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) GetIImageInTemplateVMs ¶
func (self *SDatastoreImageCache) GetIImageInTemplateVMs() ([]cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) GetIImageInTemplateVMsById ¶
func (self *SDatastoreImageCache) GetIImageInTemplateVMsById(id string) (cloudprovider.ICloudImage, error)
func (*SDatastoreImageCache) GetId ¶
func (self *SDatastoreImageCache) GetId() string
func (*SDatastoreImageCache) GetName ¶
func (self *SDatastoreImageCache) GetName() string
func (*SDatastoreImageCache) GetPath ¶
func (self *SDatastoreImageCache) GetPath() string
func (*SDatastoreImageCache) GetStatus ¶
func (self *SDatastoreImageCache) GetStatus() string
func (*SDatastoreImageCache) IsEmulated ¶
func (self *SDatastoreImageCache) IsEmulated() bool
func (*SDatastoreImageCache) Refresh ¶
func (self *SDatastoreImageCache) Refresh() error
func (*SDatastoreImageCache) UploadImage ¶
func (self *SDatastoreImageCache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, image *cloudprovider.SImageCreateOption, callback func(progress float32)) (string, error)
type SDiskConfig ¶
type SDistributedVirtualPortgroup ¶
type SDistributedVirtualPortgroup struct { SManagedObject HostPortGroup types.HostPortGroup }
func NewDistributedVirtualPortgroup ¶
func NewDistributedVirtualPortgroup(manager *SESXiClient, net *mo.DistributedVirtualPortgroup, dc *SDatacenter) *SDistributedVirtualPortgroup
func (*SDistributedVirtualPortgroup) AddHostToDVS ¶
func (net *SDistributedVirtualPortgroup) AddHostToDVS(host *SHost) (err error)
func (*SDistributedVirtualPortgroup) ContainHost ¶
func (net *SDistributedVirtualPortgroup) ContainHost(host *SHost) bool
func (*SDistributedVirtualPortgroup) FindPort ¶
func (net *SDistributedVirtualPortgroup) FindPort() (*types.DistributedVirtualPort, error)
func (*SDistributedVirtualPortgroup) GetActivePorts ¶
func (net *SDistributedVirtualPortgroup) GetActivePorts() []string
func (*SDistributedVirtualPortgroup) GetDVSUuid ¶
func (net *SDistributedVirtualPortgroup) GetDVSUuid() (string, error)
func (*SDistributedVirtualPortgroup) GetName ¶
func (net *SDistributedVirtualPortgroup) GetName() string
func (*SDistributedVirtualPortgroup) GetNumPorts ¶
func (net *SDistributedVirtualPortgroup) GetNumPorts() int32
func (*SDistributedVirtualPortgroup) GetType ¶
func (net *SDistributedVirtualPortgroup) GetType() string
func (*SDistributedVirtualPortgroup) GetVlanId ¶
func (net *SDistributedVirtualPortgroup) GetVlanId() int32
func (*SDistributedVirtualPortgroup) GetVlanMode ¶
func (net *SDistributedVirtualPortgroup) GetVlanMode() string
func (*SDistributedVirtualPortgroup) SetHostPortGroup ¶
func (net *SDistributedVirtualPortgroup) SetHostPortGroup(pg types.HostPortGroup)
func (*SDistributedVirtualPortgroup) Uplink ¶
func (net *SDistributedVirtualPortgroup) Uplink() bool
type SDistributedVirtualSwitch ¶
type SDistributedVirtualSwitch struct { Host *SHost DistributedVirtualSwitch mo.DistributedVirtualSwitch }
func (*SDistributedVirtualSwitch) FindNetworkByVlanID ¶
func (vs *SDistributedVirtualSwitch) FindNetworkByVlanID(vlanID int32) (IVMNetwork, error)
type SESXiClient ¶
type SESXiClient struct { *ESXiClientConfig cloudprovider.SFakeOnPremiseRegion multicloud.SRegion multicloud.SNoObjectStorageRegion // contains filtered or unexported fields }
func NewESXiClient ¶
func NewESXiClient(cfg *ESXiClientConfig) (*SESXiClient, error)
func NewESXiClient2 ¶
func NewESXiClient2(cfg *ESXiClientConfig) (*SESXiClient, error)
func NewESXiClientFromAccessInfo ¶
func NewESXiClientFromAccessInfo(ctx context.Context, accessInfo *vcenter.SVCenterAccessInfo) (*SESXiClient, error)
func NewESXiClientFromJson ¶
func NewESXiClientFromJson(ctx context.Context, input jsonutils.JSONObject) (*SESXiClient, *vcenter.SVCenterAccessInfo, error)
func (*SESXiClient) About ¶
func (cli *SESXiClient) About() jsonutils.JSONObject
func (*SESXiClient) AllHostIP ¶
func (cli *SESXiClient) AllHostIP() (map[string]string, []mo.HostSystem, error)
func (*SESXiClient) DoExtendDiskOnline ¶
func (cli *SESXiClient) DoExtendDiskOnline(_vm *SVirtualMachine, _disk *SVirtualDisk, newSizeMb int64) error
func (*SESXiClient) ExtendDisk ¶
func (cli *SESXiClient) ExtendDisk(url string, newSizeMb int64) error
func (*SESXiClient) FindDatacenterByMoId ¶
func (cli *SESXiClient) FindDatacenterByMoId(dcId string) (*SDatacenter, error)
func (*SESXiClient) FindHostByIp ¶
func (cli *SESXiClient) FindHostByIp(hostIp string) (*SHost, error)
func (*SESXiClient) FindHostByMoId ¶
func (cli *SESXiClient) FindHostByMoId(moId string) (cloudprovider.ICloudHost, error)
func (*SESXiClient) FindVMByPrivateID ¶
func (cli *SESXiClient) FindVMByPrivateID(idstr string) (*SVirtualMachine, error)
func (*SESXiClient) GetAccountId ¶
func (cli *SESXiClient) GetAccountId() string
func (*SESXiClient) GetCapabilities ¶
func (cli *SESXiClient) GetCapabilities() []string
func (*SESXiClient) GetDatacenters ¶
func (cli *SESXiClient) GetDatacenters() ([]*SDatacenter, error)
func (*SESXiClient) GetEcsMetrics ¶
func (self *SESXiClient) GetEcsMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
func (*SESXiClient) GetHostMetrics ¶
func (self *SESXiClient) GetHostMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
func (*SESXiClient) GetI18n ¶
func (cli *SESXiClient) GetI18n() cloudprovider.SModelI18nTable
func (*SESXiClient) GetIDiskById ¶
func (self *SESXiClient) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)
func (*SESXiClient) GetIHostById ¶
func (cli *SESXiClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SESXiClient) GetIHosts ¶
func (cli *SESXiClient) GetIHosts() ([]cloudprovider.ICloudHost, error)
func (*SESXiClient) GetILoadBalancerBackendGroups ¶
func (cli *SESXiClient) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error)
func (*SESXiClient) GetIProjects ¶
func (cli *SESXiClient) GetIProjects() ([]cloudprovider.ICloudProject, error)
func (*SESXiClient) GetISkus ¶
func (cli *SESXiClient) GetISkus() ([]cloudprovider.ICloudSku, error)
func (*SESXiClient) GetISnapshotById ¶
func (cli *SESXiClient) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)
func (*SESXiClient) GetISnapshots ¶
func (cli *SESXiClient) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SESXiClient) GetIStorageById ¶
func (cli *SESXiClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SESXiClient) GetIStoragecacheById ¶
func (cli *SESXiClient) GetIStoragecacheById(idstr string) (cloudprovider.ICloudStoragecache, error)
func (*SESXiClient) GetIStoragecaches ¶
func (cli *SESXiClient) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)
func (*SESXiClient) GetIStorages ¶
func (cli *SESXiClient) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SESXiClient) GetIVMById ¶
func (cli *SESXiClient) GetIVMById(id string) (cloudprovider.ICloudVM, error)
func (*SESXiClient) GetMetricTypes ¶
func (self *SESXiClient) GetMetricTypes() (jsonutils.JSONObject, error)
func (*SESXiClient) GetMetrics ¶
func (self *SESXiClient) GetMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
func (*SESXiClient) GetProvider ¶
func (cli *SESXiClient) GetProvider() string
func (*SESXiClient) GetSubAccounts ¶
func (cli *SESXiClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
func (*SESXiClient) GetUUID ¶
func (cli *SESXiClient) GetUUID() string
func (*SESXiClient) GetVersion ¶
func (cli *SESXiClient) GetVersion() string
func (*SESXiClient) HostVmIPs ¶
func (cli *SESXiClient) HostVmIPs(ctx context.Context) (SNetworkInfo, error)
func (*SESXiClient) HostVmIPsInCluster ¶
func (cli *SESXiClient) HostVmIPsInCluster(ctx context.Context, cluster *SCluster) (SNetworkInfo, error)
func (*SESXiClient) HostVmIPsInDc ¶
func (cli *SESXiClient) HostVmIPsInDc(ctx context.Context, dc *SDatacenter) (SNetworkInfo, error)
func (*SESXiClient) HostVmIPsPro ¶
func (cli *SESXiClient) HostVmIPsPro(ctx context.Context) (SNetworkInfoPro, error)
func (*SESXiClient) IsHostIpExists ¶
func (cli *SESXiClient) IsHostIpExists(hostIp string) (bool, error)
func (*SESXiClient) IsVCenter ¶
func (cli *SESXiClient) IsVCenter() bool
func (*SESXiClient) IsValid ¶
func (cli *SESXiClient) IsValid() bool
func (*SESXiClient) SearchTemplateVM ¶
func (cli *SESXiClient) SearchTemplateVM(id string) (*SVirtualMachine, error)
func (*SESXiClient) SearchVM ¶
func (cli *SESXiClient) SearchVM(id string) (*SVirtualMachine, error)
func (*SESXiClient) VMIP ¶
func (cli *SESXiClient) VMIP(host mo.HostSystem) (map[string][]string, error)
func (*SESXiClient) VMIP2 ¶
func (cli *SESXiClient) VMIP2() ([]SVMIPInfo, error)
type SEsxiImageInfo ¶
type SHost ¶
type SHost struct { multicloud.SHostBase SManagedObject // contains filtered or unexported fields }
func NewHost ¶
func NewHost(manager *SESXiClient, host *mo.HostSystem, dc *SDatacenter) *SHost
func (*SHost) CloneVM ¶
func (host *SHost) CloneVM(ctx context.Context, from *SVirtualMachine, snapshot *types.ManagedObjectReference, ds *SDatastore, params SCreateVMParam) (*SVirtualMachine, error)
If snapshot is not nil, params.Disks will be ignored
func (*SHost) CreateVM ¶
func (self *SHost) CreateVM(desc *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
func (*SHost) CreateVM2 ¶
func (self *SHost) CreateVM2(ctx context.Context, ds *SDatastore, params SCreateVMParam) (needDeploy bool, vm *SVirtualMachine, err error)
func (*SHost) DoCreateVM ¶
func (self *SHost) DoCreateVM(ctx context.Context, ds *SDatastore, params SCreateVMParam) (needDeploy bool, vm *SVirtualMachine, err error)
func (*SHost) FileUrlPathToDsPath ¶
func (*SHost) FindDataStoreById ¶
func (host *SHost) FindDataStoreById(id string) (*SDatastore, error)
func (*SHost) FindNetworkByVlanID ¶
func (host *SHost) FindNetworkByVlanID(vlanID int32) (IVMNetwork, error)
func (*SHost) GetAccessIp ¶
func (*SHost) GetAccessMac ¶
func (*SHost) GetCluster ¶
func (*SHost) GetCpuCount ¶
func (*SHost) GetCpuDesc ¶
func (*SHost) GetDataStores ¶
func (host *SHost) GetDataStores() ([]cloudprovider.ICloudStorage, error)
func (*SHost) GetEnabled ¶
func (*SHost) GetGlobalId ¶
func (*SHost) GetHostStatus ¶
func (*SHost) GetHostType ¶
func (*SHost) GetIHostNics ¶
func (host *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)
func (*SHost) GetIHostNicsInternal ¶
func (host *SHost) GetIHostNicsInternal(debug bool) ([]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) GetIWires ¶
func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SHost) GetIsMaintenance ¶
func (*SHost) GetManagementServerIp ¶
func (*SHost) GetMemSizeMB ¶
func (*SHost) GetNetworks ¶
func (host *SHost) GetNetworks() ([]IVMNetwork, error)
func (*SHost) GetNodeCount ¶
func (*SHost) GetResourcePool ¶
func (host *SHost) GetResourcePool() (*object.ResourcePool, error)
func (*SHost) GetResourcePools ¶
func (host *SHost) GetResourcePools() ([]mo.ResourcePool, error)
func (*SHost) GetSchedtags ¶
func (*SHost) GetSiblingHosts ¶
func (*SHost) GetStorageInfo ¶
func (self *SHost) GetStorageInfo() []SHostStorageInfo
func (*SHost) GetStorageSizeMB ¶
func (*SHost) GetStorageType ¶
func (*SHost) GetSysInfo ¶
func (self *SHost) GetSysInfo() jsonutils.JSONObject
func (*SHost) GetTemplateVMById ¶
func (self *SHost) GetTemplateVMById(id string) (*SVirtualMachine, error)
func (*SHost) GetTemplateVMs ¶
func (self *SHost) GetTemplateVMs() ([]*SVirtualMachine, error)
func (*SHost) GetVersion ¶
func (*SHost) GetoHostSystem ¶
func (host *SHost) GetoHostSystem() *object.HostSystem
func (*SHost) IsActiveVlanID ¶
IsActiveVlanID will detect if vlanID is active that means vlanID in (1, 4095).
func (*SHost) IsEmulated ¶
func (*SHost) IsManagedByVCenter ¶
func (*SHost) SyncResourcePool ¶
func (host *SHost) SyncResourcePool(name string) (*object.ResourcePool, error)
type SHostNicInfo ¶
type SHostNicInfo struct { Dev string Driver string Mac string Index int8 LinkUp bool IpAddr string IpAddr6 string Mtu int32 NicType string DVPortGroup string IpAddrPrefixLen int8 IpAddr6PrefixLen int8 }
func (*SHostNicInfo) GetBridge ¶
func (nic *SHostNicInfo) GetBridge() string
func (*SHostNicInfo) GetDVPortGroup ¶
func (nic *SHostNicInfo) GetDVPortGroup() string
func (*SHostNicInfo) GetDevice ¶
func (nic *SHostNicInfo) GetDevice() string
func (*SHostNicInfo) GetDriver ¶
func (nic *SHostNicInfo) GetDriver() string
func (*SHostNicInfo) GetIndex ¶
func (nic *SHostNicInfo) GetIndex() int8
func (*SHostNicInfo) GetIpAddr ¶
func (nic *SHostNicInfo) GetIpAddr() string
func (*SHostNicInfo) GetIpAddr6 ¶
func (nic *SHostNicInfo) GetIpAddr6() string
func (*SHostNicInfo) GetIpAddr6PrefixLen ¶
func (nic *SHostNicInfo) GetIpAddr6PrefixLen() int8
func (*SHostNicInfo) GetIpAddrPrefixLen ¶
func (nic *SHostNicInfo) GetIpAddrPrefixLen() int8
func (*SHostNicInfo) GetMac ¶
func (nic *SHostNicInfo) GetMac() string
func (*SHostNicInfo) GetMtu ¶
func (nic *SHostNicInfo) GetMtu() int32
func (*SHostNicInfo) GetNicType ¶
func (nic *SHostNicInfo) GetNicType() string
func (*SHostNicInfo) IsLinkUp ¶
func (nic *SHostNicInfo) IsLinkUp() tristate.TriState
type SHostStorageAdapterInfo ¶
type SHostStorageDriverInfo ¶
type SHostStorageInfo ¶
type SImage ¶
type SImage struct { multicloud.SImageBase multicloud.STagBase // contains filtered or unexported fields }
func (*SImage) GetBios ¶
func (img *SImage) GetBios() cloudprovider.TBiosType
func (*SImage) GetCreatedAt ¶
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 ¶
func (*SImage) IsEmulated ¶
type SManagedObject ¶
type SManagedObject struct {
// contains filtered or unexported fields
}
func (*SManagedObject) GetDatacenter ¶
func (self *SManagedObject) GetDatacenter() (*SDatacenter, error)
func (*SManagedObject) GetDatacenterPath ¶
func (self *SManagedObject) GetDatacenterPath() []string
func (*SManagedObject) GetDatacenterPathString ¶
func (self *SManagedObject) GetDatacenterPathString() string
func (*SManagedObject) GetId ¶
func (self *SManagedObject) GetId() string
func (*SManagedObject) GetName ¶
func (self *SManagedObject) GetName() string
func (*SManagedObject) GetPath ¶
func (self *SManagedObject) GetPath() []string
func (*SManagedObject) GetType ¶
func (self *SManagedObject) GetType() string
type SNetwork ¶
type SNetwork struct { SManagedObject HostPortGroup types.HostPortGroup }
func NewNetwork ¶
func NewNetwork(manager *SESXiClient, net *mo.Network, dc *SDatacenter) *SNetwork
func (*SNetwork) ContainHost ¶
func (*SNetwork) GetActivePorts ¶
func (*SNetwork) GetNumPorts ¶
func (*SNetwork) GetVlanMode ¶
func (*SNetwork) SetHostPortGroup ¶
func (net *SNetwork) SetHostPortGroup(pg types.HostPortGroup)
type SNetworkInfo ¶
type SNetworkInfoBase ¶
func (*SNetworkInfoBase) AppendVMs ¶
func (s *SNetworkInfoBase) AppendVMs(name string, IpVlans []SIPVlan)
type SNetworkInfoPro ¶
type SNetworkInfoPro struct { SNetworkInfoBase HostIps map[string][]netutils.IPV4Addr VsMap SVirtualSwitchMap }
type SResourcePool ¶
type SResourcePool struct { multicloud.SProjectBase multicloud.STagBase SManagedObject }
func NewResourcePool ¶
func NewResourcePool(manager *SESXiClient, rp *mo.ResourcePool, dc *SDatacenter) *SResourcePool
func (*SResourcePool) GetGlobalId ¶
func (pool *SResourcePool) GetGlobalId() string
func (*SResourcePool) GetName ¶
func (pool *SResourcePool) GetName() string
func (*SResourcePool) GetStatus ¶
func (pool *SResourcePool) GetStatus() string
type SSimpleHostDev ¶
type SVMTemplate ¶
type SVMTemplate struct { multicloud.SImageBase multicloud.STagBase // contains filtered or unexported fields }
func NewVMTemplate ¶
func NewVMTemplate(vm *SVirtualMachine, cache *SDatastoreImageCache) *SVMTemplate
func (*SVMTemplate) GetBios ¶
func (t *SVMTemplate) GetBios() cloudprovider.TBiosType
func (*SVMTemplate) GetCreatedAt ¶
func (t *SVMTemplate) GetCreatedAt() time.Time
GetCreatedAt return vm's create time by getting the sys disk's create time
func (*SVMTemplate) GetFullOsName ¶
func (t *SVMTemplate) GetFullOsName() string
func (*SVMTemplate) GetGlobalId ¶
func (t *SVMTemplate) GetGlobalId() string
func (*SVMTemplate) GetIStoragecache ¶
func (t *SVMTemplate) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SVMTemplate) GetId ¶
func (t *SVMTemplate) GetId() string
func (*SVMTemplate) GetImageFormat ¶
func (t *SVMTemplate) GetImageFormat() string
func (*SVMTemplate) GetImageStatus ¶
func (t *SVMTemplate) GetImageStatus() string
func (*SVMTemplate) GetImageType ¶
func (t *SVMTemplate) GetImageType() cloudprovider.TImageType
func (*SVMTemplate) GetMinOsDiskSizeGb ¶
func (t *SVMTemplate) GetMinOsDiskSizeGb() int
func (*SVMTemplate) GetMinRamSizeMb ¶
func (t *SVMTemplate) GetMinRamSizeMb() int
func (*SVMTemplate) GetName ¶
func (t *SVMTemplate) GetName() string
func (*SVMTemplate) GetOsArch ¶
func (t *SVMTemplate) GetOsArch() string
func (*SVMTemplate) GetOsDist ¶
func (t *SVMTemplate) GetOsDist() string
func (*SVMTemplate) GetOsLang ¶
func (t *SVMTemplate) GetOsLang() string
func (*SVMTemplate) GetOsType ¶
func (t *SVMTemplate) GetOsType() cloudprovider.TOsType
func (*SVMTemplate) GetOsVersion ¶
func (t *SVMTemplate) GetOsVersion() string
func (*SVMTemplate) GetSizeByte ¶
func (t *SVMTemplate) GetSizeByte() int64
func (*SVMTemplate) GetStatus ¶
func (t *SVMTemplate) GetStatus() string
func (*SVMTemplate) GetSubImages ¶
func (t *SVMTemplate) GetSubImages() []cloudprovider.SSubImage
func (*SVMTemplate) IsEmulated ¶
func (t *SVMTemplate) IsEmulated() bool
func (*SVMTemplate) Refresh ¶
func (t *SVMTemplate) Refresh() error
type SVirtualCdrom ¶
type SVirtualCdrom struct {
SVirtualDevice
}
func NewVirtualCdrom ¶
func NewVirtualCdrom(vm *SVirtualMachine, dev types.BaseVirtualDevice, index int) SVirtualCdrom
type SVirtualDevice ¶
type SVirtualDevice struct {
// contains filtered or unexported fields
}
func NewVirtualDevice ¶
func NewVirtualDevice(vm *SVirtualMachine, dev types.BaseVirtualDevice, index int) SVirtualDevice
func (*SVirtualDevice) GetDriver ¶
func (dev *SVirtualDevice) GetDriver() string
func (*SVirtualDevice) GetIndex ¶
func (dev *SVirtualDevice) GetIndex() int
type SVirtualDisk ¶
type SVirtualDisk struct { multicloud.SDisk multicloud.STagBase SVirtualDevice IsRoot bool }
func NewVirtualDisk ¶
func NewVirtualDisk(vm *SVirtualMachine, dev types.BaseVirtualDevice, index int) SVirtualDisk
func (*SVirtualDisk) CreateISnapshot ¶
func (disk *SVirtualDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)
func (*SVirtualDisk) GetAccessPath ¶
func (disk *SVirtualDisk) GetAccessPath() string
func (*SVirtualDisk) GetBillingType ¶
func (disk *SVirtualDisk) GetBillingType() string
func (*SVirtualDisk) GetCacheMode ¶
func (disk *SVirtualDisk) GetCacheMode() string
func (*SVirtualDisk) GetCreatedAt ¶
func (disk *SVirtualDisk) GetCreatedAt() time.Time
GetCreatedAt return create time by getting the Data of file stored at disk.GetAccessPath
func (*SVirtualDisk) GetDiskFormat ¶
func (disk *SVirtualDisk) GetDiskFormat() string
func (*SVirtualDisk) GetDiskSizeMB ¶
func (disk *SVirtualDisk) GetDiskSizeMB() int
func (*SVirtualDisk) GetDiskType ¶
func (disk *SVirtualDisk) GetDiskType() string
func (*SVirtualDisk) GetDriver ¶
func (disk *SVirtualDisk) GetDriver() string
func (*SVirtualDisk) GetExpiredAt ¶
func (disk *SVirtualDisk) GetExpiredAt() time.Time
func (*SVirtualDisk) GetFilename ¶
func (disk *SVirtualDisk) GetFilename() string
func (*SVirtualDisk) GetFsFormat ¶
func (disk *SVirtualDisk) GetFsFormat() string
func (*SVirtualDisk) GetGlobalId ¶
func (disk *SVirtualDisk) GetGlobalId() string
func (*SVirtualDisk) GetISnapshot ¶
func (disk *SVirtualDisk) GetISnapshot(idStr string) (cloudprovider.ICloudSnapshot, error)
func (*SVirtualDisk) GetISnapshots ¶
func (disk *SVirtualDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SVirtualDisk) GetIStorage ¶
func (disk *SVirtualDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
func (*SVirtualDisk) GetId ¶
func (disk *SVirtualDisk) GetId() string
func (*SVirtualDisk) GetIsAutoDelete ¶
func (disk *SVirtualDisk) GetIsAutoDelete() bool
func (*SVirtualDisk) GetIsNonPersistent ¶
func (disk *SVirtualDisk) GetIsNonPersistent() bool
func (*SVirtualDisk) GetMountpoint ¶
func (disk *SVirtualDisk) GetMountpoint() string
func (*SVirtualDisk) GetName ¶
func (disk *SVirtualDisk) GetName() string
func (*SVirtualDisk) GetProjectId ¶
func (disk *SVirtualDisk) GetProjectId() string
func (*SVirtualDisk) GetStatus ¶
func (disk *SVirtualDisk) GetStatus() string
func (*SVirtualDisk) GetTemplateId ¶
func (disk *SVirtualDisk) GetTemplateId() string
func (*SVirtualDisk) IsEmulated ¶
func (disk *SVirtualDisk) IsEmulated() bool
func (*SVirtualDisk) MatchId ¶
func (disk *SVirtualDisk) MatchId(id string) bool
func (*SVirtualDisk) Refresh ¶
func (disk *SVirtualDisk) Refresh() error
func (*SVirtualDisk) Resize ¶
func (disk *SVirtualDisk) Resize(ctx context.Context, newSizeMb int64) error
func (*SVirtualDisk) ResizePartition ¶
func (disk *SVirtualDisk) ResizePartition(ctx context.Context, accessInfo vcenter.SVCenterAccessInfo) error
type SVirtualMachine ¶
type SVirtualMachine struct { multicloud.SInstanceBase multicloud.STagBase SManagedObject // contains filtered or unexported fields }
func NewVirtualMachine ¶
func NewVirtualMachine(manager *SESXiClient, vm *mo.VirtualMachine, dc *SDatacenter) *SVirtualMachine
func (*SVirtualMachine) AssignSecurityGroup ¶
func (self *SVirtualMachine) AssignSecurityGroup(secgroupId string) error
func (*SVirtualMachine) AttachDisk ¶
func (self *SVirtualMachine) AttachDisk(ctx context.Context, diskId string) error
func (*SVirtualMachine) ChangeConfig ¶
func (self *SVirtualMachine) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error
func (*SVirtualMachine) CheckFileInfo ¶
func (self *SVirtualMachine) CheckFileInfo(ctx context.Context) error
func (*SVirtualMachine) ConvertPublicIpToEip ¶
func (self *SVirtualMachine) ConvertPublicIpToEip() error
func (*SVirtualMachine) CreateDisk ¶
func (self *SVirtualMachine) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)
func (*SVirtualMachine) CreateInstanceSnapshot ¶
func (self *SVirtualMachine) CreateInstanceSnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudInstanceSnapshot, error)
func (*SVirtualMachine) DetachDisk ¶
func (self *SVirtualMachine) DetachDisk(ctx context.Context, diskId string) error
func (*SVirtualMachine) DoCustomize ¶
func (self *SVirtualMachine) DoCustomize(ctx context.Context, params jsonutils.JSONObject) error
func (*SVirtualMachine) DoRebuildRoot ¶
func (*SVirtualMachine) DoRename ¶
func (self *SVirtualMachine) DoRename(ctx context.Context, name string) error
func (*SVirtualMachine) ExportTemplate ¶
func (*SVirtualMachine) FindController ¶
func (self *SVirtualMachine) FindController(ctx context.Context, driver string) ([]SVirtualDevice, error)
func (*SVirtualMachine) FindDiskByDriver ¶
func (self *SVirtualMachine) FindDiskByDriver(drivers ...string) []SVirtualDisk
func (*SVirtualMachine) FindMinDiffKey ¶
func (self *SVirtualMachine) FindMinDiffKey(limit int32) int32
func (*SVirtualMachine) GetBillingType ¶
func (self *SVirtualMachine) GetBillingType() string
func (*SVirtualMachine) GetBios ¶
func (vm *SVirtualMachine) GetBios() cloudprovider.TBiosType
func (*SVirtualMachine) GetBootOrder ¶
func (self *SVirtualMachine) GetBootOrder() string
func (*SVirtualMachine) GetCreatedAt ¶
func (self *SVirtualMachine) GetCreatedAt() time.Time
func (*SVirtualMachine) GetError ¶
func (self *SVirtualMachine) GetError() error
func (*SVirtualMachine) GetExpiredAt ¶
func (self *SVirtualMachine) GetExpiredAt() time.Time
func (*SVirtualMachine) GetFullOsName ¶
func (vm *SVirtualMachine) GetFullOsName() string
func (*SVirtualMachine) GetGlobalId ¶
func (self *SVirtualMachine) GetGlobalId() string
func (*SVirtualMachine) GetGuestFamily ¶
func (self *SVirtualMachine) GetGuestFamily() string
func (*SVirtualMachine) GetGuestFullName ¶
func (self *SVirtualMachine) GetGuestFullName() string
func (*SVirtualMachine) GetGuestId ¶
func (self *SVirtualMachine) GetGuestId() string
func (*SVirtualMachine) GetGuestState ¶
func (self *SVirtualMachine) GetGuestState() string
func (*SVirtualMachine) GetGuestToolsRunningStatus ¶
func (self *SVirtualMachine) GetGuestToolsRunningStatus() string
func (*SVirtualMachine) GetGuestToolsStatus ¶
func (self *SVirtualMachine) GetGuestToolsStatus() string
func (*SVirtualMachine) GetHostname ¶
func (self *SVirtualMachine) GetHostname() string
func (*SVirtualMachine) GetHypervisor ¶
func (self *SVirtualMachine) GetHypervisor() string
func (*SVirtualMachine) GetIDiskById ¶
func (self *SVirtualMachine) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)
func (*SVirtualMachine) GetIDisks ¶
func (self *SVirtualMachine) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SVirtualMachine) GetIEIP ¶
func (self *SVirtualMachine) GetIEIP() (cloudprovider.ICloudEIP, error)
func (*SVirtualMachine) GetIHost ¶
func (self *SVirtualMachine) GetIHost() cloudprovider.ICloudHost
func (*SVirtualMachine) GetIHostId ¶
func (self *SVirtualMachine) GetIHostId() string
func (*SVirtualMachine) GetINics ¶
func (self *SVirtualMachine) GetINics() ([]cloudprovider.ICloudNic, error)
func (*SVirtualMachine) GetInstanceSnapshot ¶
func (self *SVirtualMachine) GetInstanceSnapshot(idStr string) (cloudprovider.ICloudInstanceSnapshot, error)
func (*SVirtualMachine) GetInstanceSnapshots ¶
func (self *SVirtualMachine) GetInstanceSnapshots() ([]cloudprovider.ICloudInstanceSnapshot, error)
func (*SVirtualMachine) GetInstanceType ¶
func (self *SVirtualMachine) GetInstanceType() string
func (*SVirtualMachine) GetIps ¶
func (self *SVirtualMachine) GetIps() []string
func (*SVirtualMachine) GetMachine ¶
func (self *SVirtualMachine) GetMachine() string
func (*SVirtualMachine) GetMoid ¶
func (self *SVirtualMachine) GetMoid() string
func (*SVirtualMachine) GetOsArch ¶
func (vm *SVirtualMachine) GetOsArch() string
func (*SVirtualMachine) GetOsDist ¶
func (vm *SVirtualMachine) GetOsDist() string
func (*SVirtualMachine) GetOsLang ¶
func (vm *SVirtualMachine) GetOsLang() string
func (*SVirtualMachine) GetOsType ¶
func (vm *SVirtualMachine) GetOsType() cloudprovider.TOsType
func (*SVirtualMachine) GetOsVersion ¶
func (vm *SVirtualMachine) GetOsVersion() string
func (*SVirtualMachine) GetProjectId ¶
func (self *SVirtualMachine) GetProjectId() string
func (*SVirtualMachine) GetSecurityGroupIds ¶
func (self *SVirtualMachine) GetSecurityGroupIds() ([]string, error)
func (*SVirtualMachine) GetSerialOutput ¶
func (self *SVirtualMachine) GetSerialOutput(port int) (string, error)
func (*SVirtualMachine) GetStatus ¶
func (self *SVirtualMachine) GetStatus() string
func (*SVirtualMachine) GetSysTags ¶
func (self *SVirtualMachine) GetSysTags() map[string]string
func (*SVirtualMachine) GetToolsVersion ¶
func (self *SVirtualMachine) GetToolsVersion() string
func (*SVirtualMachine) GetVGADevice ¶
func (self *SVirtualMachine) GetVGADevice() string
func (*SVirtualMachine) GetVNCInfo ¶
func (self *SVirtualMachine) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
func (*SVirtualMachine) GetVcpuCount ¶
func (self *SVirtualMachine) GetVcpuCount() int
func (*SVirtualMachine) GetVdi ¶
func (self *SVirtualMachine) GetVdi() string
func (*SVirtualMachine) GetVersion ¶
func (self *SVirtualMachine) GetVersion() string
func (*SVirtualMachine) GetVga ¶
func (self *SVirtualMachine) GetVga() string
func (*SVirtualMachine) GetVmemSizeMB ¶
func (self *SVirtualMachine) GetVmemSizeMB() int
func (*SVirtualMachine) GetVmrcInfo ¶
func (self *SVirtualMachine) GetVmrcInfo() (*cloudprovider.ServerVncOutput, error)
func (*SVirtualMachine) GetWebmksInfo ¶
func (self *SVirtualMachine) GetWebmksInfo() (*cloudprovider.ServerVncOutput, error)
func (*SVirtualMachine) IsAutoRenew ¶
func (self *SVirtualMachine) IsAutoRenew() bool
func (*SVirtualMachine) IsEmulated ¶
func (self *SVirtualMachine) IsEmulated() bool
func (*SVirtualMachine) IsTemplate ¶
func (self *SVirtualMachine) IsTemplate() bool
func (*SVirtualMachine) LiveMigrateVM ¶
func (self *SVirtualMachine) LiveMigrateVM(hostId string) error
func (*SVirtualMachine) MigrateVM ¶
func (self *SVirtualMachine) MigrateVM(hostId string) error
func (*SVirtualMachine) RebuildRoot ¶
func (self *SVirtualMachine) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
func (*SVirtualMachine) Refresh ¶
func (self *SVirtualMachine) Refresh() error
func (*SVirtualMachine) Renew ¶
func (self *SVirtualMachine) Renew(bc billing.SBillingCycle) error
func (*SVirtualMachine) ResetToInstanceSnapshot ¶
func (self *SVirtualMachine) ResetToInstanceSnapshot(ctx context.Context, idStr string) error
func (*SVirtualMachine) SetAutoRenew ¶
func (self *SVirtualMachine) SetAutoRenew(bc billing.SBillingCycle) error
func (*SVirtualMachine) SetSecurityGroups ¶
func (self *SVirtualMachine) SetSecurityGroups(secgroupIds []string) error
func (*SVirtualMachine) StartVM ¶
func (self *SVirtualMachine) StartVM(ctx context.Context) error
ideopotent start
func (*SVirtualMachine) StopVM ¶
func (self *SVirtualMachine) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
func (*SVirtualMachine) SuspendVM ¶
func (self *SVirtualMachine) SuspendVM(ctx context.Context) error
func (*SVirtualMachine) UpdateUserData ¶
func (self *SVirtualMachine) UpdateUserData(userData string) error
type SVirtualMachineSnapshot ¶
type SVirtualMachineSnapshot struct { multicloud.SResourceBase multicloud.STagBase // contains filtered or unexported fields }
func NewSnapshot ¶
func NewSnapshot(st types.VirtualMachineSnapshotTree) *SVirtualMachineSnapshot
func (*SVirtualMachineSnapshot) Delete ¶
func (s *SVirtualMachineSnapshot) Delete() error
func (*SVirtualMachineSnapshot) GetDescription ¶
func (s *SVirtualMachineSnapshot) GetDescription() string
func (*SVirtualMachineSnapshot) GetGlobalId ¶
func (s *SVirtualMachineSnapshot) GetGlobalId() string
func (*SVirtualMachineSnapshot) GetId ¶
func (s *SVirtualMachineSnapshot) GetId() string
func (*SVirtualMachineSnapshot) GetName ¶
func (s *SVirtualMachineSnapshot) GetName() string
func (*SVirtualMachineSnapshot) GetProjectId ¶
func (s *SVirtualMachineSnapshot) GetProjectId() string
func (*SVirtualMachineSnapshot) GetStatus ¶
func (s *SVirtualMachineSnapshot) GetStatus() string
func (*SVirtualMachineSnapshot) IsEmulated ¶
func (s *SVirtualMachineSnapshot) IsEmulated() bool
func (*SVirtualMachineSnapshot) Refresh ¶
func (s *SVirtualMachineSnapshot) Refresh() error
type SVirtualNIC ¶
type SVirtualNIC struct { SVirtualDevice cloudprovider.DummyICloudNic }
func NewVirtualNIC ¶
func NewVirtualNIC(vm *SVirtualMachine, dev types.BaseVirtualDevice, index int) SVirtualNIC
func (*SVirtualNIC) GetDriver ¶
func (nic *SVirtualNIC) GetDriver() string
func (*SVirtualNIC) GetINetworkId ¶
func (nic *SVirtualNIC) GetINetworkId() string
func (*SVirtualNIC) GetIP ¶
func (nic *SVirtualNIC) GetIP() string
func (*SVirtualNIC) GetId ¶
func (nic *SVirtualNIC) GetId() string
func (*SVirtualNIC) GetMAC ¶
func (nic *SVirtualNIC) GetMAC() string
func (*SVirtualNIC) InClassicNetwork ¶
func (nic *SVirtualNIC) InClassicNetwork() bool
type SVirtualSwitch ¶
type SVirtualSwitch struct { Host *SHost HostVirtualSwitch types.HostVirtualSwitch }
func (*SVirtualSwitch) FindNetworkByVlanID ¶
func (vs *SVirtualSwitch) FindNetworkByVlanID(vlanID int32) (IVMNetwork, error)
type SVirtualSwitchMap ¶
type SVirtualSwitchMap struct {
// contains filtered or unexported fields
}
func NewVirtualSwitchMap ¶
func NewVirtualSwitchMap(length ...int) SVirtualSwitchMap
func (*SVirtualSwitchMap) Insert ¶
func (vsm *SVirtualSwitchMap) Insert(id string, vs SVirtualSwitchSpec)
func (*SVirtualSwitchMap) List ¶
func (vsm *SVirtualSwitchMap) List() []SVirtualSwitchSpec
func (*SVirtualSwitchMap) Merge ¶
func (vms *SVirtualSwitchMap) Merge(ovsm *SVirtualSwitchMap)
type SVirtualSwitchSpec ¶
type SVirtualSwitchSpec struct { Name string Id string Distributed bool Hosts []SSimpleHostDev HostIps map[string][]netutils.IPV4Addr Vlans map[int32][]netutils.IPV4Addr }
func NewVirtualSwitch ¶
func NewVirtualSwitch() *SVirtualSwitchSpec
func (*SVirtualSwitchSpec) Merge ¶
func (vs *SVirtualSwitchSpec) Merge(vsc *SVirtualSwitchSpec)
type SVirtualVGA ¶
type SVirtualVGA struct {
SVirtualDevice
}
func NewVirtualVGA ¶
func NewVirtualVGA(vm *SVirtualMachine, dev types.BaseVirtualDevice, index int) SVirtualVGA
func (*SVirtualVGA) GetEnable3D ¶
func (vga *SVirtualVGA) GetEnable3D() bool
func (*SVirtualVGA) GetRamSizeMB ¶
func (vga *SVirtualVGA) GetRamSizeMB() int
func (*SVirtualVGA) String ¶
func (vga *SVirtualVGA) String() string
type VMFetcher ¶
type VMFetcher interface { FetchNoTemplateVMs() ([]*SVirtualMachine, error) FetchTemplateVMs() ([]*SVirtualMachine, error) FetchFakeTempateVMs(string) ([]*SVirtualMachine, error) }
Source Files ¶
- cluster.go
- datacenter.go
- device.go
- devtools.go
- doc.go
- fakeregion.go
- guestos.go
- host.go
- hostnic.go
- image.go
- ip.go
- logger.go
- manager.go
- mobase.go
- monitor.go
- net_topology.go
- net_topology_pro.go
- network.go
- resourcepool.go
- snapshot.go
- storage.go
- storagecache.go
- template.go
- utils.go
- vdisk.go
- virtualmachine.go
- vnic.go
- vswitch.go