incloudsphere

package
v0.3.10-0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLOUD_PROVIDER_INCLOUD_SPHERE = api.CLOUD_PROVIDER_INCLOUD_SPHERE
	AUTH_ADDR                     = "system/user/login"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDeviceDto

type BlockDeviceDto struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	PartitionFlag   bool   `json:"partitionFlag"`
	PartitionNumber string `json:"partitionNumber"`
	Capacity        int    `json:"capacity"`
	DisplayCapacity string `json:"displayCapacity"`
	DiskType        string `json:"diskType"`
	AbsolutePath    string `json:"absolutePath"`
	Transport       string `json:"transport"`
	Used            string `json:"used"`
	IsUsed          bool   `json:"isUsed"`
}

type CdpInfo

type CdpInfo struct {
	CdpBackupDatastoreId string `json:"cdpBackupDatastoreId"`
	BackupDataStoreName  string `json:"backupDataStoreName"`
	StartTime            string `json:"startTime"`
	EndTime              string `json:"endTime"`
	EnableCDP            bool   `json:"enableCDP"`
	CdpAvgWriteMBps      int    `json:"cdpAvgWriteMBps"`
	CdpRemainTimes       int    `json:"cdpRemainTimes"`
	CdpLogSpaceSize      int    `json:"cdpLogSpaceSize"`
	IntervalTime         int    `json:"intervalTime"`
}

type Cdrom

type Cdrom struct {
	Path           string `json:"path"`
	Type           string `json:"type"`
	Connected      bool   `json:"connected"`
	StartConnected bool   `json:"startConnected"`
	CifsDto        string `json:"cifsDto"`
	DataStore      struct {
		Id   string `json:"id"`
		Name string `json:"name"`
	} `json:"dataStore"`
}

type DataCenterOrHostDto

type DataCenterOrHostDto struct {
	DataCenterOrHost string `json:"dataCenterOrHost"`
	DataCenterName   string `json:"dataCenterName"`
	HostName         string `json:"hostName"`
	Status           string `json:"status"`
}

type Disks

type Disks struct {
	Id              string  `json:"id"`
	Label           string  `json:"label"`
	ScsiId          string  `json:"scsiId"`
	Enabled         bool    `json:"enabled"`
	WriteBps        int     `json:"writeBps"`
	ReadBps         int     `json:"readBps"`
	TotalBps        int     `json:"totalBps"`
	TotalIops       int     `json:"totalIops"`
	WriteIops       int     `json:"writeIops"`
	ReadIops        int     `json:"readIops"`
	Volume          Volume  `json:"volume"`
	BusModel        string  `json:"busModel"`
	Usage           float64 `json:"usage"`
	MonReadIops     float64 `json:"monReadIops"`
	MonWriteIops    float64 `json:"monWriteIops"`
	ReadThroughput  float64 `json:"readThroughput"`
	WriteThroughput float64 `json:"writeThroughput"`
	ReadWriteModel  string  `json:"readWriteModel"`
	EnableNativeIO  bool    `json:"enableNativeIO"`
	EnableKernelIO  bool    `json:"enableKernelIO"`
	L2CacheSize     int     `json:"l2CacheSize"`
	QueueNum        int     `json:"queueNum"`
}

type Floppy

type Floppy struct {
	Path      string `json:"path"`
	DataStore string `json:"dataStore"`
	VfdType   string `json:"vfdType"`
}

type FtpServerHost

type FtpServerHost struct {
	Id string `json:"id"`
	Ip string `json:"ip"`
}

type GuestOSAuthInfo

type GuestOSAuthInfo struct {
	UserName string `json:"userName"`
	UserPwd  string `json:"userPwd"`
}

type InCloudSphereTags

type InCloudSphereTags struct {
}

func (*InCloudSphereTags) GetSysTags

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

func (*InCloudSphereTags) GetTags

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

func (*InCloudSphereTags) SetTags

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

type RelatedVms

type RelatedVms struct {
	Id            string `json:"id"`
	Text          string `json:"text"`
	IconCls       string `json:"iconCls"`
	State         string `json:"state"`
	Children      string `json:"children"`
	Object        string `json:"object"`
	Name          string `json:"name"`
	ViewId        string `json:"viewId"`
	TargetType    string `json:"targetType"`
	InnerName     string `json:"innerName"`
	ServiceType   string `json:"serviceType"`
	StorageType   string `json:"storageType"`
	HciType       string `json:"hciType"`
	VMType        string `json:"vmType"`
	HostId        string `json:"hostId"`
	ParentId      string `json:"parentId"`
	DatastoreRole string `json:"datastoreRole"`
	Vlan          string `json:"vlan"`
	DhcpEnabled   bool   `json:"dhcpEnabled"`
	ConnectMode   string `json:"connectMode"`
	DataStoreType string `json:"dataStoreType"`
	Hypervisor    string `json:"hypervisor"`
}

type SDisk

type SDisk struct {
	multicloud.SDisk
	InCloudSphereTags

	Id                 string       `json:"id"`
	UUID               string       `json:"uuid"`
	Size               float64      `json:"size"`
	RealSize           float64      `json:"realSize"`
	Name               string       `json:"name"`
	FileName           string       `json:"fileName"`
	Offset             int          `json:"offset"`
	Shared             bool         `json:"shared"`
	DeleteModel        string       `json:"deleteModel"`
	VolumePolicy       string       `json:"volumePolicy"`
	Format             string       `json:"format"`
	BlockDeviceId      string       `json:"blockDeviceId"`
	DiskType           string       `json:"diskType"`
	DataStoreId        string       `json:"dataStoreId"`
	DataStoreName      string       `json:"dataStoreName"`
	DataStoreSize      float64      `json:"dataStoreSize"`
	FreeStorage        float64      `json:"freeStorage"`
	DataStoreType      string       `json:"dataStoreType"`
	DataStoreReplicate int          `json:"dataStoreReplicate"`
	VMName             string       `json:"vmName"`
	VMStatus           string       `json:"vmStatus"`
	Type               string       `json:"type"`
	Description        string       `json:"description"`
	Bootable           bool         `json:"bootable"`
	VolumeStatus       string       `json:"volumeStatus"`
	MountedHostIds     string       `json:"mountedHostIds"`
	Md5                string       `json:"md5"`
	DataSize           int          `json:"dataSize"`
	OpenStackId        string       `json:"openStackId"`
	VvSourceDto        string       `json:"vvSourceDto"`
	FormatDisk         bool         `json:"formatDisk"`
	ToBeConverted      bool         `json:"toBeConverted"`
	RelatedVms         []RelatedVms `json:"relatedVms"`
	XactiveDataStoreId string       `json:"xactiveDataStoreId"`
	ClusterSize        int          `json:"clusterSize"`
	ScsiId             string       `json:"scsiId"`
	SecondaryUUId      string       `json:"secondaryUuid"`
	SecondaryVolumes   string       `json:"secondaryVolumes"`
	// contains filtered or unexported fields
}

func (*SDisk) CreateISnapshot

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

func (*SDisk) Delete

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

func (*SDisk) GetAccessPath

func (self *SDisk) GetAccessPath() string

func (*SDisk) GetCacheMode

func (self *SDisk) GetCacheMode() string

func (*SDisk) GetDiskFormat

func (self *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (self *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (self *SDisk) GetDiskType() string

func (*SDisk) GetDriver

func (self *SDisk) GetDriver() string

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (self *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshot

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

func (*SDisk) GetISnapshots

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

func (*SDisk) GetIStorage

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

func (*SDisk) GetId

func (self *SDisk) GetId() string

func (*SDisk) GetIsAutoDelete

func (self *SDisk) GetIsAutoDelete() bool

func (*SDisk) GetIsNonPersistent

func (self *SDisk) GetIsNonPersistent() bool

func (*SDisk) GetMountpoint

func (self *SDisk) GetMountpoint() string

func (*SDisk) GetName

func (self *SDisk) GetName() string

func (*SDisk) GetStatus

func (self *SDisk) GetStatus() string

func (*SDisk) GetTemplateId

func (self *SDisk) GetTemplateId() string

func (*SDisk) Rebuild

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

func (*SDisk) Reset

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

func (*SDisk) Resize

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

type SHost

type SHost struct {
	multicloud.SHostBase
	InCloudSphereTags

	Id                    string  `json:"id"`
	IP                    string  `json:"ip"`
	SwitchUplinkPortDto   string  `json:"switchUplinkPortDto"`
	UplinkTopoDto         string  `json:"uplinkTopoDto"`
	Pnics                 string  `json:"pnics"`
	Disks                 string  `json:"disks"`
	Name                  string  `json:"name"`
	HostName              string  `json:"hostName"`
	NodeVersion           string  `json:"nodeVersion"`
	Password              string  `json:"password"`
	DataCenterId          string  `json:"dataCenterId"`
	DataCenterName        string  `json:"dataCenterName"`
	ClusterName           string  `json:"clusterName"`
	ClusterId             string  `json:"clusterId"`
	Status                string  `json:"status"`
	CPUSocket             int64   `json:"cpuSocket"`
	CPUCorePerSocket      int64   `json:"cpuCorePerSocket"`
	CPUThreadPerCore      int64   `json:"cpuThreadPerCore"`
	LogicCPUNum           int64   `json:"logicCpuNum"`
	LogicalProcessor      int64   `json:"logicalProcessor"`
	CPUFrequency          float64 `json:"cpuFrequency"`
	CPUUsage              float64 `json:"cpuUsage"`
	CPUTotalHz            int64   `json:"cpuTotalHz"`
	FreeCPU               int64   `json:"freeCpu"`
	UsedCPU               int64   `json:"usedCpu"`
	TotalMem              float64 `json:"totalMem"`
	LogicTotalMem         int64   `json:"logicTotalMem"`
	MemoryUsage           float64 `json:"memoryUsage"`
	FreeMemory            int64   `json:"freeMemory"`
	UsedMemory            int64   `json:"usedMemory"`
	LogicUsedMemory       int64   `json:"logicUsedMemory"`
	LogicFreeMemory       int64   `json:"logicFreeMemory"`
	PnicNum               int64   `json:"pnicNum"`
	NormalRunTime         int64   `json:"normalRunTime"`
	Model                 string  `json:"model"`
	CPUType               string  `json:"cpuType"`
	VTDegree              int64   `json:"vtDegree"`
	Powerstate            string  `json:"powerstate"`
	HostBmcDto            string  `json:"hostBmcDto"`
	MountPath             string  `json:"mountPath"`
	MonMountState         string  `json:"monMountState"`
	CPUModel              string  `json:"cpuModel"`
	NetworkDtos           string  `json:"networkDtos"`
	PortIP                string  `json:"portIp"`
	Monstatus             bool    `json:"monstatus"`
	HostIqn               string  `json:"hostIqn"`
	VxlanPortDto          string  `json:"vxlanPortDto"`
	SDNUpLinks            string  `json:"sdnUpLinks"`
	AllPNicsCount         int64   `json:"allPNicsCount"`
	AvailablePNicsCount   int64   `json:"availablePNicsCount"`
	CfsDomainStatus       string  `json:"cfsDomainStatus"`
	SerialNumber          string  `json:"serialNumber"`
	Manufacturer          string  `json:"manufacturer"`
	IndicatorStatus       string  `json:"indicatorStatus"`
	EntryTemperature      string  `json:"entryTemperature"`
	MulticastEnabled      bool    `json:"multicastEnabled"`
	BroadcastLimitEnabled bool    `json:"broadcastLimitEnabled"`
	Pcies                 string  `json:"pcies"`
	VgpuEnable            bool    `json:"vgpuEnable"`
	SSHEnable             bool    `json:"sshEnable"`
	SpecialFailover       bool    `json:"specialFailover"`
	VswitchDtos           string  `json:"vswitchDtos"`
	HotfixVersion         string  `json:"hotfixVersion"`
	VMMigBandWidth        string  `json:"vmMigBandWidth"`
	VMMigBandWidthFlag    bool    `json:"vmMigBandWidthFlag"`
	DpdkEnabled           bool    `json:"dpdkEnabled"`
	HugePageTotal         int64   `json:"hugePageTotal"`
	HugePageUsed          int64   `json:"hugePageUsed"`
	HugePageFree          int64   `json:"hugePageFree"`
	StorageUsage          int64   `json:"storageUsage"`
	NodeForm              string  `json:"nodeForm"`
	CPUArchType           string  `json:"cpuArchType"`
	LogPartitionSize      int64   `json:"logPartitionSize"`
	RootPartitionSize     int64   `json:"rootPartitionSize"`
	Cpuflags              string  `json:"cpuflags"`
	// contains filtered or unexported fields
}

func (*SHost) CreateVM

func (*SHost) GetAccessIp

func (self *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (self *SHost) GetAccessMac() string

func (*SHost) GetCpuCmtbound

func (self *SHost) GetCpuCmtbound() float32

func (*SHost) GetCpuCount

func (self *SHost) GetCpuCount() int

func (*SHost) GetCpuDesc

func (self *SHost) GetCpuDesc() string

func (*SHost) GetCpuMhz

func (self *SHost) GetCpuMhz() int

func (*SHost) GetEnabled

func (self *SHost) GetEnabled() bool

func (*SHost) GetGlobalId

func (self *SHost) GetGlobalId() string

func (*SHost) GetHostStatus

func (self *SHost) GetHostStatus() string

func (*SHost) GetHostType

func (self *SHost) GetHostType() string

func (*SHost) GetIHostNics

func (self *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)

func (*SHost) GetIStorageById

func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SHost) GetIStorages

func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SHost) GetIVMById

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

func (*SHost) GetIVMs

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

func (*SHost) GetIWires

func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SHost) GetId

func (self *SHost) GetId() string

func (*SHost) GetIsMaintenance

func (self *SHost) GetIsMaintenance() bool

func (*SHost) GetMemCmtbound

func (self *SHost) GetMemCmtbound() float32

func (*SHost) GetMemSizeMB

func (self *SHost) GetMemSizeMB() int

func (*SHost) GetName

func (self *SHost) GetName() string

func (*SHost) GetNodeCount

func (self *SHost) GetNodeCount() int8

func (*SHost) GetReservedMemoryMb

func (self *SHost) GetReservedMemoryMb() int

func (*SHost) GetSN

func (self *SHost) GetSN() string

func (*SHost) GetStatus

func (self *SHost) GetStatus() string

func (*SHost) GetStorageSizeMB

func (self *SHost) GetStorageSizeMB() int

func (*SHost) GetStorageType

func (self *SHost) GetStorageType() string

func (*SHost) GetSysInfo

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

func (*SHost) GetVersion

func (self *SHost) GetVersion() string

type SImage

type SImage struct {
	multicloud.SImageBase
	InCloudSphereTags

	Name          string `json:"name"`
	FileSize      int64  `json:"fileSize"`
	RealSize      int64  `json:"realSize"`
	SourceType    string `json:"sourceType"`
	Format        string `json:"format"`
	FileType      string `json:"fileType"`
	Size          int64  `json:"size"`
	Date          string `json:"date"`
	Path          string `json:"path"`
	FTPServer     string `json:"ftpServer"`
	DataStoreID   string `json:"dataStoreId"`
	DataStoreName string `json:"dataStoreName"`
	ServerID      string `json:"serverId"`
	Md5           string `json:"md5"`
	// contains filtered or unexported fields
}

func (*SImage) Delete

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

func (*SImage) GetBios

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

func (*SImage) GetFullOsName

func (i *SImage) GetFullOsName() string

func (*SImage) GetGlobalId

func (self *SImage) GetGlobalId() string

func (*SImage) GetIStoragecache

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

func (*SImage) GetId

func (self *SImage) GetId() string

func (*SImage) GetImageFormat

func (self *SImage) GetImageFormat() string

func (*SImage) GetImageStatus

func (self *SImage) GetImageStatus() string

func (*SImage) GetImageType

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

func (*SImage) GetMinOsDiskSizeGb

func (self *SImage) GetMinOsDiskSizeGb() int

func (*SImage) GetMinRamSizeMb

func (self *SImage) GetMinRamSizeMb() int

func (*SImage) GetName

func (self *SImage) GetName() string

func (*SImage) GetOsArch

func (i *SImage) GetOsArch() string

func (*SImage) GetOsDist

func (i *SImage) GetOsDist() string

func (*SImage) GetOsLang

func (i *SImage) GetOsLang() string

func (*SImage) GetOsType

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

func (*SImage) GetOsVersion

func (i *SImage) GetOsVersion() string

func (*SImage) GetSizeByte

func (self *SImage) GetSizeByte() int64

func (*SImage) GetStatus

func (self *SImage) GetStatus() string

type SImageInfo

type SImageInfo struct {
	OsType              string
	OsDist              string
	Model               string
	SocketLimit         int
	SupportCpuHotPlug   bool
	SupportMemHotPlug   bool
	SupportDiskHotPlug  bool
	SupportUefiBootMode bool
}

func (*SImageInfo) IsEquals

func (self *SImageInfo) IsEquals(name string) bool

type SImageStorage

type SImageStorage struct {
	Id   string
	Name string
}

type SImageTree

type SImageTree struct {
	Id       string
	Name     string
	Children []struct {
		Id       string
		Name     string
		Children []struct {
			Id     string
			Name   string
			Object SImageInfo
		}
	}
}

func (*SImageTree) ToList

func (self *SImageTree) ToList() []SImageInfo

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	InCloudSphereTags

	Id                 string `json:"id"`
	CustomVMId         string `json:"customVmId"`
	Name               string `json:"name"`
	State              string `json:"state"`
	Status             string `json:"status"`
	HostId             string `json:"hostId"`
	HostName           string `json:"hostName"`
	HostIP             string `json:"hostIp"`
	HostStatus         string `json:"hostStatus"`
	HostMemory         int64  `json:"hostMemory"`
	DataCenterId       string `json:"dataCenterId"`
	HaEnabled          bool   `json:"haEnabled"`
	RouterFlag         bool   `json:"routerFlag"`
	Migratable         bool   `json:"migratable"`
	HostBinded         bool   `json:"hostBinded"`
	ToolsInstalled     bool   `json:"toolsInstalled"`
	ToolsVersion       string `json:"toolsVersion"`
	ToolsType          string `json:"toolsType"`
	ToolsVersionStatus string `json:"toolsVersionStatus"`
	ToolsRunningStatus string `json:"toolsRunningStatus"`
	ToolsNeedUpdate    bool   `json:"toolsNeedUpdate"`
	Description        string `json:"description"`
	HaMaxLimit         int64  `json:"haMaxLimit"`
	Template           bool   `json:"template"`
	Initialized        bool   `json:"initialized"`
	GuestosLabel       string `json:"guestosLabel"`
	GuestosType        string `json:"guestosType"`
	GuestOSInfo        struct {
		Model               string `json:"model"`
		SocketLimit         int    `json:"socketLimit"`
		SupportCpuHotPlug   bool   `json:"supportCpuHotPlug"`
		SupportDiskHotPlug  bool   `json:"supportDiskHotPlug"`
		SupportMemHotPlug   bool   `json:"supportMemHotPlug"`
		SupportUefiBootMode bool   `json:"supportUefiBootMode"`
	} `json:"guestOsInfo"`
	InnerName         string `json:"innerName"`
	UUId              string `json:"uuid"`
	MaxMemory         int64  `json:"maxMemory"`
	Memory            int    `json:"memory"`
	MemoryUsage       int64  `json:"memoryUsage"`
	MemHotplugEnabled bool   `json:"memHotplugEnabled"`
	EnableHugeMemPage bool   `json:"enableHugeMemPage"`
	CPUNum            int    `json:"cpuNum"`
	CPUSocket         int    `json:"cpuSocket"`
	CPUCore           int64  `json:"cpuCore"`
	CPUUsage          int64  `json:"cpuUsage"`
	MaxCPUNum         int64  `json:"maxCpuNum"`
	CPUHotplugEnabled bool   `json:"cpuHotplugEnabled"`
	CPUModelType      string `json:"cpuModelType"`
	CPUModelEnabled   bool   `json:"cpuModelEnabled"`
	RunningTime       int64  `json:"runningTime"`
	Boot              string `json:"boot"`
	BootMode          string `json:"bootMode"`
	SplashTime        int64  `json:"splashTime"`
	StoragePriority   int64  `json:"storagePriority"`
	USB               string `json:"usb"`

	//Usbs                     []interface{}   `json:"usbs"`
	Cdrom  Cdrom          `json:"cdrom"`
	Floppy Floppy         `json:"floppy"`
	Disks  []Disks        `json:"disks"`
	Nics   []SInstanceNic `json:"nics"`

	//Gpus                     []interface{}   `json:"gpus"`
	//VMPcis                   []interface{}   `json:"vmPcis"`
	ConfigLocation           string          `json:"configLocation"`
	HotplugEnabled           bool            `json:"hotplugEnabled"`
	VNCPort                  int64           `json:"vncPort"`
	VNCPasswd                string          `json:"vncPasswd"`
	VNCSharePolicy           string          `json:"vncSharePolicy"`
	CPUBindType              string          `json:"cpuBindType"`
	VcpuPin                  string          `json:"vcpuPin"`
	VcpuPins                 []string        `json:"vcpuPins"`
	CPUShares                int64           `json:"cpuShares"`
	PanickPolicy             string          `json:"panickPolicy"`
	DataStoreId              string          `json:"dataStoreId"`
	SdsdomainId              string          `json:"sdsdomainId"`
	ClockModel               string          `json:"clockModel"`
	CPULimit                 int64           `json:"cpuLimit"`
	MemShares                int64           `json:"memShares"`
	CPUReservation           int64           `json:"cpuReservation"`
	MemReservation           int64           `json:"memReservation"`
	LastBackup               string          `json:"lastBackup"`
	VMType                   string          `json:"vmType"`
	SystemVMType             string          `json:"systemVmType"`
	MemBalloonEnabled        bool            `json:"memBalloonEnabled"`
	Completed                bool            `json:"completed"`
	GraphicsCardModel        string          `json:"graphicsCardModel"`
	GraphicsCardMemory       int64           `json:"graphicsCardMemory"`
	GraphicsCards            string          `json:"graphicsCards"`
	VMHostName               string          `json:"vmHostName"`
	DiskTotalSize            int64           `json:"diskTotalSize"`
	DiskUsedSize             float64         `json:"diskUsedSize"`
	DiskUsage                float64         `json:"diskUsage"`
	StartPriority            string          `json:"startPriority"`
	OwnerName                string          `json:"ownerName"`
	Version                  string          `json:"version"`
	EnableReplicate          bool            `json:"enableReplicate"`
	ReplicationDatastoreId   string          `json:"replicationDatastoreId"`
	ReplicationDatastoreName string          `json:"replicationDatastoreName"`
	RecoveryFlag             bool            `json:"recoveryFlag"`
	SpiceUSBNum              int64           `json:"spiceUsbNum"`
	CDPInfo                  CdpInfo         `json:"cdpInfo"`
	GuestOSAuthInfo          GuestOSAuthInfo `json:"guestOSAuthInfo"`
	AwareNUMAEnabled         bool            `json:"awareNumaEnabled"`
	DrxEnabled               bool            `json:"drxEnabled"`
	SecretLevel              string          `json:"secretLevel"`
	// contains filtered or unexported fields
}

func (*SInstance) AssignSecurityGroup

func (self *SInstance) AssignSecurityGroup(id string) error

func (*SInstance) AttachDisk

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

func (*SInstance) ChangeConfig

func (self *SInstance) ChangeConfig(ctx context.Context, opts *cloudprovider.SManagedVMChangeConfig) error

func (*SInstance) CreateDisk

func (self *SInstance) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error)

func (*SInstance) DeleteVM

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

func (*SInstance) DeployVM

func (self *SInstance) DeployVM(ctx context.Context, name string, username string, password string, publicKey string, deleteKeypair bool, description string) error

func (*SInstance) DetachDisk

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

func (*SInstance) GetBios

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

func (*SInstance) GetBootOrder

func (self *SInstance) GetBootOrder() string

func (*SInstance) GetError

func (self *SInstance) GetError() error

func (*SInstance) GetFullOsName

func (i *SInstance) GetFullOsName() string

func (*SInstance) GetGlobalId

func (self *SInstance) GetGlobalId() string

func (*SInstance) GetHostname

func (self *SInstance) GetHostname() string

func (*SInstance) GetHypervisor

func (self *SInstance) GetHypervisor() string

func (*SInstance) GetIDisks

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

func (*SInstance) GetIEIP

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

func (*SInstance) GetIHost

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

func (*SInstance) GetINics

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

func (*SInstance) GetId

func (self *SInstance) GetId() string

func (*SInstance) GetInstanceType

func (self *SInstance) GetInstanceType() string

func (*SInstance) GetMachine

func (self *SInstance) GetMachine() string

func (*SInstance) GetName

func (self *SInstance) GetName() string

func (*SInstance) GetOsArch

func (i *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (i *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (i *SInstance) GetOsLang() string

func (*SInstance) GetOsType

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

func (*SInstance) GetOsVersion

func (i *SInstance) GetOsVersion() string

func (*SInstance) GetProjectId

func (self *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

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

func (*SInstance) GetStatus

func (self *SInstance) GetStatus() string

func (*SInstance) GetVNCInfo

func (*SInstance) GetVcpuCount

func (self *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (self *SInstance) GetVdi() string

func (*SInstance) GetVga

func (self *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (self *SInstance) GetVmemSizeMB() int

func (*SInstance) RebuildRoot

func (*SInstance) Refresh

func (self *SInstance) Refresh() error

func (*SInstance) SetSecurityGroups

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

func (*SInstance) StartVM

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

func (*SInstance) StopVM

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

func (*SInstance) UpdateUserData

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

func (*SInstance) UpdateVM

func (self *SInstance) UpdateVM(ctx context.Context, name string) error

type SInstanceNic

type SInstanceNic struct {
	cloudprovider.DummyICloudNic

	Id              string  `json:"id"`
	AutoGenerated   bool    `json:"autoGenerated"`
	Name            string  `json:"name"`
	NolocalName     string  `json:"nolocalName"`
	InnerName       string  `json:"innerName"`
	DevName         string  `json:"devName"`
	IP              string  `json:"ip"`
	Netmask         string  `json:"netmask"`
	Gateway         string  `json:"gateway"`
	Mac             string  `json:"mac"`
	Model           string  `json:"model"`
	DeviceId        string  `json:"deviceId"`
	DeviceName      string  `json:"deviceName"`
	DeviceType      string  `json:"deviceType"`
	SwitchType      string  `json:"switchType"`
	VswitchId       string  `json:"vswitchId"`
	UplinkRate      int     `json:"uplinkRate"`
	UplinkBurst     int     `json:"uplinkBurst"`
	DownlinkRate    int     `json:"downlinkRate"`
	DownlinkBurst   int     `json:"downlinkBurst"`
	DownlinkQueue   string  `json:"downlinkQueue"`
	Enable          bool    `json:"enable"`
	Status          string  `json:"status"`
	InboundRate     float64 `json:"inboundRate"`
	OutboundRate    float64 `json:"outboundRate"`
	ConnectStatus   bool    `json:"connectStatus"`
	VMName          string  `json:"vmName"`
	VMId            string  `json:"vmId"`
	VMStatus        string  `json:"vmStatus"`
	VMTemplate      bool    `json:"vmTemplate"`
	NetworkName     string  `json:"networkName"`
	NetworkVlan     string  `json:"networkVlan"`
	VlanRange       string  `json:"vlanRange"`
	NetworkId       string  `json:"networkId"`
	NetworkType     string  `json:"networkType"`
	HostIP          string  `json:"hostIp"`
	HostStatus      string  `json:"hostStatus"`
	HostId          string  `json:"hostId"`
	DirectObjName   string  `json:"directObjName"`
	TotalOctets     float64 `json:"totalOctets"`
	TotalDropped    float64 `json:"totalDropped"`
	TotalPackets    float64 `json:"totalPackets"`
	TotalBytes      float64 `json:"totalBytes"`
	TotalErrors     float64 `json:"totalErrors"`
	WriteOctets     float64 `json:"writeOctets"`
	WriteDropped    float64 `json:"writeDropped"`
	WritePackets    float64 `json:"writePackets"`
	WriteBytes      float64 `json:"writeBytes"`
	WriteErrors     float64 `json:"writeErrors"`
	ReadOctets      float64 `json:"readOctets"`
	ReadDropped     float64 `json:"readDropped"`
	ReadPackets     float64 `json:"readPackets"`
	ReadBytes       float64 `json:"readBytes"`
	ReadErrors      float64 `json:"readErrors"`
	SecurityGroups  string  `json:"securityGroups"`
	AdvancedNetIP   string  `json:"advancedNetIp"`
	PortId          string  `json:"portId"`
	SdnVFId         string  `json:"sdnVFId"`
	OpenstackId     string  `json:"openstackId"`
	BindIPEnable    bool    `json:"bindIpEnable"`
	BindIP          string  `json:"bindIp"`
	PriorityEnabled bool    `json:"priorityEnabled"`
	NetPriority     string  `json:"netPriority"`
	VMType          string  `json:"vmType"`
	SystemVMType    string  `json:"systemVmType"`
	Dhcp            bool    `json:"dhcp"`
	DhcpIP          string  `json:"dhcpIp"`
	DhcpEnabled     bool    `json:"dhcpEnabled"`
	UsedDpdk        bool    `json:"usedDpdk"`
	Queues          int     `json:"queues"`
	// contains filtered or unexported fields
}

func (*SInstanceNic) AssignAddress

func (self *SInstanceNic) AssignAddress(ipAddrs []string) error

func (*SInstanceNic) GetDriver

func (self *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (self *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (self *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (self *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (self *SInstanceNic) GetMAC() string

func (*SInstanceNic) GetSubAddress

func (self *SInstanceNic) GetSubAddress() ([]string, error)

func (*SInstanceNic) InClassicNetwork

func (self *SInstanceNic) InClassicNetwork() bool

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	InCloudSphereTags

	Id         string `json:"id"`
	Name       string `json:"name"`
	ResourceId string `json:"resourceId"`
	Vlan       int    `json:"vlan"`
	VlanFlag   bool   `json:"vlanFlag"`
	Mtu        string `json:"mtu"`
	Type       string `json:"type"`
	VswitchDto SWire  `json:"vswitchDto"`
	//PortDtos        []string `json:"portDtos"`
	VMDtos      string `json:"vmDtos"`
	VnicDtos    string `json:"vnicDtos"`
	Vmcount     int    `json:"vmcount"`
	Vniccount   int    `json:"vniccount"`
	ConnectMode string `json:"connectMode"`
	// 约定未开启dhcp时,描述信息里面放置<gateway>/<netmask>
	Description     string `json:"description"`
	UplinkRate      int    `json:"uplinkRate"`
	UplinkBurst     int    `json:"uplinkBurst"`
	DownlinkRate    int    `json:"downlinkRate"`
	DownlinkBurst   int    `json:"downlinkBurst"`
	QosEnabled      bool   `json:"qosEnabled"`
	DataServiceType string `json:"dataServiceType"`
	UserVlan        string `json:"userVlan"`
	TpidType        string `json:"tpidType"`
	PermitDel       bool   `json:"permitDel"`
	Cidr            string `json:"cidr"`
	Gateway         string `json:"gateway"`
	DhcpEnabled     bool   `json:"dhcpEnabled"`
	DNS             string `json:"dns"`
	DataCenterDto   SZone  `json:"dataCenterDto"`
	NetworkTopoly   bool   `json:"networkTopoly"`
	// contains filtered or unexported fields
}

func (*SNetwork) Contains

func (self *SNetwork) Contains(_ip string) bool

func (*SNetwork) Delete

func (self *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (self *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetCidr

func (self *SNetwork) GetCidr() string

func (*SNetwork) GetGateway

func (self *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (self *SNetwork) GetGlobalId() string

func (*SNetwork) GetIWire

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

func (*SNetwork) GetId

func (self *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (self *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (self *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (self *SNetwork) GetIpStart() string

func (*SNetwork) GetName

func (self *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (self *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

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

func (*SNetwork) GetServerType

func (self *SNetwork) GetServerType() string

func (*SNetwork) GetStatus

func (self *SNetwork) GetStatus() string

func (*SNetwork) Refresh

func (self *SNetwork) Refresh() error

type SRegion

type SRegion struct {
	multicloud.SRegion
	multicloud.SRegionEipBase
	multicloud.SNoObjectStorageRegion
	multicloud.SRegionLbBase
	// contains filtered or unexported fields
}

func (*SRegion) AttachDisk

func (self *SRegion) AttachDisk(vmId, diskId string) error

func (*SRegion) ChangeConfig

func (self *SRegion) ChangeConfig(vmId string, cpu int, memMb int) error

func (*SRegion) CreateDisk

func (self *SRegion) CreateDisk(name, storageId string, sizeGb int) (*SDisk, error)

func (*SRegion) CreateISecurityGroup

func (*SRegion) CreateIVpc

func (*SRegion) DeleteVM

func (self *SRegion) DeleteVM(vmId string) error

func (*SRegion) DetachDisk

func (self *SRegion) DetachDisk(vmId, diskId string) error

func (*SRegion) GetCapabilities

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

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SphereClient

func (*SRegion) GetCloudEnv

func (self *SRegion) GetCloudEnv() string

func (*SRegion) GetDisk

func (self *SRegion) GetDisk(id string) (*SDisk, error)

func (*SRegion) GetDisks

func (self *SRegion) GetDisks(storageId string) ([]SDisk, error)

func (*SRegion) GetGeographicInfo

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

func (*SRegion) GetGlobalId

func (self *SRegion) GetGlobalId() string

func (*SRegion) GetHost

func (self *SRegion) GetHost(id string) (*SHost, error)

func (*SRegion) GetHosts

func (self *SRegion) GetHosts(dcId string) ([]SHost, error)

func (*SRegion) GetI18n

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

func (*SRegion) GetIHostById

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

func (*SRegion) GetISecurityGroupById

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

func (*SRegion) GetISecurityGroupByName

func (*SRegion) GetIStorageById

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

func (*SRegion) GetIStoragecacheById

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

func (*SRegion) GetIStoragecaches

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

func (*SRegion) GetIVMById

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

func (*SRegion) GetIVpcById

func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)

func (*SRegion) GetIVpcs

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

func (*SRegion) GetIZoneById

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

func (*SRegion) GetIZones

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

func (*SRegion) GetId

func (self *SRegion) GetId() string

func (*SRegion) GetImageList

func (self *SRegion) GetImageList(storageId string) ([]SImage, error)

func (*SRegion) GetImageStorages

func (self *SRegion) GetImageStorages(dsId string) ([]SImageStorage, error)

func (*SRegion) GetImageTrees

func (self *SRegion) GetImageTrees() ([]SImageTree, error)

func (*SRegion) GetInstance

func (self *SRegion) GetInstance(id string) (*SInstance, error)

func (*SRegion) GetInstances

func (self *SRegion) GetInstances(hostId string) ([]SInstance, error)

func (*SRegion) GetName

func (self *SRegion) GetName() string

func (*SRegion) GetNetwork

func (self *SRegion) GetNetwork(id string) (*SNetwork, error)

func (*SRegion) GetNetworks

func (self *SRegion) GetNetworks(vsId string) ([]SNetwork, error)

func (*SRegion) GetProvider

func (self *SRegion) GetProvider() string

func (*SRegion) GetStatus

func (self *SRegion) GetStatus() string

func (*SRegion) GetStorage

func (self *SRegion) GetStorage(id string) (*SStorage, error)

func (*SRegion) GetStoragesByDc

func (self *SRegion) GetStoragesByDc(dcId string) ([]SStorage, error)

func (*SRegion) GetStoragesByHost

func (self *SRegion) GetStoragesByHost(hostId string) ([]SStorage, error)

func (*SRegion) GetWire

func (self *SRegion) GetWire(id string) (*SWire, error)

func (*SRegion) GetWires

func (self *SRegion) GetWires() ([]SWire, error)

func (*SRegion) GetWiresByDs

func (self *SRegion) GetWiresByDs(dsId string) ([]SWire, error)

func (*SRegion) GetZone

func (self *SRegion) GetZone(id string) (*SZone, error)

func (*SRegion) GetZones

func (self *SRegion) GetZones() ([]SZone, error)

func (*SRegion) Refresh

func (self *SRegion) Refresh() error

func (*SRegion) ResetVmPassword

func (self *SRegion) ResetVmPassword(vmId string, username, password string) error

func (*SRegion) ResizeDisk

func (self *SRegion) ResizeDisk(id string, sizeGb int) error

func (*SRegion) StartVm

func (self *SRegion) StartVm(id string, password, publicKey string) error

func (*SRegion) StopVm

func (self *SRegion) StopVm(id string) error

type SStorage

type SStorage struct {
	multicloud.SStorageBase
	InCloudSphereTags

	Id                  string              `json:"id"`
	Name                string              `json:"name"`
	MountPath           string              `json:"mountPath"`
	DataStoreType       string              `json:"dataStoreType"`
	Capacity            float64             `json:"capacity"`
	UsedCapacity        float64             `json:"usedCapacity"`
	AvailCapacity       float64             `json:"availCapacity"`
	DataCenterId        string              `json:"dataCenterId"`
	HostId              string              `json:"hostId"`
	MountStatus         string              `json:"mountStatus"`
	HostIP              string              `json:"hostIp"`
	UUID                string              `json:"uuid"`
	AbsolutePath        string              `json:"absolutePath"`
	DataCenterName      string              `json:"dataCenterName"`
	DataCenterOrHostDto DataCenterOrHostDto `json:"dataCenterOrHostDto"`
	BlockDeviceDto      BlockDeviceDto      `json:"blockDeviceDto"`
	XactiveStoreName    string              `json:"xactiveStoreName"`
	XactiveStoreId      string              `json:"xactiveStoreId"`
	DataCenterDto       string              `json:"dataCenterDto"`
	HostNumbers         int                 `json:"hostNumbers"`
	VMNumbers           int                 `json:"vmNumbers"`
	VolumesNumbers      int                 `json:"volumesNumbers"`
	VMTemplateNumbers   int                 `json:"vmTemplateNumbers"`
	Tags                string              `json:"tags"`
	MaxSlots            int                 `json:"maxSlots"`
	Creating            bool                `json:"creating"`
	StorageBackUp       bool                `json:"storageBackUp"`
	ExtensionType       string              `json:"extensionType"`
	CanBeImageStorage   bool                `json:"canBeImageStorage"`
	MultiplexRatio      float64             `json:"multiplexRatio"`
	Oplimit             bool                `json:"oplimit"`
	Maxop               int                 `json:"maxop"`
	MountStateCount     string              `json:"mountStateCount"`
	DatastoreRole       string              `json:"datastoreRole"`
	CanCreateXactive    bool                `json:"canCreateXactive"`
	BlockDeviceUUId     string              `json:"blockDeviceUuid"`
	OpHostIP            string              `json:"opHostIp"`
	IsMount             string              `json:"isMount"`
	HostDto             string              `json:"hostDto"`
	ScvmOn              bool                `json:"scvmOn"`
	// contains filtered or unexported fields
}

func (*SStorage) CreateIDisk

func (*SStorage) GetCapacityMB

func (self *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (self *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetEnabled

func (self *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (self *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

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

func (*SStorage) GetIDisks

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

func (*SStorage) GetIStoragecache

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

func (*SStorage) GetIZone

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

func (*SStorage) GetId

func (self *SStorage) GetId() string

func (*SStorage) GetMediumType

func (self *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (self *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (self *SStorage) GetName() string

func (*SStorage) GetStatus

func (self *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

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

func (*SStorage) GetStorageType

func (self *SStorage) GetStorageType() string

func (*SStorage) IsSysDiskStore

func (self *SStorage) IsSysDiskStore() bool

func (*SStorage) Refresh

func (self *SStorage) Refresh() error

type SStoragecache

type SStoragecache struct {
	multicloud.SResourceBase
	InCloudSphereTags
	// contains filtered or unexported fields
}

func (*SStoragecache) CreateIImage

func (self *SStoragecache) CreateIImage(snpId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) DownloadImage

func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)

func (*SStoragecache) GetGlobalId

func (self *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

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

func (*SStoragecache) GetICustomizedCloudImages

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

func (*SStoragecache) GetIImageById

func (self *SStoragecache) GetIImageById(id string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) GetId

func (self *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (self *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (self *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (self *SStoragecache) GetStatus() string

func (*SStoragecache) UploadImage

func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, image *cloudprovider.SImageCreateOption, callback func(float32)) (string, error)

type STask

type STask struct {
	Id                string
	Name              string
	Detail            string
	Error             string
	State             string
	CreatedResourceId string
}

type SVersion

type SVersion struct {
	DisplayVersion string
}

type SVpc

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

func (*SVpc) Delete

func (self *SVpc) Delete() error

func (*SVpc) GetCidrBlock

func (self *SVpc) GetCidrBlock() string

func (*SVpc) GetGlobalId

func (self *SVpc) GetGlobalId() string

func (*SVpc) GetIRouteTableById

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

func (*SVpc) GetIRouteTables

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

func (*SVpc) GetISecurityGroups

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

func (*SVpc) GetIWireById

func (self *SVpc) GetIWireById(id string) (cloudprovider.ICloudWire, error)

func (*SVpc) GetIWires

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

func (*SVpc) GetId

func (self *SVpc) GetId() string

func (*SVpc) GetIsDefault

func (self *SVpc) GetIsDefault() bool

func (*SVpc) GetName

func (self *SVpc) GetName() string

func (*SVpc) GetRegion

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

func (*SVpc) GetStatus

func (self *SVpc) GetStatus() string

func (*SVpc) IsEmulated

func (self *SVpc) IsEmulated() bool

type SWire

type SWire struct {
	multicloud.SResourceBase
	InCloudSphereTags

	Id               string  `json:"id"`
	Name             string  `json:"name"`
	ResourceId       string  `json:"resourceId"`
	ControllerIP     string  `json:"controllerIP"`
	DataCenterDto    SZone   `json:"dataCenterDto"`
	HostDtos         []SHost `json:"hostDtos"`
	SwitchType       string  `json:"switchType"`
	AppType          string  `json:"appType"`
	Description      string  `json:"description"`
	NetworkDtos      string  `json:"networkDtos"`
	SdnNetworkDtos   string  `json:"sdnNetworkDtos"`
	VMDtos           string  `json:"vmDtos"`
	HostNum          int     `json:"hostNum"`
	PnicNum          int     `json:"pnicNum"`
	NetworkNum       int     `json:"networkNum"`
	VMNum            int     `json:"vmNum"`
	Maxvfs           int     `json:"maxvfs"`
	ThirdPartySDN    bool    `json:"thirdPartySDN"`
	Hierarchy        bool    `json:"hierarchy"`
	ConnectStorage   bool    `json:"connectStorage"`
	ConnectManage    bool    `json:"connectManage"`
	ConnectSwitches  string  `json:"connectSwitches"`
	DhcpProtection   bool    `json:"dhcpProtection"`
	NeutronName      string  `json:"neutronName"`
	NeutronPassword  string  `json:"neutronPassword"`
	ConnectScvm      bool    `json:"connectScvm"`
	SwitchUplinkType string  `json:"switchUplinkType"`
	ComputerNetNum   int     `json:"computerNetNum"`
	DataNetNum       int     `json:"dataNetNum"`
	MigrateNetNum    int     `json:"migrateNetNum"`
	VMMigBandWidth   string  `json:"vmMigBandWidth"`
	EnableDpdk       bool    `json:"enableDpdk"`
	SflowStatus      bool    `json:"sflowStatus"`
	NetflowStatus    bool    `json:"netflowStatus"`
	MulticastStatus  bool    `json:"multicastStatus"`
	MirrorStatus     bool    `json:"mirrorStatus"`
	BrLimitStatus    bool    `json:"brLimitStatus"`
	Hidden           bool    `json:"hidden"`
	NetworkTopoly    bool    `json:"networkTopoly"`
	// contains filtered or unexported fields
}

func (*SWire) CreateINetwork

func (*SWire) GetBandwidth

func (self *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (self *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

func (self *SWire) GetINetworkById(id string) (cloudprovider.ICloudNetwork, error)

func (*SWire) GetINetworks

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

func (*SWire) GetIVpc

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

func (*SWire) GetIZone

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

func (*SWire) GetId

func (self *SWire) GetId() string

func (*SWire) GetName

func (self *SWire) GetName() string

func (*SWire) GetStatus

func (self *SWire) GetStatus() string

type SZone

type SZone struct {
	multicloud.SResourceBase
	InCloudSphereTags

	Id                 string `json:"id"`
	Name               string `json:"name"`
	NFSPath            string `json:"nfsPath"`
	Type               string `json:"type"`
	Description        string `json:"description"`
	HostNum            int64  `json:"hostNum"`
	VMNum              int64  `json:"vmNum"`
	ClusterNum         int64  `json:"clusterNum"`
	CfsDomainNum       int64  `json:"cfsDomainNum"`
	StorageNum         int64  `json:"storageNum"`
	ImageISONum        int64  `json:"imageIsoNum"`
	NetNum             int64  `json:"netNum"`
	NeutronNetNum      int64  `json:"neutronNetNum"`
	CPUCapacity        string `json:"cpuCapacity"`
	CPUAvailable       string `json:"cpuAvailable"`
	CPUUsed            string `json:"cpuUsed"`
	CPUUtilization     string `json:"cpuUtilization"`
	MemoryCapacity     string `json:"memoryCapacity"`
	MemoryAvailable    string `json:"memoryAvailable"`
	MemoryUsed         string `json:"memoryUsed"`
	MemoryUtilization  string `json:"memoryUtilization"`
	StorageCapacity    string `json:"storageCapacity"`
	StorageAvailable   string `json:"storageAvailable"`
	StorageUsed        string `json:"storageUsed"`
	StorageUtilization string `json:"storageUtilization"`
	DatastoreNum       int64  `json:"datastoreNum"`
	LocalstoreNum      int64  `json:"localstoreNum"`
	CfsstoreNum        int64  `json:"cfsstoreNum"`
	RawstoreNum        int64  `json:"rawstoreNum"`
	NfsstoreNum        int64  `json:"nfsstoreNum"`
	XactivestoreNum    int64  `json:"xactivestoreNum"`
	NetworkType        string `json:"networkType"`
	VswitchDtos        string `json:"vswitchDtos"`
	//SDNNetworkDtos     []interface{} `json:"sdnNetworkDtos"`
	SDNInit      bool   `json:"sdnInit"`
	SDNSpeedUp   bool   `json:"sdnSpeedUp"`
	SDNConfigDto string `json:"sdnConfigDto"`
	// contains filtered or unexported fields
}

func (*SZone) GetGlobalId

func (self *SZone) GetGlobalId() string

func (*SZone) GetI18n

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

func (*SZone) GetIHostById

func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SZone) GetIHosts

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

func (*SZone) GetIRegion

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

func (*SZone) GetIStorageById

func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SZone) GetIStorages

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

func (*SZone) GetId

func (self *SZone) GetId() string

func (*SZone) GetName

func (self *SZone) GetName() string

func (*SZone) GetStatus

func (self *SZone) GetStatus() string

type SphereClient

type SphereClient struct {
	*SphereClientConfig
}

func NewSphereClient

func NewSphereClient(cfg *SphereClientConfig) (*SphereClient, error)

func (*SphereClient) GetAccountId

func (self *SphereClient) GetAccountId() string

func (*SphereClient) GetCapabilities

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

func (*SphereClient) GetIRegions

func (self *SphereClient) GetIRegions() []cloudprovider.ICloudRegion

func (*SphereClient) GetRegion

func (self *SphereClient) GetRegion() (*SRegion, error)

func (*SphereClient) GetRegions

func (self *SphereClient) GetRegions() ([]SRegion, error)

func (*SphereClient) GetSubAccounts

func (self *SphereClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)

func (*SphereClient) GetVersion

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

type SphereClientConfig

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

func NewSphereClientConfig

func NewSphereClientConfig(host, accessKey, accessSecret string) *SphereClientConfig

func (*SphereClientConfig) CloudproviderConfig

func (self *SphereClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *SphereClientConfig

func (*SphereClientConfig) Debug

func (self *SphereClientConfig) Debug(debug bool) *SphereClientConfig

type SphereError

type SphereError struct {
	Message string
	Code    int
	Params  []string
}

func (SphereError) Error

func (self SphereError) Error() string

func (*SphereError) ParseErrorFromJsonResponse

func (ce *SphereError) ParseErrorFromJsonResponse(statusCode int, body jsonutils.JSONObject) error

type Volume

type Volume struct {
	Id                 string      `json:"id"`
	UUID               string      `json:"uuid"`
	Size               float64     `json:"size"`
	RealSize           float64     `json:"realSize"`
	Name               string      `json:"name"`
	FileName           string      `json:"fileName"`
	Offset             int         `json:"offset"`
	Shared             bool        `json:"shared"`
	DeleteModel        string      `json:"deleteModel"`
	VolumePolicy       string      `json:"volumePolicy"`
	Format             string      `json:"format"`
	BlockDeviceId      string      `json:"blockDeviceId"`
	DiskType           string      `json:"diskType"`
	DataStoreId        string      `json:"dataStoreId"`
	DataStoreName      string      `json:"dataStoreName"`
	DataStoreSize      float64     `json:"dataStoreSize"`
	FreeStorage        float64     `json:"freeStorage"`
	DataStoreType      string      `json:"dataStoreType"`
	DataStoreReplicate int         `json:"dataStoreReplicate"`
	VMName             string      `json:"vmName"`
	VMStatus           string      `json:"vmStatus"`
	Type               string      `json:"type"`
	Description        string      `json:"description"`
	Bootable           bool        `json:"bootable"`
	VolumeStatus       string      `json:"volumeStatus"`
	MountedHostIds     string      `json:"mountedHostIds"`
	Md5                string      `json:"md5"`
	DataSize           int         `json:"dataSize"`
	OpenStackId        string      `json:"openStackId"`
	VvSourceDto        VvSourceDto `json:"vvSourceDto"`
	FormatDisk         bool        `json:"formatDisk"`
	ToBeConverted      bool        `json:"toBeConverted"`
	RelatedVms         string      `json:"relatedVms"`
	XactiveDataStoreId string      `json:"xactiveDataStoreId"`
	ClusterSize        int         `json:"clusterSize"`
	ScsiId             string      `json:"scsiId"`
	SecondaryUUID      string      `json:"secondaryUuid"`
	SecondaryVolumes   []struct{}  `json:"secondaryVolumes"`
}

type VvSourceDto

type VvSourceDto struct {
	SourceType    string        `json:"sourceType"`
	FilePath      string        `json:"filePath"`
	Name          string        `json:"name"`
	FtpServerHost FtpServerHost `json:"ftpServerHost"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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