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) GetICloudImages(cache *SDatastoreImageCache) ([]cloudprovider.ICloudImage, error)
- 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) 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) 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, image *cloudprovider.SImageCreateOption, ...) (string, error)
- type SDiskConfig
- type SDiskInfo
- type SDistributedVirtualPortgroup
- func (net *SDistributedVirtualPortgroup) AddHostToDVS(host *SHost) (err error)
- func (net *SDistributedVirtualPortgroup) FindPort() (*types.DistributedVirtualPort, error)
- func (net *SDistributedVirtualPortgroup) GetActivePorts() []string
- func (net *SDistributedVirtualPortgroup) GetDVSUuid() (string, error)
- func (net *SDistributedVirtualPortgroup) GetHosts() []types.ManagedObjectReference
- 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) GetVswitchName() string
- func (net *SDistributedVirtualPortgroup) Summary() SNetworkSummary
- func (net *SDistributedVirtualPortgroup) SummaryText() string
- 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 (client *SESXiClient) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error)
- func (client *SESXiClient) CreateIVpc(opts *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, 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 (client *SESXiClient) GetCloudEnv() string
- func (cli *SESXiClient) GetDatacenters() ([]*SDatacenter, error)
- func (self *SESXiClient) GetEcsMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
- func (client *SESXiClient) GetGeographicInfo() cloudprovider.SGeographicInfo
- func (client *SESXiClient) GetGlobalId() string
- 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) GetIProjects() ([]cloudprovider.ICloudProject, error)
- func (client *SESXiClient) GetISecurityGroupById(id string) (cloudprovider.ICloudSecurityGroup, 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 (cli *SESXiClient) GetIVMs() ([]cloudprovider.ICloudVM, error)
- func (client *SESXiClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (cli *SESXiClient) GetIVpcs() ([]cloudprovider.ICloudVpc, error)
- func (client *SESXiClient) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
- func (client *SESXiClient) GetIZones() ([]cloudprovider.ICloudZone, error)
- func (client *SESXiClient) GetId() string
- func (self *SESXiClient) GetMetricTypes() ([]SEsxiMetricType, error)
- func (self *SESXiClient) GetMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
- func (client *SESXiClient) GetName() string
- func (cli *SESXiClient) GetNetworks() ([]IVMNetwork, error)
- func (cli *SESXiClient) GetProvider() string
- func (client *SESXiClient) GetStatus() string
- func (cli *SESXiClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- func (client *SESXiClient) GetSysTags() map[string]string
- func (client *SESXiClient) GetTags() (map[string]string, 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 (client *SESXiClient) IsEmulated() bool
- 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 (client *SESXiClient) Refresh() error
- func (cli *SESXiClient) SearchTemplateVM(id string) (*SVirtualMachine, error)
- func (cli *SESXiClient) SearchVM(id string) (*SVirtualMachine, error)
- func (client *SESXiClient) SetTags(tags map[string]string, replace bool) error
- func (cli *SESXiClient) VMIP(host mo.HostSystem) (map[string][]string, error)
- func (cli *SESXiClient) VMIP2() ([]SVMIPInfo, error)
- type SEsxiImageInfo
- type SEsxiInstanceSnapshotInfo
- type SEsxiMetricType
- type SHost
- func (host *SHost) CloneVM(ctx context.Context, from *SVirtualMachine, ...) (*SVirtualMachine, error)
- func (host *SHost) CreateVM(desc *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
- func (host *SHost) CreateVM2(ctx context.Context, ds *SDatastore, params SCreateVMParam) (needDeploy bool, vm *SVirtualMachine, err error)
- func (host *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) GetAccessIp() string
- func (host *SHost) GetAccessMac() string
- func (host *SHost) GetCluster() (*SCluster, error)
- func (host *SHost) GetCpuCount() int
- func (host *SHost) GetCpuDesc() string
- func (host *SHost) GetCpuMhz() int
- func (host *SHost) GetDataStores() ([]cloudprovider.ICloudStorage, error)
- func (host *SHost) GetEnabled() bool
- func (host *SHost) GetGlobalId() string
- func (host *SHost) GetHostStatus() string
- func (host *SHost) GetHostSystem() *object.HostSystem
- func (host *SHost) GetHostType() string
- func (host *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)
- func (host *SHost) GetIHostNicsInternal(debug bool) ([]cloudprovider.ICloudHostNetInterface, error)
- func (host *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (host *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (host *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, error)
- func (host *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)
- func (host *SHost) GetIVMs2() ([]cloudprovider.ICloudVM, error)
- func (host *SHost) GetIsMaintenance() bool
- func (host *SHost) GetManagementServerIp() string
- func (host *SHost) GetMemSizeMB() int
- func (host *SHost) GetName() string
- func (host *SHost) GetNetworks() ([]IVMNetwork, error)
- func (host *SHost) GetNodeCount() int8
- func (host *SHost) GetResourcePool() (*object.ResourcePool, error)
- func (host *SHost) GetResourcePools() ([]mo.ResourcePool, error)
- func (host *SHost) GetSN() string
- func (host *SHost) GetSchedtags() ([]string, error)
- func (host *SHost) GetSiblingHosts() ([]*SHost, error)
- func (host *SHost) GetStatus() string
- func (host *SHost) GetStorageInfo() []SHostStorageInfo
- func (host *SHost) GetStorageSizeMB() int64
- func (host *SHost) GetStorageType() string
- func (host *SHost) GetSysInfo() jsonutils.JSONObject
- func (host *SHost) GetSysTags() map[string]string
- func (host *SHost) GetTemplateVMById(id string) (*SVirtualMachine, error)
- func (host *SHost) GetTemplateVMs() ([]*SVirtualMachine, error)
- func (host *SHost) GetVersion() string
- func (host *SHost) IsActiveVlanID(vlanID int32) bool
- func (host *SHost) IsEmulated() bool
- func (host *SHost) IsManagedByVCenter() bool
- func (host *SHost) Refresh() error
- func (host *SHost) SearchTemplateVM(id string) (*SVirtualMachine, error)
- func (host *SHost) SyncResourcePool(name string) (*object.ResourcePool, error)
- 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) GetHosts() []types.ManagedObjectReference
- func (net *SNetwork) GetName() string
- func (net *SNetwork) GetType() string
- func (net *SNetwork) GetVlanId() int32
- func (net *SNetwork) GetVswitchName() string
- func (net *SNetwork) Summary() SNetworkSummary
- func (net *SNetwork) SummaryText() string
- type SNetworkInfo
- type SNetworkInfoBase
- type SNetworkInfoPro
- type SNetworkSummary
- type SOsInfo
- type SResourcePool
- type SServerNic
- 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) GetIStorageId() string
- 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) GetPreallocation() 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
- type SVirtualMachine
- func (svm *SVirtualMachine) AttachDisk(ctx context.Context, diskId string) error
- func (svm *SVirtualMachine) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error
- func (svm *SVirtualMachine) CheckFileInfo(ctx context.Context) error
- func (svm *SVirtualMachine) ConvertPublicIpToEip() error
- func (svm *SVirtualMachine) CopyRootDisk(ctx context.Context, imagePath string) (string, error)
- func (svm *SVirtualMachine) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)
- func (svm *SVirtualMachine) CreateInstanceSnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudInstanceSnapshot, error)
- func (svm *SVirtualMachine) DeleteVM(ctx context.Context) error
- func (svm *SVirtualMachine) DeployVM(ctx context.Context, opts *cloudprovider.SInstanceDeployOptions) error
- func (svm *SVirtualMachine) DetachDisk(ctx context.Context, diskId string) error
- func (svm *SVirtualMachine) DoCustomize(ctx context.Context, params jsonutils.JSONObject) error
- func (svm *SVirtualMachine) DoRebuildRoot(ctx context.Context, imagePath string, uuid string) error
- func (svm *SVirtualMachine) DoRename(ctx context.Context, name string) error
- func (svm *SVirtualMachine) ExportTemplate(ctx context.Context, idx int, diskPath string) error
- func (svm *SVirtualMachine) FindController(ctx context.Context, driver string) ([]SVirtualDevice, error)
- func (svm *SVirtualMachine) FindDiskByDriver(drivers ...string) []SVirtualDisk
- func (svm *SVirtualMachine) FindMinDiffKey(limit int32) int32
- func (svm *SVirtualMachine) GetBillingType() string
- func (vm *SVirtualMachine) GetBios() cloudprovider.TBiosType
- func (svm *SVirtualMachine) GetBootOrder() string
- func (svm *SVirtualMachine) GetCpuSockets() int
- func (svm *SVirtualMachine) GetCreatedAt() time.Time
- func (vm *SVirtualMachine) GetDatastoreNames() []string
- func (vm *SVirtualMachine) GetDatastores() ([]*SDatastore, error)
- func (svm *SVirtualMachine) GetError() error
- func (svm *SVirtualMachine) GetExpiredAt() time.Time
- func (vm *SVirtualMachine) GetFullOsName() string
- func (svm *SVirtualMachine) GetGlobalId() string
- func (svm *SVirtualMachine) GetGuestFamily() string
- func (svm *SVirtualMachine) GetGuestFullName() string
- func (svm *SVirtualMachine) GetGuestId() string
- func (svm *SVirtualMachine) GetGuestState() string
- func (svm *SVirtualMachine) GetGuestToolsRunningStatus() string
- func (svm *SVirtualMachine) GetGuestToolsStatus() string
- func (svm *SVirtualMachine) GetHostname() string
- func (svm *SVirtualMachine) GetHypervisor() string
- func (svm *SVirtualMachine) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)
- func (svm *SVirtualMachine) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (svm *SVirtualMachine) GetIEIP() (cloudprovider.ICloudEIP, error)
- func (svm *SVirtualMachine) GetIHost() cloudprovider.ICloudHost
- func (svm *SVirtualMachine) GetIHostId() string
- func (svm *SVirtualMachine) GetINics() ([]cloudprovider.ICloudNic, error)
- func (svm *SVirtualMachine) GetInstanceSnapshot(idStr string) (cloudprovider.ICloudInstanceSnapshot, error)
- func (svm *SVirtualMachine) GetInstanceSnapshots() ([]cloudprovider.ICloudInstanceSnapshot, error)
- func (svm *SVirtualMachine) GetInstanceType() string
- func (svm *SVirtualMachine) GetIps() []string
- func (svm *SVirtualMachine) GetMachine() string
- func (svm *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 (svm *SVirtualMachine) GetProjectId() string
- func (svm *SVirtualMachine) GetRootImagePath() (string, error)
- func (svm *SVirtualMachine) GetSecurityGroupIds() ([]string, error)
- func (svm *SVirtualMachine) GetSerialOutput(port int) (string, error)
- func (svm *SVirtualMachine) GetStatus() string
- func (svm *SVirtualMachine) GetSysTags() map[string]string
- func (svm *SVirtualMachine) GetTags() (map[string]string, error)
- func (svm *SVirtualMachine) GetToolsVersion() string
- func (svm *SVirtualMachine) GetVGADevice() string
- func (svm *SVirtualMachine) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
- func (svm *SVirtualMachine) GetVcpuCount() int
- func (svm *SVirtualMachine) GetVdi() string
- func (svm *SVirtualMachine) GetVersion() string
- func (svm *SVirtualMachine) GetVga() string
- func (svm *SVirtualMachine) GetVmemSizeMB() int
- func (svm *SVirtualMachine) GetVmrcInfo() (*cloudprovider.ServerVncOutput, error)
- func (svm *SVirtualMachine) GetWebmksInfo() (*cloudprovider.ServerVncOutput, error)
- func (svm *SVirtualMachine) IsAutoRenew() bool
- func (svm *SVirtualMachine) IsEmulated() bool
- func (svm *SVirtualMachine) IsTemplate() bool
- func (svm *SVirtualMachine) LiveMigrateVM(hostId string) error
- func (svm *SVirtualMachine) MigrateVM(hostId string) error
- func (svm *SVirtualMachine) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
- func (svm *SVirtualMachine) Refresh() error
- func (svm *SVirtualMachine) Renew(bc billing.SBillingCycle) error
- func (svm *SVirtualMachine) ResetToInstanceSnapshot(ctx context.Context, idStr string) error
- func (svm *SVirtualMachine) ResumeVM(ctx context.Context) error
- func (svm *SVirtualMachine) SetAutoRenew(bc billing.SBillingCycle) error
- func (svm *SVirtualMachine) SetConfig(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) error
- func (svm *SVirtualMachine) SetSecurityGroups(secgroupIds []string) error
- func (svm *SVirtualMachine) SetTags(tags map[string]string, replace bool) error
- func (svm *SVirtualMachine) StartVM(ctx context.Context) error
- func (svm *SVirtualMachine) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
- func (svm *SVirtualMachine) SuspendVM(ctx context.Context) error
- func (svm *SVirtualMachine) UpdateUserData(userData string) error
- func (svm *SVirtualMachine) UpdateVM(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) 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
- func (nic *SVirtualNIC) GetDriver() string
- func (nic *SVirtualNIC) GetINetworkId() string
- func (nic *SVirtualNIC) GetIP() string
- func (nic *SVirtualNIC) GetId() string
- func (nic *SVirtualNIC) GetMAC() string
- func (nic *SVirtualNIC) GetSubAddress() ([]string, error)
- func (nic *SVirtualNIC) InClassicNetwork() bool
- 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 ( True bool = true False bool = false )
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", "summary", "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", "summary"}
var RESOURCEPOOL_PROPS = []string{"name", "parent", "host"}
var VIRTUAL_MACHINE_PROPS = []string{"name", "parent", "resourcePool", "snapshot", "config", "availableField", "datastore"}
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 GetPreallocation() string GetWriteThrough() bool GetFileName() string GetDatastore() *types.ManagedObjectReference }
type INetworkInfo ¶
func NewNetworkInfo ¶
func NewNetworkInfo(dvs bool, size int) INetworkInfo
type IVMNetwork ¶
type IVMNetwork interface { GetId() string GetName() string GetType() string GetVlanId() int32 GetVswitchName() string Summary() SNetworkSummary SummaryText() string GetHosts() []types.ManagedObjectReference GetDatacenter() (*SDatacenter, error) GetPath() []string }
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 CpuSockets int 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) GetICloudImages ¶
func (self *SDatastore) GetICloudImages(cache *SDatastoreImageCache) ([]cloudprovider.ICloudImage, error)
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) 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) 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, image *cloudprovider.SImageCreateOption, callback func(progress float32)) (string, error)
type SDiskConfig ¶
type SDistributedVirtualPortgroup ¶
type SDistributedVirtualPortgroup struct {
SManagedObject
}
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) 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) GetHosts ¶
func (net *SDistributedVirtualPortgroup) GetHosts() []types.ManagedObjectReference
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) GetVswitchName ¶
func (net *SDistributedVirtualPortgroup) GetVswitchName() string
func (*SDistributedVirtualPortgroup) Summary ¶
func (net *SDistributedVirtualPortgroup) Summary() SNetworkSummary
func (*SDistributedVirtualPortgroup) SummaryText ¶
func (net *SDistributedVirtualPortgroup) SummaryText() string
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 multicloud.SRegion multicloud.SRegionEipBase multicloud.SNoObjectStorageRegion multicloud.SRegionLbBase // 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) CreateISecurityGroup ¶
func (client *SESXiClient) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error)
func (*SESXiClient) CreateIVpc ¶
func (client *SESXiClient) CreateIVpc(opts *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, 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) GetCloudEnv ¶
func (client *SESXiClient) GetCloudEnv() 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) GetGeographicInfo ¶
func (client *SESXiClient) GetGeographicInfo() cloudprovider.SGeographicInfo
func (*SESXiClient) GetGlobalId ¶
func (client *SESXiClient) GetGlobalId() string
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) GetIProjects ¶
func (cli *SESXiClient) GetIProjects() ([]cloudprovider.ICloudProject, error)
func (*SESXiClient) GetISecurityGroupById ¶
func (client *SESXiClient) GetISecurityGroupById(id string) (cloudprovider.ICloudSecurityGroup, 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) GetIVMs ¶
func (cli *SESXiClient) GetIVMs() ([]cloudprovider.ICloudVM, error)
func (*SESXiClient) GetIVpcById ¶
func (client *SESXiClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
func (*SESXiClient) GetIVpcs ¶
func (cli *SESXiClient) GetIVpcs() ([]cloudprovider.ICloudVpc, error)
func (*SESXiClient) GetIZoneById ¶
func (client *SESXiClient) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
func (*SESXiClient) GetIZones ¶
func (client *SESXiClient) GetIZones() ([]cloudprovider.ICloudZone, error)
func (*SESXiClient) GetId ¶
func (client *SESXiClient) GetId() string
func (*SESXiClient) GetMetricTypes ¶
func (self *SESXiClient) GetMetricTypes() ([]SEsxiMetricType, error)
func (*SESXiClient) GetMetrics ¶
func (self *SESXiClient) GetMetrics(opts *cloudprovider.MetricListOptions) ([]cloudprovider.MetricValues, error)
func (*SESXiClient) GetName ¶
func (client *SESXiClient) GetName() string
func (*SESXiClient) GetNetworks ¶
func (cli *SESXiClient) GetNetworks() ([]IVMNetwork, error)
func (*SESXiClient) GetProvider ¶
func (cli *SESXiClient) GetProvider() string
func (*SESXiClient) GetStatus ¶
func (client *SESXiClient) GetStatus() string
func (*SESXiClient) GetSubAccounts ¶
func (cli *SESXiClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
func (*SESXiClient) GetSysTags ¶
func (client *SESXiClient) GetSysTags() map[string]string
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) IsEmulated ¶
func (client *SESXiClient) IsEmulated() bool
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) Refresh ¶
func (client *SESXiClient) Refresh() error
func (*SESXiClient) SearchTemplateVM ¶
func (cli *SESXiClient) SearchTemplateVM(id string) (*SVirtualMachine, error)
func (*SESXiClient) SearchVM ¶
func (cli *SESXiClient) SearchVM(id string) (*SVirtualMachine, error)
func (*SESXiClient) SetTags ¶
func (client *SESXiClient) SetTags(tags map[string]string, replace bool) 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 SEsxiMetricType ¶
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 (host *SHost) CreateVM(desc *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
func (*SHost) CreateVM2 ¶
func (host *SHost) CreateVM2(ctx context.Context, ds *SDatastore, params SCreateVMParam) (needDeploy bool, vm *SVirtualMachine, err error)
func (*SHost) DoCreateVM ¶
func (host *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) 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) GetHostSystem ¶
func (host *SHost) GetHostSystem() *object.HostSystem
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 (host *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SHost) GetIStorages ¶
func (host *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SHost) GetIVMById ¶
func (host *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, 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 (host *SHost) GetStorageInfo() []SHostStorageInfo
func (*SHost) GetStorageSizeMB ¶
func (*SHost) GetStorageType ¶
func (*SHost) GetSysInfo ¶
func (host *SHost) GetSysInfo() jsonutils.JSONObject
func (*SHost) GetSysTags ¶
func (*SHost) GetTemplateVMById ¶
func (host *SHost) GetTemplateVMById(id string) (*SVirtualMachine, error)
func (*SHost) GetTemplateVMs ¶
func (host *SHost) GetTemplateVMs() ([]*SVirtualMachine, error)
func (*SHost) GetVersion ¶
func (*SHost) IsActiveVlanID ¶
IsActiveVlanID will detect if vlanID is active that means vlanID in (1, 4095).
func (*SHost) IsEmulated ¶
func (*SHost) IsManagedByVCenter ¶
func (*SHost) SearchTemplateVM ¶
func (host *SHost) SearchTemplateVM(id string) (*SVirtualMachine, error)
func (*SHost) SyncResourcePool ¶
func (host *SHost) SyncResourcePool(name string) (*object.ResourcePool, error)
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
}
func NewNetwork ¶
func NewNetwork(manager *SESXiClient, net *mo.Network, dc *SDatacenter) *SNetwork
func (*SNetwork) GetHosts ¶
func (net *SNetwork) GetHosts() []types.ManagedObjectReference
func (*SNetwork) GetVswitchName ¶
func (*SNetwork) Summary ¶
func (net *SNetwork) Summary() SNetworkSummary
func (*SNetwork) SummaryText ¶
type SNetworkInfo ¶
type SNetworkInfoBase ¶
type SNetworkInfoBase struct { // VMs []SSimpleVM IPPool SIPPool }
type SNetworkInfoPro ¶
type SNetworkInfoPro struct { SNetworkInfoBase HostIps map[string][]netutils.IPV4Addr VsMap SVirtualSwitchMap }
type SNetworkSummary ¶
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 SServerNic ¶
type SServerNic struct { Name string `json:"name"` Index int `json:"index"` Bridge string `json:"bridge"` Domain string `json:"domain"` Ip string `json:"ip"` Vlan int `json:"vlan"` Driver string `json:"driver"` Masklen int `json:"masklen"` Virtual bool `json:"virtual"` Manual bool `json:"manual"` WireId string `json:"wire_id"` NetId string `json:"net_id"` Mac string `json:"mac"` BandWidth int `json:"bw"` Mtu int `json:"mtu,omitempty"` Dns string `json:"dns"` Ntp string `json:"ntp"` Net string `json:"net"` Interface string `json:"interface"` Gateway string `json:"gateway"` Ifname string `json:"ifname"` NicType string `json:"nic_type,omitempty"` LinkUp bool `json:"link_up,omitempty"` TeamWith string `json:"team_with,omitempty"` TeamingMaster *SServerNic `json:"-"` TeamingSlaves []*SServerNic `json:"-"` }
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) GetIStorageId ¶
func (disk *SVirtualDisk) GetIStorageId() string
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) GetPreallocation ¶
func (disk *SVirtualDisk) GetPreallocation() 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
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) AttachDisk ¶
func (svm *SVirtualMachine) AttachDisk(ctx context.Context, diskId string) error
func (*SVirtualMachine) ChangeConfig ¶
func (svm *SVirtualMachine) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error
func (*SVirtualMachine) CheckFileInfo ¶
func (svm *SVirtualMachine) CheckFileInfo(ctx context.Context) error
func (*SVirtualMachine) ConvertPublicIpToEip ¶
func (svm *SVirtualMachine) ConvertPublicIpToEip() error
func (*SVirtualMachine) CopyRootDisk ¶
func (*SVirtualMachine) CreateDisk ¶
func (svm *SVirtualMachine) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)
func (*SVirtualMachine) CreateInstanceSnapshot ¶
func (svm *SVirtualMachine) CreateInstanceSnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudInstanceSnapshot, error)
func (*SVirtualMachine) DeployVM ¶
func (svm *SVirtualMachine) DeployVM(ctx context.Context, opts *cloudprovider.SInstanceDeployOptions) error
func (*SVirtualMachine) DetachDisk ¶
func (svm *SVirtualMachine) DetachDisk(ctx context.Context, diskId string) error
func (*SVirtualMachine) DoCustomize ¶
func (svm *SVirtualMachine) DoCustomize(ctx context.Context, params jsonutils.JSONObject) error
func (*SVirtualMachine) DoRebuildRoot ¶
func (*SVirtualMachine) DoRename ¶
func (svm *SVirtualMachine) DoRename(ctx context.Context, name string) error
func (*SVirtualMachine) ExportTemplate ¶
func (*SVirtualMachine) FindController ¶
func (svm *SVirtualMachine) FindController(ctx context.Context, driver string) ([]SVirtualDevice, error)
func (*SVirtualMachine) FindDiskByDriver ¶
func (svm *SVirtualMachine) FindDiskByDriver(drivers ...string) []SVirtualDisk
func (*SVirtualMachine) FindMinDiffKey ¶
func (svm *SVirtualMachine) FindMinDiffKey(limit int32) int32
func (*SVirtualMachine) GetBillingType ¶
func (svm *SVirtualMachine) GetBillingType() string
func (*SVirtualMachine) GetBios ¶
func (vm *SVirtualMachine) GetBios() cloudprovider.TBiosType
func (*SVirtualMachine) GetBootOrder ¶
func (svm *SVirtualMachine) GetBootOrder() string
func (*SVirtualMachine) GetCpuSockets ¶
func (svm *SVirtualMachine) GetCpuSockets() int
func (*SVirtualMachine) GetCreatedAt ¶
func (svm *SVirtualMachine) GetCreatedAt() time.Time
func (*SVirtualMachine) GetDatastoreNames ¶
func (vm *SVirtualMachine) GetDatastoreNames() []string
func (*SVirtualMachine) GetDatastores ¶
func (vm *SVirtualMachine) GetDatastores() ([]*SDatastore, error)
func (*SVirtualMachine) GetError ¶
func (svm *SVirtualMachine) GetError() error
func (*SVirtualMachine) GetExpiredAt ¶
func (svm *SVirtualMachine) GetExpiredAt() time.Time
func (*SVirtualMachine) GetFullOsName ¶
func (vm *SVirtualMachine) GetFullOsName() string
func (*SVirtualMachine) GetGlobalId ¶
func (svm *SVirtualMachine) GetGlobalId() string
func (*SVirtualMachine) GetGuestFamily ¶
func (svm *SVirtualMachine) GetGuestFamily() string
func (*SVirtualMachine) GetGuestFullName ¶
func (svm *SVirtualMachine) GetGuestFullName() string
func (*SVirtualMachine) GetGuestId ¶
func (svm *SVirtualMachine) GetGuestId() string
func (*SVirtualMachine) GetGuestState ¶
func (svm *SVirtualMachine) GetGuestState() string
func (*SVirtualMachine) GetGuestToolsRunningStatus ¶
func (svm *SVirtualMachine) GetGuestToolsRunningStatus() string
func (*SVirtualMachine) GetGuestToolsStatus ¶
func (svm *SVirtualMachine) GetGuestToolsStatus() string
func (*SVirtualMachine) GetHostname ¶
func (svm *SVirtualMachine) GetHostname() string
func (*SVirtualMachine) GetHypervisor ¶
func (svm *SVirtualMachine) GetHypervisor() string
func (*SVirtualMachine) GetIDiskById ¶
func (svm *SVirtualMachine) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)
func (*SVirtualMachine) GetIDisks ¶
func (svm *SVirtualMachine) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SVirtualMachine) GetIEIP ¶
func (svm *SVirtualMachine) GetIEIP() (cloudprovider.ICloudEIP, error)
func (*SVirtualMachine) GetIHost ¶
func (svm *SVirtualMachine) GetIHost() cloudprovider.ICloudHost
func (*SVirtualMachine) GetIHostId ¶
func (svm *SVirtualMachine) GetIHostId() string
func (*SVirtualMachine) GetINics ¶
func (svm *SVirtualMachine) GetINics() ([]cloudprovider.ICloudNic, error)
func (*SVirtualMachine) GetInstanceSnapshot ¶
func (svm *SVirtualMachine) GetInstanceSnapshot(idStr string) (cloudprovider.ICloudInstanceSnapshot, error)
func (*SVirtualMachine) GetInstanceSnapshots ¶
func (svm *SVirtualMachine) GetInstanceSnapshots() ([]cloudprovider.ICloudInstanceSnapshot, error)
func (*SVirtualMachine) GetInstanceType ¶
func (svm *SVirtualMachine) GetInstanceType() string
func (*SVirtualMachine) GetIps ¶
func (svm *SVirtualMachine) GetIps() []string
func (*SVirtualMachine) GetMachine ¶
func (svm *SVirtualMachine) GetMachine() string
func (*SVirtualMachine) GetMoid ¶
func (svm *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 (svm *SVirtualMachine) GetProjectId() string
func (*SVirtualMachine) GetRootImagePath ¶
func (svm *SVirtualMachine) GetRootImagePath() (string, error)
func (*SVirtualMachine) GetSecurityGroupIds ¶
func (svm *SVirtualMachine) GetSecurityGroupIds() ([]string, error)
func (*SVirtualMachine) GetSerialOutput ¶
func (svm *SVirtualMachine) GetSerialOutput(port int) (string, error)
func (*SVirtualMachine) GetStatus ¶
func (svm *SVirtualMachine) GetStatus() string
func (*SVirtualMachine) GetSysTags ¶
func (svm *SVirtualMachine) GetSysTags() map[string]string
func (*SVirtualMachine) GetToolsVersion ¶
func (svm *SVirtualMachine) GetToolsVersion() string
func (*SVirtualMachine) GetVGADevice ¶
func (svm *SVirtualMachine) GetVGADevice() string
func (*SVirtualMachine) GetVNCInfo ¶
func (svm *SVirtualMachine) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
func (*SVirtualMachine) GetVcpuCount ¶
func (svm *SVirtualMachine) GetVcpuCount() int
func (*SVirtualMachine) GetVdi ¶
func (svm *SVirtualMachine) GetVdi() string
func (*SVirtualMachine) GetVersion ¶
func (svm *SVirtualMachine) GetVersion() string
func (*SVirtualMachine) GetVga ¶
func (svm *SVirtualMachine) GetVga() string
func (*SVirtualMachine) GetVmemSizeMB ¶
func (svm *SVirtualMachine) GetVmemSizeMB() int
func (*SVirtualMachine) GetVmrcInfo ¶
func (svm *SVirtualMachine) GetVmrcInfo() (*cloudprovider.ServerVncOutput, error)
func (*SVirtualMachine) GetWebmksInfo ¶
func (svm *SVirtualMachine) GetWebmksInfo() (*cloudprovider.ServerVncOutput, error)
func (*SVirtualMachine) IsAutoRenew ¶
func (svm *SVirtualMachine) IsAutoRenew() bool
func (*SVirtualMachine) IsEmulated ¶
func (svm *SVirtualMachine) IsEmulated() bool
func (*SVirtualMachine) IsTemplate ¶
func (svm *SVirtualMachine) IsTemplate() bool
func (*SVirtualMachine) LiveMigrateVM ¶
func (svm *SVirtualMachine) LiveMigrateVM(hostId string) error
func (*SVirtualMachine) MigrateVM ¶
func (svm *SVirtualMachine) MigrateVM(hostId string) error
func (*SVirtualMachine) RebuildRoot ¶
func (svm *SVirtualMachine) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
func (*SVirtualMachine) Refresh ¶
func (svm *SVirtualMachine) Refresh() error
func (*SVirtualMachine) Renew ¶
func (svm *SVirtualMachine) Renew(bc billing.SBillingCycle) error
func (*SVirtualMachine) ResetToInstanceSnapshot ¶
func (svm *SVirtualMachine) ResetToInstanceSnapshot(ctx context.Context, idStr string) error
func (*SVirtualMachine) SetAutoRenew ¶
func (svm *SVirtualMachine) SetAutoRenew(bc billing.SBillingCycle) error
func (*SVirtualMachine) SetConfig ¶
func (svm *SVirtualMachine) SetConfig(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) error
func (*SVirtualMachine) SetSecurityGroups ¶
func (svm *SVirtualMachine) SetSecurityGroups(secgroupIds []string) error
func (*SVirtualMachine) SetTags ¶
func (svm *SVirtualMachine) SetTags(tags map[string]string, replace bool) error
func (*SVirtualMachine) StartVM ¶
func (svm *SVirtualMachine) StartVM(ctx context.Context) error
ideopotent start
func (*SVirtualMachine) StopVM ¶
func (svm *SVirtualMachine) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
func (*SVirtualMachine) SuspendVM ¶
func (svm *SVirtualMachine) SuspendVM(ctx context.Context) error
func (*SVirtualMachine) UpdateUserData ¶
func (svm *SVirtualMachine) UpdateUserData(userData string) error
func (*SVirtualMachine) UpdateVM ¶
func (svm *SVirtualMachine) UpdateVM(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) 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) GetSubAddress ¶
func (nic *SVirtualNIC) GetSubAddress() ([]string, error)
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 }
func NewVirtualSwitch ¶
func NewVirtualSwitch() *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
- compact_ips.go
- datacenter.go
- device.go
- devtools.go
- doc.go
- fakeregion.go
- fakevpc.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
- ovf.go
- resourcepool.go
- snapshot.go
- storage.go
- storagecache.go
- tags.go
- template.go
- utils.go
- vdisk.go
- virtualmachine.go
- vnic.go
- vswitch.go
- wire.go