jdcloud

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLOUD_PROVIDER_JDCLOUD    = api.CLOUD_PROVIDER_JDCLOUD
	CLOUD_PROVIDER_JDCLOUD_CN = "京东云"
	CLOUD_PROVIDER_JDCLOUD_EN = "JDcloud"

	JDCLOUD_DEFAULT_REGION = "cn-north-1"
)

Variables

View Source
var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{
	"cn-south-1": {Latitude: 23.129110, Longitude: 113.264381, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN},
	"cn-north-1": {Latitude: 39.904202, Longitude: 116.407394, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN},
	"cn-east-2":  {Latitude: 31.210344, Longitude: 121.455364, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN},
	"cn-east-1":  {Latitude: 33.939763, Longitude: 118.267582, City: api.CITY_SU_QIAN, CountryCode: api.COUNTRY_CODE_CN},
}
View Source
var ZonesInRegion = map[string][]sZoneIden{
	"cn-north-1": {
		{
			Id:   "cn-north-1a",
			Name: "可用区A",
		},
		{
			Id:   "cn-north-1b",
			Name: "可用区B",
		},
		{
			Id:   "cn-north-1c",
			Name: "可用区C",
		},
	},
	"cn-east-1": {
		{
			Id:   "cn-east-1a",
			Name: "可用区A",
		},
	},
	"cn-east-2": {
		{
			Id:   "cn-east-2a",
			Name: "可用区A",
		},
		{
			Id:   "cn-east-2b",
			Name: "可用区B",
		},
		{
			Id:   "cn-east-2c",
			Name: "可用区C",
		},
	},
	"cn-south-1": {
		{
			Id:   "cn-south-1a",
			Name: "可用区A",
		},
		{
			Id:   "cn-south-1b",
			Name: "可用区B",
		},
		{
			Id:   "cn-south-1c",
			Name: "可用区C",
		},
	},
}

Functions

This section is empty.

Types

type JDCloudClientConfig

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

func NewJDCloudClientConfig

func NewJDCloudClientConfig(accessKey, accessSecret string) *JDCloudClientConfig

func (*JDCloudClientConfig) CloudproviderConfig

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

func (*JDCloudClientConfig) Debug

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

type JdcloudTags

type JdcloudTags struct {
}

func (*JdcloudTags) GetSysTags

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

func (*JdcloudTags) GetTags

func (jt *JdcloudTags) GetTags() (map[string]string, error)

func (*JdcloudTags) SetTags

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

type Logger

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

func (Logger) Log

func (l Logger) Log(level int, message ...interface{})

type SBalance

type SBalance struct {
	apis.DescribeAccountAmountResult
}

type SDBInstance

type SDBInstance struct {
	multicloud.SDBInstanceBase
	JdcloudTags

	models.DBInstance
	// contains filtered or unexported fields
}

func (*SDBInstance) Delete

func (self *SDBInstance) Delete() error

func (*SDBInstance) GetCategory

func (self *SDBInstance) GetCategory() string

func (*SDBInstance) GetConnectionStr

func (self *SDBInstance) GetConnectionStr() string

func (*SDBInstance) GetCreatedAt

func (self *SDBInstance) GetCreatedAt() time.Time

func (*SDBInstance) GetDiskSizeGB

func (self *SDBInstance) GetDiskSizeGB() int

func (*SDBInstance) GetEngine

func (self *SDBInstance) GetEngine() string

func (*SDBInstance) GetEngineVersion

func (self *SDBInstance) GetEngineVersion() string

func (*SDBInstance) GetExpiredAt

func (self *SDBInstance) GetExpiredAt() time.Time

func (*SDBInstance) GetGlobalId

func (self *SDBInstance) GetGlobalId() string

func (*SDBInstance) GetIDBInstanceAccounts

func (self *SDBInstance) GetIDBInstanceAccounts() ([]cloudprovider.ICloudDBInstanceAccount, error)

func (*SDBInstance) GetIDBInstanceBackups

func (self *SDBInstance) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error)

func (*SDBInstance) GetIDBInstanceDatabases

func (self *SDBInstance) GetIDBInstanceDatabases() ([]cloudprovider.ICloudDBInstanceDatabase, error)

func (*SDBInstance) GetIVpcId

func (self *SDBInstance) GetIVpcId() string

func (*SDBInstance) GetId

func (self *SDBInstance) GetId() string

func (*SDBInstance) GetInstanceType

func (self *SDBInstance) GetInstanceType() string

func (*SDBInstance) GetInternalConnectionStr

func (self *SDBInstance) GetInternalConnectionStr() string

func (*SDBInstance) GetMaintainTime

func (self *SDBInstance) GetMaintainTime() string

func (*SDBInstance) GetMasterInstanceId

func (self *SDBInstance) GetMasterInstanceId() string

func (*SDBInstance) GetName

func (self *SDBInstance) GetName() string

func (*SDBInstance) GetPort

func (self *SDBInstance) GetPort() int

func (*SDBInstance) GetStatus

func (self *SDBInstance) GetStatus() string

func (*SDBInstance) GetStorageType

func (self *SDBInstance) GetStorageType() string

func (*SDBInstance) GetVcpuCount

func (self *SDBInstance) GetVcpuCount() int

func (*SDBInstance) GetVmemSizeMB

func (self *SDBInstance) GetVmemSizeMB() int

func (*SDBInstance) GetZone1Id

func (self *SDBInstance) GetZone1Id() string

func (*SDBInstance) GetZone2Id

func (self *SDBInstance) GetZone2Id() string

func (*SDBInstance) GetZone3Id

func (self *SDBInstance) GetZone3Id() string

func (*SDBInstance) Refresh

func (self *SDBInstance) Refresh() error

type SDBInstanceAccount

type SDBInstanceAccount struct {
	multicloud.SDBInstanceAccountBase
	JdcloudTags

	models.Account
	// contains filtered or unexported fields
}

func (*SDBInstanceAccount) GetGlobalId

func (self *SDBInstanceAccount) GetGlobalId() string

func (*SDBInstanceAccount) GetIDBInstanceAccountPrivileges

func (self *SDBInstanceAccount) GetIDBInstanceAccountPrivileges() ([]cloudprovider.ICloudDBInstanceAccountPrivilege, error)

func (*SDBInstanceAccount) GetId

func (self *SDBInstanceAccount) GetId() string

func (*SDBInstanceAccount) GetName

func (self *SDBInstanceAccount) GetName() string

func (*SDBInstanceAccount) GetStatus

func (self *SDBInstanceAccount) GetStatus() string

type SDBInstanceAccountPrivilege

type SDBInstanceAccountPrivilege struct {
	models.AccountPrivilege
	Account string
}

func (*SDBInstanceAccountPrivilege) GetDBName

func (self *SDBInstanceAccountPrivilege) GetDBName() string

func (*SDBInstanceAccountPrivilege) GetGlobalId

func (self *SDBInstanceAccountPrivilege) GetGlobalId() string

func (*SDBInstanceAccountPrivilege) GetPrivilege

func (self *SDBInstanceAccountPrivilege) GetPrivilege() string

type SDBInstanceBackup

type SDBInstanceBackup struct {
	multicloud.SDBInstanceBackupBase
	JdcloudTags

	models.Backup
	// contains filtered or unexported fields
}

func (*SDBInstanceBackup) GetBackupMethod

func (self *SDBInstanceBackup) GetBackupMethod() cloudprovider.TBackupMethod

func (*SDBInstanceBackup) GetBackupMode

func (self *SDBInstanceBackup) GetBackupMode() string

func (*SDBInstanceBackup) GetBackupSizeMb

func (self *SDBInstanceBackup) GetBackupSizeMb() int

func (*SDBInstanceBackup) GetDBInstanceId

func (self *SDBInstanceBackup) GetDBInstanceId() string

func (*SDBInstanceBackup) GetDBNames

func (self *SDBInstanceBackup) GetDBNames() string

func (*SDBInstanceBackup) GetEndTime

func (self *SDBInstanceBackup) GetEndTime() time.Time

func (*SDBInstanceBackup) GetEngine

func (self *SDBInstanceBackup) GetEngine() string

func (*SDBInstanceBackup) GetEngineVersion

func (self *SDBInstanceBackup) GetEngineVersion() string

func (*SDBInstanceBackup) GetGlobalId

func (self *SDBInstanceBackup) GetGlobalId() string

func (*SDBInstanceBackup) GetId

func (self *SDBInstanceBackup) GetId() string

func (*SDBInstanceBackup) GetName

func (self *SDBInstanceBackup) GetName() string

func (*SDBInstanceBackup) GetStartTime

func (self *SDBInstanceBackup) GetStartTime() time.Time

func (*SDBInstanceBackup) GetStatus

func (self *SDBInstanceBackup) GetStatus() string

type SDBInstanceDatabase

type SDBInstanceDatabase struct {
	multicloud.SDBInstanceDatabaseBase
	JdcloudTags

	models.Database
	// contains filtered or unexported fields
}

func (*SDBInstanceDatabase) GetCharacterSet

func (self *SDBInstanceDatabase) GetCharacterSet() string

func (*SDBInstanceDatabase) GetGlobalId

func (self *SDBInstanceDatabase) GetGlobalId() string

func (*SDBInstanceDatabase) GetId

func (self *SDBInstanceDatabase) GetId() string

func (*SDBInstanceDatabase) GetName

func (self *SDBInstanceDatabase) GetName() string

func (*SDBInstanceDatabase) GetStatus

func (self *SDBInstanceDatabase) GetStatus() string

type SDisk

type SDisk struct {
	multicloud.SDisk
	JdcloudTags
	multicloud.SBillingBase

	models.Disk

	ImageId      string
	IsSystemDisk bool
	// contains filtered or unexported fields
}

func (*SDisk) CreateISnapshot

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

func (*SDisk) Delete

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

func (*SDisk) GetAccessPath

func (d *SDisk) GetAccessPath() string

func (*SDisk) GetBillingType

func (d *SDisk) GetBillingType() string

func (*SDisk) GetCacheMode

func (d *SDisk) GetCacheMode() string

func (*SDisk) GetDiskFormat

func (d *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (d *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (d *SDisk) GetDiskType() string

func (*SDisk) GetDriver

func (d *SDisk) GetDriver() string

func (*SDisk) GetExpiredAt

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

func (*SDisk) GetFsFormat

func (d *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (d *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshot

func (d *SDisk) GetISnapshot(id string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetISnapshots

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

func (*SDisk) GetIStorage

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

func (*SDisk) GetId

func (d *SDisk) GetId() string

func (*SDisk) GetIops

func (d *SDisk) GetIops() int

func (*SDisk) GetIsAutoDelete

func (d *SDisk) GetIsAutoDelete() bool

func (*SDisk) GetIsNonPersistent

func (d *SDisk) GetIsNonPersistent() bool

func (*SDisk) GetMountpoint

func (d *SDisk) GetMountpoint() string

func (*SDisk) GetName

func (d *SDisk) GetName() string

func (*SDisk) GetProjectId

func (d *SDisk) GetProjectId() string

func (*SDisk) GetStatus

func (d *SDisk) GetStatus() string

func (*SDisk) GetSysTags

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

func (*SDisk) GetTemplateId

func (d *SDisk) GetTemplateId() string

func (*SDisk) IsEmulated

func (d *SDisk) IsEmulated() bool

func (*SDisk) Rebuild

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

func (*SDisk) Refresh

func (d *SDisk) Refresh() error

func (*SDisk) Reset

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

func (*SDisk) Resize

func (s *SDisk) Resize(ctx context.Context, newSizeMB int64) error

type SEip

type SEip struct {
	multicloud.SEipBase
	JdcloudTags

	models.ElasticIp
	// contains filtered or unexported fields
}

func (*SEip) Associate

func (e *SEip) Associate(conf *cloudprovider.AssociateConfig) error

func (*SEip) ChangeBandwidth

func (e *SEip) ChangeBandwidth(bw int) error

func (*SEip) Delete

func (e *SEip) Delete() error

func (*SEip) Dissociate

func (e *SEip) Dissociate() error

func (*SEip) GetAssociationExternalId

func (e *SEip) GetAssociationExternalId() string

func (*SEip) GetAssociationType

func (e *SEip) GetAssociationType() string

func (*SEip) GetBandwidth

func (e *SEip) GetBandwidth() int

func (*SEip) GetBillingType

func (e *SEip) GetBillingType() string

func (*SEip) GetCreatedAt

func (e *SEip) GetCreatedAt() time.Time

func (*SEip) GetExpiredAt

func (e *SEip) GetExpiredAt() time.Time

func (*SEip) GetGlobalId

func (e *SEip) GetGlobalId() string

func (*SEip) GetINetworkId

func (e *SEip) GetINetworkId() string

func (*SEip) GetId

func (e *SEip) GetId() string

func (*SEip) GetInternetChargeType

func (e *SEip) GetInternetChargeType() string

func (*SEip) GetIpAddr

func (e *SEip) GetIpAddr() string

func (*SEip) GetMode

func (e *SEip) GetMode() string

func (*SEip) GetName

func (e *SEip) GetName() string

func (*SEip) GetProjectId

func (e *SEip) GetProjectId() string

func (*SEip) GetStatus

func (e *SEip) GetStatus() string

func (*SEip) IsEmulated

func (e *SEip) IsEmulated() bool

func (*SEip) Refresh

func (e *SEip) Refresh() error

type SHost

type SHost struct {
	multicloud.SHostBase
	// contains filtered or unexported fields
}

func (*SHost) CreateVM

func (*SHost) GetAccessIp

func (h *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (h *SHost) GetAccessMac() string

func (*SHost) GetCpuCount

func (h *SHost) GetCpuCount() int

func (*SHost) GetCpuDesc

func (h *SHost) GetCpuDesc() string

func (*SHost) GetCpuMhz

func (h *SHost) GetCpuMhz() int

func (*SHost) GetEnabled

func (h *SHost) GetEnabled() bool

func (*SHost) GetGlobalId

func (h *SHost) GetGlobalId() string

func (*SHost) GetHostStatus

func (h *SHost) GetHostStatus() string

func (*SHost) GetHostType

func (h *SHost) GetHostType() string

func (*SHost) GetIHostNics

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

func (*SHost) GetIStorageById

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

func (*SHost) GetIStorages

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

func (*SHost) GetIVMById

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

func (*SHost) GetIVMs

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

func (*SHost) GetId

func (h *SHost) GetId() string

func (*SHost) GetIsMaintenance

func (h *SHost) GetIsMaintenance() bool

func (*SHost) GetMemSizeMB

func (h *SHost) GetMemSizeMB() int

func (*SHost) GetName

func (h *SHost) GetName() string

func (*SHost) GetNodeCount

func (h *SHost) GetNodeCount() int8

func (*SHost) GetSN

func (h *SHost) GetSN() string

func (*SHost) GetStatus

func (h *SHost) GetStatus() string

func (*SHost) GetStorageSizeMB

func (h *SHost) GetStorageSizeMB() int64

func (*SHost) GetStorageType

func (h *SHost) GetStorageType() string

func (*SHost) GetSysInfo

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

func (*SHost) GetVersion

func (h *SHost) GetVersion() string

func (*SHost) IsEmulated

func (h *SHost) IsEmulated() bool

func (*SHost) Refresh

func (h *SHost) Refresh() error

type SImage

type SImage struct {
	multicloud.SImageBase
	JdcloudTags

	models.Image
	// contains filtered or unexported fields
}

func (*SImage) Delete

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

func (*SImage) GetBios

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

func (*SImage) GetCreatedAt

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

func (*SImage) GetDescription

func (i *SImage) GetDescription() string

func (*SImage) GetFullOsName

func (i *SImage) GetFullOsName() string

func (*SImage) GetGlobalId

func (i *SImage) GetGlobalId() string

func (*SImage) GetIStoragecache

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

func (*SImage) GetId

func (i *SImage) GetId() string

func (*SImage) GetImageFormat

func (i *SImage) GetImageFormat() string

func (*SImage) GetImageStatus

func (i *SImage) GetImageStatus() string

func (*SImage) GetImageType

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

func (*SImage) GetMinOsDiskSizeGb

func (i *SImage) GetMinOsDiskSizeGb() int

func (*SImage) GetMinRamSizeMb

func (i *SImage) GetMinRamSizeMb() int

func (*SImage) GetName

func (i *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 (i *SImage) GetSizeByte() int64

func (*SImage) GetStatus

func (i *SImage) GetStatus() string

func (*SImage) IsEmulated

func (i *SImage) IsEmulated() bool

func (*SImage) Refresh

func (i *SImage) Refresh() error

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	multicloud.SBillingBase
	JdcloudTags

	models.Instance
	// contains filtered or unexported fields
}

func (*SInstance) AttachDisk

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

func (*SInstance) ChangeConfig

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

func (*SInstance) DeleteVM

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

func (*SInstance) DeployVM

func (*SInstance) DetachDisk

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

func (*SInstance) GetBillingType

func (i *SInstance) GetBillingType() string

func (*SInstance) GetBios

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

func (*SInstance) GetBootOrder

func (i *SInstance) GetBootOrder() string

func (*SInstance) GetError

func (self *SInstance) GetError() error

func (*SInstance) GetExpiredAt

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

func (*SInstance) GetFullOsName

func (i *SInstance) GetFullOsName() string

func (*SInstance) GetGlobalId

func (i *SInstance) GetGlobalId() string

func (*SInstance) GetHostname

func (i *SInstance) GetHostname() string

func (*SInstance) GetHypervisor

func (in *SInstance) GetHypervisor() string

func (*SInstance) GetIDisks

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

func (*SInstance) GetIEIP

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

func (*SInstance) GetIHost

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

func (*SInstance) GetINics

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

func (*SInstance) GetId

func (i *SInstance) GetId() string

func (*SInstance) GetImage

func (i *SInstance) GetImage() (*SImage, error)

func (*SInstance) GetInstanceType

func (i *SInstance) GetInstanceType() string

func (*SInstance) GetMachine

func (i *SInstance) GetMachine() string

func (*SInstance) GetName

func (i *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 (in *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

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

func (*SInstance) GetStatus

func (i *SInstance) GetStatus() string

func (*SInstance) GetVNCInfo

func (*SInstance) GetVcpuCount

func (in *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (i *SInstance) GetVdi() string

func (*SInstance) GetVga

func (i *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (in *SInstance) GetVmemSizeMB() int

func (*SInstance) IsEmulated

func (i *SInstance) IsEmulated() bool

func (*SInstance) RebuildRoot

func (self *SInstance) RebuildRoot(ctx context.Context, config *cloudprovider.SManagedVMRebuildRootConfig) (string, error)

func (*SInstance) Refresh

func (i *SInstance) Refresh() error

func (*SInstance) Renew

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

func (*SInstance) SetSecurityGroups

func (in *SInstance) SetSecurityGroups(ids []string) error

func (*SInstance) StartVM

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

func (*SInstance) StopVM

func (*SInstance) UpdateUserData

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

func (*SInstance) UpdateVM

type SInstanceNic

type SInstanceNic struct {
	cloudprovider.DummyICloudNic

	models.InstanceNetworkInterface
	// contains filtered or unexported fields
}

func (*SInstanceNic) GetDriver

func (in *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (in *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (in *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (in *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (in *SInstanceNic) GetMAC() string

func (*SInstanceNic) InClassicNetwork

func (in *SInstanceNic) InClassicNetwork() bool

type SInstanceType

type SInstanceType struct {
	models.InstanceType
}

func (*SInstanceType) GetCpu

func (it *SInstanceType) GetCpu() int

func (*SInstanceType) GetMemoryMB

func (it *SInstanceType) GetMemoryMB() int

type SJDCloudClient

type SJDCloudClient struct {
	*JDCloudClientConfig
	// contains filtered or unexported fields
}

func NewJDCloudClient

func NewJDCloudClient(cfg *JDCloudClientConfig) (*SJDCloudClient, error)

func (*SJDCloudClient) DescribeAccountAmount

func (self *SJDCloudClient) DescribeAccountAmount() (*SBalance, error)

func (*SJDCloudClient) GetAccountId

func (self *SJDCloudClient) GetAccountId() string

func (*SJDCloudClient) GetEcsMetrics

func (*SJDCloudClient) GetIRegions

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

func (*SJDCloudClient) GetMetrics

func (*SJDCloudClient) GetRdsMetrics

func (*SJDCloudClient) GetRegion

func (self *SJDCloudClient) GetRegion(regionId string) *SRegion

func (*SJDCloudClient) GetSubAccounts

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

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	JdcloudTags

	models.Subnet
	// contains filtered or unexported fields
}

func (*SNetwork) Cidr

func (n *SNetwork) Cidr() string

func (*SNetwork) Delete

func (n *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (n *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetGateway

func (n *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (n *SNetwork) GetGlobalId() string

func (*SNetwork) GetIWire

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

func (*SNetwork) GetId

func (n *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (n *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (n *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (n *SNetwork) GetIpStart() string

func (*SNetwork) GetIsPublic

func (n *SNetwork) GetIsPublic() bool

func (*SNetwork) GetName

func (n *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (n *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

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

func (*SNetwork) GetServerType

func (n *SNetwork) GetServerType() string

func (*SNetwork) GetStatus

func (n *SNetwork) GetStatus() string

func (*SNetwork) IsEmulated

func (n *SNetwork) IsEmulated() bool

func (*SNetwork) Refresh

func (n *SNetwork) Refresh() error

type SNetworkInterface

type SNetworkInterface struct {
	multicloud.SNetworkInterfaceBase
	JdcloudTags

	models.NetworkInterface
	// contains filtered or unexported fields
}

func (*SNetworkInterface) GetAssociateId

func (nic *SNetworkInterface) GetAssociateId() string

func (*SNetworkInterface) GetAssociateType

func (nic *SNetworkInterface) GetAssociateType() string

func (*SNetworkInterface) GetGlobalId

func (nic *SNetworkInterface) GetGlobalId() string

func (*SNetworkInterface) GetICloudInterfaceAddresses

func (nic *SNetworkInterface) GetICloudInterfaceAddresses() ([]cloudprovider.ICloudInterfaceAddress, error)

func (*SNetworkInterface) GetId

func (nic *SNetworkInterface) GetId() string

func (*SNetworkInterface) GetMacAddress

func (nic *SNetworkInterface) GetMacAddress() string

func (*SNetworkInterface) GetName

func (nic *SNetworkInterface) GetName() string

func (*SNetworkInterface) GetStatus

func (nic *SNetworkInterface) GetStatus() string

type SNetworkInterfacePrivateIp

type SNetworkInterfacePrivateIp struct {
	models.NetworkInterfacePrivateIp
	// contains filtered or unexported fields
}

func (*SNetworkInterfacePrivateIp) GetGlobalId

func (ip *SNetworkInterfacePrivateIp) GetGlobalId() string

func (*SNetworkInterfacePrivateIp) GetINetworkId

func (ip *SNetworkInterfacePrivateIp) GetINetworkId() string

func (*SNetworkInterfacePrivateIp) GetIP

func (ip *SNetworkInterfacePrivateIp) GetIP() string

func (*SNetworkInterfacePrivateIp) IsPrimary

func (ip *SNetworkInterfacePrivateIp) IsPrimary() bool

type SRegion

type SRegion struct {
	cloudprovider.SFakeOnPremiseRegion
	multicloud.SRegion
	multicloud.SNoObjectStorageRegion

	ID   string `json:"id"`
	Name string `json:"Name"`
	// contains filtered or unexported fields
}

func (*SRegion) DeleteDBInstance

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

func (*SRegion) FillHost

func (r *SRegion) FillHost(instance *SInstance)

func (*SRegion) GetCapabilities

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

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SJDCloudClient

func (*SRegion) GetDBInstance

func (self *SRegion) GetDBInstance(id string) (*SDBInstance, error)

func (*SRegion) GetDBInstanceAccounts

func (self *SRegion) GetDBInstanceAccounts(id string, pageNumber, pageSize int) ([]SDBInstanceAccount, int, error)

func (*SRegion) GetDBInstanceBackups

func (self *SRegion) GetDBInstanceBackups(id string, pageNumber, pageSize int) ([]SDBInstanceBackup, int, error)

func (*SRegion) GetDBInstanceDatabases

func (self *SRegion) GetDBInstanceDatabases(id string, pageNumber, pageSize int) ([]SDBInstanceDatabase, int, error)

func (*SRegion) GetDBInstances

func (self *SRegion) GetDBInstances(pageNumber int, pageSize int) ([]SDBInstance, int, error)

func (*SRegion) GetDiskById

func (r *SRegion) GetDiskById(id string) (*SDisk, error)

func (*SRegion) GetDisks

func (r *SRegion) GetDisks(instanceId, zoneId, diskType string, diskIds []string, pageNumber, pageSize int) ([]SDisk, int, error)

func (*SRegion) GetEIPById

func (r *SRegion) GetEIPById(id string) (*SEip, error)

func (*SRegion) GetGeographicInfo

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

func (*SRegion) GetGlobalId

func (r *SRegion) GetGlobalId() string

func (*SRegion) GetI18n

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

func (*SRegion) GetIDBInstanceById

func (self *SRegion) GetIDBInstanceById(id string) (cloudprovider.ICloudDBInstance, error)

func (*SRegion) GetIDBInstances

func (self *SRegion) GetIDBInstances() ([]cloudprovider.ICloudDBInstance, error)

func (*SRegion) GetIDiskById

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

func (*SRegion) GetIEipById

func (r *SRegion) GetIEipById(id string) (cloudprovider.ICloudEIP, error)

func (*SRegion) GetIEips

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

func (*SRegion) GetIHostById

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

func (*SRegion) GetIHosts

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

func (*SRegion) GetIStorageById

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

func (*SRegion) GetIStoragecacheById

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

func (*SRegion) GetIStoragecaches

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

func (*SRegion) GetIStorages

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

func (*SRegion) GetIVMById

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

func (*SRegion) GetIVMs

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

func (*SRegion) GetIVpcById

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

func (*SRegion) GetIVpcs

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

func (*SRegion) GetIZoneById

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

func (*SRegion) GetIZones

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

func (*SRegion) GetId

func (r *SRegion) GetId() string

func (*SRegion) GetImage

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

func (*SRegion) GetImages

func (r *SRegion) GetImages(imageIds []string, imageSource string, pageNumber, pageSize int) ([]SImage, int, error)

func (*SRegion) GetInstanceById

func (r *SRegion) GetInstanceById(id string) (*SInstance, error)

func (*SRegion) GetInstances

func (r *SRegion) GetInstances(zoneId string, ids []string, pangeNumber, pageSize int) ([]SInstance, int, error)

func (*SRegion) GetName

func (r *SRegion) GetName() string

func (*SRegion) GetNetworkById

func (r *SRegion) GetNetworkById(id string) (*SNetwork, error)

func (*SRegion) GetNetworks

func (r *SRegion) GetNetworks(vpcId string, pageNumber int, pageSize int) ([]SNetwork, int, error)

func (*SRegion) GetProvider

func (r *SRegion) GetProvider() string

func (*SRegion) GetSecurityGroups

func (r *SRegion) GetSecurityGroups(vpcId string, securityGroupIds []string, pageNumber int, pageSize int) ([]SSecurityGroup, int, error)

func (*SRegion) GetSnapshotById

func (r *SRegion) GetSnapshotById(id string) (*SSnapshot, error)

func (*SRegion) GetSnapshots

func (r *SRegion) GetSnapshots(diskId string, pageNumber, pageSize int) ([]SSnapshot, int, error)

func (*SRegion) GetStatus

func (r *SRegion) GetStatus() string

func (*SRegion) GetVpcById

func (r *SRegion) GetVpcById(id string) (*SVpc, error)

func (*SRegion) GetVpcs

func (r *SRegion) GetVpcs(pageNumber, pageSize int) (vpcs []SVpc, total int, err error)

func (*SRegion) InstanceTypes

func (r *SRegion) InstanceTypes(instanceTypes ...string) ([]SInstanceType, error)

func (*SRegion) IsEmulated

func (r *SRegion) IsEmulated() bool

func (*SRegion) Refresh

func (r *SRegion) Refresh() error

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	JdcloudTags

	models.NetworkSecurityGroup
	// contains filtered or unexported fields
}

func (*SSecurityGroup) Delete

func (sg *SSecurityGroup) Delete() error

func (*SSecurityGroup) GetDescription

func (sg *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (sg *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (sg *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetName

func (sg *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetRules

func (*SSecurityGroup) GetStatus

func (sg *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetVpcId

func (sg *SSecurityGroup) GetVpcId() string

type SSnapshot

type SSnapshot struct {
	multicloud.SResourceBase
	JdcloudTags

	models.Snapshot
	// contains filtered or unexported fields
}

func (*SSnapshot) Delete

func (s *SSnapshot) Delete() error

func (*SSnapshot) GetDiskId

func (s *SSnapshot) GetDiskId() string

func (*SSnapshot) GetDiskType

func (s *SSnapshot) GetDiskType() string

func (*SSnapshot) GetGlobalId

func (s *SSnapshot) GetGlobalId() string

func (*SSnapshot) GetId

func (s *SSnapshot) GetId() string

func (*SSnapshot) GetName

func (s *SSnapshot) GetName() string

func (*SSnapshot) GetProjectId

func (s *SSnapshot) GetProjectId() string

func (*SSnapshot) GetSizeMb

func (s *SSnapshot) GetSizeMb() int32

func (*SSnapshot) GetStatus

func (s *SSnapshot) GetStatus() string

func (*SSnapshot) IsEmulated

func (s *SSnapshot) IsEmulated() bool

func (*SSnapshot) Refresh

func (s *SSnapshot) Refresh() error

type SStorage

type SStorage struct {
	multicloud.SStorageBase
	JdcloudTags
	// contains filtered or unexported fields
}

func (*SStorage) CreateIDisk

func (*SStorage) DisableSync

func (s *SStorage) DisableSync() bool

func (*SStorage) GetCapacityMB

func (s *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (s *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetEnabled

func (s *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (s *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

func (s *SStorage) GetIDiskById(idStr string) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetIDisks

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

func (*SStorage) GetIStoragecache

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

func (*SStorage) GetIZone

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

func (*SStorage) GetId

func (s *SStorage) GetId() string

func (*SStorage) GetMediumType

func (s *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (s *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (s *SStorage) GetName() string

func (*SStorage) GetStatus

func (s *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

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

func (*SStorage) GetStorageType

func (s *SStorage) GetStorageType() string

func (*SStorage) IsEmulated

func (s *SStorage) IsEmulated() bool

func (*SStorage) IsSysDiskStore

func (s *SStorage) IsSysDiskStore() bool

func (*SStorage) Refresh

func (s *SStorage) Refresh() error

type SStoragecache

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

func (*SStoragecache) GetGlobalId

func (sc *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

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

func (*SStoragecache) GetICustomizedCloudImages

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

func (*SStoragecache) GetIImageById

func (sc *SStoragecache) GetIImageById(exId string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) GetId

func (sc *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (sc *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (sc *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (sc *SStoragecache) GetStatus() string

func (*SStoragecache) IsEmulated

func (sc *SStoragecache) IsEmulated() bool

func (*SStoragecache) Refresh

func (sc *SStoragecache) Refresh() error

func (*SStoragecache) UploadImage

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

type SVpc

type SVpc struct {
	multicloud.SVpc
	JdcloudTags
	models.Vpc
	// contains filtered or unexported fields
}

func (*SVpc) Delete

func (v *SVpc) Delete() error

func (*SVpc) GetCidrBlock

func (v *SVpc) GetCidrBlock() string

func (*SVpc) GetGlobalId

func (v *SVpc) GetGlobalId() string

func (*SVpc) GetIRouteTableById

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

func (*SVpc) GetIRouteTables

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

func (*SVpc) GetISecurityGroups

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

func (*SVpc) GetIWireById

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

func (*SVpc) GetIWires

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

func (*SVpc) GetId

func (v *SVpc) GetId() string

func (*SVpc) GetIsDefault

func (v *SVpc) GetIsDefault() bool

func (*SVpc) GetName

func (v *SVpc) GetName() string

func (*SVpc) GetRegion

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

func (*SVpc) GetStatus

func (v *SVpc) GetStatus() string

func (*SVpc) GetWire

func (v *SVpc) GetWire() *SWire

func (*SVpc) IsEmulated

func (v *SVpc) IsEmulated() bool

func (*SVpc) Refresh

func (v *SVpc) Refresh() error

type SWire

type SWire struct {
	multicloud.SResourceBase
	JdcloudTags
	// contains filtered or unexported fields
}

func (*SWire) CreateINetwork

func (*SWire) CreateNetworks

func (w *SWire) CreateNetworks() (*SNetwork, error)

func (*SWire) GetBandwidth

func (w *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (w *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

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

func (*SWire) GetINetworks

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

func (*SWire) GetIVpc

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

func (*SWire) GetIZone

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

func (*SWire) GetId

func (w *SWire) GetId() string

func (*SWire) GetName

func (w *SWire) GetName() string

func (*SWire) GetStatus

func (w *SWire) GetStatus() string

func (*SWire) IsEmulated

func (w *SWire) IsEmulated() bool

func (*SWire) Refresh

func (w *SWire) Refresh() error

type SZone

type SZone struct {
	multicloud.SResourceBase
	JdcloudTags

	ID   string
	Name string
	// contains filtered or unexported fields
}

func (*SZone) GetGlobalId

func (z *SZone) GetGlobalId() string

func (*SZone) GetI18n

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

func (*SZone) GetIHostById

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

func (*SZone) GetIHosts

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

func (*SZone) GetIRegion

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

func (*SZone) GetIStorageById

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

func (*SZone) GetIStorages

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

func (*SZone) GetId

func (z *SZone) GetId() string

func (*SZone) GetName

func (z *SZone) GetName() string

func (*SZone) GetStatus

func (z *SZone) GetStatus() string

func (*SZone) IsEmulated

func (z *SZone) IsEmulated() bool

func (*SZone) Refresh

func (z *SZone) Refresh() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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