Documentation ¶
Index ¶
- Constants
- Variables
- type AddressTemplate
- type AddressTemplateGroup
- type AddressTemplateSpecification
- type DataDisk
- type ImageStatusType
- type InstanceChargeType
- type InternetAccessible
- type LoginSettings
- type Placement
- type QcloudResponse
- type SAccountBalance
- type SDisk
- func (self *SDisk) CreateISnapshot(name, desc string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) Delete() error
- func (self *SDisk) GetBillingType() string
- func (self *SDisk) GetCacheMode() string
- func (self *SDisk) GetDiskFormat() string
- func (self *SDisk) GetDiskSizeMB() int
- func (self *SDisk) GetDiskType() string
- func (self *SDisk) GetDriver() string
- func (self *SDisk) GetExpiredAt() time.Time
- func (self *SDisk) GetFsFormat() string
- func (self *SDisk) GetGlobalId() string
- func (self *SDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetIStorge() cloudprovider.ICloudStorage
- func (self *SDisk) GetId() string
- func (self *SDisk) GetIsAutoDelete() bool
- func (self *SDisk) GetIsNonPersistent() bool
- func (self *SDisk) GetMetadata() *jsonutils.JSONDict
- func (self *SDisk) GetMountpoint() string
- func (self *SDisk) GetName() string
- func (self *SDisk) GetStatus() string
- func (self *SDisk) GetTemplateId() string
- func (self *SDisk) IsEmulated() bool
- func (self *SDisk) Refresh() error
- func (self *SDisk) Reset(snapshotId string) error
- func (self *SDisk) Resize(size int64) error
- type SDiskSet
- type SEipAddress
- func (self *SEipAddress) Associate(instanceId string) error
- func (self *SEipAddress) ChangeBandwidth(bw int) error
- func (self *SEipAddress) Delete() error
- func (self *SEipAddress) Dissociate() error
- func (self *SEipAddress) GetAssociationExternalId() string
- func (self *SEipAddress) GetAssociationType() string
- func (self *SEipAddress) GetBandwidth() int
- func (self *SEipAddress) GetGlobalId() string
- func (self *SEipAddress) GetId() string
- func (self *SEipAddress) GetInternetChargeType() string
- func (self *SEipAddress) GetIpAddr() string
- func (self *SEipAddress) GetManagerId() string
- func (self *SEipAddress) GetMetadata() *jsonutils.JSONDict
- func (self *SEipAddress) GetMode() string
- func (self *SEipAddress) GetName() string
- func (self *SEipAddress) GetStatus() string
- func (self *SEipAddress) IsEmulated() bool
- func (self *SEipAddress) Refresh() error
- type SHost
- func (self *SHost) CreateVM(name string, imgId string, sysDiskSize int, cpu int, memMB int, ...) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetAccessIp() string
- func (self *SHost) GetAccessMac() string
- func (self *SHost) GetCpuCount() int8
- func (self *SHost) GetCpuDesc() string
- func (self *SHost) GetCpuMhz() int
- func (self *SHost) GetEnabled() bool
- func (self *SHost) GetGlobalId() string
- func (self *SHost) GetHostStatus() string
- func (self *SHost) GetHostType() string
- func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIVMById(gid string) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)
- func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SHost) GetId() string
- func (self *SHost) GetInstanceById(instanceId string) (*SInstance, error)
- func (self *SHost) GetManagerId() string
- func (self *SHost) GetMemSizeMB() int
- func (self *SHost) GetMetadata() *jsonutils.JSONDict
- func (self *SHost) GetName() string
- func (self *SHost) GetNodeCount() int8
- func (self *SHost) GetSN() string
- func (self *SHost) GetStatus() string
- func (self *SHost) GetStorageSizeMB() int
- func (self *SHost) GetStorageType() string
- func (self *SHost) GetSysInfo() jsonutils.JSONObject
- func (self *SHost) IsEmulated() bool
- func (self *SHost) Refresh() error
- type SImage
- func (self *SImage) Delete() error
- func (self *SImage) GetGlobalId() string
- func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SImage) GetId() string
- func (self *SImage) GetMetadata() *jsonutils.JSONDict
- func (self *SImage) GetName() string
- func (self *SImage) GetStatus() string
- func (self *SImage) IsEmulated() bool
- func (self *SImage) Refresh() error
- type SInstance
- func (self *SInstance) AttachDisk(diskId string) error
- func (self *SInstance) ChangeConfig(instanceId string, ncpu int, vmem int) error
- func (self *SInstance) DeleteVM() error
- func (self *SInstance) DeployVM(name string, password string, publicKey string, deleteKeypair bool, ...) error
- func (self *SInstance) DetachDisk(diskId string) error
- func (self *SInstance) GetBillingType() string
- func (self *SInstance) GetBios() string
- func (self *SInstance) GetBootOrder() string
- func (self *SInstance) GetCreateTime() time.Time
- func (self *SInstance) GetExpiredAt() time.Time
- func (self *SInstance) GetGlobalId() string
- func (self *SInstance) GetHypervisor() string
- func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)
- func (self *SInstance) GetIHost() cloudprovider.ICloudHost
- func (self *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)
- func (self *SInstance) GetId() string
- func (self *SInstance) GetMachine() string
- func (self *SInstance) GetMetadata() *jsonutils.JSONDict
- func (self *SInstance) GetName() string
- func (self *SInstance) GetOSName() string
- func (self *SInstance) GetOSType() string
- func (self *SInstance) GetStatus() string
- func (self *SInstance) GetVNCInfo() (jsonutils.JSONObject, error)
- func (self *SInstance) GetVcpuCount() int8
- func (self *SInstance) GetVdi() string
- func (self *SInstance) GetVga() string
- func (self *SInstance) GetVmemSizeMB() int
- func (self *SInstance) IsEmulated() bool
- func (self *SInstance) RebuildRoot(imageId string, passwd string, publicKey string, sysSizeGB int) (string, error)
- func (self *SInstance) Refresh() error
- func (self *SInstance) StartVM() error
- func (self *SInstance) StopVM(isForce bool) error
- func (self *SInstance) SyncSecurityGroup(secgroupId string, name string, rules []secrules.SecurityRule) error
- func (self *SInstance) UpdateUserData(userData string) error
- func (self *SInstance) UpdateVM(name string) error
- type SInstanceNic
- type SInstanceType
- type SKeypair
- type SLocalDisk
- func (self *SLocalDisk) CreateISnapshot(name, desc string) (cloudprovider.ICloudSnapshot, error)
- func (self *SLocalDisk) Delete() error
- func (self *SLocalDisk) GetBillingType() string
- func (self *SLocalDisk) GetCacheMode() string
- func (self *SLocalDisk) GetDiskFormat() string
- func (self *SLocalDisk) GetDiskSizeMB() int
- func (self *SLocalDisk) GetDiskType() string
- func (self *SLocalDisk) GetDriver() string
- func (self *SLocalDisk) GetExpiredAt() time.Time
- func (self *SLocalDisk) GetFsFormat() string
- func (self *SLocalDisk) GetGlobalId() string
- func (self *SLocalDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (self *SLocalDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SLocalDisk) GetIStorge() cloudprovider.ICloudStorage
- func (self *SLocalDisk) GetId() string
- func (self *SLocalDisk) GetIsAutoDelete() bool
- func (self *SLocalDisk) GetIsNonPersistent() bool
- func (self *SLocalDisk) GetMetadata() *jsonutils.JSONDict
- func (self *SLocalDisk) GetMountpoint() string
- func (self *SLocalDisk) GetName() string
- func (self *SLocalDisk) GetStatus() string
- func (self *SLocalDisk) GetTemplateId() string
- func (self *SLocalDisk) IsEmulated() bool
- func (self *SLocalDisk) Refresh() error
- func (self *SLocalDisk) Reset(snapshotId string) error
- func (self *SLocalDisk) Resize(size int64) error
- type SLocalStorage
- func (self *SLocalStorage) CreateIDisk(name string, sizeGb int, desc string) (cloudprovider.ICloudDisk, error)
- func (self *SLocalStorage) GetCapacityMB() int
- func (self *SLocalStorage) GetEnabled() bool
- func (self *SLocalStorage) GetGlobalId() string
- func (self *SLocalStorage) GetIDisk(idStr string) (cloudprovider.ICloudDisk, error)
- func (self *SLocalStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SLocalStorage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SLocalStorage) GetIZone() cloudprovider.ICloudZone
- func (self *SLocalStorage) GetId() string
- func (self *SLocalStorage) GetManagerId() string
- func (self *SLocalStorage) GetMediumType() string
- func (self *SLocalStorage) GetMetadata() *jsonutils.JSONDict
- func (self *SLocalStorage) GetName() string
- func (self *SLocalStorage) GetStatus() string
- func (self *SLocalStorage) GetStorageConf() jsonutils.JSONObject
- func (self *SLocalStorage) GetStorageType() string
- func (self *SLocalStorage) IsEmulated() bool
- func (self *SLocalStorage) Refresh() error
- type SNetwork
- func (self *SNetwork) Delete() error
- func (self *SNetwork) GetAllocTimeoutSeconds() int
- func (self *SNetwork) GetGateway() string
- func (self *SNetwork) GetGlobalId() string
- func (self *SNetwork) GetIWire() cloudprovider.ICloudWire
- func (self *SNetwork) GetId() string
- func (self *SNetwork) GetIpEnd() string
- func (self *SNetwork) GetIpMask() int8
- func (self *SNetwork) GetIpStart() string
- func (self *SNetwork) GetIsPublic() bool
- func (self *SNetwork) GetMetadata() *jsonutils.JSONDict
- func (self *SNetwork) GetName() string
- func (self *SNetwork) GetServerType() string
- func (self *SNetwork) GetStatus() string
- func (self *SNetwork) IsEmulated() bool
- func (self *SNetwork) Refresh() error
- type SQcloudClient
- func (client *SQcloudClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (client *SQcloudClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)
- func (client *SQcloudClient) GetIRegions() []cloudprovider.ICloudRegion
- func (client *SQcloudClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (client *SQcloudClient) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
- func (client *SQcloudClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (client *SQcloudClient) GetRegion(regionId string) *SRegion
- func (client *SQcloudClient) GetRegions() []SRegion
- func (client *SQcloudClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- func (client *SQcloudClient) QueryAccountBalance() (*SAccountBalance, error)
- type SRegion
- func (self *SRegion) AddressGroupList(groupId, groupName string, offset, limit int) ([]AddressTemplateGroup, int, error)
- func (self *SRegion) AddressList(addressId, addressName string, offset, limit int) ([]AddressTemplate, int, error)
- func (region *SRegion) AllocateEIP(name string, bwMbps int, chargeType TInternetChargeType) (*SEipAddress, error)
- func (region *SRegion) AssociateEip(eipId string, instanceId string) error
- func (self *SRegion) AttachDisk(instanceId string, diskId string) error
- func (self *SRegion) AttachKeypair(instanceId string, keypairId string) error
- func (self *SRegion) ChangeVMConfig(zoneId string, instanceId string, ncpu int, vmem int, disks []*SDisk) error
- func (self *SRegion) CreateDisk(zoneId string, category string, name string, sizeGb int, desc string) (string, error)
- func (region *SRegion) CreateEIP(name string, bwMbps int, chargeType string) (cloudprovider.ICloudEIP, error)
- func (self *SRegion) CreateIVpc(name string, desc string, cidr string) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) CreateInstance(name string, imageId string, instanceType string, securityGroupId string, ...) (string, error)
- func (self *SRegion) CreateInstanceSimple(name string, imgId string, cpu int, memGB int, storageType string, ...) (*SInstance, error)
- func (self *SRegion) CreateKeyPair(name string) (*SKeypair, error)
- func (self *SRegion) CreateNetwork(zoneId string, vpcId string, name string, cidr string, desc string) (string, error)
- func (self *SRegion) CreateSecurityGroup(name, description string) (*SSecurityGroup, error)
- func (self *SRegion) CreateSnapshot(diskId, name, desc string) (string, error)
- func (region *SRegion) DeallocateEIP(eipId string) error
- func (self *SRegion) DeleteDisk(diskId string) error
- func (self *SRegion) DeleteImage(imageId string) error
- func (self *SRegion) DeleteNetwork(networkId string) error
- func (self *SRegion) DeleteSecurityGroup(secGroupId string) error
- func (self *SRegion) DeleteSnapshot(snapshotId string) error
- func (self *SRegion) DeleteVM(instanceId string) error
- func (self *SRegion) DeleteVpc(vpcId string) error
- func (self *SRegion) DeployVM(instanceId string, name string, password string, keypairName string, ...) error
- func (self *SRegion) DetachDisk(instanceId string, diskId string) error
- func (self *SRegion) DetachKeyPair(instanceId string, keypairId string) error
- func (region *SRegion) DissociateEip(eipId string) error
- func (self *SRegion) GetClient() *SQcloudClient
- func (self *SRegion) GetCosClient() (*cos.Client, error)
- func (self *SRegion) GetDisk(diskId string) (*SDisk, error)
- func (self *SRegion) GetDisks(instanceId string, zoneId string, category string, diskIds []string, ...) ([]SDisk, int, error)
- func (region *SRegion) GetEip(eipId string) (*SEipAddress, error)
- func (region *SRegion) GetEips(eipId string, offset int, limit int) ([]SEipAddress, int, error)
- func (self *SRegion) GetGlobalId() string
- func (self *SRegion) GetIEipById(eipId string) (cloudprovider.ICloudEIP, error)
- func (self *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)
- func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)
- func (self *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
- func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)
- func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
- func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)
- func (self *SRegion) GetId() string
- func (self *SRegion) GetImage(imageId string) (*SImage, error)
- func (self *SRegion) GetImageByName(name string) (*SImage, error)
- func (self *SRegion) GetImageStatus(imageId string) (ImageStatusType, error)
- func (self *SRegion) GetImages(status string, owner string, imageIds []string, name string, offset int, ...) ([]SImage, int, error)
- func (self *SRegion) GetInstance(instanceId string) (*SInstance, error)
- func (self *SRegion) GetInstanceStatus(instanceId string) (string, error)
- func (self *SRegion) GetInstanceTypes() ([]SInstanceType, error)
- func (self *SRegion) GetInstanceVNCUrl(instanceId string) (string, error)
- func (self *SRegion) GetInstances(zoneId string, ids []string, offset int, limit int) ([]SInstance, int, error)
- func (self *SRegion) GetKeypairs(name string, keyIds []string, offset int, limit int) ([]SKeypair, int, error)
- func (self *SRegion) GetLatitude() float32
- func (self *SRegion) GetLongitude() float32
- func (self *SRegion) GetMatchInstanceTypes(cpu int, memMB int, gpu int, zoneId string) ([]SInstanceType, error)
- func (self *SRegion) GetMetadata() *jsonutils.JSONDict
- func (self *SRegion) GetName() string
- func (self *SRegion) GetNetwork(networkId string) (*SNetwork, error)
- func (self *SRegion) GetNetworks(ids []string, vpcId string, offset int, limit int) ([]SNetwork, int, error)
- func (self *SRegion) GetProvider() string
- func (self *SRegion) GetSecurityGroupDetails(secGroupId string) (*SSecurityGroup, error)
- func (self *SRegion) GetSecurityGroups(vpcId string, offset int, limit int) ([]SSecurityGroup, int, error)
- func (self *SRegion) GetSnapshots(instanceId string, diskId string, snapshotName string, snapshotIds []string, ...) ([]SSnapshot, int, error)
- func (self *SRegion) GetStatus() string
- func (self *SRegion) GetVpcs(vpcIds []string, offset int, limit int) ([]SVpc, int, error)
- func (self *SRegion) ImportImage(name string, osArch string, osType string, osVersion string, imageUrl string) (*SImage, error)
- func (self *SRegion) ImportKeypair(name string, pubKey string) (*SKeypair, error)
- func (self *SRegion) IsEmulated() bool
- func (self *SRegion) Refresh() error
- func (self *SRegion) ReplaceSystemDisk(instanceId string, imageId string, passwd string, keypairName string, ...) error
- func (self *SRegion) ResetDisk(diskId, snapshotId string) error
- func (self *SRegion) ResizeDisk(diskId string, sizeGb int64) error
- func (self *SRegion) StartVM(instanceId string) error
- func (self *SRegion) StopVM(instanceId string, isForce bool) error
- func (region *SRegion) UpdateEipBandwidth(eipId string, bw int) error
- func (self *SRegion) UpdateInstancePassword(instId string, passwd string) error
- func (self *SRegion) UpdateVM(instanceId string, hostname string) error
- type SSecurityGroup
- func (self *SSecurityGroup) GetDescription() string
- func (self *SSecurityGroup) GetGlobalId() string
- func (self *SSecurityGroup) GetId() string
- func (self *SSecurityGroup) GetMetadata() *jsonutils.JSONDict
- func (self *SSecurityGroup) GetName() string
- func (self *SSecurityGroup) GetRules() ([]secrules.SecurityRule, error)
- func (self *SSecurityGroup) GetStatus() string
- func (self *SSecurityGroup) IsEmulated() bool
- func (self *SSecurityGroup) Refresh() error
- type SSnapshot
- func (self *SSnapshot) Delete() error
- func (self *SSnapshot) GetDiskId() string
- func (self *SSnapshot) GetDiskType() string
- func (self *SSnapshot) GetGlobalId() string
- func (self *SSnapshot) GetId() string
- func (self *SSnapshot) GetManagerId() string
- func (self *SSnapshot) GetMetadata() *jsonutils.JSONDict
- func (self *SSnapshot) GetName() string
- func (self *SSnapshot) GetRegionId() string
- func (self *SSnapshot) GetSize() int32
- func (self *SSnapshot) GetStatus() string
- func (self *SSnapshot) IsEmulated() bool
- func (self *SSnapshot) Refresh() error
- type SStorage
- func (self *SStorage) CreateIDisk(name string, sizeGb int, desc string) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetCapacityMB() int
- func (self *SStorage) GetEnabled() bool
- func (self *SStorage) GetGlobalId() string
- func (self *SStorage) GetIDisk(idStr string) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SStorage) GetIZone() cloudprovider.ICloudZone
- func (self *SStorage) GetId() string
- func (self *SStorage) GetManagerId() string
- func (self *SStorage) GetMediumType() string
- func (self *SStorage) GetMetadata() *jsonutils.JSONDict
- func (self *SStorage) GetName() string
- func (self *SStorage) GetStatus() string
- func (self *SStorage) GetStorageConf() jsonutils.JSONObject
- func (self *SStorage) GetStorageType() string
- func (self *SStorage) IsEmulated() bool
- func (self *SStorage) Refresh() error
- type SStoragecache
- func (self *SStoragecache) CreateIImage(snapshoutId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)
- func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)
- func (self *SStoragecache) GetGlobalId() string
- func (self *SStoragecache) GetIImages() ([]cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetId() string
- func (self *SStoragecache) GetManagerId() string
- func (self *SStoragecache) GetMetadata() *jsonutils.JSONDict
- func (self *SStoragecache) GetName() string
- func (self *SStoragecache) GetStatus() string
- func (self *SStoragecache) IsEmulated() bool
- func (self *SStoragecache) Refresh() error
- func (self *SStoragecache) UploadImage(userCred mcclient.TokenCredential, imageId string, ...) (string, error)
- type SVpc
- func (self *SVpc) Delete() error
- func (self *SVpc) GetCidrBlock() string
- func (self *SVpc) GetGlobalId() string
- func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)
- func (self *SVpc) GetIWireById(wireId string) (cloudprovider.ICloudWire, error)
- func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SVpc) GetId() string
- func (self *SVpc) GetIsDefault() bool
- func (self *SVpc) GetManagerId() string
- func (self *SVpc) GetMetadata() *jsonutils.JSONDict
- func (self *SVpc) GetName() string
- func (self *SVpc) GetRegion() cloudprovider.ICloudRegion
- func (self *SVpc) GetStatus() string
- func (self *SVpc) IsEmulated() bool
- func (self *SVpc) Refresh() error
- func (self *SVpc) SyncSecurityGroup(secgroupId string, name string, rules []secrules.SecurityRule) (string, error)
- type SWire
- func (self *SWire) CreateINetwork(name string, cidr string, desc string) (cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetBandwidth() int
- func (self *SWire) GetGlobalId() string
- func (self *SWire) GetINetworkById(netid string) (cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)
- func (self *SWire) GetIVpc() cloudprovider.ICloudVpc
- func (self *SWire) GetIZone() cloudprovider.ICloudZone
- func (self *SWire) GetId() string
- func (self *SWire) GetMetadata() *jsonutils.JSONDict
- func (self *SWire) GetName() string
- func (self *SWire) GetNetworkById(networkId string) *SNetwork
- func (self *SWire) GetStatus() string
- func (self *SWire) IsEmulated() bool
- func (self *SWire) Refresh() error
- type SZone
- func (self *SZone) GetGlobalId() string
- func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)
- func (self *SZone) GetIRegion() cloudprovider.ICloudRegion
- func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SZone) GetIWires() ([]cloudprovider.ICloudWire, error)
- func (self *SZone) GetId() string
- func (self *SZone) GetMetadata() *jsonutils.JSONDict
- func (self *SZone) GetName() string
- func (self *SZone) GetStatus() string
- func (self *SZone) IsEmulated() bool
- func (self *SZone) Refresh() error
- type SecurityGroupPolicy
- type SecurityGroupPolicySet
- type SecurityGroupRuleSet
- type ServiceTemplateSpecification
- type SnapshotStatusType
- type SystemDisk
- type TInternetChargeType
- type Tag
- type VirtualPrivateCloud
Constants ¶
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 ( CLOUD_PROVIDER_QCLOUD = models.CLOUD_PROVIDER_QCLOUD CLOUD_PROVIDER_QCLOUD_CN = "腾讯云" QCLOUD_DEFAULT_REGION = "ap-beijing" QCLOUD_API_VERSION = "2017-03-12" )
Variables ¶
View Source
var LatitudeAndLongitude = map[string]map[string]float32{
"ap-bangkok": {"latitude": 13.756330, "longitude": 100.501762},
"ap-beijing": {"latitude": 39.904202, "longitude": 116.407394},
"ap-chengdu": {"latitude": 30.572815, "longitude": 104.066803},
"ap-chongqing": {"latitude": 29.431585, "longitude": 106.912254},
"ap-guangzhou": {"latitude": 23.129110, "longitude": 113.264381},
"ap-guangzhou-open": {"latitude": 23.126593, "longitude": 113.273415},
"ap-hongkong": {"latitude": 22.396427, "longitude": 114.109497},
"ap-mumbai": {"latitude": 19.075983, "longitude": 72.877655},
"ap-seoul": {"latitude": 37.566536, "longitude": 126.977966},
"ap-shanghai": {"latitude": 31.230391, "longitude": 121.473701},
"ap-shanghai-fsi": {"latitude": 31.311033, "longitude": 121.536217},
"ap-shenzhen-fsi": {"latitude": 22.531544, "longitude": 114.025467},
"ap-singapore": {"latitude": 1.352083, "longitude": 103.819839},
"ap-tokyo": {"latitude": 35.709026, "longitude": 139.731995},
"eu-frankfurt": {"latitude": 51.165691, "longitude": 10.451526},
"eu-moscow": {"latitude": 55.755825, "longitude": 37.617298},
"na-ashburn": {"latitude": 37.431572, "longitude": -78.656891},
"na-siliconvalley": {"latitude": 37.387474, "longitude": -122.057541},
"na-toronto": {"latitude": 43.653225, "longitude": -79.383186},
}
Functions ¶
This section is empty.
Types ¶
type AddressTemplate ¶
type AddressTemplateGroup ¶
type DataDisk ¶
type DataDisk struct { DiskSize float32 // 数据盘大小,单位:GB。最小调整步长为10G,不同数据盘类型取值范围不同,具体限制详见:CVM实例配置。默认值为0,表示不购买数据盘。更多限制详见产品文档。 DiskType string // 数据盘类型。数据盘类型限制详见CVM实例配置。取值范围:LOCAL_BASIC:本地硬盘 LOCAL_SSD:本地SSD硬盘 CLOUD_BASIC:普通云硬盘 CLOUD_PREMIUM:高性能云硬盘 CLOUD_SSD:SSD云硬盘 默认取值:LOCAL_BASIC。 该参数对ResizeInstanceDisk接口无效。 DiskId string // 数据盘ID。LOCAL_BASIC 和 LOCAL_SSD 类型没有ID。暂时不支持该参数。 DeleteWithInstance bool // 数据盘是否随子机销毁。取值范围:TRUE:子机销毁时,销毁数据盘 FALSE:子机销毁时,保留数据盘 默认取值:TRUE 该参数目前仅用于 RunInstances 接口。 }
type ImageStatusType ¶
type ImageStatusType string
const ( ImageStatusCreating ImageStatusType = "Creating" ImageStatusAvailable ImageStatusType = "NORMAL" ImageStatusUnAvailable ImageStatusType = "UnAvailable" ImageStatusCreateFailed ImageStatusType = "CreateFailed" )
type InstanceChargeType ¶
type InstanceChargeType string
const ( PrePaidInstanceChargeType InstanceChargeType = "PREPAID" PostPaidInstanceChargeType InstanceChargeType = "POSTPAID_BY_HOUR" CdhPaidInstanceChargeType InstanceChargeType = "CDHPAID" DefaultInstanceChargeType = PostPaidInstanceChargeType )
type InternetAccessible ¶
type InternetAccessible struct { InternetChargeType string //网络计费类型。取值范围:BANDWIDTH_PREPAID:预付费按带宽结算 TRAFFIC_POSTPAID_BY_HOUR:流量按小时后付费 BANDWIDTH_POSTPAID_BY_HOUR:带宽按小时后付费 BANDWIDTH_PACKAGE:带宽包用户 默认取值:非带宽包用户默认与子机付费类型保持一致。 InternetMaxBandwidthOut int // 公网出带宽上限,单位:Mbps。默认值:0Mbps。不同机型带宽上限范围不一致,具体限制详见购买网络带宽。 PublicIpAssigned bool // 是否分配公网IP。取值范围: TRUE:表示分配公网IP FALSE:表示不分配公网IP 当公网带宽大于0Mbps时,可自由选择开通与否,默认开通公网IP;当公网带宽为0,则不允许分配公网IP。 }
type LoginSettings ¶
type LoginSettings struct { Password string //实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:Linux实例密码必须8到16位,至少包括两项[a-z,A-Z]、[0-9] 和 [( ) ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。<br><li>Windows实例密码必须12到16位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) ~ ! @ # $ % ^ & * - + = { } [ ] : ; ' , . ? /]中的特殊符号。 若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 KeyIds []string // 密钥ID列表。关联密钥后,就可以通过对应的私钥来访问实例;KeyId可通过接口DescribeKeyPairs获取,密钥与密码不能同时指定,同时Windows操作系统不支持指定密钥。当前仅支持购买的时候指定一个密钥。 KeepImageLogin string // 保持镜像的原始设置。该参数与Password或KeyIds.N不能同时指定。只有使用自定义镜像、共享镜像或外部导入镜像创建实例时才能指定该参数为TRUE。取值范围: TRUE:表示保持镜像的登录设置 FALSE:表示不保持镜像的登录设置 默认取值:FALSE。 }
type QcloudResponse ¶
type QcloudResponse struct { *tchttp.BaseResponse Response *interface{} `json:"Response"` }
type SAccountBalance ¶
type SDisk ¶
type SDisk struct { Attached bool AutoRenewFlagError bool CreateTime time.Time DeadlineError bool DeadlineTime time.Time DifferDaysOfDeadline int DiskChargeType string DiskId string DiskName string DiskSize int DiskState string DiskType string DiskUsage string Encrypt bool InstanceId string IsReturnable bool Placement Placement Portable bool RenewFlag string ReturnFailCode int RollbackPercent int Rollbacking bool SnapshotAbility bool DeleteWithInstance bool // contains filtered or unexported fields }
func (*SDisk) CreateISnapshot ¶
func (self *SDisk) CreateISnapshot(name, desc string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetBillingType ¶
func (*SDisk) GetCacheMode ¶
func (*SDisk) GetDiskFormat ¶
func (*SDisk) GetDiskSizeMB ¶
func (*SDisk) GetDiskType ¶
func (*SDisk) GetExpiredAt ¶
func (*SDisk) GetFsFormat ¶
func (*SDisk) GetGlobalId ¶
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) GetIsAutoDelete ¶
func (*SDisk) GetIsNonPersistent ¶
func (*SDisk) GetMetadata ¶
func (*SDisk) GetMountpoint ¶
func (*SDisk) GetTemplateId ¶
func (*SDisk) IsEmulated ¶
type SEipAddress ¶
type SEipAddress struct { AddressId string // EIP的ID,是EIP的唯一标识。 AddressName string // EIP名称。 AddressStatus string // EIP状态。 AddressIp string // 外网IP地址 InstanceId string // 绑定的资源实例ID。可能是一个CVM,NAT。 CreatedTime time.Time // 创建时间。按照ISO8601标准表示,并且使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ。 NetworkInterfaceId string // 绑定的弹性网卡ID PrivateAddressIp string // 绑定的资源内网ip IsArrears bool // 资源隔离状态。true表示eip处于隔离状态,false表示资源处于未隔离装填 IsBlocked bool // 资源封堵状态。true表示eip处于封堵状态,false表示eip处于未封堵状态 IsEipDirectConnection bool // eip是否支持直通模式。true表示eip支持直通模式,false表示资源不支持直通模式 AddressType string // eip资源类型,包括"CalcIP","WanIP","EIP","AnycastEIP"。其中"CalcIP"表示设备ip,“WanIP”表示普通公网ip,“EIP”表示弹性公网ip,“AnycastEip”表示加速EIP CascadeRelease bool // eip是否在解绑后自动释放。true表示eip将会在解绑后自动释放,false表示eip在解绑后不会自动释放 // 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) GetAccessIp ¶
func (*SHost) GetAccessMac ¶
func (*SHost) GetCpuCount ¶
func (*SHost) GetCpuDesc ¶
func (*SHost) GetEnabled ¶
func (*SHost) GetGlobalId ¶
func (*SHost) GetHostStatus ¶
func (*SHost) GetHostType ¶
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) GetIWires ¶
func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SHost) GetInstanceById ¶
func (*SHost) GetManagerId ¶
func (*SHost) GetMemSizeMB ¶
func (*SHost) GetMetadata ¶
func (*SHost) GetNodeCount ¶
func (*SHost) GetStorageSizeMB ¶
func (*SHost) GetStorageType ¶
func (*SHost) GetSysInfo ¶
func (self *SHost) GetSysInfo() jsonutils.JSONObject
func (*SHost) IsEmulated ¶
type SImage ¶
type SImage struct { ImageId string // 镜像ID OsName string // 镜像操作系统 ImageType string // 镜像类型 CreatedTime time.Time // 镜像创建时间 ImageName string // 镜像名称 ImageDescription string // 镜像描述 ImageSize int // 镜像大小 Architecture string // 镜像架构 ImageState ImageStatusType // 镜像状态 Platform string // 镜像来源平台 ImageCreator string // 镜像创建者 ImageSource string // 镜像来源 SyncPercent int // 同步百分比 IsSupportCloudinit bool // 镜像是否支持cloud-init // contains filtered or unexported fields }
func (*SImage) GetGlobalId ¶
func (*SImage) GetIStoragecache ¶
func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SImage) GetMetadata ¶
func (*SImage) IsEmulated ¶
type SInstance ¶
type SInstance struct { Placement Placement InstanceId string InstanceType string CPU int8 Memory int RestrictState string //NORMAL EXPIRED PROTECTIVELY_ISOLATED InstanceName string InstanceChargeType InstanceChargeType //PREPAID:表示预付费,即包年包月 POSTPAID_BY_HOUR:表示后付费,即按量计费 CDHPAID:CDH付费,即只对CDH计费,不对CDH上的实例计费。 SystemDisk SystemDisk //实例系统盘信息。 DataDisks []DataDisk //实例数据盘信息。只包含随实例购买的数据盘。 PrivateIpAddresses []string //实例主网卡的内网IP列表。 PublicIpAddresses []string //实例主网卡的公网IP列表。 InternetAccessible InternetAccessible //实例带宽信息。 VirtualPrivateCloud VirtualPrivateCloud //实例所属虚拟私有网络信息。 ImageId string // 生产实例所使用的镜像ID。 RenewFlag string // 自动续费标识。取值范围:NOTIFY_AND_MANUAL_RENEW:表示通知即将过期,但不自动续费 NOTIFY_AND_AUTO_RENEW:表示通知即将过期,而且自动续费 DISABLE_NOTIFY_AND_MANUAL_RENEW:表示不通知即将过期,也不自动续费。 CreatedTime time.Time // 创建时间。按照ISO8601标准表示,并且使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ。 ExpiredTime time.Time // 到期时间。按照ISO8601标准表示,并且使用UTC时间。格式为:YYYY-MM-DDThh:mm:ssZ。 OsName string // 操作系统名称。 SecurityGroupIds []string // 实例所属安全组。该参数可以通过调用 DescribeSecurityGroups 的返回值中的sgId字段来获取。 LoginSettings LoginSettings //实例登录设置。目前只返回实例所关联的密钥。 InstanceState string // 实例状态。取值范围:PENDING:表示创建中 LAUNCH_FAILED:表示创建失败 RUNNING:表示运行中 STOPPED:表示关机 STARTING:表示开机中 STOPPING:表示关机中 REBOOTING:表示重启中 SHUTDOWN:表示停止待销毁 TERMINATING:表示销毁中。 Tags []Tag // contains filtered or unexported fields }
func (*SInstance) AttachDisk ¶
func (*SInstance) ChangeConfig ¶
func (*SInstance) DetachDisk ¶
func (*SInstance) GetBillingType ¶
func (*SInstance) GetBootOrder ¶
func (*SInstance) GetCreateTime ¶
func (*SInstance) GetExpiredAt ¶
func (*SInstance) GetGlobalId ¶
func (*SInstance) GetHypervisor ¶
func (*SInstance) GetIDisks ¶
func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SInstance) GetIHost ¶
func (self *SInstance) GetIHost() cloudprovider.ICloudHost
func (*SInstance) GetMachine ¶
func (*SInstance) GetMetadata ¶
func (*SInstance) GetVNCInfo ¶
func (self *SInstance) GetVNCInfo() (jsonutils.JSONObject, error)
func (*SInstance) GetVcpuCount ¶
func (*SInstance) GetVmemSizeMB ¶
func (*SInstance) IsEmulated ¶
func (*SInstance) RebuildRoot ¶
func (*SInstance) SyncSecurityGroup ¶
func (*SInstance) UpdateUserData ¶
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 { Zone string // 可用区。 InstanceType string // 实例机型。 InstanceFamily string // 实例机型系列。 GPU int // GPU核数,单位:核。 CPU int // CPU核数,单位:核。 Memory int // 内存容量,单位:GB。 CbsSupport string // 是否支持云硬盘。取值范围:TRUE:表示支持云硬盘;FALSE:表示不支持云硬盘。 InstanceTypeState string // 机型状态。取值范围:AVAILABLE:表示机型可用;UNAVAILABLE:表示机型不可用。 }
type SLocalDisk ¶
type SLocalDisk struct { DiskId string DiskSize float32 DisktType string DiskUsage string // contains filtered or unexported fields }
func (*SLocalDisk) CreateISnapshot ¶
func (self *SLocalDisk) CreateISnapshot(name, desc string) (cloudprovider.ICloudSnapshot, error)
func (*SLocalDisk) Delete ¶
func (self *SLocalDisk) Delete() error
func (*SLocalDisk) GetBillingType ¶
func (self *SLocalDisk) GetBillingType() string
func (*SLocalDisk) GetCacheMode ¶
func (self *SLocalDisk) GetCacheMode() string
func (*SLocalDisk) GetDiskFormat ¶
func (self *SLocalDisk) GetDiskFormat() string
func (*SLocalDisk) GetDiskSizeMB ¶
func (self *SLocalDisk) GetDiskSizeMB() int
func (*SLocalDisk) GetDiskType ¶
func (self *SLocalDisk) GetDiskType() string
func (*SLocalDisk) GetDriver ¶
func (self *SLocalDisk) GetDriver() string
func (*SLocalDisk) GetExpiredAt ¶
func (self *SLocalDisk) GetExpiredAt() time.Time
func (*SLocalDisk) GetFsFormat ¶
func (self *SLocalDisk) GetFsFormat() string
func (*SLocalDisk) GetGlobalId ¶
func (self *SLocalDisk) GetGlobalId() string
func (*SLocalDisk) GetISnapshot ¶
func (self *SLocalDisk) GetISnapshot(snapshotId string) (cloudprovider.ICloudSnapshot, error)
func (*SLocalDisk) GetISnapshots ¶
func (self *SLocalDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SLocalDisk) GetIStorge ¶
func (self *SLocalDisk) GetIStorge() cloudprovider.ICloudStorage
func (*SLocalDisk) GetId ¶
func (self *SLocalDisk) GetId() string
func (*SLocalDisk) GetIsAutoDelete ¶
func (self *SLocalDisk) GetIsAutoDelete() bool
func (*SLocalDisk) GetIsNonPersistent ¶
func (self *SLocalDisk) GetIsNonPersistent() bool
func (*SLocalDisk) GetMetadata ¶
func (self *SLocalDisk) GetMetadata() *jsonutils.JSONDict
func (*SLocalDisk) GetMountpoint ¶
func (self *SLocalDisk) GetMountpoint() string
func (*SLocalDisk) GetName ¶
func (self *SLocalDisk) GetName() string
func (*SLocalDisk) GetStatus ¶
func (self *SLocalDisk) GetStatus() string
func (*SLocalDisk) GetTemplateId ¶
func (self *SLocalDisk) GetTemplateId() string
func (*SLocalDisk) IsEmulated ¶
func (self *SLocalDisk) IsEmulated() bool
func (*SLocalDisk) Refresh ¶
func (self *SLocalDisk) Refresh() error
func (*SLocalDisk) Reset ¶
func (self *SLocalDisk) Reset(snapshotId string) error
func (*SLocalDisk) Resize ¶
func (self *SLocalDisk) Resize(size int64) error
type SLocalStorage ¶
type SLocalStorage struct {
// contains filtered or unexported fields
}
func (*SLocalStorage) CreateIDisk ¶
func (self *SLocalStorage) CreateIDisk(name string, sizeGb int, desc string) (cloudprovider.ICloudDisk, error)
func (*SLocalStorage) GetCapacityMB ¶
func (self *SLocalStorage) GetCapacityMB() int
func (*SLocalStorage) GetEnabled ¶
func (self *SLocalStorage) GetEnabled() bool
func (*SLocalStorage) GetGlobalId ¶
func (self *SLocalStorage) GetGlobalId() string
func (*SLocalStorage) GetIDisk ¶
func (self *SLocalStorage) GetIDisk(idStr string) (cloudprovider.ICloudDisk, error)
func (*SLocalStorage) GetIDisks ¶
func (self *SLocalStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SLocalStorage) GetIStoragecache ¶
func (self *SLocalStorage) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SLocalStorage) GetIZone ¶
func (self *SLocalStorage) GetIZone() cloudprovider.ICloudZone
func (*SLocalStorage) GetId ¶
func (self *SLocalStorage) GetId() string
func (*SLocalStorage) GetManagerId ¶
func (self *SLocalStorage) GetManagerId() string
func (*SLocalStorage) GetMediumType ¶
func (self *SLocalStorage) GetMediumType() string
func (*SLocalStorage) GetMetadata ¶
func (self *SLocalStorage) GetMetadata() *jsonutils.JSONDict
func (*SLocalStorage) GetName ¶
func (self *SLocalStorage) GetName() string
func (*SLocalStorage) GetStatus ¶
func (self *SLocalStorage) GetStatus() string
func (*SLocalStorage) GetStorageConf ¶
func (self *SLocalStorage) GetStorageConf() jsonutils.JSONObject
func (*SLocalStorage) GetStorageType ¶
func (self *SLocalStorage) GetStorageType() string
func (*SLocalStorage) IsEmulated ¶
func (self *SLocalStorage) IsEmulated() bool
func (*SLocalStorage) Refresh ¶
func (self *SLocalStorage) Refresh() error
type SNetwork ¶
type SNetwork struct { CidrBlock string Zone string SubnetId string VpcId string SubnetName string AvailableIpAddressCount int CreatedTime time.Time EnableBroadcast bool IsDefault bool RouteTableId string // contains filtered or unexported fields }
func (*SNetwork) GetAllocTimeoutSeconds ¶
func (*SNetwork) GetGateway ¶
func (*SNetwork) GetGlobalId ¶
func (*SNetwork) GetIWire ¶
func (self *SNetwork) GetIWire() cloudprovider.ICloudWire
func (*SNetwork) GetIpStart ¶
func (*SNetwork) GetIsPublic ¶
func (*SNetwork) GetMetadata ¶
func (*SNetwork) GetServerType ¶
func (*SNetwork) IsEmulated ¶
type SQcloudClient ¶
type SQcloudClient struct { AppID string SecretID string SecretKey string // contains filtered or unexported fields }
func NewQcloudClient ¶
func (*SQcloudClient) GetIHostById ¶
func (client *SQcloudClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SQcloudClient) GetIRegionById ¶
func (client *SQcloudClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)
func (*SQcloudClient) GetIRegions ¶
func (client *SQcloudClient) GetIRegions() []cloudprovider.ICloudRegion
func (*SQcloudClient) GetIStorageById ¶
func (client *SQcloudClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SQcloudClient) GetIStoragecacheById ¶
func (client *SQcloudClient) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
func (*SQcloudClient) GetIVpcById ¶
func (client *SQcloudClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
func (*SQcloudClient) GetRegion ¶
func (client *SQcloudClient) GetRegion(regionId string) *SRegion
func (*SQcloudClient) GetRegions ¶
func (client *SQcloudClient) GetRegions() []SRegion
func (*SQcloudClient) GetSubAccounts ¶
func (client *SQcloudClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
func (*SQcloudClient) QueryAccountBalance ¶
func (client *SQcloudClient) QueryAccountBalance() (*SAccountBalance, error)
type SRegion ¶
type SRegion struct { Region string RegionName string RegionState string Latitude float64 Longitude float64 // contains filtered or unexported fields }
func (*SRegion) AddressGroupList ¶
func (*SRegion) AddressList ¶
func (*SRegion) AllocateEIP ¶
func (region *SRegion) AllocateEIP(name string, bwMbps int, chargeType TInternetChargeType) (*SEipAddress, error)
func (*SRegion) AssociateEip ¶
func (*SRegion) AttachDisk ¶
func (*SRegion) AttachKeypair ¶
func (*SRegion) ChangeVMConfig ¶
func (*SRegion) CreateDisk ¶
func (*SRegion) CreateIVpc ¶
func (*SRegion) CreateInstance ¶
func (*SRegion) CreateInstanceSimple ¶
func (*SRegion) CreateNetwork ¶
func (*SRegion) CreateSecurityGroup ¶
func (self *SRegion) CreateSecurityGroup(name, description string) (*SSecurityGroup, error)
func (*SRegion) CreateSnapshot ¶
func (*SRegion) DeallocateEIP ¶
func (*SRegion) DeleteDisk ¶
func (*SRegion) DeleteImage ¶
func (*SRegion) DeleteNetwork ¶
func (*SRegion) DeleteSecurityGroup ¶
func (*SRegion) DeleteSnapshot ¶
func (*SRegion) DetachDisk ¶
func (*SRegion) DetachKeyPair ¶
func (*SRegion) DissociateEip ¶
func (*SRegion) GetClient ¶
func (self *SRegion) GetClient() *SQcloudClient
func (*SRegion) GetGlobalId ¶
func (*SRegion) GetIEipById ¶
func (self *SRegion) GetIEipById(eipId string) (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) GetIZoneById ¶
func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
func (*SRegion) GetIZones ¶
func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)
func (*SRegion) GetImageStatus ¶
func (self *SRegion) GetImageStatus(imageId string) (ImageStatusType, error)
func (*SRegion) GetInstance ¶
func (*SRegion) GetInstanceStatus ¶
func (*SRegion) GetInstanceTypes ¶
func (self *SRegion) GetInstanceTypes() ([]SInstanceType, error)
func (*SRegion) GetInstanceVNCUrl ¶
func (*SRegion) GetInstances ¶
func (*SRegion) GetKeypairs ¶
func (*SRegion) GetLatitude ¶
func (*SRegion) GetLongitude ¶
func (*SRegion) GetMatchInstanceTypes ¶
func (*SRegion) GetMetadata ¶
func (*SRegion) GetNetworks ¶
func (*SRegion) GetProvider ¶
func (*SRegion) GetSecurityGroupDetails ¶
func (self *SRegion) GetSecurityGroupDetails(secGroupId string) (*SSecurityGroup, error)
func (*SRegion) GetSecurityGroups ¶
func (*SRegion) GetSnapshots ¶
func (*SRegion) ImportImage ¶
func (*SRegion) ImportKeypair ¶
func (*SRegion) IsEmulated ¶
func (*SRegion) ReplaceSystemDisk ¶
func (*SRegion) UpdateEipBandwidth ¶
func (*SRegion) UpdateInstancePassword ¶
type SSecurityGroup ¶
type SSecurityGroup struct { SecurityGroupId string // 安全组实例ID,例如:sg-ohuuioma。 SecurityGroupName string // 安全组名称,可任意命名,但不得超过60个字符。 SecurityGroupDesc string // 安全组备注,最多100个字符。 ProjectId string // 项目id,默认0。可在qcloud控制台项目管理页面查询到。 IsDefault bool // 是否是默认安全组,默认安全组不支持删除。 CreatedTime time.Time // 安全组创建时间。 SecurityGroupPolicySet SecurityGroupPolicySet // 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 SSnapshot ¶
type SSnapshot struct { SnapshotId string // 快照ID。 Placement Placement // 快照所在的位置。 DiskUsage string // 创建此快照的云硬盘类型。取值范围:SYSTEM_DISK:系统盘 DATA_DISK:数据盘。 DiskId string // 创建此快照的云硬盘ID。 DiskSize int32 // 创建此快照的云硬盘大小,单位GB。 SnapshotState SnapshotStatusType // 快照的状态。取值范围: NORMAL:正常 CREATING:创建中 ROLLBACKING:回滚中 COPYING_FROM_REMOTE:跨地域复制快照拷贝中。 SnapshotName string // 快照名称,用户自定义的快照别名。调用ModifySnapshotAttribute可修改此字段。 Percent int // 快照创建进度百分比,快照创建成功后此字段恒为100。 CreateTime time.Time // 快照的创建时间。 DeadlineTime time.Time // 快照到期时间。如果快照为永久保留,此字段为空。 Encrypt bool // 是否为加密盘创建的快照。取值范围:true:该快照为加密盘创建的 false:非加密盘创建的快照。 IsPermanent bool // 是否为永久快照。取值范围: true:永久快照 false:非永久快照。 CopyingToRegions []string // 快照正在跨地域复制的目的地域,默认取值为[]。 CopyFromRemote bool // 是否为跨地域复制的快照。取值范围:true:表示为跨地域复制的快照。 false:本地域的快照。 // contains filtered or unexported fields }
func (*SSnapshot) GetDiskType ¶
func (*SSnapshot) GetGlobalId ¶
func (*SSnapshot) GetManagerId ¶
func (*SSnapshot) GetMetadata ¶
func (*SSnapshot) GetRegionId ¶
func (*SSnapshot) IsEmulated ¶
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 (*SStorage) GetEnabled ¶
func (*SStorage) GetGlobalId ¶
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) GetManagerId ¶
func (*SStorage) GetMediumType ¶
func (*SStorage) GetMetadata ¶
func (*SStorage) GetStorageConf ¶
func (self *SStorage) GetStorageConf() jsonutils.JSONObject
func (*SStorage) GetStorageType ¶
func (*SStorage) IsEmulated ¶
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 SVpc ¶
type SVpc struct { CidrBlock string CreatedTime time.Time DhcpOptionsId string DnsServerSet []string DomainName string EnableMulticast bool IsDefault bool VpcId string VpcName string // contains filtered or unexported fields }
func (*SVpc) GetCidrBlock ¶
func (*SVpc) GetGlobalId ¶
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) GetIsDefault ¶
func (*SVpc) GetManagerId ¶
func (*SVpc) GetMetadata ¶
func (*SVpc) GetRegion ¶
func (self *SVpc) GetRegion() cloudprovider.ICloudRegion
func (*SVpc) IsEmulated ¶
func (*SVpc) SyncSecurityGroup ¶
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 (*SWire) GetGlobalId ¶
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) GetMetadata ¶
func (*SWire) GetNetworkById ¶
func (*SWire) IsEmulated ¶
type SZone ¶
type SZone struct { Zone string ZoneId string ZoneName string ZoneState string // contains filtered or unexported fields }
func (*SZone) GetGlobalId ¶
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) GetMetadata ¶
func (*SZone) IsEmulated ¶
type SecurityGroupPolicy ¶
type SecurityGroupPolicy struct { PolicyIndex int // 安全组规则索引号。 Protocol string // 协议, 取值: TCP,UDP, ICMP。 Port string // 端口(all, 离散port, range)。 ServiceTemplate ServiceTemplateSpecification // 协议端口ID或者协议端口组ID。ServiceTemplate和Protocol+Port互斥。 CidrBlock string // 网段或IP(互斥)。 SecurityGroupId string // 已绑定安全组的网段或IP。 AddressTemplate AddressTemplateSpecification // IP地址ID或者ID地址组ID。 Action string // ACCEPT 或 DROP。 PolicyDescription string // 安全组规则描述。 // contains filtered or unexported fields }
func (*SecurityGroupPolicy) String ¶
func (self *SecurityGroupPolicy) String() string
type SecurityGroupPolicySet ¶
type SecurityGroupPolicySet struct { Version string Egress []SecurityGroupPolicy // 出站规则。 Ingress []SecurityGroupPolicy // 入站规则。 }
type SecurityGroupRuleSet ¶
type SecurityGroupRuleSet []SecurityGroupPolicy
func (SecurityGroupRuleSet) Len ¶
func (v SecurityGroupRuleSet) Len() int
func (SecurityGroupRuleSet) Less ¶
func (v SecurityGroupRuleSet) Less(i, j int) bool
func (SecurityGroupRuleSet) Swap ¶
func (v SecurityGroupRuleSet) Swap(i, j int)
type SnapshotStatusType ¶
type SnapshotStatusType string
const ( SnapshotStatusAccomplished SnapshotStatusType = "NORMAL" SnapshotStatusProgress SnapshotStatusType = "CREATING" SnapshotStatusFailed SnapshotStatusType = "failed" )
type SystemDisk ¶
type TInternetChargeType ¶
type TInternetChargeType string
type VirtualPrivateCloud ¶
type VirtualPrivateCloud struct { VpcId string // 私有网络ID,形如vpc-xxx。有效的VpcId可通过登录控制台查询;也可以调用接口 DescribeVpcEx ,从接口返回中的unVpcId字段获取。 SubnetId string // 私有网络子网ID,形如subnet-xxx。有效的私有网络子网ID可通过登录控制台查询;也可以调用接口 DescribeSubnets ,从接口返回中的unSubnetId字段获取。 AsVpcGateway bool // 是否用作公网网关。公网网关只有在实例拥有公网IP以及处于私有网络下时才能正常使用。取值范围:TRUE:表示用作公网网关 FALSE:表示不用作公网网关 默认取值:FALSE。 PrivateIpAddresses []string // 私有网络子网 IP 数组,在创建实例、修改实例vpc属性操作中可使用此参数。当前仅批量创建多台实例时支持传入相同子网的多个 IP。 }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.