zstack

package
v0.0.0-...-3235d85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageTypeCeph    = TStorageType("Ceph")
	StorageTypeLocal   = TStorageType("LocalStorage")
	StorageTypeVCenter = TStorageType("VCenter")

	CephPoolTypeData       = TCephPoolType("Data")
	CephPoolTypeRoot       = TCephPoolType("Root")
	CephPoolTypeImageCache = TCephPoolType("ImageCache")
)
View Source
const (
	CLOUD_PROVIDER_ZSTACK = api.CLOUD_PROVIDER_ZSTACK
	ZSTACK_DEFAULT_REGION = "ZStack"
	ZSTACK_API_VERSION    = "v1"
)

Variables

View Source
var (
	SkipEsxi bool = true
)

Functions

This section is empty.

Types

type DataPoint

type DataPoint struct {
	Value  float64 `json:"value"`
	Time   int64   `json:"time"`
	Labels Label   `json:"labels"`
}

type ImageServers

type ImageServers []SImageServer

func (ImageServers) Len

func (v ImageServers) Len() int

func (ImageServers) Less

func (v ImageServers) Less(i, j int) bool

func (ImageServers) Swap

func (v ImageServers) Swap(i, j int)

type Label

type Label struct {
	VMUuid   string `json:"VMUuid"`
	HostUuid string `json:"HostUuid"`
}

type SBackupStorageRef

type SBackupStorageRef struct {
	BackupStorageUUID string    `json:"backupStorageUuid"`
	CreateDate        time.Time `json:"createDate"`
	ImageUUID         string    `json:"ImageUuid"`
	InstallPath       string    `json:"installPath"`
	LastOpDate        time.Time `json:"lastOpDate"`
	Status            string    `json:"status"`
}

type SCluster

type SCluster struct {
	ZStackBasic
	Description    string `json:"description"`
	State          string `json:"State"`
	HypervisorType string `json:"hypervisorType"`
	ZStackTime
	ZoneUUID string `json:"zoneUuid"`
	Type     string `json:"type"`
}

type SConfiguration

type SConfiguration struct {
	Name         string
	Category     string
	Description  string
	DefaultValue string
	Value        string
}

type SConsoleInfo

type SConsoleInfo struct {
	Scheme   string `json:"scheme"`
	Hostname string `json:"hostname"`
	Port     int    `json:"port"`
	Token    string `json:"token"`
}

type SDataPoint

type SDataPoint struct {
	DataPoints []DataPoint `json:"data"`
}

type SDisk

type SDisk struct {
	multicloud.SDisk
	ZStackTags

	ZStackBasic
	PrimaryStorageUUID string  `json:"primaryStorageUuid"`
	VMInstanceUUID     string  `json:"vmInstanceUuid"`
	DiskOfferingUUID   string  `json:"diskOfferingUuid"`
	RootImageUUID      string  `json:"rootImageUuid"`
	InstallPath        string  `json:"installPath"`
	Type               string  `json:"type"`
	Format             string  `json:"format"`
	Size               int     `json:"size"`
	ActualSize         int     `json:"actualSize"`
	DeviceID           float32 `json:"deviceId"`
	State              string  `json:"state"`
	Status             string  `json:"status"`

	ZStackTime
	// contains filtered or unexported fields
}

func (*SDisk) CreateISnapshot

func (disk *SDisk) CreateISnapshot(ctx context.Context, name, desc string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) Delete

func (disk *SDisk) Delete(ctx context.Context) error

func (*SDisk) GetAccessPath

func (disk *SDisk) GetAccessPath() string

func (*SDisk) GetBillingType

func (disk *SDisk) GetBillingType() string

func (*SDisk) GetCacheMode

func (disk *SDisk) GetCacheMode() string

func (*SDisk) GetCreatedAt

func (disk *SDisk) GetCreatedAt() time.Time

func (*SDisk) GetDiskFormat

func (disk *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (disk *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (disk *SDisk) GetDiskType() string

func (*SDisk) GetDriver

func (disk *SDisk) GetDriver() string

func (*SDisk) GetExpiredAt

func (disk *SDisk) GetExpiredAt() time.Time

func (*SDisk) GetFsFormat

func (disk *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (disk *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshot

func (disk *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetISnapshots

func (disk *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetIStorage

func (disk *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)

func (*SDisk) GetIStorageId

func (disk *SDisk) GetIStorageId() string

func (*SDisk) GetId

func (disk *SDisk) GetId() string

func (*SDisk) GetIsAutoDelete

func (disk *SDisk) GetIsAutoDelete() bool

func (*SDisk) GetIsNonPersistent

func (disk *SDisk) GetIsNonPersistent() bool

func (*SDisk) GetMountpoint

func (disk *SDisk) GetMountpoint() string

func (*SDisk) GetName

func (disk *SDisk) GetName() string

func (*SDisk) GetProjectId

func (disk *SDisk) GetProjectId() string

func (*SDisk) GetStatus

func (disk *SDisk) GetStatus() string

func (*SDisk) GetSysTags

func (disk *SDisk) GetSysTags() map[string]string

func (*SDisk) GetTemplateId

func (disk *SDisk) GetTemplateId() string

func (*SDisk) IsEmulated

func (disk *SDisk) IsEmulated() bool

func (*SDisk) Rebuild

func (disk *SDisk) Rebuild(ctx context.Context) error

func (*SDisk) Refresh

func (disk *SDisk) Refresh() error

func (*SDisk) Reset

func (disk *SDisk) Reset(ctx context.Context, snapshotId string) (string, error)

func (*SDisk) Resize

func (disk *SDisk) Resize(ctx context.Context, sizeMb int64) error

type SDiskOffering

type SDiskOffering struct {
	ZStackBasic
	DiskSize          int    `json:"diskSize"`
	Type              string `json:"type"`
	State             string `json:"state"`
	AllocatorStrategy string `json:"allocatorStrategy"`
}

type SEipAddress

type SEipAddress struct {
	multicloud.SEipBase
	ZStackTags

	ZStackBasic
	VMNicUUID string `json:"vmNicUuid"`
	VipUUID   string `json:"vipUuid"`
	State     string `json:"state"`
	VipIP     string `json:"vipIp"`
	GuestIP   string `json:"guestIp"`
	ZStackTime
	// contains filtered or unexported fields
}

func (*SEipAddress) Associate

func (eip *SEipAddress) Associate(conf *cloudprovider.AssociateConfig) error

func (*SEipAddress) ChangeBandwidth

func (eip *SEipAddress) ChangeBandwidth(bw int) error

func (*SEipAddress) Delete

func (eip *SEipAddress) Delete() error

func (*SEipAddress) Dissociate

func (eip *SEipAddress) Dissociate() error

func (*SEipAddress) GetAssociationExternalId

func (eip *SEipAddress) GetAssociationExternalId() string

func (*SEipAddress) GetAssociationType

func (eip *SEipAddress) GetAssociationType() string

func (*SEipAddress) GetBandwidth

func (eip *SEipAddress) GetBandwidth() int

func (*SEipAddress) GetBillingType

func (eip *SEipAddress) GetBillingType() string

func (*SEipAddress) GetCreatedAt

func (eip *SEipAddress) GetCreatedAt() time.Time

func (*SEipAddress) GetExpiredAt

func (eip *SEipAddress) GetExpiredAt() time.Time

func (*SEipAddress) GetGlobalId

func (eip *SEipAddress) GetGlobalId() string

func (*SEipAddress) GetINetworkId

func (eip *SEipAddress) GetINetworkId() string

func (*SEipAddress) GetId

func (eip *SEipAddress) GetId() string

func (*SEipAddress) GetInternetChargeType

func (eip *SEipAddress) GetInternetChargeType() string

func (*SEipAddress) GetIpAddr

func (eip *SEipAddress) GetIpAddr() string

func (*SEipAddress) GetMode

func (eip *SEipAddress) GetMode() string

func (*SEipAddress) GetName

func (eip *SEipAddress) GetName() string

func (*SEipAddress) GetProjectId

func (eip *SEipAddress) GetProjectId() string

func (*SEipAddress) GetStatus

func (eip *SEipAddress) GetStatus() string

func (*SEipAddress) IsEmulated

func (eip *SEipAddress) IsEmulated() bool

func (*SEipAddress) Refresh

func (eip *SEipAddress) Refresh() error

type SHost

type SHost struct {
	multicloud.SHostBase

	ZStackBasic
	Username                string `json:"username"`
	SSHPort                 int    `json:"sshPort"`
	ZoneUUID                string `json:"zoneUuid"`
	ClusterUUID             string `json:"clusterUuid"`
	ManagementIP            string `json:"managementIp"`
	HypervisorType          string `json:"hypervisorType"`
	State                   string `json:"state"`
	Status                  string `json:"status"`
	TotalCPUCapacity        int    `json:"totalCpuCapacity"`
	AvailableCPUCapacity    int    `json:"availableCpuCapacity"`
	CPUSockets              int    `json:"cpuSockets"`
	TotalMemoryCapacity     int    `json:"totalMemoryCapacity"`
	AvailableMemoryCapacity int    `json:"availableMemoryCapacity"`
	CPUNum                  int    `json:"cpuNum"`
	ZStackTime
	// contains filtered or unexported fields
}

func (*SHost) CreateVM

func (*SHost) GetAccessIp

func (host *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (host *SHost) GetAccessMac() string

func (*SHost) GetCpuCmtbound

func (host *SHost) GetCpuCmtbound() float32

func (*SHost) GetCpuCount

func (host *SHost) GetCpuCount() int

func (*SHost) GetCpuDesc

func (host *SHost) GetCpuDesc() string

func (*SHost) GetCpuMhz

func (host *SHost) GetCpuMhz() int

func (*SHost) GetEnabled

func (host *SHost) GetEnabled() bool

func (*SHost) GetGlobalId

func (host *SHost) GetGlobalId() string

func (*SHost) GetHostStatus

func (host *SHost) GetHostStatus() string

func (*SHost) GetHostType

func (host *SHost) GetHostType() string

func (*SHost) GetIHostNics

func (host *SHost) GetIHostNics() ([]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(instanceId string) (cloudprovider.ICloudVM, error)

func (*SHost) GetIVMs

func (host *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)

func (*SHost) GetId

func (host *SHost) GetId() string

func (*SHost) GetIsMaintenance

func (host *SHost) GetIsMaintenance() bool

func (*SHost) GetMemCmtbound

func (host *SHost) GetMemCmtbound() float32

func (*SHost) GetMemSizeMB

func (host *SHost) GetMemSizeMB() int

func (*SHost) GetName

func (host *SHost) GetName() string

func (*SHost) GetNodeCount

func (host *SHost) GetNodeCount() int8

func (*SHost) GetReservedMemoryMb

func (host *SHost) GetReservedMemoryMb() int

func (*SHost) GetSN

func (host *SHost) GetSN() string

func (*SHost) GetStatus

func (host *SHost) GetStatus() string

func (*SHost) GetStorageSizeMB

func (host *SHost) GetStorageSizeMB() int64

func (*SHost) GetStorageType

func (host *SHost) GetStorageType() string

func (*SHost) GetSysInfo

func (host *SHost) GetSysInfo() jsonutils.JSONObject

func (*SHost) GetVersion

func (host *SHost) GetVersion() string

func (*SHost) IsEmulated

func (host *SHost) IsEmulated() bool

func (*SHost) Refresh

func (host *SHost) Refresh() error

type SHostRoute

type SHostRoute struct {
	ID            int
	L3NetworkUuid string `json:"l3NetworkUuid"`
	Prefix        string
	Nexthop       string
	ZStackTime
}

type SImage

type SImage struct {
	multicloud.SImageBase
	ZStackTags

	BackupStorageRefs []SBackupStorageRef `json:"backupStorageRefs"`
	ActualSize        int                 `json:"actualSize"`
	CreateDate        time.Time           `json:"createDate"`
	Description       string              `json:"description"`
	Format            string              `json:"format"`
	LastOpDate        time.Time           `json:"lastOpDate"`
	MD5Sum            string              `json:"md5sum"`
	MediaType         string              `json:"mediaType"`
	Name              string              `json:"name"`
	Platform          string              `json:"platform"`
	Size              int                 `json:"size"`
	State             string              `json:"state"`
	Status            string              `json:"Ready"`
	System            bool                `json:"system"`
	Type              string              `json:"type"`
	URL               string              `json:"url"`
	UUID              string              `json:"uuid"`
	// contains filtered or unexported fields
}

func (*SImage) Delete

func (image *SImage) Delete(ctx context.Context) error

func (*SImage) GetBios

func (image *SImage) GetBios() cloudprovider.TBiosType

func (*SImage) GetCreatedAt

func (image *SImage) GetCreatedAt() time.Time

func (*SImage) GetFullOsName

func (image *SImage) GetFullOsName() string

func (*SImage) GetGlobalId

func (image *SImage) GetGlobalId() string

func (*SImage) GetIStoragecache

func (image *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SImage) GetId

func (image *SImage) GetId() string

func (*SImage) GetImageFormat

func (image *SImage) GetImageFormat() string

func (*SImage) GetImageStatus

func (image *SImage) GetImageStatus() string

func (*SImage) GetImageType

func (image *SImage) GetImageType() cloudprovider.TImageType

func (*SImage) GetMinOsDiskSizeGb

func (image *SImage) GetMinOsDiskSizeGb() int

func (*SImage) GetMinRamSizeMb

func (image *SImage) GetMinRamSizeMb() int

func (*SImage) GetName

func (image *SImage) GetName() string

func (*SImage) GetOsArch

func (image *SImage) GetOsArch() string

func (*SImage) GetOsDist

func (image *SImage) GetOsDist() string

func (*SImage) GetOsLang

func (image *SImage) GetOsLang() string

func (*SImage) GetOsType

func (image *SImage) GetOsType() cloudprovider.TOsType

func (*SImage) GetOsVersion

func (image *SImage) GetOsVersion() string

func (*SImage) GetSizeByte

func (image *SImage) GetSizeByte() int64

func (*SImage) GetStatus

func (image *SImage) GetStatus() string

func (*SImage) IsEmulated

func (image *SImage) IsEmulated() bool

func (*SImage) Refresh

func (image *SImage) Refresh() error

type SImageServer

type SImageServer struct {
	ZStackBasic

	Hostname          string   `json:"hostname"`
	Username          string   `json:"username"`
	SSHPort           int      `json:"sshPort"`
	URL               string   `json:"url"`
	TotalCapacity     int      `json:"totalCapacity"`
	AvailableCapacity int      `json:"availableCapacity"`
	Type              string   `json:"type"`
	State             string   `json:"state"`
	Status            string   `json:"status"`
	AttachedZoneUUIDs []string `json:"attachedZoneUuids"`
	ZStackTime
}

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	ZStackTags

	ZStackBasic
	ZoneUUID             string `json:"zoneUuid"`
	ClusterUUID          string `json:"clusterUuid"`
	HostUUID             string `json:"hostUuid"`
	LastHostUUID         string `json:"lastHostUuid"`
	RootVolumeUUID       string `json:"rootVolumeUuid"`
	Platform             string `json:"platform"`
	InstanceOfferingUUID string `json:"instanceOfferingUuid"`

	DefaultL3NetworkUUID string            `json:"defaultL3NetworkUuid"`
	Type                 string            `json:"type"`
	HypervisorType       string            `json:"hypervisorType"`
	MemorySize           int               `json:"memorySize"`
	CPUNum               int               `json:"cpuNum"`
	CPUSpeed             int               `json:"cpuSpeed"`
	State                string            `json:"state"`
	InternalID           string            `json:"internalId"`
	VMNics               []SInstanceNic    `json:"vmNics"`
	AllVolumes           []SDisk           `json:"allVolumes"`
	VMCdRoms             []SInstanceCdrome `json:"vmCdRoms"`
	ZStackTime
	// contains filtered or unexported fields
}

func (*SInstance) AttachDisk

func (instance *SInstance) AttachDisk(ctx context.Context, diskId string) error

func (*SInstance) ChangeConfig

func (instance *SInstance) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error

func (*SInstance) DeleteVM

func (instance *SInstance) DeleteVM(ctx context.Context) error

func (*SInstance) DeployVM

func (instance *SInstance) DeployVM(ctx context.Context, opts *cloudprovider.SInstanceDeployOptions) error

func (*SInstance) DetachDisk

func (instance *SInstance) DetachDisk(ctx context.Context, diskId string) error

func (*SInstance) GetBillingType

func (instance *SInstance) GetBillingType() string

func (*SInstance) GetBios

func (instance *SInstance) GetBios() cloudprovider.TBiosType

func (*SInstance) GetBootOrder

func (instance *SInstance) GetBootOrder() string

func (*SInstance) GetCreatedAt

func (instance *SInstance) GetCreatedAt() time.Time

func (*SInstance) GetError

func (instance *SInstance) GetError() error

func (*SInstance) GetExpiredAt

func (instance *SInstance) GetExpiredAt() time.Time

func (*SInstance) GetFullOsName

func (instance *SInstance) GetFullOsName() string

func (*SInstance) GetGlobalId

func (instance *SInstance) GetGlobalId() string

func (*SInstance) GetHostname

func (instance *SInstance) GetHostname() string

func (*SInstance) GetHypervisor

func (instance *SInstance) GetHypervisor() string

func (*SInstance) GetIDisks

func (instance *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SInstance) GetIEIP

func (instance *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)

func (*SInstance) GetIHost

func (instance *SInstance) GetIHost() cloudprovider.ICloudHost

func (*SInstance) GetIHostId

func (instance *SInstance) GetIHostId() string

func (*SInstance) GetINics

func (instance *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)

func (*SInstance) GetId

func (instance *SInstance) GetId() string

func (*SInstance) GetInstanceType

func (instance *SInstance) GetInstanceType() string

func (*SInstance) GetMachine

func (instance *SInstance) GetMachine() string

func (*SInstance) GetName

func (instance *SInstance) GetName() string

func (*SInstance) GetOsArch

func (instance *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (instance *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (instance *SInstance) GetOsLang() string

func (*SInstance) GetOsType

func (instance *SInstance) GetOsType() cloudprovider.TOsType

func (*SInstance) GetOsVersion

func (instance *SInstance) GetOsVersion() string

func (*SInstance) GetProjectId

func (instance *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

func (instance *SInstance) GetSecurityGroupIds() ([]string, error)

func (*SInstance) GetStatus

func (instance *SInstance) GetStatus() string

func (*SInstance) GetVNCInfo

func (instance *SInstance) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)

func (*SInstance) GetVcpuCount

func (instance *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (instance *SInstance) GetVdi() string

func (*SInstance) GetVga

func (instance *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (instance *SInstance) GetVmemSizeMB() int

func (*SInstance) IsEmulated

func (instance *SInstance) IsEmulated() bool

func (*SInstance) RebuildRoot

func (instance *SInstance) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)

func (*SInstance) Refresh

func (instance *SInstance) Refresh() error

func (*SInstance) Renew

func (instance *SInstance) Renew(bc billing.SBillingCycle) error

func (*SInstance) SetSecurityGroups

func (instance *SInstance) SetSecurityGroups(secgroupIds []string) error

func (*SInstance) StartVM

func (instance *SInstance) StartVM(ctx context.Context) error

func (*SInstance) StopVM

func (instance *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error

func (*SInstance) UpdateUserData

func (instance *SInstance) UpdateUserData(userData string) error

func (*SInstance) UpdateVM

func (instance *SInstance) UpdateVM(ctx context.Context, input cloudprovider.SInstanceUpdateOptions) error

type SInstanceCdrome

type SInstanceCdrome struct {
}

type SInstanceNic

type SInstanceNic struct {
	UUID           string   `json:"uuid"`
	VMInstanceUUID string   `json:"vmInstanceUuid"`
	L3NetworkUUID  string   `json:"l3NetworkUuid"`
	IP             string   `json:"ip"`
	Mac            string   `json:"mac"`
	HypervisorType string   `json:"hypervisorType"`
	IPVersion      int      `json:"ipVersion"`
	UsedIps        []string `json:"usedIps"`
	InternalName   string   `json:"internalName"`
	DeviceID       int      `json:"deviceId"`
	ZStackTime

	cloudprovider.DummyICloudNic
	// contains filtered or unexported fields
}

func (*SInstanceNic) GetDriver

func (nic *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (nic *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (nic *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (nic *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (nic *SInstanceNic) GetMAC() string

func (*SInstanceNic) InClassicNetwork

func (nic *SInstanceNic) InClassicNetwork() bool

type SInstanceOffering

type SInstanceOffering struct {
	multicloud.SServerSku
	ZStackTags

	ZStackBasic
	MemorySize        int    `json:"memorySize"`
	CPUNum            int    `json:"cpuNum"`
	CPUSpeed          int    `json:"cpuSpeed"`
	Type              string `json:"type"`
	AllocatorStrategy string `json:"allocatorStrategy"`
	State             string `json:"state"`

	ZStackTime
	// contains filtered or unexported fields
}

func (*SInstanceOffering) Delete

func (offering *SInstanceOffering) Delete() error

func (*SInstanceOffering) GetAttachedDiskCount

func (offering *SInstanceOffering) GetAttachedDiskCount() int

func (*SInstanceOffering) GetAttachedDiskSizeGB

func (offering *SInstanceOffering) GetAttachedDiskSizeGB() int

func (*SInstanceOffering) GetAttachedDiskType

func (offering *SInstanceOffering) GetAttachedDiskType() string

func (*SInstanceOffering) GetCpuArch

func (offering *SInstanceOffering) GetCpuArch() string

func (*SInstanceOffering) GetCpuCoreCount

func (offering *SInstanceOffering) GetCpuCoreCount() int

func (*SInstanceOffering) GetDataDiskMaxCount

func (offering *SInstanceOffering) GetDataDiskMaxCount() int

func (*SInstanceOffering) GetDataDiskTypes

func (offering *SInstanceOffering) GetDataDiskTypes() string

func (*SInstanceOffering) GetGlobalId

func (offering *SInstanceOffering) GetGlobalId() string

func (*SInstanceOffering) GetGpuAttachable

func (offering *SInstanceOffering) GetGpuAttachable() bool

func (*SInstanceOffering) GetGpuCount

func (offering *SInstanceOffering) GetGpuCount() string

func (*SInstanceOffering) GetGpuMaxCount

func (offering *SInstanceOffering) GetGpuMaxCount() int

func (*SInstanceOffering) GetGpuSpec

func (offering *SInstanceOffering) GetGpuSpec() string

func (*SInstanceOffering) GetId

func (offering *SInstanceOffering) GetId() string

func (*SInstanceOffering) GetInstanceTypeCategory

func (offering *SInstanceOffering) GetInstanceTypeCategory() string

func (*SInstanceOffering) GetInstanceTypeFamily

func (offering *SInstanceOffering) GetInstanceTypeFamily() string

func (*SInstanceOffering) GetMemorySizeMB

func (offering *SInstanceOffering) GetMemorySizeMB() int

func (*SInstanceOffering) GetName

func (offering *SInstanceOffering) GetName() string

func (*SInstanceOffering) GetNicMaxCount

func (offering *SInstanceOffering) GetNicMaxCount() int

func (*SInstanceOffering) GetNicType

func (offering *SInstanceOffering) GetNicType() string

func (*SInstanceOffering) GetOsName

func (offering *SInstanceOffering) GetOsName() string

func (*SInstanceOffering) GetPostpaidStatus

func (offering *SInstanceOffering) GetPostpaidStatus() string

func (*SInstanceOffering) GetPrepaidStatus

func (offering *SInstanceOffering) GetPrepaidStatus() string

func (*SInstanceOffering) GetStatus

func (offering *SInstanceOffering) GetStatus() string

func (*SInstanceOffering) GetSysDiskMaxSizeGB

func (offering *SInstanceOffering) GetSysDiskMaxSizeGB() int

func (*SInstanceOffering) GetSysDiskMinSizeGB

func (offering *SInstanceOffering) GetSysDiskMinSizeGB() int

func (*SInstanceOffering) GetSysDiskResizable

func (offering *SInstanceOffering) GetSysDiskResizable() bool

func (*SInstanceOffering) GetSysDiskType

func (offering *SInstanceOffering) GetSysDiskType() string

func (*SInstanceOffering) IsEmulated

func (offering *SInstanceOffering) IsEmulated() bool

func (*SInstanceOffering) Refresh

func (offering *SInstanceOffering) Refresh() error

type SInterfaceIP

type SInterfaceIP struct {
	IP            string
	L3NetworkUUID string
	IPRangeUUID   string
}

func (*SInterfaceIP) GetGlobalId

func (ip *SInterfaceIP) GetGlobalId() string

func (*SInterfaceIP) GetINetworkId

func (ip *SInterfaceIP) GetINetworkId() string

func (*SInterfaceIP) GetIP

func (ip *SInterfaceIP) GetIP() string

func (*SInterfaceIP) IsPrimary

func (ip *SInterfaceIP) IsPrimary() bool

type SL3Network

type SL3Network struct {
	ZStackBasic
	Type          string       `json:"type"`
	ZoneUUID      string       `json:"zoneUuid"`
	L2NetworkUUID string       `json:"l2NetworkUuid"`
	State         string       `json:"state"`
	System        bool         `json:"system"`
	Category      bool         `json:"category"`
	IPVersion     int          `json:"ipVersion"`
	DNS           []string     `json:"dns"`
	Networks      []SNetwork   `json:"ipRanges"`
	HostRoute     []SHostRoute `json:"hostRoute"`
	ZStackTime
}

type SLocalStorage

type SLocalStorage struct {
	multicloud.SStorageBase
	ZStackTags

	HostUUID                  string `json:"hostUuid"`
	TotalCapacity             int64  `json:"totalCapacity"`
	AvailableCapacity         int64  `json:"availableCapacity"`
	TotalPhysicalCapacity     int64  `json:"totalPhysicalCapacity"`
	AvailablePhysicalCapacity int64  `json:"availablePhysicalCapacity"`
	// contains filtered or unexported fields
}

func (*SLocalStorage) CreateIDisk

func (*SLocalStorage) GetCapacityMB

func (storage *SLocalStorage) GetCapacityMB() int64

func (*SLocalStorage) GetCapacityUsedMB

func (storage *SLocalStorage) GetCapacityUsedMB() int64

func (*SLocalStorage) GetEnabled

func (storage *SLocalStorage) GetEnabled() bool

func (*SLocalStorage) GetGlobalId

func (storage *SLocalStorage) GetGlobalId() string

func (*SLocalStorage) GetIDiskById

func (storage *SLocalStorage) GetIDiskById(diskId string) (cloudprovider.ICloudDisk, error)

func (*SLocalStorage) GetIDisks

func (storage *SLocalStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SLocalStorage) GetIStoragecache

func (storage *SLocalStorage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SLocalStorage) GetIZone

func (storage *SLocalStorage) GetIZone() cloudprovider.ICloudZone

func (*SLocalStorage) GetId

func (storage *SLocalStorage) GetId() string

func (*SLocalStorage) GetMediumType

func (storage *SLocalStorage) GetMediumType() string

func (*SLocalStorage) GetMountPoint

func (storage *SLocalStorage) GetMountPoint() string

func (*SLocalStorage) GetName

func (storage *SLocalStorage) GetName() string

func (*SLocalStorage) GetStatus

func (storage *SLocalStorage) GetStatus() string

func (*SLocalStorage) GetStorageConf

func (storage *SLocalStorage) GetStorageConf() jsonutils.JSONObject

func (*SLocalStorage) GetStorageType

func (storage *SLocalStorage) GetStorageType() string

func (*SLocalStorage) IsEmulated

func (storage *SLocalStorage) IsEmulated() bool

func (*SLocalStorage) IsSysDiskStore

func (storage *SLocalStorage) IsSysDiskStore() bool

func (*SLocalStorage) Refresh

func (storage *SLocalStorage) Refresh() error

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	ZStackTags

	ZStackBasic
	L3NetworkUUID string `json:"l3NetworkUuid"`
	StartIP       string `json:"startIp"`
	EndIP         string `json:"endIp"`
	Netmask       string `json:"netmask"`
	Gateway       string `json:"gateway"`
	NetworkCIDR   string `json:"networkCidr"`
	IPVersion     int    `json:"ipVersion"`
	PrefixLen     int    `json:"prefixLen"`
	ZStackTime
	// contains filtered or unexported fields
}

func (*SNetwork) Contains

func (network *SNetwork) Contains(ipAddr string) bool

func (*SNetwork) Delete

func (network *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (network *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetGateway

func (network *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (network *SNetwork) GetGlobalId() string

func (*SNetwork) GetIPRange

func (network *SNetwork) GetIPRange() netutils.IPV4AddrRange

func (*SNetwork) GetIWire

func (network *SNetwork) GetIWire() cloudprovider.ICloudWire

func (*SNetwork) GetId

func (network *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (network *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (network *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (network *SNetwork) GetIpStart() string

func (*SNetwork) GetIsPublic

func (network *SNetwork) GetIsPublic() bool

func (*SNetwork) GetName

func (network *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (network *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

func (self *SNetwork) GetPublicScope() rbacscope.TRbacScope

func (*SNetwork) GetServerType

func (network *SNetwork) GetServerType() string

func (*SNetwork) GetStatus

func (network *SNetwork) GetStatus() string

func (*SNetwork) IsEmulated

func (network *SNetwork) IsEmulated() bool

func (*SNetwork) Refresh

func (network *SNetwork) Refresh() error

type SNetworkService

type SNetworkService struct {
	IPsec          []string `json:"IPsec"`
	VRouterRoute   []string `json:"VRouterRoute"`
	VipQos         []string `json:"VipQos"`
	DNS            []string `json:"DNS"`
	SNAT           []string `json:"SNAT"`
	LoadBalancer   []string `json:"LoadBalancer"`
	Userdata       []string `json:"Userdata"`
	SecurityGroup  []string `json:"SecurityGroup"`
	Eip            []string `json:"Eip"`
	DHCP           []string `json:"DHCP"`
	CentralizedDNS []string `json:"CentralizedDNS"`
	HostRoute      []string `json:"HostRoute"`
	PortForwarding []string `json:"PortForwarding"`
}

type SNetworkServiceProvider

type SNetworkServiceProvider struct {
	ZStackBasic
	ZStackTime
	Type                   string   `json:"type"`
	NetworkServiceTypes    []string `json:"networkServiceTypes"`
	AttachedL2NetworkUUIDs []string `json:"attachedL2NetworkUuids"`
}

type SNetworkServiceRef

type SNetworkServiceRef struct {
	L3NetworkUUID              string `json:"l3NetworkUuid"`
	NetworkServiceProviderUUID string `json:"networkServiceProviderUuid"`
	NetworkServiceType         string `json:"networkServiceType"`
}

type SPool

type SPool struct {
	UUID               string        `json:"uuid"`
	PrimaryStorageUUID string        `json:"primaryStorageUuid"`
	PoolName           string        `json:"poolName"`
	Type               TCephPoolType `json:"type"`
	AvailableCapacity  int64         `json:"availableCapacity"`
	UsedCapacity       int64         `json:"usedCapacity"`
	ReplicatedSize     int64         `json:"replicatedSize"`
	TotalCapacity      int64         `json:"totalCapacity"`
	ZStackTime
}

type SQuota

type SQuota struct {
	Uuid         string
	Name         string
	IdentityUuid string
	IdentityType string
	Value        int
}

func (*SQuota) GetCurrentQuotaUsedCount

func (q *SQuota) GetCurrentQuotaUsedCount() int

func (*SQuota) GetDesc

func (q *SQuota) GetDesc() string

func (*SQuota) GetGlobalId

func (q *SQuota) GetGlobalId() string

func (*SQuota) GetMaxQuotaCount

func (q *SQuota) GetMaxQuotaCount() int

func (*SQuota) GetName

func (q *SQuota) GetName() string

func (*SQuota) GetQuotaType

func (q *SQuota) GetQuotaType() string

type SRegion

type SRegion struct {
	multicloud.SRegion
	multicloud.SNoLbRegion
	multicloud.SNoObjectStorageRegion

	Name string
	// contains filtered or unexported fields
}

func (*SRegion) AssignSecurityGroup

func (region *SRegion) AssignSecurityGroup(instanceId, secgroupId string) error

func (*SRegion) AssociateEip

func (region *SRegion) AssociateEip(instanceId, eipId string) error

func (*SRegion) AttachDisk

func (region *SRegion) AttachDisk(instanceId string, diskId string) error

func (*SRegion) AttachServiceForl3Network

func (region *SRegion) AttachServiceForl3Network(l3Id string, services []string) error

func (*SRegion) ChangeConfig

func (region *SRegion) ChangeConfig(instanceId, offeringId string) error

func (*SRegion) CreateDisk

func (region *SRegion) CreateDisk(name string, storageId string, hostId string, poolName string, sizeGb int, desc string) (*SDisk, error)

func (*SRegion) CreateDiskOffering

func (region *SRegion) CreateDiskOffering(diskSizeGB int) (*SDiskOffering, error)

func (*SRegion) CreateEIP

func (region *SRegion) CreateEIP(eip *cloudprovider.SEip) (cloudprovider.ICloudEIP, error)

func (*SRegion) CreateEip

func (region *SRegion) CreateEip(name string, vipId string, desc string) (*SEipAddress, error)

func (*SRegion) CreateISecurityGroup

func (*SRegion) CreateISku

func (*SRegion) CreateIVpc

func (region *SRegion) CreateIVpc(opts *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, error)

func (*SRegion) CreateImage

func (region *SRegion) CreateImage(zoneId string, imageName, format, osType, desc string, reader io.Reader, size int64, callback func(progress float32)) (*SImage, error)

func (*SRegion) CreateInstance

func (region *SRegion) CreateInstance(desc *cloudprovider.SManagedVMCreateConfig, l3Id, zoneId string, offerings map[string]string) (*SInstance, error)

func (*SRegion) CreateInstanceOffering

func (region *SRegion) CreateInstanceOffering(name string, cpu int, memoryMb int, offeringType string) (*SInstanceOffering, error)

func (*SRegion) CreateNetwork

func (region *SRegion) CreateNetwork(name string, cidr string, wireId string, desc string) (*SNetwork, error)

func (*SRegion) CreateSecurityGroup

func (region *SRegion) CreateSecurityGroup(opts *cloudprovider.SecurityGroupCreateInput) (*SSecurityGroup, error)

func (*SRegion) CreateSecurityGroupRule

func (region *SRegion) CreateSecurityGroupRule(secgroupId string, opts *cloudprovider.SecurityGroupRuleCreateOptions) (*SSecurityGroupRule, error)

func (*SRegion) CreateSnapshot

func (region *SRegion) CreateSnapshot(name, diskId, desc string) (*SSnapshot, error)

func (*SRegion) CreateVirtualIP

func (region *SRegion) CreateVirtualIP(name, desc, ip string, l3Id string) (*SVirtualIP, error)

func (*SRegion) DeleteDisk

func (region *SRegion) DeleteDisk(diskId string) error

func (*SRegion) DeleteDiskOffering

func (region *SRegion) DeleteDiskOffering(offerId string) error

func (*SRegion) DeleteISkuByName

func (region *SRegion) DeleteISkuByName(name string) error

func (*SRegion) DeleteImage

func (region *SRegion) DeleteImage(imageId string) error

func (*SRegion) DeleteNetwork

func (region *SRegion) DeleteNetwork(networkId string) error

func (*SRegion) DeleteOffering

func (region *SRegion) DeleteOffering(offeringId string) error

func (*SRegion) DeleteSecurityGroupRules

func (region *SRegion) DeleteSecurityGroupRules(ruleIds []string) error

func (*SRegion) DeleteSnapshot

func (region *SRegion) DeleteSnapshot(snapshotId string) error

func (*SRegion) DeleteVM

func (region *SRegion) DeleteVM(instanceId string) error

func (*SRegion) DeleteVirtualIP

func (region *SRegion) DeleteVirtualIP(vipId string) error

func (*SRegion) DetachDisk

func (region *SRegion) DetachDisk(instanceId, diskId string) error

func (*SRegion) DisassociateEip

func (region *SRegion) DisassociateEip(eipId string) error

func (*SRegion) ExpungeDisk

func (region *SRegion) ExpungeDisk(diskId string) error

func (*SRegion) GetBackupStorageUUID

func (region *SRegion) GetBackupStorageUUID(zondId string) ([]string, error)

func (*SRegion) GetBootOrder

func (region *SRegion) GetBootOrder(instanceId string) string

func (*SRegion) GetCapabilities

func (region *SRegion) GetCapabilities() []string

func (*SRegion) GetClient

func (region *SRegion) GetClient() *SZStackClient

func (*SRegion) GetCloudEnv

func (region *SRegion) GetCloudEnv() string

func (*SRegion) GetClusterIds

func (region *SRegion) GetClusterIds() ([]string, error)

func (*SRegion) GetClusters

func (region *SRegion) GetClusters() ([]SCluster, error)

func (*SRegion) GetConfigrations

func (region *SRegion) GetConfigrations() ([]SConfiguration, error)

func (*SRegion) GetDisk

func (region *SRegion) GetDisk(diskId string) (*SDisk, error)

func (*SRegion) GetDiskOfferings

func (region *SRegion) GetDiskOfferings(diskSizeGB int) ([]SDiskOffering, error)

func (*SRegion) GetDiskWithStorage

func (region *SRegion) GetDiskWithStorage(diskId string) (*SDisk, error)

func (*SRegion) GetDisks

func (region *SRegion) GetDisks(storageId string, diskIds []string, diskType string) ([]SDisk, error)

func (*SRegion) GetEip

func (region *SRegion) GetEip(eipId string) (*SEipAddress, error)

func (*SRegion) GetEips

func (region *SRegion) GetEips(eipId, instanceId string) ([]SEipAddress, error)

func (*SRegion) GetGeographicInfo

func (region *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo

func (*SRegion) GetGlobalId

func (region *SRegion) GetGlobalId() string

func (*SRegion) GetHost

func (region *SRegion) GetHost(hostId string) (*SHost, error)

func (*SRegion) GetHosts

func (region *SRegion) GetHosts(zoneId string, hostId string) ([]SHost, error)

func (*SRegion) GetI18n

func (region *SRegion) GetI18n() cloudprovider.SModelI18nTable

func (*SRegion) GetICloudQuotas

func (region *SRegion) GetICloudQuotas() ([]cloudprovider.ICloudQuota, error)

func (*SRegion) GetIDiskById

func (self *SRegion) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)

func (*SRegion) GetIEipById

func (region *SRegion) GetIEipById(eipId string) (cloudprovider.ICloudEIP, error)

func (*SRegion) GetIEips

func (region *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)

func (*SRegion) GetIHostById

func (region *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SRegion) GetIHosts

func (region *SRegion) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SRegion) GetINetworkInterfaces

func (region *SRegion) GetINetworkInterfaces() ([]cloudprovider.ICloudNetworkInterface, error)

func (*SRegion) GetISecurityGroupById

func (region *SRegion) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error)

func (*SRegion) GetISecurityGroups

func (self *SRegion) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)

func (*SRegion) GetISkus

func (region *SRegion) GetISkus() ([]cloudprovider.ICloudSku, error)

func (*SRegion) GetISnapshotById

func (region *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)

func (*SRegion) GetISnapshots

func (region *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SRegion) GetIStorageById

func (region *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SRegion) GetIStoragecacheById

func (region *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIStoragecaches

func (region *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIStorages

func (region *SRegion) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SRegion) GetIVMById

func (self *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error)

func (*SRegion) GetIVMs

func (region *SRegion) GetIVMs() ([]cloudprovider.ICloudVM, error)

func (*SRegion) GetIVpcById

func (region *SRegion) GetIVpcById(vpcId string) (cloudprovider.ICloudVpc, error)

func (*SRegion) GetIVpcs

func (region *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)

func (*SRegion) GetIZoneById

func (region *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)

func (*SRegion) GetIZones

func (region *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)

func (*SRegion) GetId

func (region *SRegion) GetId() string

func (*SRegion) GetImage

func (region *SRegion) GetImage(imageId string) (*SImage, error)

func (*SRegion) GetImageServers

func (region *SRegion) GetImageServers(zoneId, serverId string) ([]SImageServer, error)

func (*SRegion) GetImages

func (region *SRegion) GetImages(zoneId string, imageId string) ([]SImage, error)

func (*SRegion) GetInstance

func (region *SRegion) GetInstance(instanceId string) (*SInstance, error)

func (*SRegion) GetInstanceConsoleInfo

func (region *SRegion) GetInstanceConsoleInfo(instnaceId string) (*SConsoleInfo, error)

func (*SRegion) GetInstanceConsolePassword

func (region *SRegion) GetInstanceConsolePassword(instnaceId string) (string, error)

func (*SRegion) GetInstanceOffering

func (region *SRegion) GetInstanceOffering(offerId string) (*SInstanceOffering, error)

func (*SRegion) GetInstanceOfferingByType

func (region *SRegion) GetInstanceOfferingByType(instanceType string) (*SInstanceOffering, error)

func (*SRegion) GetInstanceOfferings

func (region *SRegion) GetInstanceOfferings(offerId string, name string, cpu int, memorySizeMb int) ([]SInstanceOffering, error)

func (*SRegion) GetInstances

func (region *SRegion) GetInstances(hostId string, instanceId string, nicId string) ([]SInstance, error)

func (*SRegion) GetL3Network

func (region *SRegion) GetL3Network(l3Id string) (*SL3Network, error)

func (*SRegion) GetL3Networks

func (region *SRegion) GetL3Networks(zoneId string, wireId string, l3Id string) ([]SL3Network, error)

func (*SRegion) GetLocalStorage

func (region *SRegion) GetLocalStorage(storageId string, hostId string) (*SLocalStorage, error)

func (*SRegion) GetLocalStorages

func (region *SRegion) GetLocalStorages(storageId string, hostId string) ([]SLocalStorage, error)

func (*SRegion) GetName

func (region *SRegion) GetName() string

func (*SRegion) GetNetwork

func (region *SRegion) GetNetwork(zoneId, wireId, l3Id, networkId string) (*SNetwork, error)

func (*SRegion) GetNetworkId

func (region *SRegion) GetNetworkId(vip *SVirtualIP) string

func (*SRegion) GetNetworkServiceProviders

func (region *SRegion) GetNetworkServiceProviders(Type string) ([]SNetworkServiceProvider, error)

func (*SRegion) GetNetworkServiceRef

func (region *SRegion) GetNetworkServiceRef(l3Id string, Type string) ([]SNetworkServiceRef, error)

func (*SRegion) GetNetworkServices

func (region *SRegion) GetNetworkServices() (*SNetworkService, error)

func (*SRegion) GetNetworks

func (region *SRegion) GetNetworks(zoneId string, wireId string, l3Id string, networkId string) ([]SNetwork, error)

func (*SRegion) GetProvider

func (region *SRegion) GetProvider() string

func (*SRegion) GetQuotas

func (region *SRegion) GetQuotas() ([]SQuota, error)

func (*SRegion) GetResourceSysTags

func (region *SRegion) GetResourceSysTags(tagId string, resourceType string, resourceId string, tag string) ([]SSysTag, error)

func (*SRegion) GetSecurityGroup

func (region *SRegion) GetSecurityGroup(secgroupId string) (*SSecurityGroup, error)

func (*SRegion) GetSecurityGroups

func (region *SRegion) GetSecurityGroups(secgroupId string, instanceId string, name string) ([]SSecurityGroup, error)

func (*SRegion) GetSnapshot

func (region *SRegion) GetSnapshot(snapshotId string) (*SSnapshot, error)

func (*SRegion) GetSnapshots

func (region *SRegion) GetSnapshots(snapshotId string, diskId string) ([]SSnapshot, error)

func (*SRegion) GetStatus

func (region *SRegion) GetStatus() string

func (*SRegion) GetStorage

func (region *SRegion) GetStorage(storageId string) (*SStorage, error)

func (*SRegion) GetStorages

func (region *SRegion) GetStorages(zoneId, clusterId, storageId string) ([]SStorage, error)

func (*SRegion) GetUserAccount

func (region *SRegion) GetUserAccount(name string) ([]SUserAccount, error)

func (*SRegion) GetVirtualIP

func (region *SRegion) GetVirtualIP(vipId string) (*SVirtualIP, error)

func (*SRegion) GetVirtualIPs

func (region *SRegion) GetVirtualIPs(vipId string) ([]SVirtualIP, error)

func (*SRegion) GetVpc

func (region *SRegion) GetVpc() *SVpc

func (*SRegion) GetWire

func (region *SRegion) GetWire(wireId string) (*SWire, error)

func (*SRegion) GetWires

func (region *SRegion) GetWires(zoneId string, wireId string, clusterId string) ([]SWire, error)

func (*SRegion) GetZone

func (region *SRegion) GetZone(zoneId string) (*SZone, error)

func (*SRegion) GetZones

func (region *SRegion) GetZones(zoneId string) ([]SZone, error)

func (*SRegion) IsEmulated

func (region *SRegion) IsEmulated() bool

func (*SRegion) RebuildDisk

func (region *SRegion) RebuildDisk(diskId string) error

func (*SRegion) RebuildRoot

func (region *SRegion) RebuildRoot(instanceId, imageId string, sysSizeGB int) (string, error)

func (*SRegion) Refresh

func (region *SRegion) Refresh() error

func (*SRegion) RemoveNetworkService

func (region *SRegion) RemoveNetworkService(l3Id string, service string) error

func (*SRegion) ResetDisks

func (region *SRegion) ResetDisks(snapshotId string) (jsonutils.JSONObject, error)

func (*SRegion) ResizeDisk

func (region *SRegion) ResizeDisk(diskId string, sizeMb int64) error

func (*SRegion) RevokeSecurityGroup

func (region *SRegion) RevokeSecurityGroup(instanceId, secgroupId string) error

func (*SRegion) StartVM

func (region *SRegion) StartVM(instanceId string) error

func (*SRegion) StopVM

func (region *SRegion) StopVM(instanceId string, isForce bool) error

func (*SRegion) UpdateVM

func (region *SRegion) UpdateVM(instanceId string, params jsonutils.JSONObject) error

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	ZStackTags

	ZStackBasic
	State     string `json:"state"`
	IPVersion int    `json:"ipVersion"`
	ZStackTime
	InternalID             int                  `json:"internalId"`
	Rules                  []SSecurityGroupRule `json:"rules"`
	AttachedL3NetworkUUIDs []string             `json:"attachedL3NetworkUuids"`
	// contains filtered or unexported fields
}

func (*SSecurityGroup) Delete

func (self *SSecurityGroup) Delete() error

func (*SSecurityGroup) GetDescription

func (self *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (self *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (self *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetName

func (self *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetProjectId

func (self *SSecurityGroup) GetProjectId() string

func (*SSecurityGroup) GetRules

func (self *SSecurityGroup) GetRules() ([]cloudprovider.ISecurityGroupRule, error)

func (*SSecurityGroup) GetStatus

func (self *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetVpcId

func (self *SSecurityGroup) GetVpcId() string

func (*SSecurityGroup) Refresh

func (self *SSecurityGroup) Refresh() error

type SSecurityGroupRule

type SSecurityGroupRule struct {
	ZStackBasic
	SecurityGroupUUID       string `json:"securityGroupUuid"`
	Type                    string `json:"type"`
	IPVersion               int    `json:"ipVersion"`
	StartPort               int    `json:"startPort"`
	EndPort                 int    `json:"endPort"`
	Protocol                string `json:"protocol"`
	State                   string `json:"state"`
	AllowedCIDR             string `json:"allowedCidr"`
	RemoteSecurityGroupUUID string `json:"remoteSecurityGroupUuid"`
	ZStackTime
	// contains filtered or unexported fields
}

func (*SSecurityGroupRule) Delete

func (self *SSecurityGroupRule) Delete() error

func (*SSecurityGroupRule) GetAction

func (*SSecurityGroupRule) GetCIDRs

func (self *SSecurityGroupRule) GetCIDRs() []string

func (*SSecurityGroupRule) GetDescription

func (self *SSecurityGroupRule) GetDescription() string

func (*SSecurityGroupRule) GetDirection

func (self *SSecurityGroupRule) GetDirection() secrules.TSecurityRuleDirection

func (*SSecurityGroupRule) GetGlobalId

func (self *SSecurityGroupRule) GetGlobalId() string

func (*SSecurityGroupRule) GetPorts

func (self *SSecurityGroupRule) GetPorts() string

func (*SSecurityGroupRule) GetPriority

func (self *SSecurityGroupRule) GetPriority() int

func (*SSecurityGroupRule) GetProtocol

func (self *SSecurityGroupRule) GetProtocol() string

func (*SSecurityGroupRule) Update

type SSnapshot

type SSnapshot struct {
	multicloud.SResourceBase
	ZStackTags

	ZStackBasic
	PrimaryStorageUUID string `json:"primaryStorageUuid"`
	VolumeUUID         string `json:"volumeUuid"`
	VolumeType         string `json:"volumeType"`
	Format             string `json:"format"`
	Latest             bool   `json:"latest"`
	Size               int    `json:"size"`
	State              string `json:"state"`
	Status             string `json:"status"`
	// contains filtered or unexported fields
}

func (*SSnapshot) Delete

func (snapshot *SSnapshot) Delete() error

func (*SSnapshot) GetDiskId

func (snapshot *SSnapshot) GetDiskId() string

func (*SSnapshot) GetDiskType

func (snapshot *SSnapshot) GetDiskType() string

func (*SSnapshot) GetGlobalId

func (snapshot *SSnapshot) GetGlobalId() string

func (*SSnapshot) GetId

func (snapshot *SSnapshot) GetId() string

func (*SSnapshot) GetName

func (snapshot *SSnapshot) GetName() string

func (*SSnapshot) GetProjectId

func (snapshot *SSnapshot) GetProjectId() string

func (*SSnapshot) GetSizeMb

func (snapshot *SSnapshot) GetSizeMb() int32

func (*SSnapshot) GetStatus

func (snapshot *SSnapshot) GetStatus() string

func (*SSnapshot) IsEmulated

func (snapshot *SSnapshot) IsEmulated() bool

func (*SSnapshot) Refresh

func (snapshot *SSnapshot) Refresh() error

type SStorage

type SStorage struct {
	multicloud.SStorageBase
	ZStackTags

	ZStackBasic
	VCenterUUID               string       `json:"VCenterUuid"`
	Datastore                 string       `json:"datastore"`
	ZoneUUID                  string       `json:"zoneUuid"`
	URL                       string       `json:"url"`
	TotalCapacity             int64        `json:"totalCapacity"`
	AvailableCapacity         int          `json:"availableCapacity"`
	TotalPhysicalCapacity     int          `json:"totalPhysicalCapacity"`
	AvailablePhysicalCapacity int          `json:"availablePhysicalCapacity"`
	Type                      TStorageType `json:"type"`
	State                     string       `json:"state"`
	Status                    string       `json:"status"`
	MountPath                 string       `json:"mountPath"`
	AttachedClusterUUIDs      []string     `json:"attachedClusterUuids"`

	Pools []SPool `json:"pools"`

	ZStackTime
	// contains filtered or unexported fields
}

func (*SStorage) CreateIDisk

func (storage *SStorage) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetCapacityMB

func (storage *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (storage *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetDataPoolName

func (storage *SStorage) GetDataPoolName() (string, error)

func (*SStorage) GetEnabled

func (storage *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (storage *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

func (storage *SStorage) GetIDiskById(diskId string) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetIDisks

func (storage *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SStorage) GetIStoragecache

func (storage *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SStorage) GetIZone

func (storage *SStorage) GetIZone() cloudprovider.ICloudZone

func (*SStorage) GetId

func (storage *SStorage) GetId() string

func (*SStorage) GetMediumType

func (storage *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (storage *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (storage *SStorage) GetName() string

func (*SStorage) GetStatus

func (storage *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

func (storage *SStorage) GetStorageConf() jsonutils.JSONObject

func (*SStorage) GetStorageType

func (storage *SStorage) GetStorageType() string

func (*SStorage) IsSysDiskStore

func (storage *SStorage) IsSysDiskStore() bool

type SStoragecache

type SStoragecache struct {
	multicloud.SResourceBase
	ZStackTags
	ZoneId string
	// contains filtered or unexported fields
}

func (*SStoragecache) GetGlobalId

func (scache *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

func (scache *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetICustomizedCloudImages

func (scache *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetIImageById

func (scache *SStoragecache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) GetId

func (scache *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (scache *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (scache *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (scache *SStoragecache) GetStatus() string

func (*SStoragecache) IsEmulated

func (scache *SStoragecache) IsEmulated() bool

func (*SStoragecache) Refresh

func (scache *SStoragecache) Refresh() error

func (*SStoragecache) UploadImage

func (scache *SStoragecache) UploadImage(ctx context.Context, image *cloudprovider.SImageCreateOption, callback func(progress float32)) (string, error)

type SSysTag

type SSysTag struct {
	ZStackTime
	Inherent     bool   `json:"inherent"`
	ResourceType string `json:"resourceType"`
	ResourceUUID string `json:"resourceUuid"`
	Tag          string `json:"tag"`
	Type         string `json:"type"`
	UUID         string `json:"uuid"`
}

type SUserAccount

type SUserAccount struct {
	Uuid string
}

type SVersion

type SVersion struct {
	Version string
}

type SVirtualIP

type SVirtualIP struct {
	multicloud.SNetworkInterfaceBase
	ZStackTags

	ZStackBasic
	IPRangeUUID        string   `json:"ipRangeUuid"`
	L3NetworkUUID      string   `json:"l3NetworkUuid"`
	IP                 string   `json:"ip"`
	State              string   `json:"state"`
	Gateway            string   `json:"gateway"`
	Netmask            string   `json:"netmask"`
	PrefixLen          int      `json:"prefixLen"`
	ServiceProvider    string   `json:"serviceProvider"`
	PeerL3NetworkUuids []string `json:"peerL3NetworkUuids"`
	UseFor             string   `json:"useFor"`
	UsedIPUUID         string   `json:"usedIpUuid"`
	ZStackTime
	// contains filtered or unexported fields
}

func (*SVirtualIP) GetAssociateId

func (vip *SVirtualIP) GetAssociateId() string

func (*SVirtualIP) GetAssociateType

func (vip *SVirtualIP) GetAssociateType() string

func (*SVirtualIP) GetGlobalId

func (vip *SVirtualIP) GetGlobalId() string

func (*SVirtualIP) GetICloudInterfaceAddresses

func (vip *SVirtualIP) GetICloudInterfaceAddresses() ([]cloudprovider.ICloudInterfaceAddress, error)

func (*SVirtualIP) GetId

func (vip *SVirtualIP) GetId() string

func (*SVirtualIP) GetMacAddress

func (vip *SVirtualIP) GetMacAddress() string

func (*SVirtualIP) GetName

func (vip *SVirtualIP) GetName() string

func (*SVirtualIP) GetStatus

func (vip *SVirtualIP) GetStatus() string

type SVpc

type SVpc struct {
	multicloud.SVpc
	ZStackTags
	// contains filtered or unexported fields
}

func (*SVpc) Delete

func (vpc *SVpc) Delete() error

func (*SVpc) GetCidrBlock

func (vpc *SVpc) GetCidrBlock() string

func (*SVpc) GetGlobalId

func (vpc *SVpc) GetGlobalId() string

func (*SVpc) GetIRouteTableById

func (self *SVpc) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetIRouteTables

func (vpc *SVpc) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetISecurityGroups

func (vpc *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)

func (*SVpc) GetIWireById

func (vpc *SVpc) GetIWireById(wireId string) (cloudprovider.ICloudWire, error)

func (*SVpc) GetIWires

func (vpc *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SVpc) GetId

func (vpc *SVpc) GetId() string

func (*SVpc) GetIsDefault

func (vpc *SVpc) GetIsDefault() bool

func (*SVpc) GetName

func (vpc *SVpc) GetName() string

func (*SVpc) GetRegion

func (vpc *SVpc) GetRegion() cloudprovider.ICloudRegion

func (*SVpc) GetStatus

func (vpc *SVpc) GetStatus() string

func (*SVpc) IsEmulated

func (vpc *SVpc) IsEmulated() bool

func (*SVpc) Refresh

func (vpc *SVpc) Refresh() error

type SWire

type SWire struct {
	multicloud.SResourceBase
	ZStackTags

	ZStackBasic
	Vlan              int    `json:"vlan"`
	ZoneUUID          string `json:"zoneUuid"`
	PhysicalInterface string `json:"physicalInterface"`
	Type              string `json:"type"`
	ZStackTime
	AttachedClusterUUIDs []string `json:"attachedClusterUuids"`
	// contains filtered or unexported fields
}

func (*SWire) CreateINetwork

func (*SWire) GetBandwidth

func (wire *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (wire *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

func (wire *SWire) GetINetworkById(netid string) (cloudprovider.ICloudNetwork, error)

func (*SWire) GetINetworks

func (wire *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)

func (*SWire) GetIVpc

func (wire *SWire) GetIVpc() cloudprovider.ICloudVpc

func (*SWire) GetIZone

func (wire *SWire) GetIZone() cloudprovider.ICloudZone

func (*SWire) GetId

func (wire *SWire) GetId() string

func (*SWire) GetName

func (wire *SWire) GetName() string

func (*SWire) GetStatus

func (wire *SWire) GetStatus() string

func (*SWire) IsEmulated

func (wire *SWire) IsEmulated() bool

func (*SWire) Refresh

func (wire *SWire) Refresh() error

type SZStackClient

type SZStackClient struct {
	*ZstackClientConfig
	// contains filtered or unexported fields
}

func NewZStackClient

func NewZStackClient(cfg *ZstackClientConfig) (*SZStackClient, error)

func (*SZStackClient) GetCapabilities

func (self *SZStackClient) GetCapabilities() []string

func (*SZStackClient) GetCloudRegionExternalIdPrefix

func (cli *SZStackClient) GetCloudRegionExternalIdPrefix() string

func (*SZStackClient) GetEcsMetrics

func (*SZStackClient) GetHostMetrics

func (*SZStackClient) GetIProjects

func (cli *SZStackClient) GetIProjects() ([]cloudprovider.ICloudProject, error)

func (*SZStackClient) GetIRegionById

func (cli *SZStackClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)

func (*SZStackClient) GetIRegions

func (cli *SZStackClient) GetIRegions() []cloudprovider.ICloudRegion

func (*SZStackClient) GetMetrics

func (*SZStackClient) GetMonitorData

func (self *SZStackClient) GetMonitorData(name string, namespace string, since time.Time, until time.Time) ([]DataPoint, error)

func (*SZStackClient) GetRegion

func (cli *SZStackClient) GetRegion(regionId string) *SRegion

func (*SZStackClient) GetRegions

func (cli *SZStackClient) GetRegions() []SRegion

func (*SZStackClient) GetSubAccounts

func (cli *SZStackClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)

func (*SZStackClient) GetVersion

func (self *SZStackClient) GetVersion() (*SVersion, error)

type SZone

type SZone struct {
	multicloud.SResourceBase
	ZStackTags

	ZStackBasic
	Type  string
	State string
	// contains filtered or unexported fields
}

func (*SZone) GetGlobalId

func (zone *SZone) GetGlobalId() string

func (*SZone) GetI18n

func (zone *SZone) GetI18n() cloudprovider.SModelI18nTable

func (*SZone) GetIHostById

func (zone *SZone) GetIHostById(hostId string) (cloudprovider.ICloudHost, error)

func (*SZone) GetIHosts

func (zone *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SZone) GetIRegion

func (zone *SZone) GetIRegion() cloudprovider.ICloudRegion

func (*SZone) GetIStorageById

func (zone *SZone) GetIStorageById(storageId string) (cloudprovider.ICloudStorage, error)

func (*SZone) GetIStorages

func (zone *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SZone) GetIWires

func (zone *SZone) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SZone) GetId

func (zone *SZone) GetId() string

func (*SZone) GetName

func (zone *SZone) GetName() string

func (*SZone) GetStatus

func (zone *SZone) GetStatus() string

func (*SZone) IsEmulated

func (zone *SZone) IsEmulated() bool

func (*SZone) Refresh

func (zone *SZone) Refresh() error

type TCephPoolType

type TCephPoolType string

type TStorageType

type TStorageType string

type ZStackBasic

type ZStackBasic struct {
	UUID        string `json:"uuid"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type ZStackTags

type ZStackTags struct {
}

func (*ZStackTags) GetSysTags

func (self *ZStackTags) GetSysTags() map[string]string

func (*ZStackTags) GetTags

func (self *ZStackTags) GetTags() (map[string]string, error)

func (*ZStackTags) SetTags

func (self *ZStackTags) SetTags(tags map[string]string, replace bool) error

type ZStackTime

type ZStackTime struct {
	CreateDate time.Time `json:"createDate"`
	LastOpDate time.Time `json:"lastOpDate"`
}

type ZstackClientConfig

type ZstackClientConfig struct {
	// contains filtered or unexported fields
}

func NewZstackClientConfig

func NewZstackClientConfig(authURL, username, password string) *ZstackClientConfig

func (*ZstackClientConfig) CloudproviderConfig

func (cfg *ZstackClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *ZstackClientConfig

func (*ZstackClientConfig) Debug

func (cfg *ZstackClientConfig) Debug(debug bool) *ZstackClientConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL