aliyun

package
v2.3.20181123+incompat... Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLOUD_PROVIDER_ALIYUN    = models.CLOUD_PROVIDER_ALIYUN
	CLOUD_PROVIDER_ALIYUN_CN = "阿里云"

	ALIYUN_DEFAULT_REGION = "cn-hangzhou"

	ALIYUN_API_VERSION = "2014-05-26"

	ALIYUN_BSS_API_VERSION = "2017-12-14"

	ALIYUN_RAM_API_VERSION = "2015-05-01"
)
View Source
const (
	InternetChargeByTraffic   = TInternetChargeType("PayByTraffic")
	InternetChargeByBandwidth = TInternetChargeType("PayByBandwidth")
)
View Source
const (
	EIP_STATUS_ASSOCIATING   = "Associating"
	EIP_STATUS_UNASSOCIATING = "Unassociating"
	EIP_STATUS_INUSE         = "InUse"
	EIP_STATUS_AVAILABLE     = "Available"

	EIP_OPERATION_LOCK_FINANCIAL = "financial"
	EIP_OPERATION_LOCK_SECURITY  = "security"

	EIP_INSTANCE_TYPE_ECS   = "EcsInstance" // (默认值):VPC类型的ECS实例
	EIP_INTANNCE_TYPE_SLB   = "SlbInstance" // :VPC类型的SLB实例
	EIP_INSTANCE_TYPE_NAT   = "Nat"         // :NAT网关
	EIP_INSTANCE_TYPE_HAVIP = "HaVip"       // :HAVIP
)
View Source
const (
	InstanceStatusStopped  = "Stopped"
	InstanceStatusRunning  = "Running"
	InstanceStatusStopping = "Stopping"
	InstanceStatusStarting = "Starting"
)
View Source
const (
	AliyunECSImageImportRole         = "AliyunECSImageImportDefaultRole"
	AliyunECSImageImportRoleDocument = `` /* 143-byte string literal not displayed */

	AliyunECSImageImportRolePolicyType     = "System"
	AliyunECSImageImportRolePolicy         = "AliyunECSImageImportRolePolicy"
	AliyunECSImageImportRolePolicyDocument = `` /* 133-byte string literal not displayed */

)
View Source
const (
	AliyunECSImageExportRole         = "AliyunECSImageExportDefaultRole"
	AliyunECSImageExportRoleDocument = `` /* 214-byte string literal not displayed */

	AliyunECSImageExportRolePolicyType     = "System"
	AliyunECSImageExportRolePolicy         = "AliyunECSImageExportRolePolicy"
	AliyunECSImageExportRolePolicyDocument = `` /* 352-byte string literal not displayed */

)
View Source
const (
	SnapshotStatusAccomplished SnapshotStatusType = "accomplished"
	SnapshotStatusProgress     SnapshotStatusType = "progressing"
	SnapshotStatusFailed       SnapshotStatusType = "failed"

	SnapshotTypeSystem string = "System"
	SnapshotTypeData   string = "Data"
)
View Source
const (
	ImportImageTask = TaskActionType("ImportImage")
	ExportImageTask = TaskActionType("ExportImage")
)
View Source
const (
	VpcAvailable = "Available"
	VpcPending   = "Pending"
)
View Source
const (
	VSwitchPending   = "Pending"
	VSwitchAvailable = "Available"
)

Variables

View Source
var LatitudeAndLongitude = map[string]map[string]float32{
	"cn-qingdao":     {"latitude": 36.067108, "longitude": 120.382607},
	"cn-beijing":     {"latitude": 39.904202, "longitude": 116.407394},
	"cn-zhangjiakou": {"latitude": 40.767544, "longitude": 114.886337},
	"cn-huhehaote":   {"latitude": 40.842358, "longitude": 111.749992},
	"cn-hangzhou":    {"latitude": 30.274084, "longitude": 120.155067},
	"cn-shanghai":    {"latitude": 31.230391, "longitude": 121.473701},
	"cn-shenzhen":    {"latitude": 22.543097, "longitude": 114.057861},
	"cn-hongkong":    {"latitude": 22.396427, "longitude": 114.109497},
	"ap-northeast-1": {"latitude": 35.709026, "longitude": 139.731995},
	"ap-southeast-1": {"latitude": 1.352083, "longitude": 103.819839},
	"ap-southeast-2": {"latitude": -33.868820, "longitude": 151.209290},
	"ap-southeast-3": {"latitude": 3.139003, "longitude": 101.686852},
	"ap-southeast-5": {"latitude": -6.175110, "longitude": 106.865036},
	"ap-south-1":     {"latitude": 19.075983, "longitude": 72.877655},
	"us-east-1":      {"latitude": 37.431572, "longitude": -78.656891},
	"us-west-1":      {"latitude": 37.387474, "longitude": -122.057541},
	"eu-west-1":      {"latitude": 51.507351, "longitude": -0.127758},
	"me-east-1":      {"latitude": 25.204849, "longitude": 55.270782},
	"eu-central-1":   {"latitude": 50.110924, "longitude": 8.682127},
}

Functions

This section is empty.

Types

type ImageExportTask

type ImageExportTask struct {
	ImageId  string
	RegionId string
	// RequestId string
	TaskId string
}

type ImageImportTask

type ImageImportTask struct {
	ImageId  string
	RegionId string
	// RequestId string
	TaskId string
}

type ImageOwnerType

type ImageOwnerType string
const (
	ImageOwnerSystem      ImageOwnerType = "system"
	ImageOwnerSelf        ImageOwnerType = "self"
	ImageOwnerOthers      ImageOwnerType = "others"
	ImageOwnerMarketplace ImageOwnerType = "marketplace"
)

type ImageStatusType

type ImageStatusType string
const (
	ImageStatusCreating     ImageStatusType = "Creating"
	ImageStatusAvailable    ImageStatusType = "Available"
	ImageStatusUnAvailable  ImageStatusType = "UnAvailable"
	ImageStatusCreateFailed ImageStatusType = "CreateFailed"
)

type ImageUsageType

type ImageUsageType string
const (
	ImageUsageInstance ImageUsageType = "instance"
	ImageUsageNone     ImageUsageType = "none"
)

type InstanceChargeType

type InstanceChargeType string
const (
	PrePaidInstanceChargeType  InstanceChargeType = "PrePaid"
	PostPaidInstanceChargeType InstanceChargeType = "PostPaid"
	DefaultInstanceChargeType                     = PostPaidInstanceChargeType
)

type OssProgressListener

type OssProgressListener struct {
}

定义进度条监听器。

func (*OssProgressListener) ProgressChanged

func (listener *OssProgressListener) ProgressChanged(event *oss.ProgressEvent)

定义进度变更事件处理函数。

type PermissionSet

type PermissionSet []SPermission

func (PermissionSet) Len

func (v PermissionSet) Len() int

func (PermissionSet) Less

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

func (PermissionSet) Swap

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

type SAccountBalance

type SAccountBalance struct {
	AvailableAmount     float64
	AvailableCashAmount float64
	CreditAmount        float64
	MybankCreditAmount  float64
	Currency            string
}

type SAliyunClient

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

func NewAliyunClient

func NewAliyunClient(providerId string, providerName string, accessKey string, secret string) (*SAliyunClient, error)

func (*SAliyunClient) DeletePolicy

func (self *SAliyunClient) DeletePolicy(policyType string, policyName string) error

func (*SAliyunClient) DeleteRole

func (self *SAliyunClient) DeleteRole(roleName string) error

func (*SAliyunClient) EnableImageExport

func (self *SAliyunClient) EnableImageExport() error

func (*SAliyunClient) EnableImageImport

func (self *SAliyunClient) EnableImageImport() error

func (*SAliyunClient) GetIHostById

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

func (*SAliyunClient) GetIRegionById

func (self *SAliyunClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)

func (*SAliyunClient) GetIRegions

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

func (*SAliyunClient) GetIStorageById

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

func (*SAliyunClient) GetIStoragecacheById

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

func (*SAliyunClient) GetIVpcById

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

func (*SAliyunClient) GetPolicy

func (self *SAliyunClient) GetPolicy(policyType string, policyName string) (*SPolicy, error)

func (*SAliyunClient) GetRegion

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

func (*SAliyunClient) GetRegions

func (self *SAliyunClient) GetRegions() []SRegion

func (*SAliyunClient) GetRole

func (self *SAliyunClient) GetRole(roleName string) (*SRole, error)

func (*SAliyunClient) GetSubAccounts

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

func (*SAliyunClient) ListPolicies

func (self *SAliyunClient) ListPolicies(policyType string, role string) ([]SPolicy, error)

func (*SAliyunClient) ListRoles

func (self *SAliyunClient) ListRoles() ([]SRole, error)

func (*SAliyunClient) QueryAccountBalance

func (self *SAliyunClient) QueryAccountBalance() (*SAccountBalance, error)

func (*SAliyunClient) QueryCashCoupons

func (self *SAliyunClient) QueryCashCoupons() ([]SCashCoupon, error)

func (*SAliyunClient) QueryPrepaidCards

func (self *SAliyunClient) QueryPrepaidCards() ([]SPrepaidCard, error)

func (*SAliyunClient) UpdateAccount

func (self *SAliyunClient) UpdateAccount(accessKey, secret string) error

type SCashCoupon

type SCashCoupon struct {
	ApplicableProducts  string
	ApplicableScenarios string
	Balance             float64
	CashCouponId        string
	CashCouponNo        string
	EffectiveTime       time.Time
	ExpiryTime          time.Time
	GrantedTime         time.Time
	NominalValue        float64
	Status              string
}

type SDedicatedHostAttribute

type SDedicatedHostAttribute struct {
	DedicatedHostId   string
	DedicatedHostName string
}

type SDedicatedHostGenerations

type SDedicatedHostGenerations struct {
	DedicatedHostGeneration []string
}

type SDedicatedHostTypes

type SDedicatedHostTypes struct {
	DedicatedHostType []string
}

type SDisk

type SDisk struct {
	AttachedTime                  time.Time
	AutoSnapshotPolicyId          string
	Category                      string
	CreationTime                  time.Time
	DeleteAutoSnapshot            bool
	DeleteWithInstance            bool
	Description                   string
	DetachedTime                  time.Time
	Device                        string
	DiskChargeType                InstanceChargeType
	DiskId                        string
	DiskName                      string
	EnableAutoSnapshot            bool
	EnableAutomatedSnapshotPolicy bool
	Encrypted                     bool
	ExpiredTime                   time.Time
	ImageId                       string
	InstanceId                    string
	MountInstances                SMountInstances
	OperationLocks                SOperationLocks
	Portable                      bool
	ProductCode                   string
	RegionId                      string
	ResourceGroupId               string
	Size                          int
	SourceSnapshotId              string
	Status                        string
	Tags                          STags
	Type                          string
	ZoneId                        string
	// contains filtered or unexported fields
}

func (*SDisk) CreateISnapshot

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

func (*SDisk) Delete

func (self *SDisk) Delete() error

func (*SDisk) GetBillingType

func (self *SDisk) GetBillingType() 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) GetExpiredAt

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

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) GetIStorge

func (self *SDisk) GetIStorge() cloudprovider.ICloudStorage

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) GetMetadata

func (self *SDisk) GetMetadata() *jsonutils.JSONDict

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) IsEmulated

func (self *SDisk) IsEmulated() bool

func (*SDisk) Refresh

func (self *SDisk) Refresh() error

func (*SDisk) Reset

func (self *SDisk) Reset(snapshotId string) error

func (*SDisk) Resize

func (self *SDisk) Resize(size int64) error

func (*SDisk) ResizeDisk

func (self *SDisk) ResizeDisk(newSize int64) error

type SDiskCategories

type SDiskCategories struct {
	DiskCategories []string
}

type SEipAddress

type SEipAddress struct {
	AllocationId string

	InternetChargeType string

	IpAddress string
	Status    string

	InstanceType string
	InstanceId   string
	Bandwidth    int /* Mbps */

	AllocationTime time.Time

	OperationLocks string
	// contains filtered or unexported fields
}

func (*SEipAddress) Associate

func (self *SEipAddress) Associate(instanceId string) error

func (*SEipAddress) ChangeBandwidth

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

func (*SEipAddress) Delete

func (self *SEipAddress) Delete() error

func (*SEipAddress) Dissociate

func (self *SEipAddress) Dissociate() error

func (*SEipAddress) GetAssociationExternalId

func (self *SEipAddress) GetAssociationExternalId() string

func (*SEipAddress) GetAssociationType

func (self *SEipAddress) GetAssociationType() string

func (*SEipAddress) GetBandwidth

func (self *SEipAddress) GetBandwidth() int

func (*SEipAddress) GetGlobalId

func (self *SEipAddress) GetGlobalId() string

func (*SEipAddress) GetId

func (self *SEipAddress) GetId() string

func (*SEipAddress) GetInternetChargeType

func (self *SEipAddress) GetInternetChargeType() string

func (*SEipAddress) GetIpAddr

func (self *SEipAddress) GetIpAddr() string

func (*SEipAddress) GetManagerId

func (self *SEipAddress) GetManagerId() string

func (*SEipAddress) GetMetadata

func (self *SEipAddress) GetMetadata() *jsonutils.JSONDict

func (*SEipAddress) GetMode

func (self *SEipAddress) GetMode() string

func (*SEipAddress) GetName

func (self *SEipAddress) GetName() string

func (*SEipAddress) GetStatus

func (self *SEipAddress) GetStatus() string

func (*SEipAddress) IsEmulated

func (self *SEipAddress) IsEmulated() bool

func (*SEipAddress) Refresh

func (self *SEipAddress) Refresh() error

type SHost

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

func (*SHost) CreateVM

func (self *SHost) CreateVM(name string, imgId string, sysDiskSize int, cpu int, memMB int,
	vswitchId string, ipAddr string, desc string, passwd string,
	storageType string, diskSizes []int, publicKey string, secgroupId string, userData string) (cloudprovider.ICloudVM, error)

func (*SHost) GetAccessIp

func (self *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (self *SHost) GetAccessMac() string

func (*SHost) GetCpuCount

func (self *SHost) GetCpuCount() int8

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) 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(gid 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) GetInstanceById

func (self *SHost) GetInstanceById(instanceId string) (*SInstance, error)

func (*SHost) GetManagerId

func (self *SHost) GetManagerId() string

func (*SHost) GetMemSizeMB

func (self *SHost) GetMemSizeMB() int

func (*SHost) GetMetadata

func (self *SHost) GetMetadata() *jsonutils.JSONDict

func (*SHost) GetName

func (self *SHost) GetName() string

func (*SHost) GetNodeCount

func (self *SHost) GetNodeCount() int8

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) IsEmulated

func (self *SHost) IsEmulated() bool

func (*SHost) Refresh

func (self *SHost) Refresh() error

func (*SHost) VMGlobalId2Id

func (self *SHost) VMGlobalId2Id(gid string) string

type SImage

type SImage struct {
	Architecture         string
	CreationTime         time.Time
	Description          string
	ImageId              string
	ImageName            string
	OSName               string
	OSType               string
	ImageOwnerAlias      ImageOwnerType
	IsSupportCloudinit   bool
	IsSupportIoOptimized bool
	Platform             string
	Size                 int
	Status               ImageStatusType
	Usage                string
	// contains filtered or unexported fields
}

func (*SImage) Delete

func (self *SImage) Delete() error

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) GetMetadata

func (self *SImage) GetMetadata() *jsonutils.JSONDict

func (*SImage) GetName

func (self *SImage) GetName() string

func (*SImage) GetStatus

func (self *SImage) GetStatus() string

func (*SImage) IsEmulated

func (self *SImage) IsEmulated() bool

func (*SImage) Refresh

func (self *SImage) Refresh() error

type SInstance

type SInstance struct {
	AutoReleaseTime         string
	ClusterId               string
	Cpu                     int8
	CreationTime            time.Time
	DedicatedHostAttribute  SDedicatedHostAttribute
	Description             string
	DeviceAvailable         bool
	EipAddress              SEipAddress
	ExpiredTime             time.Time
	GPUAmount               int
	GPUSpec                 string
	HostName                string
	ImageId                 string
	InnerIpAddress          SIpAddress
	InstanceChargeType      InstanceChargeType
	InstanceId              string
	InstanceName            string
	InstanceNetworkType     string
	InstanceType            string
	InstanceTypeFamily      string
	InternetChargeType      string
	InternetMaxBandwidthIn  int
	InternetMaxBandwidthOut int
	IoOptimized             bool
	KeyPairName             string
	Memory                  int
	NetworkInterfaces       SNetworkInterfaces
	OSName                  string
	OSType                  string
	OperationLocks          SOperationLocks
	PublicIpAddress         SIpAddress
	Recyclable              bool
	RegionId                string
	ResourceGroupId         string
	SaleCycle               string
	SecurityGroupIds        SSecurityGroupIds
	SerialNumber            string
	SpotPriceLimit          string
	SpotStrategy            string
	StartTime               time.Time
	Status                  string
	StoppedMode             string
	VlanId                  string
	VpcAttributes           SVpcAttributes
	ZoneId                  string
	// contains filtered or unexported fields
}

func (*SInstance) AttachDisk

func (self *SInstance) AttachDisk(diskId string) error

func (*SInstance) ChangeConfig

func (self *SInstance) ChangeConfig(instanceId string, ncpu int, vmem int) error

func (*SInstance) DeleteVM

func (self *SInstance) DeleteVM() error

func (*SInstance) DeployVM

func (self *SInstance) DeployVM(name string, password string, publicKey string, deleteKeypair bool, description string) error

func (*SInstance) DetachDisk

func (self *SInstance) DetachDisk(diskId string) error

func (*SInstance) GetBillingType

func (self *SInstance) GetBillingType() string

func (*SInstance) GetBios

func (self *SInstance) GetBios() string

func (*SInstance) GetBootOrder

func (self *SInstance) GetBootOrder() string

func (*SInstance) GetCreateTime

func (self *SInstance) GetCreateTime() time.Time

func (*SInstance) GetExpiredAt

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

func (*SInstance) GetGlobalId

func (self *SInstance) GetGlobalId() 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) GetMachine

func (self *SInstance) GetMachine() string

func (*SInstance) GetMetadata

func (self *SInstance) GetMetadata() *jsonutils.JSONDict

func (*SInstance) GetName

func (self *SInstance) GetName() string

func (*SInstance) GetOSName

func (self *SInstance) GetOSName() string

func (*SInstance) GetOSType

func (self *SInstance) GetOSType() string

func (*SInstance) GetStatus

func (self *SInstance) GetStatus() string

func (*SInstance) GetVNCInfo

func (self *SInstance) GetVNCInfo() (jsonutils.JSONObject, error)

func (*SInstance) GetVcpuCount

func (self *SInstance) GetVcpuCount() int8

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) IsEmulated

func (self *SInstance) IsEmulated() bool

func (*SInstance) RebuildRoot

func (self *SInstance) RebuildRoot(imageId string, passwd string, publicKey string, sysSizeGB int) (string, error)

func (*SInstance) Refresh

func (self *SInstance) Refresh() error

func (*SInstance) StartVM

func (self *SInstance) StartVM() error

func (*SInstance) StopVM

func (self *SInstance) StopVM(isForce bool) error

func (*SInstance) SyncSecurityGroup

func (self *SInstance) SyncSecurityGroup(secgroupId string, name string, rules []secrules.SecurityRule) error

func (*SInstance) UpdateUserData

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

func (*SInstance) UpdateVM

func (self *SInstance) UpdateVM(name string) error

type SInstanceNic

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

func (*SInstanceNic) GetDriver

func (self *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetwork

func (self *SInstanceNic) GetINetwork() cloudprovider.ICloudNetwork

func (*SInstanceNic) GetIP

func (self *SInstanceNic) GetIP() string

func (*SInstanceNic) GetMAC

func (self *SInstanceNic) GetMAC() string

type SInstanceType

type SInstanceType struct {
	CpuCoreCount         int
	MemorySize           float32
	EniQuantity          int // 实例规格支持网卡数量
	GPUAmount            int
	GPUSpec              string
	InstanceTypeFamily   string
	InstanceTypeId       string
	LocalStorageCategory string
	LocalStorageAmount   int
	LocalStorageCapacity int64
	InstanceBandwidthRx  int
	InstanceBandwidthTx  int
	InstancePpsRx        int
	InstancePpsTx        int
}

type SInstanceTypes

type SInstanceTypes struct {
	InstanceTypes []string
}

type SIpAddress

type SIpAddress struct {
	IpAddress []string
}

type SKeypair

type SKeypair struct {
	KeyPairFingerPrint string
	KeyPairName        string
}

type SMountInstances

type SMountInstances struct {
	MountInstance []string
}

type SNetworkInterface

type SNetworkInterface struct {
	MacAddress         string
	NetworkInterfaceId string
	PrimaryIpAddress   string
}

type SNetworkInterfaces

type SNetworkInterfaces struct {
	NetworkInterface []SNetworkInterface
}

type SNextHops

type SNextHops struct {
	NextHop []string
}

type SOperationLocks

type SOperationLocks struct {
	LockReason []string
}

type SPermission

type SPermission struct {
	CreateTime              time.Time
	Description             string
	DestCidrIp              string
	DestGroupId             string
	DestGroupName           string
	DestGroupOwnerAccount   string
	Direction               string
	IpProtocol              string
	NicType                 SecurityGroupPermissionNicType
	Policy                  string
	PortRange               string
	Priority                int
	SourceCidrIp            string
	SourceGroupId           string
	SourceGroupName         string
	SourceGroupOwnerAccount string
}

func (*SPermission) String

func (self *SPermission) String() string

type SPermissions

type SPermissions struct {
	Permission []SPermission
}

type SPolicy

type SPolicy struct {
	AttachmentCount int
	CreateDate      time.Time
	UpdateDate      time.Time
	DefaultVersion  string
	Description     string
	PolicyName      string
	PolicyType      string
}

type SPrepaidCard

type SPrepaidCard struct {
	PrepaidCardId       string
	PrepaidCardNo       string
	GrantedTime         time.Time
	EffectiveTime       time.Time
	ExpiryTime          time.Time
	NominalValue        float64
	Balance             float64
	ApplicableProducts  string
	ApplicableScenarios string
}

type SRegion

type SRegion struct {
	RegionId  string
	LocalName string
	// contains filtered or unexported fields
}

func (*SRegion) AllocateEIP

func (region *SRegion) AllocateEIP(bwMbps int, chargeType TInternetChargeType) (*SEipAddress, error)

func (*SRegion) AssociateEip

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

func (*SRegion) AttachDisk

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

func (*SRegion) AttachKeypair

func (self *SRegion) AttachKeypair(instanceId string, name string) error

func (*SRegion) ChangeVMConfig

func (self *SRegion) ChangeVMConfig(zoneId string, instanceId string, ncpu int, vmem int, disks []*SDisk) error

func (*SRegion) CheckBucket

func (self *SRegion) CheckBucket(bucketName string) (*oss.Bucket, error)

func (*SRegion) CreateDisk

func (self *SRegion) CreateDisk(zoneId string, category string, name string, sizeGb int, desc string) (string, error)

func (*SRegion) CreateEIP

func (region *SRegion) CreateEIP(name string, bwMbps int, chargeType string) (cloudprovider.ICloudEIP, error)

func (*SRegion) CreateIVpc

func (self *SRegion) CreateIVpc(name string, desc string, cidr string) (cloudprovider.ICloudVpc, error)

func (*SRegion) CreateImage

func (self *SRegion) CreateImage(snapshoutId, imageName, imageDesc string) (string, error)

func (*SRegion) CreateInstance

func (self *SRegion) CreateInstance(name string, imageId string, instanceType string, securityGroupId string,
	zoneId string, desc string, passwd string, disks []SDisk, vSwitchId string, ipAddr string,
	keypair string, userData string) (string, error)

func (*SRegion) CreateInstanceSimple

func (self *SRegion) CreateInstanceSimple(name string, imgId string, cpu int, memGB int, storageType string, dataDiskSizesGB []int, vswitchId string, passwd string, publicKey string) (*SInstance, error)

func (*SRegion) CreateSnapshot

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

func (*SRegion) DeallocateEIP

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

func (*SRegion) DeleteDisk

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

func (*SRegion) DeleteImage

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

func (*SRegion) DeleteSnapshot

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

func (*SRegion) DeleteVM

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

func (*SRegion) DeleteVpc

func (self *SRegion) DeleteVpc(vpcId string) error

func (*SRegion) DeployVM

func (self *SRegion) DeployVM(instanceId string, name string, password string, keypairName string, deleteKeypair bool, description string) error

func (*SRegion) DetachDisk

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

func (*SRegion) DetachKeyPair

func (self *SRegion) DetachKeyPair(instanceId string, name string) error

func (*SRegion) DissociateEip

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

func (*SRegion) ExportImage

func (self *SRegion) ExportImage(imageId string, bucket *oss.Bucket) (*ImageExportTask, error)

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SAliyunClient

func (*SRegion) GetDisks

func (self *SRegion) GetDisks(instanceId string, zoneId string, category string, diskIds []string, offset int, limit int) ([]SDisk, int, error)

func (*SRegion) GetEip

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

func (*SRegion) GetEips

func (region *SRegion) GetEips(eipId string, offset int, limit int) ([]SEipAddress, int, error)

func (*SRegion) GetGlobalId

func (self *SRegion) GetGlobalId() string

func (*SRegion) GetIEipById

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

func (*SRegion) GetIEips

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

func (*SRegion) GetIHostById

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

func (*SRegion) GetISnapshotById

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

func (*SRegion) GetISnapshots

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

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) 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) GetImage

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

func (*SRegion) GetImageByName

func (self *SRegion) GetImageByName(name string) (*SImage, error)

func (*SRegion) GetImageStatus

func (self *SRegion) GetImageStatus(imageId string) (ImageStatusType, error)

func (*SRegion) GetImages

func (self *SRegion) GetImages(status ImageStatusType, owner ImageOwnerType, imageId []string, name string, offset int, limit int) ([]SImage, int, error)

func (*SRegion) GetInstance

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

func (*SRegion) GetInstanceStatus

func (self *SRegion) GetInstanceStatus(instanceId string) (string, error)

func (*SRegion) GetInstanceTypes

func (self *SRegion) GetInstanceTypes() ([]SInstanceType, error)

func (*SRegion) GetInstanceVNCUrl

func (self *SRegion) GetInstanceVNCUrl(instanceId string) (string, error)

func (*SRegion) GetInstances

func (self *SRegion) GetInstances(zoneId string, ids []string, offset int, limit int) ([]SInstance, int, error)

func (*SRegion) GetKeypairs

func (self *SRegion) GetKeypairs(finger string, name string, offset int, limit int) ([]SKeypair, int, error)

func (*SRegion) GetLatitude

func (self *SRegion) GetLatitude() float32

func (*SRegion) GetLongitude

func (self *SRegion) GetLongitude() float32

func (*SRegion) GetMatchInstanceTypes

func (self *SRegion) GetMatchInstanceTypes(cpu int, memMB int, gpu int, zoneId string) ([]SInstanceType, error)

func (*SRegion) GetMetadata

func (self *SRegion) GetMetadata() *jsonutils.JSONDict

func (*SRegion) GetName

func (self *SRegion) GetName() string

func (*SRegion) GetOSSInternalDomain

func (self *SRegion) GetOSSInternalDomain() string

func (*SRegion) GetOssClient

func (self *SRegion) GetOssClient() (*oss.Client, error)

func (*SRegion) GetProvider

func (self *SRegion) GetProvider() string

func (*SRegion) GetRouteTables

func (self *SRegion) GetRouteTables(ids []string, offset int, limit int) ([]SRouteTable, int, error)

func (*SRegion) GetSecurityGroupDetails

func (self *SRegion) GetSecurityGroupDetails(secGroupId string) (*SSecurityGroup, error)

func (*SRegion) GetSecurityGroups

func (self *SRegion) GetSecurityGroups(vpcId string, offset int, limit int) ([]SSecurityGroup, int, error)

func (*SRegion) GetSnapshots

func (self *SRegion) GetSnapshots(instanceId string, diskId string, snapshotName string, snapshotIds []string, offset int, limit int) ([]SSnapshot, int, error)

func (*SRegion) GetStatus

func (self *SRegion) GetStatus() string

func (*SRegion) GetTaskStatus

func (self *SRegion) GetTaskStatus(action TaskActionType, taskId string) (string, error)

func (*SRegion) GetTasks

func (self *SRegion) GetTasks(action TaskActionType, taskId []string, offset int, limit int) ([]STask, int, error)

func (*SRegion) GetVRouters

func (self *SRegion) GetVRouters(offset int, limit int) ([]SVRouter, int, error)

func (*SRegion) GetVSwitches

func (self *SRegion) GetVSwitches(ids []string, vpcId string, offset int, limit int) ([]SVSwitch, int, error)

func (*SRegion) GetVpcs

func (self *SRegion) GetVpcs(vpcId []string, offset int, limit int) ([]SVpc, int, error)

func (*SRegion) ImportImage

func (self *SRegion) ImportImage(name string, osArch string, osType string, osDist string, bucket string, key string) (*ImageImportTask, error)

func (*SRegion) ImportKeypair

func (self *SRegion) ImportKeypair(name string, pubKey string) (*SKeypair, error)

func (*SRegion) IsEmulated

func (self *SRegion) IsEmulated() bool

func (*SRegion) ModifyInstanceVNCUrlPassword

func (self *SRegion) ModifyInstanceVNCUrlPassword(instanceId string, passwd string) error

func (*SRegion) Refresh

func (self *SRegion) Refresh() error

func (*SRegion) ReplaceSystemDisk

func (self *SRegion) ReplaceSystemDisk(instanceId string, imageId string, passwd string, keypairName string, sysDiskSizeGB int) (string, error)

func (*SRegion) StartVM

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

func (*SRegion) StopVM

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

func (*SRegion) UpdateEipBandwidth

func (region *SRegion) UpdateEipBandwidth(eipId string, bw int) error

func (*SRegion) UpdateInstancePassword

func (self *SRegion) UpdateInstancePassword(instId string, passwd string) error

func (*SRegion) UpdateVM

func (self *SRegion) UpdateVM(instanceId string, hostname string) error

type SResourceCreation

type SResourceCreation struct {
	ResourceTypes []string
}

type SResources

type SResources struct {
	ResourcesInfo []SResourcesInfo
}

type SResourcesInfo

type SResourcesInfo struct {
	DataDiskCategories   SSupportedDataDiskCategories
	InstanceGenerations  SSupportedInstanceGenerations
	InstanceTypeFamilies SSupportedInstanceTypeFamilies
	InstanceTypes        SSupportedInstanceTypes
	IoOptimized          bool
	NetworkTypes         SSupportedNetworkTypes
	SystemDiskCategories SSupportedSystemDiskCategories
}

type SRole

type SRole struct {
	Arn         string
	CreateDate  time.Time
	Description string
	RoleId      string
	RoleName    string

	AssumeRolePolicyDocument string
}

type SRouteEntry

type SRouteEntry struct {
	DestinationCidrBlock string
	InstanceId           string
	NextHopType          string
	NextHops             SNextHops
	RouteTableId         string
	Status               string
	Type                 string
}

type SRouteEntrys

type SRouteEntrys struct {
	RouteEntry []SRouteEntry
}

type SRouteTable

type SRouteTable struct {
	CreationTime   time.Time
	RouteEntrys    SRouteEntrys
	RouteTableId   string
	RouteTableType string
	VRouterId      string
}

type SRouteTableIds

type SRouteTableIds struct {
	RouteTableId []string
}

type SSecurityGroup

type SSecurityGroup struct {
	CreationTime      time.Time
	Description       string
	SecurityGroupId   string
	SecurityGroupName string
	VpcId             string
	InnerAccessPolicy string
	Permissions       SPermissions
	RegionId          string
	Tags              Tags
	// contains filtered or unexported fields
}

func (*SSecurityGroup) GetDescription

func (self *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (self *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (self *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetMetadata

func (self *SSecurityGroup) GetMetadata() *jsonutils.JSONDict

func (*SSecurityGroup) GetName

func (self *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetRules

func (self *SSecurityGroup) GetRules() ([]secrules.SecurityRule, error)

func (*SSecurityGroup) GetStatus

func (self *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) IsEmulated

func (self *SSecurityGroup) IsEmulated() bool

func (*SSecurityGroup) Refresh

func (self *SSecurityGroup) Refresh() error

type SSecurityGroupIds

type SSecurityGroupIds struct {
	SecurityGroupId []string
}

type SSnapshot

type SSnapshot struct {
	Progress       string
	SnapshotId     string
	SnapshotName   string
	SourceDiskId   string
	SourceDiskSize int32
	SourceDiskType string
	Status         SnapshotStatusType
	Usage          string
	// contains filtered or unexported fields
}

func (*SSnapshot) Delete

func (self *SSnapshot) Delete() error

func (*SSnapshot) GetDiskId

func (self *SSnapshot) GetDiskId() string

func (*SSnapshot) GetDiskType

func (self *SSnapshot) GetDiskType() string

func (*SSnapshot) GetGlobalId

func (self *SSnapshot) GetGlobalId() string

func (*SSnapshot) GetId

func (self *SSnapshot) GetId() string

func (*SSnapshot) GetMetadata

func (self *SSnapshot) GetMetadata() *jsonutils.JSONDict

func (*SSnapshot) GetName

func (self *SSnapshot) GetName() string

func (*SSnapshot) GetSize

func (self *SSnapshot) GetSize() int32

func (*SSnapshot) GetStatus

func (self *SSnapshot) GetStatus() string

func (*SSnapshot) IsEmulated

func (self *SSnapshot) IsEmulated() bool

func (*SSnapshot) Refresh

func (self *SSnapshot) Refresh() error

type SStorage

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

func (*SStorage) CreateIDisk

func (self *SStorage) CreateIDisk(name string, sizeGb int, desc string) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetCapacityMB

func (self *SStorage) GetCapacityMB() int

func (*SStorage) GetEnabled

func (self *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (self *SStorage) GetGlobalId() string

func (*SStorage) GetIDisk

func (self *SStorage) GetIDisk(idStr 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) GetManagerId

func (self *SStorage) GetManagerId() string

func (*SStorage) GetMediumType

func (self *SStorage) GetMediumType() string

func (*SStorage) GetMetadata

func (self *SStorage) GetMetadata() *jsonutils.JSONDict

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) IsEmulated

func (self *SStorage) IsEmulated() bool

func (*SStorage) Refresh

func (self *SStorage) Refresh() error

type SStoragecache

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

func (*SStoragecache) CreateIImage

func (self *SStoragecache) CreateIImage(snapshoutId, 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) GetIImages

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

func (*SStoragecache) GetId

func (self *SStoragecache) GetId() string

func (*SStoragecache) GetManagerId

func (self *SStoragecache) GetManagerId() string

func (*SStoragecache) GetMetadata

func (self *SStoragecache) GetMetadata() *jsonutils.JSONDict

func (*SStoragecache) GetName

func (self *SStoragecache) GetName() string

func (*SStoragecache) GetStatus

func (self *SStoragecache) GetStatus() string

func (*SStoragecache) IsEmulated

func (self *SStoragecache) IsEmulated() bool

func (*SStoragecache) Refresh

func (self *SStoragecache) Refresh() error

func (*SStoragecache) UploadImage

func (self *SStoragecache) UploadImage(userCred mcclient.TokenCredential, imageId string, osArch, osType, osDist string, extId string, isForce bool) (string, error)

type SSupportedDataDiskCategories

type SSupportedDataDiskCategories struct {
	SupportedDataDiskCategory []string
}

type SSupportedInstanceGenerations

type SSupportedInstanceGenerations struct {
	SupportedInstanceGeneration []string
}

type SSupportedInstanceTypeFamilies

type SSupportedInstanceTypeFamilies struct {
	SupportedInstanceTypeFamily []string
}

type SSupportedInstanceTypes

type SSupportedInstanceTypes struct {
	SupportedInstanceType []string
}

type SSupportedNetworkTypes

type SSupportedNetworkTypes struct {
	SupportedNetworkCategory []string
}

type SSupportedSystemDiskCategories

type SSupportedSystemDiskCategories struct {
	SupportedSystemDiskCategory []string
}

type STags

type STags struct {
	Tag []string
}

type STask

type STask struct {
	TaskId        string
	TaskStatus    string
	TaskAction    string
	SupportCancel bool
	FinishedTime  time.Time
	CreationTime  time.Time
}

type SUserCIDRs

type SUserCIDRs struct {
	UserCidr []string
}

type SVRouter

type SVRouter struct {
	CreationTime  time.Time
	Description   string
	RegionId      string
	RouteTableIds SRouteTableIds
	VRouterId     string
	VRouterName   string
	VpcId         string
}

type SVSwitch

type SVSwitch struct {
	AvailableIpAddressCount int
	CidrBlock               string
	CreationTime            time.Time
	Description             string
	IsDefault               bool
	Status                  string
	VSwitchId               string
	VSwitchName             string
	VpcId                   string
	ZoneId                  string
	// contains filtered or unexported fields
}

func (*SVSwitch) Delete

func (self *SVSwitch) Delete() error

func (*SVSwitch) GetAllocTimeoutSeconds

func (self *SVSwitch) GetAllocTimeoutSeconds() int

func (*SVSwitch) GetGateway

func (self *SVSwitch) GetGateway() string

func (*SVSwitch) GetGlobalId

func (self *SVSwitch) GetGlobalId() string

func (*SVSwitch) GetIWire

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

func (*SVSwitch) GetId

func (self *SVSwitch) GetId() string

func (*SVSwitch) GetIpEnd

func (self *SVSwitch) GetIpEnd() string

func (*SVSwitch) GetIpMask

func (self *SVSwitch) GetIpMask() int8

func (*SVSwitch) GetIpStart

func (self *SVSwitch) GetIpStart() string

func (*SVSwitch) GetIsPublic

func (self *SVSwitch) GetIsPublic() bool

func (*SVSwitch) GetMetadata

func (self *SVSwitch) GetMetadata() *jsonutils.JSONDict

func (*SVSwitch) GetName

func (self *SVSwitch) GetName() string

func (*SVSwitch) GetServerType

func (self *SVSwitch) GetServerType() string

func (*SVSwitch) GetStatus

func (self *SVSwitch) GetStatus() string

func (*SVSwitch) IsEmulated

func (self *SVSwitch) IsEmulated() bool

func (*SVSwitch) Refresh

func (self *SVSwitch) Refresh() error

type SVSwitchIds

type SVSwitchIds struct {
	VSwitchId []string
}

type SVolumeCategories

type SVolumeCategories struct {
	VolumeCategories []string
}

type SVpc

type SVpc struct {
	CidrBlock    string
	CreationTime time.Time
	Description  string
	IsDefault    bool
	RegionId     string
	Status       string
	UserCidrs    SUserCIDRs
	VRouterId    string
	VSwitchIds   SVSwitchIds
	VpcId        string
	VpcName      string
	// 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) GetISecurityGroups

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

func (*SVpc) GetIWireById

func (self *SVpc) GetIWireById(wireId 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) GetManagerId

func (self *SVpc) GetManagerId() string

func (*SVpc) GetMetadata

func (self *SVpc) GetMetadata() *jsonutils.JSONDict

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

func (*SVpc) Refresh

func (self *SVpc) Refresh() error

func (*SVpc) SyncSecurityGroup

func (self *SVpc) SyncSecurityGroup(secgroupId string, name string, rules []secrules.SecurityRule) (string, error)

type SVpcAttributes

type SVpcAttributes struct {
	NatIpAddress     string
	PrivateIpAddress SIpAddress
	VSwitchId        string
	VpcId            string
}

type SWire

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

func (*SWire) CreateINetwork

func (self *SWire) CreateINetwork(name string, cidr string, desc string) (cloudprovider.ICloudNetwork, error)

func (*SWire) GetBandwidth

func (self *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (self *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

func (self *SWire) GetINetworkById(netid 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) GetMetadata

func (self *SWire) GetMetadata() *jsonutils.JSONDict

func (*SWire) GetName

func (self *SWire) GetName() string

func (*SWire) GetStatus

func (self *SWire) GetStatus() string

func (*SWire) IsEmulated

func (self *SWire) IsEmulated() bool

func (*SWire) Refresh

func (self *SWire) Refresh() error

type SZone

type SZone struct {
	ZoneId                    string
	LocalName                 string
	DedicatedHostGenerations  SDedicatedHostGenerations
	AvailableVolumeCategories SVolumeCategories
	/* 可供创建的具体资源,AvailableResourcesType 组成的数组 */
	AvailableResources SResources
	/* 允许创建的资源类型集合 */
	AvailableResourceCreation SResourceCreation
	/* 允许创建的实例规格类型 */
	AvailableInstanceTypes SInstanceTypes
	/* 支持的磁盘种类集合 */
	AvailableDiskCategories     SDiskCategories
	AvailableDedicatedHostTypes SDedicatedHostTypes
	// contains filtered or unexported fields
}

func (*SZone) GetGlobalId

func (self *SZone) GetGlobalId() string

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) GetIWires

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

func (*SZone) GetId

func (self *SZone) GetId() string

func (*SZone) GetMetadata

func (self *SZone) GetMetadata() *jsonutils.JSONDict

func (*SZone) GetName

func (self *SZone) GetName() string

func (*SZone) GetStatus

func (self *SZone) GetStatus() string

func (*SZone) IsEmulated

func (self *SZone) IsEmulated() bool

func (*SZone) Refresh

func (self *SZone) Refresh() error

type SecurityGroupPermissionNicType

type SecurityGroupPermissionNicType string
const (
	IntranetNicType SecurityGroupPermissionNicType = "intranet"
	InternetNicType SecurityGroupPermissionNicType = "internet"
)

type SnapshotStatusType

type SnapshotStatusType string

type SpotStrategyType

type SpotStrategyType string
const (
	NoSpotStrategy             SpotStrategyType = "NoSpot"
	SpotWithPriceLimitStrategy SpotStrategyType = "SpotWithPriceLimit"
	SpotAsPriceGoStrategy      SpotStrategyType = "SpotAsPriceGo"
	DefaultSpotStrategy                         = NoSpotStrategy
)

type TInternetChargeType

type TInternetChargeType string

type Tag

type Tag struct {
	TagKey   string
	TagValue string
}

type Tags

type Tags struct {
	Tag []Tag
}

type TaskActionType

type TaskActionType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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