Documentation ¶
Index ¶
- Constants
- Variables
- func BuildParams(params SParams, privateKey string) jsonutils.JSONObject
- func DoAction(client *SUcloudClient, action string, params SParams, resultKey string, ...) error
- func DoListAll(client *SUcloudClient, action string, params SParams, resultKey string, ...) error
- func GetBucketName(regionId string, imageId string) string
- func GetSignature(params SParams, privateKey string) string
- type DiskSet
- type Domain
- type EIPAddr
- type IPSet
- type NetworkInfo
- type Resource
- type Rule
- type SBucket
- func (b *SBucket) AbortMultipartUpload(ctx context.Context, key string, uploadId string) error
- func (b *SBucket) CompleteMultipartUpload(ctx context.Context, key string, uploadId string, partEtags []string) error
- func (b *SBucket) CopyObject(ctx context.Context, destKey string, srcBucket, srcKey string, ...) error
- func (b *SBucket) CopyPart(ctx context.Context, key string, uploadId string, partIndex int, ...) (string, error)
- func (b *SBucket) DeleteObject(ctx context.Context, key string) error
- func (b *SBucket) GetAccessUrls() []cloudprovider.SBucketAccessUrl
- func (b *SBucket) GetAcl() cloudprovider.TBucketACLType
- func (b *SBucket) GetCreatedAt() time.Time
- func (b *SBucket) GetGlobalId() string
- func (b *SBucket) GetIRegion() cloudprovider.ICloudRegion
- func (b *SBucket) GetLocation() string
- func (b *SBucket) GetName() string
- func (b *SBucket) GetObject(ctx context.Context, key string, rangeOpt *cloudprovider.SGetObjectRange) (io.ReadCloser, error)
- func (b *SBucket) GetProjectId() string
- func (b *SBucket) GetStats() cloudprovider.SBucketStats
- func (b *SBucket) GetStorageClass() string
- func (b *SBucket) GetTempUrl(method string, key string, expire time.Duration) (string, error)
- func (b *SBucket) ListObjects(prefix string, marker string, delimiter string, maxCount int) (cloudprovider.SListObjectResult, error)
- func (b *SBucket) NewMultipartUpload(ctx context.Context, key string, cannedAcl cloudprovider.TBucketACLType, ...) (string, error)
- func (b *SBucket) PutObject(ctx context.Context, key string, input io.Reader, sizeBytes int64, ...) error
- func (b *SBucket) SetAcl(aclStr cloudprovider.TBucketACLType) error
- func (b *SBucket) UploadPart(ctx context.Context, key string, uploadId string, partIndex int, ...) (string, error)
- type SDisk
- func (self *SDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) Delete(ctx context.Context) error
- func (self *SDisk) GetAccessPath() string
- func (self *SDisk) GetBillingType() string
- func (self *SDisk) GetCacheMode() string
- func (self *SDisk) GetCreatedAt() time.Time
- 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(idStr string) (cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
- func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
- func (self *SDisk) GetId() string
- func (self *SDisk) GetIsAutoDelete() bool
- func (self *SDisk) GetIsNonPersistent() bool
- func (self *SDisk) GetMountpoint() string
- func (self *SDisk) GetName() string
- func (self *SDisk) GetProjectId() string
- func (self *SDisk) GetStatus() string
- func (self *SDisk) GetStorageType() string
- func (self *SDisk) GetSysTags() map[string]string
- func (self *SDisk) GetTemplateId() string
- func (self *SDisk) IsEmulated() bool
- func (self *SDisk) Rebuild(ctx context.Context) error
- func (self *SDisk) Refresh() error
- func (self *SDisk) Reset(ctx context.Context, snapshotId string) (string, error)
- func (self *SDisk) Resize(ctx context.Context, newSizeMB int64) error
- type SEip
- func (self *SEip) Associate(conf *cloudprovider.AssociateConfig) error
- func (self *SEip) ChangeBandwidth(bw int) error
- func (self *SEip) Delete() error
- func (self *SEip) Dissociate() error
- func (self *SEip) GetAssociationExternalId() string
- func (self *SEip) GetAssociationType() string
- func (self *SEip) GetBandwidth() int
- func (self *SEip) GetBillingType() string
- func (self *SEip) GetCreatedAt() time.Time
- func (self *SEip) GetExpiredAt() time.Time
- func (self *SEip) GetGlobalId() string
- func (self *SEip) GetINetworkId() string
- func (self *SEip) GetId() string
- func (self *SEip) GetInternetChargeType() string
- func (self *SEip) GetIpAddr() string
- func (self *SEip) GetMode() string
- func (self *SEip) GetName() string
- func (self *SEip) GetProjectId() string
- func (self *SEip) GetStatus() string
- func (self *SEip) IsEmulated() bool
- func (self *SEip) Refresh() error
- type SFile
- func (self *SFile) Delete() error
- func (self *SFile) FetchFileUrl() string
- func (self *SFile) GetAcl() cloudprovider.TBucketACLType
- func (self *SFile) GetContentType() string
- func (self *SFile) GetETag() string
- func (self *SFile) GetHost() string
- func (self *SFile) GetIBucket() cloudprovider.ICloudBucket
- func (self *SFile) GetKey() string
- func (self *SFile) GetLastModified() time.Time
- func (self *SFile) GetMeta() http.Header
- func (self *SFile) GetSizeBytes() int64
- func (self *SFile) GetStorageClass() string
- func (self *SFile) GetUrl() string
- func (self *SFile) SetAcl(cloudprovider.TBucketACLType) error
- func (self *SFile) SetMeta(ctx context.Context, meta http.Header) error
- func (self *SFile) Upload() error
- type SHost
- func (self *SHost) CreateVM(desc *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
- func (self *SHost) GetAccessIp() string
- func (self *SHost) GetAccessMac() string
- func (self *SHost) GetCpuCount() int
- 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) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)
- func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SHost) GetIVMById(id 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) GetIsMaintenance() bool
- func (self *SHost) GetMemSizeMB() int
- 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) GetVersion() string
- func (self *SHost) IsEmulated() bool
- func (self *SHost) Refresh() error
- type SImage
- func (self *SImage) Delete(ctx context.Context) error
- func (img *SImage) GetBios() cloudprovider.TBiosType
- func (self *SImage) GetCreatedAt() time.Time
- func (img *SImage) GetFullOsName() string
- func (self *SImage) GetGlobalId() string
- func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
- func (self *SImage) GetId() string
- func (self *SImage) GetImageFormat() string
- func (self *SImage) GetImageStatus() string
- func (self *SImage) GetImageType() cloudprovider.TImageType
- func (self *SImage) GetMinOsDiskSizeGb() int
- func (self *SImage) GetMinRamSizeMb() int
- func (self *SImage) GetName() string
- func (self *SImage) GetOsArch() string
- func (self *SImage) GetOsDist() string
- func (img *SImage) GetOsLang() string
- func (self *SImage) GetOsType() cloudprovider.TOsType
- func (self *SImage) GetOsVersion() string
- func (self *SImage) GetSizeByte() int64
- func (self *SImage) GetStatus() string
- func (self *SImage) IsEmulated() bool
- func (self *SImage) Refresh() error
- type SInstance
- func (self *SInstance) AssignSecurityGroup(secgroupId string) error
- func (self *SInstance) AttachDisk(ctx context.Context, diskId string) error
- func (self *SInstance) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error
- func (self *SInstance) ChangeConfig2(ctx context.Context, instanceType string) error
- func (self *SInstance) DeleteVM(ctx context.Context) error
- func (self *SInstance) DeployVM(ctx context.Context, name string, username string, password string, ...) error
- func (self *SInstance) DetachDisk(ctx context.Context, diskId string) error
- func (self *SInstance) GetBillingType() string
- func (ins *SInstance) GetBios() cloudprovider.TBiosType
- func (self *SInstance) GetBootOrder() string
- func (self *SInstance) GetCreatedAt() time.Time
- func (self *SInstance) GetError() error
- func (self *SInstance) GetExpiredAt() time.Time
- func (ins *SInstance) GetFullOsName() string
- func (self *SInstance) GetGlobalId() string
- func (self *SInstance) GetHostname() 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) GetInstanceType() string
- func (self *SInstance) GetLocalDisk(diskId, storageType string, sizeGB int, isBoot bool) SDisk
- func (self *SInstance) GetMachine() string
- func (self *SInstance) GetName() string
- func (ins *SInstance) GetOsArch() string
- func (ins *SInstance) GetOsDist() string
- func (ins *SInstance) GetOsLang() string
- func (ins *SInstance) GetOsType() cloudprovider.TOsType
- func (ins *SInstance) GetOsVersion() string
- func (self *SInstance) GetProjectId() string
- func (self *SInstance) GetSecurityGroupIds() ([]string, error)
- func (self *SInstance) GetSecurityGroups() ([]SSecurityGroup, error)
- func (self *SInstance) GetStatus() string
- func (self *SInstance) GetSysTags() map[string]string
- func (self *SInstance) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
- func (self *SInstance) GetVcpuCount() int
- func (self *SInstance) GetVdi() string
- func (self *SInstance) GetVga() string
- func (self *SInstance) GetVmemSizeMB() int
- func (self *SInstance) IsEmulated() bool
- func (self *SInstance) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
- func (self *SInstance) Refresh() error
- func (self *SInstance) Renew(bc billing.SBillingCycle) error
- func (self *SInstance) SetSecurityGroups(secgroupIds []string) error
- func (self *SInstance) StartVM(ctx context.Context) error
- func (self *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
- func (self *SInstance) UpdateUserData(userData string) error
- func (self *SInstance) UpdateVM(ctx context.Context, name string) error
- type SInstanceNic
- type SInstanceType
- 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) GetName() string
- func (self *SNetwork) GetProjectId() string
- func (self *SNetwork) GetPublicScope() rbacutils.TRbacScope
- func (self *SNetwork) GetServerType() string
- func (self *SNetwork) GetStatus() string
- func (self *SNetwork) IsEmulated() bool
- func (self *SNetwork) Refresh() error
- type SParams
- type SProject
- type SRegion
- func (self *SRegion) AssociateEip(eipId string, instanceId string) error
- func (self *SRegion) AttachDisk(zoneId string, instanceId string, diskId string) error
- func (self *SRegion) CreateBucket(name, bucketType string) error
- func (self *SRegion) CreateDefaultSecurityGroup(name, description string) (string, error)
- func (self *SRegion) CreateDisk(zoneId string, category string, name string, sizeGb int) (string, error)
- func (self *SRegion) CreateEIP(eip *cloudprovider.SEip) (cloudprovider.ICloudEIP, error)
- func (region *SRegion) CreateIBucket(name string, storageClassStr string, aclStr string) error
- func (self *SRegion) CreateILoadBalancer(loadbalancer *cloudprovider.SLoadbalancer) (cloudprovider.ICloudLoadbalancer, error)
- func (self *SRegion) CreateILoadBalancerAcl(acl *cloudprovider.SLoadbalancerAccessControlList) (cloudprovider.ICloudLoadbalancerAcl, error)
- func (self *SRegion) CreateILoadBalancerCertificate(cert *cloudprovider.SLoadbalancerCertificate) (cloudprovider.ICloudLoadbalancerCertificate, error)
- func (self *SRegion) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error)
- func (self *SRegion) CreateIVpc(opts *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, error)
- func (self *SRegion) CreateInstance(...) (string, error)
- func (self *SRegion) CreateNetwork(vpcId string, name string, cidr string, desc string) (*SNetwork, error)
- func (self *SRegion) CreateSecurityGroup(name, description string, rules []string) (string, error)
- func (self *SRegion) CreateSnapshot(zoneId, diskId, name, desc string) (string, error)
- func (self *SRegion) DeallocateEIP(eipId string) error
- func (self *SRegion) DeleteBucket(name string) error
- func (self *SRegion) DeleteDisk(zoneId string, diskId string) error
- func (region *SRegion) DeleteIBucket(name 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, zoneId string) error
- func (self *SRegion) DeleteVM(instanceId string) error
- func (self *SRegion) DeleteVpc(vpcId string) error
- func (self *SRegion) DetachDisk(zoneId string, instanceId string, diskId string) error
- func (self *SRegion) DissociateEip(eipId string, instanceId string) error
- func (self *SRegion) DoAction(action string, params SParams, result interface{}) error
- func (self *SRegion) DoListAll(action string, params SParams, result interface{}) error
- func (self *SRegion) DoListPart(action string, limit int, offset int, params SParams, result interface{}) (int, int, error)
- func (region *SRegion) GetCapabilities() []string
- func (self *SRegion) GetClient() *SUcloudClient
- func (self *SRegion) GetCloudEnv() string
- func (self *SRegion) GetDisk(diskId string) (*SDisk, error)
- func (self *SRegion) GetDisks(zoneId string, diskType string, diskIds []string) ([]SDisk, error)
- func (self *SRegion) GetEipById(eipId string) (SEip, error)
- func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo
- func (self *SRegion) GetGlobalId() string
- func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable
- func (region *SRegion) GetIBucketById(bucketId string) (cloudprovider.ICloudBucket, error)
- func (region *SRegion) GetIBucketByName(name string) (cloudprovider.ICloudBucket, error)
- func (region *SRegion) GetIBuckets() ([]cloudprovider.ICloudBucket, error)
- func (self *SRegion) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)
- func (self *SRegion) GetIEipById(id string) (cloudprovider.ICloudEIP, error)
- func (self *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)
- func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SRegion) GetIHosts() ([]cloudprovider.ICloudHost, error)
- func (self *SRegion) GetILoadBalancerAclById(aclId string) (cloudprovider.ICloudLoadbalancerAcl, error)
- func (self *SRegion) GetILoadBalancerAcls() ([]cloudprovider.ICloudLoadbalancerAcl, error)
- func (self *SRegion) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error)
- func (self *SRegion) GetILoadBalancerById(loadbalancerId string) (cloudprovider.ICloudLoadbalancer, error)
- func (self *SRegion) GetILoadBalancerCertificateById(certId string) (cloudprovider.ICloudLoadbalancerCertificate, error)
- func (self *SRegion) GetILoadBalancerCertificates() ([]cloudprovider.ICloudLoadbalancerCertificate, error)
- func (self *SRegion) GetILoadBalancers() ([]cloudprovider.ICloudLoadbalancer, error)
- func (region *SRegion) GetINetworkInterfaces() ([]cloudprovider.ICloudNetworkInterface, error)
- func (self *SRegion) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error)
- func (self *SRegion) GetISecurityGroupByName(opts *cloudprovider.SecurityGroupFilterOptions) (cloudprovider.ICloudSecurityGroup, 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) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)
- func (self *SRegion) GetIStorages() ([]cloudprovider.ICloudStorage, error)
- func (self *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, 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) GetImages(imageType string, imageId string) ([]SImage, error)
- func (self *SRegion) GetInstanceByID(instanceId string) (SInstance, error)
- func (self *SRegion) GetInstanceVNCUrl(instanceId string) (*cloudprovider.ServerVncOutput, error)
- func (self *SRegion) GetInstances(zoneId string, instanceId string) ([]SInstance, error)
- func (self *SRegion) GetName() string
- func (self *SRegion) GetNetworks(vpcId string) ([]SNetwork, error)
- func (self *SRegion) GetProvider() string
- func (self *SRegion) GetSecurityGroupById(secGroupId string) (*SSecurityGroup, error)
- func (self *SRegion) GetSecurityGroups(secGroupId string, resourceId string, name string) ([]SSecurityGroup, error)
- func (self *SRegion) GetSkus(zoneId string) ([]cloudprovider.ICloudSku, error)
- func (self *SRegion) GetSnapshotById(zoneId string, snapshotId string) (SSnapshot, error)
- func (self *SRegion) GetSnapshots(zoneId string, diskId string, snapshotId string) ([]SSnapshot, error)
- func (self *SRegion) GetStatus() string
- func (self *SRegion) GetVips() ([]SVip, error)
- func (self *SRegion) GetVpcs(vpcId string) ([]SVPC, error)
- func (region *SRegion) IBucketExist(name string) (bool, error)
- func (self *SRegion) ImportImage(name string, ufileUrl string, osType string, osVersion string, ...) (string, error)
- func (self *SRegion) IsEmulated() bool
- func (self *SRegion) RebuildRoot(instanceId, imageId, password string) error
- func (self *SRegion) Refresh() error
- func (self *SRegion) RenewInstance(instanceId string, bc billing.SBillingCycle) error
- func (self *SRegion) ResetVMPasswd(instanceId, password string) error
- func (self *SRegion) ResizeVM(instanceId string, cpu, memoryMB int) error
- func (self *SRegion) StartVM(instanceId string) error
- func (self *SRegion) StopVM(instanceId string) error
- func (self *SRegion) UpdateEipBandwidth(eipId string, bw int) error
- func (self *SRegion) UpdateVM(instanceId, name string) error
- type SSecurityGroup
- func (self *SSecurityGroup) Delete() error
- func (self *SSecurityGroup) GetDescription() string
- func (self *SSecurityGroup) GetGlobalId() string
- func (self *SSecurityGroup) GetId() string
- func (self *SSecurityGroup) GetName() string
- func (self *SSecurityGroup) GetProjectId() string
- func (self *SSecurityGroup) GetRules() ([]cloudprovider.SecurityRule, error)
- func (self *SSecurityGroup) GetStatus() string
- func (self *SSecurityGroup) GetVpcId() string
- func (self *SSecurityGroup) IsEmulated() bool
- func (self *SSecurityGroup) Refresh() error
- func (self *SSecurityGroup) SyncRules(common, inAdds, outAdds, inDels, outDels []cloudprovider.SecurityRule) error
- func (self *SSecurityGroup) UcloudSecRuleToOnecloud(rule Rule) (cloudprovider.SecurityRule, 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) GetName() string
- func (self *SSnapshot) GetProjectId() string
- func (self *SSnapshot) GetSizeMb() int32
- func (self *SSnapshot) GetStatus() string
- func (self *SSnapshot) IsEmulated() bool
- func (self *SSnapshot) Refresh() error
- type SStorage
- func (self *SStorage) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)
- func (self *SStorage) GetCapacityMB() int64
- func (self *SStorage) GetCapacityUsedMB() int64
- func (self *SStorage) GetEnabled() bool
- func (self *SStorage) GetGlobalId() string
- func (self *SStorage) GetIDiskById(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) GetMediumType() string
- func (self *SStorage) GetMountPoint() string
- 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) IsSysDiskStore() bool
- func (self *SStorage) Refresh() error
- type SStoragecache
- func (self *SStoragecache) CreateIImage(snapshotId, 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) GetICloudImages() ([]cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)
- func (self *SStoragecache) GetId() string
- func (self *SStoragecache) GetName() string
- func (self *SStoragecache) GetPath() string
- func (self *SStoragecache) GetStatus() string
- func (self *SStoragecache) IsEmulated() bool
- func (self *SStoragecache) Refresh() error
- func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (string, error)
- type SUcloudClient
- func (self *SUcloudClient) DoAction(action string, params SParams, result interface{}) error
- func (self *SUcloudClient) DoListAll(action string, params SParams, result interface{}) error
- func (self *SUcloudClient) DoListPart(action string, limit int, offset int, params SParams, result interface{}) (int, int, error)
- func (self *SUcloudClient) FetchProjects() ([]SProject, error)
- func (self *SUcloudClient) GetAccountId() string
- func (self *SUcloudClient) GetCapabilities() []string
- func (self *SUcloudClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
- func (self *SUcloudClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)
- func (self *SUcloudClient) GetIRegions() []cloudprovider.ICloudRegion
- func (self *SUcloudClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
- func (self *SUcloudClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
- func (self *SUcloudClient) GetRegion(regionId string) *SRegion
- func (self *SUcloudClient) GetRegions() []SRegion
- func (self *SUcloudClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
- func (self *SUcloudClient) UpdateAccount(accessKey, secret string) error
- type SUcloudError
- type SVPC
- func (self *SVPC) Delete() error
- func (self *SVPC) GetCidrBlock() string
- func (self *SVPC) GetGlobalId() string
- func (self *SVPC) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)
- func (self *SVPC) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)
- 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) GetName() string
- func (self *SVPC) GetRegion() cloudprovider.ICloudRegion
- func (self *SVPC) GetStatus() string
- func (self *SVPC) IsEmulated() bool
- func (self *SVPC) Refresh() error
- type SVip
- func (vip *SVip) GetAssociateId() string
- func (vip *SVip) GetAssociateType() string
- func (vip *SVip) GetGlobalId() string
- func (vip *SVip) GetICloudInterfaceAddresses() ([]cloudprovider.ICloudInterfaceAddress, error)
- func (vip *SVip) GetId() string
- func (vip *SVip) GetMacAddress() string
- func (vip *SVip) GetName() string
- func (vip *SVip) GetStatus() string
- type SVipAddr
- type SVncInfo
- type SWire
- func (self *SWire) CreateINetwork(opts *cloudprovider.SNetworkCreateOptions) (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) GetName() string
- 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) GetI18n() cloudprovider.SModelI18nTable
- 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) GetInstances() ([]SInstance, error)
- func (self *SZone) GetName() string
- func (self *SZone) GetStatus() string
- func (self *SZone) IsEmulated() bool
- func (self *SZone) Refresh() error
- type ShareBandwidthSet
- type UcloudClientConfig
Constants ¶
const ( EIP_CHARGE_TYPE_BY_TRAFFIC = "traffic" EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth" )
const ( CLOUD_PROVIDER_UCLOUD = api.CLOUD_PROVIDER_UCLOUD CLOUD_PROVIDER_UCLOUD_CN = "UCloud" UCLOUD_DEFAULT_REGION = "cn-bj2" UCLOUD_API_VERSION = "2019-02-28" )
const UCLOUD_API_HOST = "https://api.ucloud.cn"
Variables ¶
var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ "cn-bj1": {Latitude: 39.9041999, Longitude: 116.4073963, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, "cn-bj2": {Latitude: 39.9041999, Longitude: 116.4073963, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, "cn-sh": {Latitude: 31.2303904, Longitude: 121.4737021, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, "cn-sh2": {Latitude: 31.2303904, Longitude: 121.4737021, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, "cn-gd": {Latitude: 23.12911, Longitude: 113.264385, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, "hk": {Latitude: 22.396428, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, "us-ca": {Latitude: 34.0522342, Longitude: -118.2436849, City: api.CITY_LOS_ANGELES, CountryCode: api.COUNTRY_CODE_US}, "us-ws": {Latitude: 38.9071923, Longitude: -77.0368707, City: api.CITY_WASHINGTON, CountryCode: api.COUNTRY_CODE_US}, "ge-fra": {Latitude: 50.1109221, Longitude: 8.6821267, City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE}, "th-bkk": {Latitude: 13.7563309, Longitude: 100.5017651, City: api.CITY_BANGKOK, CountryCode: api.COUNTRY_CODE_TH}, "kr-seoul": {Latitude: 37.566535, Longitude: 126.9779692, City: api.CITY_SEOUL, CountryCode: api.COUNTRY_CODE_KR}, "sg": {Latitude: 1.352083, Longitude: 103.819836, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, "tw-tp": {Latitude: 25.0329694, Longitude: 121.5654177, City: api.CITY_TAIPEI, CountryCode: api.COUNTRY_CODE_CN}, "tw-kh": {Latitude: 22.6272784, Longitude: 120.3014353, City: api.CITY_KAOHSIUNG, CountryCode: api.COUNTRY_CODE_CN}, "jpn-tky": {Latitude: 35.7090259, Longitude: 139.7319925, City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP}, "rus-mosc": {Latitude: 55.755826, Longitude: 37.6172999, City: api.CITY_MOSCOW, CountryCode: api.COUNTRY_CODE_RU}, "uae-dubai": {Latitude: 25.2048493, Longitude: 55.2707828, City: api.CITY_DUBAI, CountryCode: api.COUNTRY_CODE_AE}, "idn-jakarta": {Latitude: -6.2087634, Longitude: 106.845599, City: api.CITY_JAKARTA, CountryCode: api.COUNTRY_CODE_ID}, "ind-mumbai": {Latitude: 19.0759837, Longitude: 72.8776559, City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN}, "bra-saopaulo": {Latitude: -23.5505199, Longitude: -46.6333094, City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR}, "uk-london": {Latitude: 51.5073509, Longitude: -0.1277583, City: api.CITY_LONDON, CountryCode: api.COUNTRY_CODE_GB}, "afr-nigeria": {Latitude: 6.5243793, Longitude: 3.3792057, City: api.CITY_LAGOS, CountryCode: api.COUNTRY_CODE_NG}, "vn-sng": {Latitude: 10.8230989, Longitude: 106.6296638, City: api.CITY_HO_CHI_MINH, CountryCode: api.COUNTRY_CODE_VN}, "cn-qz": {Latitude: 24.9037185, Longitude: 118.5134676, City: api.CITY_QUAN_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, }
https://docs.ucloud.cn/api/summary/regionlist
var StorageTypes = []string{ api.STORAGE_UCLOUD_CLOUD_NORMAL, api.STORAGE_UCLOUD_CLOUD_SSD, api.STORAGE_UCLOUD_LOCAL_NORMAL, api.STORAGE_UCLOUD_LOCAL_SSD, }
https://docs.ucloud.cn/api/udisk-api/create_udisk UDisk 类型: DataDisk(普通数据盘),SSDDataDisk(SSD数据盘),默认值(DataDisk)
var UCLOUD_API_RESULT_KEYS = map[string]string{
"AllocateEIP": "EIPSet",
"GetProjectList": "ProjectSet",
"GetRegion": "Regions",
"DescribeVPC": "DataSet",
"DescribeImage": "ImageSet",
"DescribeIsolationGroup": "IsolationGroupSet",
"DescribeUHostInstance": "UHostSet",
"DescribeUHostTags": "TagSet",
"DescribeUDSet": "UDSet",
"DescribeUDisk": "DataSet",
"DescribeUDiskSnapshot": "DataSet",
"DescribeEIP": "EIPSet",
"DescribeFirewall": "DataSet",
"DescribeSubnet": "DataSet",
"DescribeBucket": "DataSet",
"CreateUDisk": "UDiskId",
"CreateVPC": "VPCId",
"CreateUDiskSnapshot": "SnapshotId",
"DescribeVIP": "VIPSet",
}
API返回结果对应的字段名
var UCLOUD_REGION_NAMES = map[string]string{
"cn-bj1": "北京一",
"cn-bj2": "北京二",
"cn-sh": "上海金融云",
"cn-sh2": "上海二",
"cn-gd": "广州",
"hk": "香港",
"us-ca": "洛杉矶",
"us-ws": "华盛顿",
"ge-fra": "法兰克福",
"th-bkk": "曼谷",
"kr-seoul": "首尔",
"sg": "新加坡",
"tw-tp": "台北",
"tw-kh": "高雄",
"jpn-tky": "东京",
"rus-mosc": "莫斯科",
"uae-dubai": "迪拜",
"idn-jakarta": "雅加达",
"ind-mumbai": "孟买",
"bra-saopaulo": "圣保罗",
"uk-london": "伦敦",
"afr-nigeria": "拉各斯",
"vn-sng": "胡志明市",
}
https://docs.ucloud.cn/api/summary/regionlist
var UCLOUD_REGION_NAMES_EN = map[string]string{
"cn-bj1": "Beijing 1",
"cn-bj2": "Beijing 2",
"cn-sh": "Shanghai 1",
"cn-sh2": "Shanghai 2",
"cn-gd": "Guangzhou",
"hk": "Hongkong",
"us-ca": "Los Angeles",
"us-ws": "Washington",
"ge-fra": "Frankfurt",
"th-bkk": "Bangkok",
"kr-seoul": "Seoul",
"sg": "Singapore",
"tw-tp": "TaiPei",
"tw-kh": "Gaoxiong",
"jpn-tky": "Tokyo",
"rus-mosc": "Moscow",
"uae-dubai": "Dubai",
"idn-jakarta": "Jakarta",
"ind-mumbai": "Mumbai",
"bra-saopaulo": "Sao Paulo",
"uk-london": "London",
"afr-nigeria": "Lagos",
"vn-sng": "Ho Chi Min City",
}
var UCLOUD_ZONE_NAMES = map[string]string{
"cn-bj1-01": "北京一可用区A",
"cn-bj2-02": "北京二可用区B",
"cn-bj2-03": "北京二可用区C",
"cn-bj2-04": "北京二可用区D",
"cn-bj2-05": "北京二可用区E",
"cn-sh-01": "上海一可用区A",
"cn-sh2-01": "上海二可用区A",
"cn-sh2-02": "上海二可用区B",
"cn-gd-02": "广州可用区B",
"hk-01": "香港可用区A",
"hk-02": "香港可用区B",
"us-ca-01": "洛杉矶可用区A",
"us-ws-01": "华盛顿可用区A",
"ge-fra-01": "法兰克福可用区A",
"th-bkk-01": "曼谷可用区A",
"kr-seoul-01": "首尔可用区A",
"sg-01": "新加坡可用区A",
"tw-kh-01": "高雄可用区A",
"tw-tp-01": "台北可用区A",
"jpn-tky-01": "东京可用区A",
"rus-mosc-01": "莫斯科可用区A",
"uae-dubai-01": "迪拜可用区A",
"idn-jakarta-01": "雅加达可用区A",
"ind-mumbai-01": "孟买可用区A",
"bra-saopaulo-01": "圣保罗可用区A",
"uk-london-01": "伦敦可用区A",
"afr-nigeria-01": "拉各斯可用区A",
"vn-sng-01": "胡志明市可用区A",
}
var UCLOUD_ZONE_NAMES_EN = map[string]string{
"cn-bj1-01": "Beijing 1 Zone A",
"cn-bj2-02": "Beijing 2 Zone B",
"cn-bj2-03": "Beijing 2 Zone C",
"cn-bj2-04": "Beijing 2 Zone D",
"cn-bj2-05": "Beijing 2 Zone E",
"cn-sh-01": "Shanghai 1 Zone A",
"cn-sh2-01": "Shanghai 2 Zone A",
"cn-sh2-02": "Shanghai 2 Zone B",
"cn-gd-02": "Guangzhou Zone B",
"hk-01": "Hongkong Zone A",
"hk-02": "Hongkong Zone B",
"us-ca-01": "Los Angeles Zone A",
"us-ws-01": "Washington Zone A",
"ge-fra-01": "Frankfurt Zone A",
"th-bkk-01": "Bangkok Zone A",
"kr-seoul-01": "Seoul Zone A",
"sg-01": "Singapore Zone A",
"tw-kh-01": "Gaoxiong Zone A",
"tw-tp-01": "TaiPei Zone A",
"jpn-tky-01": "Tokyo Zone A",
"rus-mosc-01": "Moscow Zone A",
"uae-dubai-01": "Dubai Zone A",
"idn-jakarta-01": "Jakarta Zone A",
"ind-mumbai-01": "Mumbai Zone A",
"bra-saopaulo-01": "Sao Paulo Zone A",
"uk-london-01": "London Zone A",
"afr-nigeria-01": "Lagos Zone A",
"vn-sng-01": "Ho Chi Min City Zone A",
}
Functions ¶
func BuildParams ¶
func BuildParams(params SParams, privateKey string) jsonutils.JSONObject
func DoAction ¶
func DoAction(client *SUcloudClient, action string, params SParams, resultKey string, result interface{}) error
执行操作
func DoListAll ¶
func DoListAll(client *SUcloudClient, action string, params SParams, resultKey string, result interface{}) error
遍历所有结果
func GetBucketName ¶
func GetSignature ¶
Types ¶
type NetworkInfo ¶
type SBucket ¶
type SBucket struct { multicloud.SBaseBucket multicloud.UcloudTags Domain Domain `json:"Domain"` BucketID string `json:"BucketId"` Region string `json:"Region"` CreateTime int64 `json:"CreateTime"` Biz string `json:"Biz"` BucketName string `json:"BucketName"` ModifyTime int64 `json:"ModifyTime"` Type string `json:"Type"` Tag string `json:"Tag"` HasUserDomain int64 `json:"HasUserDomain"` CDNDomainID []string `json:"CdnDomainId"` // contains filtered or unexported fields }
func (*SBucket) AbortMultipartUpload ¶
func (*SBucket) CompleteMultipartUpload ¶
func (*SBucket) CopyObject ¶
func (*SBucket) DeleteObject ¶
func (*SBucket) GetAccessUrls ¶
func (b *SBucket) GetAccessUrls() []cloudprovider.SBucketAccessUrl
func (*SBucket) GetAcl ¶
func (b *SBucket) GetAcl() cloudprovider.TBucketACLType
func (*SBucket) GetCreatedAt ¶
func (*SBucket) GetGlobalId ¶
func (*SBucket) GetIRegion ¶
func (b *SBucket) GetIRegion() cloudprovider.ICloudRegion
func (*SBucket) GetLocation ¶
func (*SBucket) GetObject ¶
func (b *SBucket) GetObject(ctx context.Context, key string, rangeOpt *cloudprovider.SGetObjectRange) (io.ReadCloser, error)
func (*SBucket) GetProjectId ¶
func (*SBucket) GetStats ¶
func (b *SBucket) GetStats() cloudprovider.SBucketStats
func (*SBucket) GetStorageClass ¶
func (*SBucket) GetTempUrl ¶
func (*SBucket) ListObjects ¶
func (b *SBucket) ListObjects(prefix string, marker string, delimiter string, maxCount int) (cloudprovider.SListObjectResult, error)
func (*SBucket) NewMultipartUpload ¶
func (*SBucket) SetAcl ¶
func (b *SBucket) SetAcl(aclStr cloudprovider.TBucketACLType) error
type SDisk ¶
type SDisk struct { multicloud.SDisk multicloud.UcloudTags Status string `json:"Status"` DeviceName string `json:"DeviceName"` UHostID string `json:"UHostId"` Tag string `json:"Tag"` Version string `json:"Version"` Name string `json:"Name"` Zone string `json:"Zone"` UHostIP string `json:"UHostIP"` DiskType string `json:"DiskType"` UDataArkMode string `json:"UDataArkMode"` SnapshotLimit int `json:"SnapshotLimit"` ExpiredTime int64 `json:"ExpiredTime"` SnapshotCount int `json:"SnapshotCount"` IsExpire string `json:"IsExpire"` UDiskID string `json:"UDiskId"` ChargeType string `json:"ChargeType"` UHostName string `json:"UHostName"` CreateTime int64 `json:"CreateTime"` SizeGB int `json:"Size"` // contains filtered or unexported fields }
https://docs.ucloud.cn/api/udisk-api/describe_udisk
func (*SDisk) CreateISnapshot ¶
func (self *SDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetAccessPath ¶
func (*SDisk) GetCacheMode ¶
func (*SDisk) GetCreatedAt ¶
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(idStr string) (cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetISnapshots ¶
func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
func (*SDisk) GetIStorage ¶
func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)
func (*SDisk) GetIsAutoDelete ¶
func (*SDisk) GetIsNonPersistent ¶
func (*SDisk) GetMountpoint ¶
func (*SDisk) GetProjectId ¶
func (*SDisk) GetStorageType ¶
func (*SDisk) GetSysTags ¶
func (*SDisk) GetTemplateId ¶
func (*SDisk) IsEmulated ¶
type SEip ¶
type SEip struct { multicloud.SEipBase multicloud.UcloudTags BandwidthMb int `json:"Bandwidth"` BandwidthType int `json:"BandwidthType"` ChargeType string `json:"ChargeType"` CreateTime int64 `json:"CreateTime"` EIPAddr []EIPAddr `json:"EIPAddr"` EIPID string `json:"EIPId"` Expire bool `json:"Expire"` ExpireTime int64 `json:"ExpireTime"` Name string `json:"Name"` PayMode string `json:"PayMode"` Remark string `json:"Remark"` Resource Resource `json:"Resource"` Status string `json:"Status"` Tag string `json:"Tag"` Weight int `json:"Weight"` // contains filtered or unexported fields }
https://docs.ucloud.cn/api/unet-api/describe_eip
func (*SEip) Associate ¶
func (self *SEip) Associate(conf *cloudprovider.AssociateConfig) error
func (*SEip) ChangeBandwidth ¶
func (*SEip) Dissociate ¶
func (*SEip) GetAssociationExternalId ¶
已绑定的资源类型, 枚举值为: uhost, 云主机;natgw:NAT网关;ulb:负载均衡器;upm: 物理机; hadoophost: 大数据集群;fortresshost:堡垒机;udockhost:容器;udhost:私有专区主机;vpngw:IPSec VPN;ucdr:云灾备;dbaudit:数据库审计。
func (*SEip) GetAssociationType ¶
func (*SEip) GetBandwidth ¶
func (*SEip) GetBillingType ¶
付费方式, 枚举值为: Year, 按年付费; Month, 按月付费; Dynamic, 按小时付费; Trial, 试用. 按小时付费和试用这两种付费模式需要开通权限.
func (*SEip) GetCreatedAt ¶
func (*SEip) GetExpiredAt ¶
func (*SEip) GetGlobalId ¶
func (*SEip) GetINetworkId ¶
func (*SEip) GetInternetChargeType ¶
弹性IP的计费模式, 枚举值为: "Bandwidth", 带宽计费; "Traffic", 流量计费; "ShareBandwidth",共享带宽模式. 默认为 "Bandwidth".
func (*SEip) GetProjectId ¶
func (*SEip) IsEmulated ¶
type SFile ¶
type SFile struct { BucketName string `json:"BucketName"` FileName string `json:"FileName"` Size int64 `json:"Size"` Hash string `json:"Hash"` MimeType string `json:"MimeType"` CreateTime int64 `json:"CreateTime"` ModifyTime int64 `json:"ModifyTime"` StorageClass string `json:"StorageClass"` // contains filtered or unexported fields }
func (*SFile) GetAcl ¶
func (self *SFile) GetAcl() cloudprovider.TBucketACLType
func (*SFile) GetContentType ¶
func (*SFile) GetIBucket ¶
func (self *SFile) GetIBucket() cloudprovider.ICloudBucket
func (*SFile) GetLastModified ¶
func (*SFile) GetSizeBytes ¶
func (*SFile) GetStorageClass ¶
func (*SFile) SetAcl ¶
func (self *SFile) SetAcl(cloudprovider.TBucketACLType) error
type SHost ¶
type SHost struct { multicloud.SHostBase // contains filtered or unexported fields }
func (*SHost) CreateVM ¶
func (self *SHost) CreateVM(desc *cloudprovider.SManagedVMCreateConfig) (cloudprovider.ICloudVM, error)
不支持user data 不支持指定keypair
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) GetIHostNics ¶
func (self *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)
func (*SHost) GetIStorageById ¶
func (self *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SHost) GetIStorages ¶
func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SHost) GetIVMById ¶
func (self *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, error)
func (*SHost) GetIWires ¶
func (self *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SHost) GetIsMaintenance ¶
func (*SHost) GetMemSizeMB ¶
func (*SHost) GetNodeCount ¶
func (*SHost) GetStorageSizeMB ¶
func (*SHost) GetStorageType ¶
func (*SHost) GetSysInfo ¶
func (self *SHost) GetSysInfo() jsonutils.JSONObject
func (*SHost) GetVersion ¶
func (*SHost) IsEmulated ¶
type SImage ¶
type SImage struct { multicloud.SImageBase multicloud.UcloudTags Zone string `json:"Zone"` ImageDescription string `json:"ImageDescription"` OSName string `json:"OsName"` ImageID string `json:"ImageId"` State string `json:"State"` ImageName string `json:"ImageName"` OSType string `json:"OsType"` CreateTime int64 `json:"CreateTime"` ImageType string `json:"ImageType"` ImageSizeGB int64 `json:"ImageSize"` // contains filtered or unexported fields }
func (*SImage) GetBios ¶
func (img *SImage) GetBios() cloudprovider.TBiosType
func (*SImage) GetCreatedAt ¶
func (*SImage) GetFullOsName ¶
func (*SImage) GetGlobalId ¶
func (*SImage) GetIStoragecache ¶
func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache
func (*SImage) GetImageFormat ¶
func (*SImage) GetImageStatus ¶
func (*SImage) GetImageType ¶
func (self *SImage) GetImageType() cloudprovider.TImageType
镜像类型。标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型
func (*SImage) GetMinOsDiskSizeGb ¶
func (*SImage) GetMinRamSizeMb ¶
func (*SImage) GetOsType ¶
func (self *SImage) GetOsType() cloudprovider.TOsType
func (*SImage) GetOsVersion ¶
func (*SImage) GetSizeByte ¶
func (*SImage) IsEmulated ¶
type SInstance ¶
type SInstance struct { multicloud.SInstanceBase multicloud.UcloudTags UHostID string `json:"UHostId"` Zone string `json:"Zone"` LifeCycle string `json:"LifeCycle"` OSName string `json:"OsName"` ImageID string `json:"ImageId"` BasicImageID string `json:"BasicImageId"` BasicImageName string `json:"BasicImageName"` Tag string `json:"Tag"` Name string `json:"Name"` Remark string `json:"Remark"` State string `json:"State"` NetworkState string `json:"NetworkState"` HostType string `json:"HostType"` StorageType string `json:"StorageType"` TotalDiskSpace int `json:"TotalDiskSpace"` DiskSet []DiskSet `json:"DiskSet"` NetCapability string `json:"NetCapability"` IPSet []IPSet `json:"IPSet"` SubnetType string `json:"SubnetType"` ChargeType string `json:"ChargeType"` ExpireTime int64 `json:"ExpireTime"` AutoRenew string `json:"AutoRenew"` IsExpire string `json:"IsExpire"` UHostType string `json:"UHostType"` OSType string `json:"OsType"` CreateTime int64 `json:"CreateTime"` CPU int `json:"CPU"` GPU int `json:"GPU"` MemoryMB int `json:"Memory"` TimemachineFeature string `json:"TimemachineFeature"` HotplugFeature bool `json:"HotplugFeature"` NetCapFeature bool `json:"NetCapFeature"` BootDiskState string `json:"BootDiskState"` // contains filtered or unexported fields }
func (*SInstance) AssignSecurityGroup ¶
func (*SInstance) AttachDisk ¶
func (*SInstance) ChangeConfig ¶
func (self *SInstance) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error
func (*SInstance) ChangeConfig2 ¶
func (*SInstance) DetachDisk ¶
func (*SInstance) GetBillingType ¶
计费模式,枚举值为: Year,按年付费; Month,按月付费; Dynamic,按需付费(需开启权限);
func (*SInstance) GetBios ¶
func (ins *SInstance) GetBios() cloudprovider.TBiosType
func (*SInstance) GetBootOrder ¶
func (*SInstance) GetCreatedAt ¶
func (*SInstance) GetExpiredAt ¶
func (*SInstance) GetFullOsName ¶
func (*SInstance) GetGlobalId ¶
func (*SInstance) GetHostname ¶
func (*SInstance) GetHypervisor ¶
func (*SInstance) GetIDisks ¶
func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)
func (*SInstance) GetIEIP ¶
func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)
国际: Internation,BGP: BGP,内网: Private
func (*SInstance) GetIHost ¶
func (self *SInstance) GetIHost() cloudprovider.ICloudHost
func (*SInstance) GetInstanceType ¶
func (*SInstance) GetLocalDisk ¶
func (*SInstance) GetMachine ¶
func (*SInstance) GetOsType ¶
func (ins *SInstance) GetOsType() cloudprovider.TOsType
func (*SInstance) GetOsVersion ¶
func (*SInstance) GetProjectId ¶
func (*SInstance) GetSecurityGroupIds ¶
func (*SInstance) GetSecurityGroups ¶
func (self *SInstance) GetSecurityGroups() ([]SSecurityGroup, error)
func (*SInstance) GetStatus ¶
实例状态,枚举值: >初始化: Initializing; >启动中: Starting; > 运行中: Running; > 关机中: Stopping; >关机: Stopped >安装失败: Install Fail; >重启中: Rebooting
func (*SInstance) GetSysTags ¶
func (*SInstance) GetVNCInfo ¶
func (self *SInstance) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)
func (*SInstance) GetVcpuCount ¶
func (*SInstance) GetVmemSizeMB ¶
func (*SInstance) IsEmulated ¶
func (*SInstance) RebuildRoot ¶
func (self *SInstance) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)
https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance 1.请确认在重新安装之前,该实例已被关闭; 2.请确认该实例未挂载UDisk; todo:// 3.将原系统重装为不同类型的系统时(Linux->Windows),不可选择保留数据盘; 4.重装不同版本的系统时(CentOS6->CentOS7),若选择保留数据盘,请注意数据盘的文件系统格式; 5.若主机CPU低于2核,不可重装为Windows系统。
func (*SInstance) SetSecurityGroups ¶
func (*SInstance) StopVM ¶
func (self *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error
func (*SInstance) UpdateUserData ¶
type SInstanceNic ¶
type SInstanceNic struct { cloudprovider.DummyICloudNic // contains filtered or unexported fields }
func (*SInstanceNic) GetDriver ¶
func (self *SInstanceNic) GetDriver() string
func (*SInstanceNic) GetINetworkId ¶
func (self *SInstanceNic) GetINetworkId() string
func (*SInstanceNic) GetIP ¶
func (self *SInstanceNic) GetIP() string
func (*SInstanceNic) GetId ¶
func (self *SInstanceNic) GetId() string
func (*SInstanceNic) GetMAC ¶
func (self *SInstanceNic) GetMAC() string
func (*SInstanceNic) InClassicNetwork ¶
func (self *SInstanceNic) InClassicNetwork() bool
type SInstanceType ¶
func ParseInstanceType ¶
func ParseInstanceType(instanceType string) (SInstanceType, error)
type SNetwork ¶
type SNetwork struct { multicloud.SResourceBase multicloud.UcloudTags CreateTime int64 `json:"CreateTime"` Gateway string `json:"Gateway"` HasNATGW bool `json:"HasNATGW"` Name string `json:"Name"` Netmask string `json:"Netmask"` Remark string `json:"Remark"` RouteTableID string `json:"RouteTableId"` Subnet string `json:"Subnet"` SubnetID string `json:"SubnetId"` SubnetName string `json:"SubnetName"` SubnetType int `json:"SubnetType"` Tag string `json:"Tag"` VPCID string `json:"VPCId"` VPCName string `json:"VPCName"` VRouterID string `json:"VRouterId"` Zone string `json:"Zone"` // contains filtered or unexported fields }
https://docs.ucloud.cn/api/vpc2.0-api/describe_subnet
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) GetProjectId ¶
func (*SNetwork) GetPublicScope ¶
func (self *SNetwork) GetPublicScope() rbacutils.TRbacScope
func (*SNetwork) GetServerType ¶
func (*SNetwork) IsEmulated ¶
type SParams ¶
type SParams struct {
// contains filtered or unexported fields
}
func NewUcloudParams ¶
func NewUcloudParams() SParams
func (*SParams) PrettyString ¶
func (*SParams) SetPagination ¶
type SProject ¶
type SProject struct { multicloud.SProjectBase multicloud.UcloudTags ProjectID string `json:"ProjectId"` ProjectName string `json:"ProjectName"` ParentID string `json:"ParentId"` ParentName string `json:"ParentName"` CreateTime int64 `json:"CreateTime"` IsDefault bool `json:"IsDefault"` MemberCount int64 `json:"MemberCount"` ResourceCount int64 `json:"ResourceCount"` }
https://docs.ucloud.cn/api/summary/get_project_list
func (*SProject) GetGlobalId ¶
func (*SProject) IsEmulated ¶
type SRegion ¶
type SRegion struct { multicloud.SRegion RegionID string // contains filtered or unexported fields }
func (*SRegion) AssociateEip ¶
func (*SRegion) AttachDisk ¶
func (*SRegion) CreateBucket ¶
func (*SRegion) CreateDefaultSecurityGroup ¶
func (*SRegion) CreateDisk ¶
func (*SRegion) CreateEIP ¶
func (self *SRegion) CreateEIP(eip *cloudprovider.SEip) (cloudprovider.ICloudEIP, error)
https://docs.ucloud.cn/api/unet-api/allocate_eip 增加共享带宽模式ShareBandwidth
func (*SRegion) CreateIBucket ¶
func (*SRegion) CreateILoadBalancer ¶
func (self *SRegion) CreateILoadBalancer(loadbalancer *cloudprovider.SLoadbalancer) (cloudprovider.ICloudLoadbalancer, error)
func (*SRegion) CreateILoadBalancerAcl ¶
func (self *SRegion) CreateILoadBalancerAcl(acl *cloudprovider.SLoadbalancerAccessControlList) (cloudprovider.ICloudLoadbalancerAcl, error)
func (*SRegion) CreateILoadBalancerCertificate ¶
func (self *SRegion) CreateILoadBalancerCertificate(cert *cloudprovider.SLoadbalancerCertificate) (cloudprovider.ICloudLoadbalancerCertificate, error)
func (*SRegion) CreateISecurityGroup ¶
func (self *SRegion) CreateISecurityGroup(conf *cloudprovider.SecurityGroupCreateInput) (cloudprovider.ICloudSecurityGroup, error)
func (*SRegion) CreateIVpc ¶
func (self *SRegion) CreateIVpc(opts *cloudprovider.VpcCreateOptions) (cloudprovider.ICloudVpc, error)
func (*SRegion) CreateInstance ¶
func (self *SRegion) CreateInstance(name, imageId, hostType, password, vpcId, SubnetId, securityGroupId, zoneId, desc, ipAddr string, cpu, memMB, gpu int, disks []SDisk, bc *billing.SBillingCycle) (string, error)
https://docs.ucloud.cn/api/uhost-api/create_uhost_instance https://docs.ucloud.cn/api/uhost-api/specification 支持8-30位字符, 不能包含[A-Z],[a-z],[0-9]和[()`~!@#$%^&*-+=_|{}[]:;'<>,.?/]之外的非法字符
func (*SRegion) CreateNetwork ¶
func (*SRegion) CreateSecurityGroup ¶
func (*SRegion) CreateSnapshot ¶
func (*SRegion) DeallocateEIP ¶
func (*SRegion) DeleteBucket ¶
func (*SRegion) DeleteDisk ¶
func (*SRegion) DeleteIBucket ¶
func (*SRegion) DeleteImage ¶
func (*SRegion) DeleteNetwork ¶
func (*SRegion) DeleteSecurityGroup ¶
func (*SRegion) DeleteSnapshot ¶
func (*SRegion) DeleteVM ¶
https://docs.ucloud.cn/api/uhost-api/terminate_uhost_instance
func (*SRegion) DetachDisk ¶
func (*SRegion) DissociateEip ¶
func (*SRegion) DoListPart ¶
func (self *SRegion) DoListPart(action string, limit int, offset int, params SParams, result interface{}) (int, int, error)
return total,lenght,error
func (*SRegion) GetCapabilities ¶
func (*SRegion) GetClient ¶
func (self *SRegion) GetClient() *SUcloudClient
func (*SRegion) GetCloudEnv ¶
func (*SRegion) GetDisks ¶
https://docs.ucloud.cn/api/udisk-api/describe_udisk diskType DataDisk|SystemDisk (DataDisk表示数据盘,SystemDisk表示系统盘)
func (*SRegion) GetGeographicInfo ¶
func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo
func (*SRegion) GetGlobalId ¶
func (*SRegion) GetI18n ¶
func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable
func (*SRegion) GetIBucketById ¶
func (region *SRegion) GetIBucketById(bucketId string) (cloudprovider.ICloudBucket, error)
func (*SRegion) GetIBucketByName ¶
func (region *SRegion) GetIBucketByName(name string) (cloudprovider.ICloudBucket, error)
func (*SRegion) GetIBuckets ¶
func (region *SRegion) GetIBuckets() ([]cloudprovider.ICloudBucket, error)
func (*SRegion) GetIDiskById ¶
func (self *SRegion) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)
func (*SRegion) GetIEipById ¶
func (self *SRegion) GetIEipById(id string) (cloudprovider.ICloudEIP, error)
func (*SRegion) GetIHostById ¶
func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SRegion) GetIHosts ¶
func (self *SRegion) GetIHosts() ([]cloudprovider.ICloudHost, error)
func (*SRegion) GetILoadBalancerAclById ¶
func (self *SRegion) GetILoadBalancerAclById(aclId string) (cloudprovider.ICloudLoadbalancerAcl, error)
func (*SRegion) GetILoadBalancerAcls ¶
func (self *SRegion) GetILoadBalancerAcls() ([]cloudprovider.ICloudLoadbalancerAcl, error)
func (*SRegion) GetILoadBalancerBackendGroups ¶
func (self *SRegion) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error)
func (*SRegion) GetILoadBalancerById ¶
func (self *SRegion) GetILoadBalancerById(loadbalancerId string) (cloudprovider.ICloudLoadbalancer, error)
func (*SRegion) GetILoadBalancerCertificateById ¶
func (self *SRegion) GetILoadBalancerCertificateById(certId string) (cloudprovider.ICloudLoadbalancerCertificate, error)
func (*SRegion) GetILoadBalancerCertificates ¶
func (self *SRegion) GetILoadBalancerCertificates() ([]cloudprovider.ICloudLoadbalancerCertificate, error)
func (*SRegion) GetILoadBalancers ¶
func (self *SRegion) GetILoadBalancers() ([]cloudprovider.ICloudLoadbalancer, error)
func (*SRegion) GetINetworkInterfaces ¶
func (region *SRegion) GetINetworkInterfaces() ([]cloudprovider.ICloudNetworkInterface, error)
func (*SRegion) GetISecurityGroupById ¶
func (self *SRegion) GetISecurityGroupById(secgroupId string) (cloudprovider.ICloudSecurityGroup, error)
func (*SRegion) GetISecurityGroupByName ¶
func (self *SRegion) GetISecurityGroupByName(opts *cloudprovider.SecurityGroupFilterOptions) (cloudprovider.ICloudSecurityGroup, error)
func (*SRegion) GetISnapshotById ¶
func (self *SRegion) GetISnapshotById(snapshotId string) (cloudprovider.ICloudSnapshot, error)
func (*SRegion) GetISnapshots ¶
func (self *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)
https://docs.ucloud.cn/api/udisk-api/describe_udisk_snapshot
func (*SRegion) GetIStorageById ¶
func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SRegion) GetIStoragecacheById ¶
func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)
func (*SRegion) GetIStoragecaches ¶
func (self *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)
func (*SRegion) GetIStorages ¶
func (self *SRegion) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SRegion) GetIVMById ¶
func (self *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error)
func (*SRegion) GetIVpcById ¶
func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
func (*SRegion) GetIZoneById ¶
func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)
func (*SRegion) GetIZones ¶
func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)
func (*SRegion) GetImages ¶
https://docs.ucloud.cn/api/uhost-api/describe_image ImageType 标准镜像:Base,镜像市场:Business, 自定义镜像:Custom,默认返回所有类型
func (*SRegion) GetInstanceVNCUrl ¶
func (self *SRegion) GetInstanceVNCUrl(instanceId string) (*cloudprovider.ServerVncOutput, error)
https://docs.ucloud.cn/api/uhost-api/get_uhost_instance_vnc_info
func (*SRegion) GetProvider ¶
func (*SRegion) GetSecurityGroupById ¶
func (self *SRegion) GetSecurityGroupById(secGroupId string) (*SSecurityGroup, error)
func (*SRegion) GetSecurityGroups ¶
func (*SRegion) GetSkus ¶
func (self *SRegion) GetSkus(zoneId string) ([]cloudprovider.ICloudSku, error)
func (*SRegion) GetSnapshotById ¶
func (*SRegion) GetSnapshots ¶
func (*SRegion) ImportImage ¶
func (*SRegion) IsEmulated ¶
func (*SRegion) RebuildRoot ¶
https://docs.ucloud.cn/api/uhost-api/reinstall_uhost_instance (密码格式使用BASE64编码;LoginMode不可变更)
func (*SRegion) RenewInstance ¶
func (self *SRegion) RenewInstance(instanceId string, bc billing.SBillingCycle) error
ChargeType : Dynamic(按需)/Month(按月)/Year(按年)
func (*SRegion) ResetVMPasswd ¶
https://docs.ucloud.cn/api/uhost-api/reset_uhost_instance_password 该操作需要UHost实例处于关闭状态。
func (*SRegion) UpdateEipBandwidth ¶
type SSecurityGroup ¶
type SSecurityGroup struct { multicloud.SSecurityGroup multicloud.UcloudTags CreateTime int64 `json:"CreateTime"` FWID string `json:"FWId"` GroupID string `json:"GroupId"` Name string `json:"Name"` Remark string `json:"Remark"` ResourceCount int `json:"ResourceCount"` Rule []Rule `json:"Rule"` Tag string `json:"Tag"` Type string `json:"Type"` // contains filtered or unexported fields }
https://docs.ucloud.cn/api/unet-api/describe_firewall
func (*SSecurityGroup) Delete ¶
func (self *SSecurityGroup) Delete() error
func (*SSecurityGroup) GetDescription ¶
func (self *SSecurityGroup) GetDescription() string
func (*SSecurityGroup) GetGlobalId ¶
func (self *SSecurityGroup) GetGlobalId() string
func (*SSecurityGroup) GetId ¶
func (self *SSecurityGroup) GetId() string
func (*SSecurityGroup) GetName ¶
func (self *SSecurityGroup) GetName() string
func (*SSecurityGroup) GetProjectId ¶
func (self *SSecurityGroup) GetProjectId() string
func (*SSecurityGroup) GetRules ¶
func (self *SSecurityGroup) GetRules() ([]cloudprovider.SecurityRule, error)
func (*SSecurityGroup) GetStatus ¶
func (self *SSecurityGroup) GetStatus() string
func (*SSecurityGroup) GetVpcId ¶
func (self *SSecurityGroup) GetVpcId() string
func (*SSecurityGroup) IsEmulated ¶
func (self *SSecurityGroup) IsEmulated() bool
func (*SSecurityGroup) Refresh ¶
func (self *SSecurityGroup) Refresh() error
func (*SSecurityGroup) SyncRules ¶
func (self *SSecurityGroup) SyncRules(common, inAdds, outAdds, inDels, outDels []cloudprovider.SecurityRule) error
func (*SSecurityGroup) UcloudSecRuleToOnecloud ¶
func (self *SSecurityGroup) UcloudSecRuleToOnecloud(rule Rule) (cloudprovider.SecurityRule, error)
type SSnapshot ¶
type SSnapshot struct { multicloud.SResourceBase multicloud.UcloudTags Comment string `json:"Comment"` ChargeType string `json:"ChargeType"` Name string `json:"Name"` UDiskName string `json:"UDiskName"` ExpiredTime int64 `json:"ExpiredTime"` UDiskID string `json:"UDiskId"` SnapshotID string `json:"SnapshotId"` CreateTime int64 `json:"CreateTime"` SizeGB int32 `json:"Size"` Status string `json:"Status"` IsUDiskAvailable bool `json:"IsUDiskAvailable"` Version string `json:"Version"` DiskType int `json:"DiskType"` UHostID string `json:"UHostId"` // contains filtered or unexported fields }
https://docs.ucloud.cn/api/udisk-api/describe_udisk_snapshot
func (*SSnapshot) GetGlobalId ¶
func (*SSnapshot) GetProjectId ¶
func (*SSnapshot) IsEmulated ¶
type SStorage ¶
type SStorage struct { multicloud.SStorageBase multicloud.UcloudTags // contains filtered or unexported fields }
func (*SStorage) CreateIDisk ¶
func (self *SStorage) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)
func (*SStorage) GetCapacityMB ¶
func (*SStorage) GetCapacityUsedMB ¶
func (*SStorage) GetEnabled ¶
func (*SStorage) GetGlobalId ¶
func (*SStorage) GetIDiskById ¶
func (self *SStorage) GetIDiskById(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) GetMediumType ¶
func (*SStorage) GetMountPoint ¶
func (*SStorage) GetStorageConf ¶
func (self *SStorage) GetStorageConf() jsonutils.JSONObject
func (*SStorage) GetStorageType ¶
func (*SStorage) IsEmulated ¶
func (*SStorage) IsSysDiskStore ¶
type SStoragecache ¶
type SStoragecache struct { multicloud.SResourceBase multicloud.UcloudTags // contains filtered or unexported fields }
func (*SStoragecache) CreateIImage ¶
func (self *SStoragecache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)
func (*SStoragecache) DownloadImage ¶
func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)
func (*SStoragecache) GetGlobalId ¶
func (self *SStoragecache) GetGlobalId() string
func (*SStoragecache) GetICloudImages ¶
func (self *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)
func (*SStoragecache) GetICustomizedCloudImages ¶
func (self *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)
func (*SStoragecache) GetIImageById ¶
func (self *SStoragecache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)
func (*SStoragecache) GetId ¶
func (self *SStoragecache) GetId() string
func (*SStoragecache) GetName ¶
func (self *SStoragecache) GetName() string
func (*SStoragecache) GetPath ¶
func (self *SStoragecache) GetPath() string
func (*SStoragecache) GetStatus ¶
func (self *SStoragecache) GetStatus() string
func (*SStoragecache) IsEmulated ¶
func (self *SStoragecache) IsEmulated() bool
func (*SStoragecache) Refresh ¶
func (self *SStoragecache) Refresh() error
func (*SStoragecache) UploadImage ¶
func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, image *cloudprovider.SImageCreateOption, callback func(progress float32)) (string, error)
type SUcloudClient ¶
type SUcloudClient struct { *UcloudClientConfig // contains filtered or unexported fields }
func NewUcloudClient ¶
func NewUcloudClient(cfg *UcloudClientConfig) (*SUcloudClient, error)
进行资源操作时参数account 对应数据库cloudprovider表中的account字段,由accessKey和projectID两部分组成,通过"/"分割。 初次导入Subaccount时,参数account对应cloudaccounts表中的account字段,即accesskey。此时projectID为空,只能进行同步子账号(项目)、查询region列表等projectId无关的操作。
func (*SUcloudClient) DoAction ¶
func (self *SUcloudClient) DoAction(action string, params SParams, result interface{}) error
func (*SUcloudClient) DoListAll ¶
func (self *SUcloudClient) DoListAll(action string, params SParams, result interface{}) error
func (*SUcloudClient) DoListPart ¶
func (*SUcloudClient) FetchProjects ¶
func (self *SUcloudClient) FetchProjects() ([]SProject, error)
func (*SUcloudClient) GetAccountId ¶
func (self *SUcloudClient) GetAccountId() string
func (*SUcloudClient) GetCapabilities ¶
func (self *SUcloudClient) GetCapabilities() []string
func (*SUcloudClient) GetIHostById ¶
func (self *SUcloudClient) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SUcloudClient) GetIRegionById ¶
func (self *SUcloudClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)
func (*SUcloudClient) GetIRegions ¶
func (self *SUcloudClient) GetIRegions() []cloudprovider.ICloudRegion
func (*SUcloudClient) GetIStorageById ¶
func (self *SUcloudClient) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SUcloudClient) GetIVpcById ¶
func (self *SUcloudClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
func (*SUcloudClient) GetRegion ¶
func (self *SUcloudClient) GetRegion(regionId string) *SRegion
func (*SUcloudClient) GetRegions ¶
func (self *SUcloudClient) GetRegions() []SRegion
func (*SUcloudClient) GetSubAccounts ¶
func (self *SUcloudClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
func (*SUcloudClient) UpdateAccount ¶
func (self *SUcloudClient) UpdateAccount(accessKey, secret string) error
type SUcloudError ¶
type SUcloudError struct { Action string `json:"Action"` Message string `json:"Message"` RetCode int64 `json:"RetCode"` }
func (*SUcloudError) Error ¶
func (self *SUcloudError) Error() string
type SVPC ¶
type SVPC struct { multicloud.SVpc multicloud.UcloudTags CreateTime int64 `json:"CreateTime"` Name string `json:"Name"` Network []string `json:"Network"` NetworkInfo []NetworkInfo `json:"NetworkInfo"` SubnetCount int `json:"SubnetCount"` Tag string `json:"Tag"` UpdateTime int64 `json:"UpdateTime"` VPCID string `json:"VPCId"` // contains filtered or unexported fields }
func (*SVPC) GetCidrBlock ¶
func (*SVPC) GetGlobalId ¶
func (*SVPC) GetIRouteTableById ¶
func (self *SVPC) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)
func (*SVPC) GetIRouteTables ¶
func (self *SVPC) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)
func (*SVPC) GetISecurityGroups ¶
func (self *SVPC) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)
由于Ucloud 安全组和vpc没有直接关联,这里是返回同一个项目下的防火墙列表,会导致重复同步的问题。 https://docs.ucloud.cn/api/unet-api/grant_firewall
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) GetRegion ¶
func (self *SVPC) GetRegion() cloudprovider.ICloudRegion
func (*SVPC) IsEmulated ¶
type SVip ¶
type SVip struct { multicloud.SNetworkInterfaceBase multicloud.UcloudTags CreateTime int64 Name string RealIp string Remark string SubnetId string Tag string VIP string VIPId string VPCId string Zone string // contains filtered or unexported fields }
func (*SVip) GetAssociateId ¶
func (*SVip) GetAssociateType ¶
func (*SVip) GetGlobalId ¶
func (*SVip) GetICloudInterfaceAddresses ¶
func (vip *SVip) GetICloudInterfaceAddresses() ([]cloudprovider.ICloudInterfaceAddress, error)
func (*SVip) GetMacAddress ¶
type SWire ¶
type SWire struct { multicloud.SResourceBase multicloud.UcloudTags // contains filtered or unexported fields }
子网在整个region可用
func (*SWire) CreateINetwork ¶
func (self *SWire) CreateINetwork(opts *cloudprovider.SNetworkCreateOptions) (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) IsEmulated ¶
type SZone ¶
type SZone struct { multicloud.SResourceBase multicloud.UcloudTags RegionId string ZoneId string // contains filtered or unexported fields }
func (*SZone) GetGlobalId ¶
func (*SZone) GetI18n ¶
func (self *SZone) GetI18n() cloudprovider.SModelI18nTable
func (*SZone) GetIHostById ¶
func (self *SZone) GetIHostById(id string) (cloudprovider.ICloudHost, error)
func (*SZone) GetIHosts ¶
func (self *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)
func (*SZone) GetIRegion ¶
func (self *SZone) GetIRegion() cloudprovider.ICloudRegion
func (*SZone) GetIStorageById ¶
func (self *SZone) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)
func (*SZone) GetIStorages ¶
func (self *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)
func (*SZone) GetIWires ¶
func (self *SZone) GetIWires() ([]cloudprovider.ICloudWire, error)
func (*SZone) IsEmulated ¶
type ShareBandwidthSet ¶
type ShareBandwidthSet struct {}
type UcloudClientConfig ¶
type UcloudClientConfig struct {
// contains filtered or unexported fields
}
func NewUcloudClientConfig ¶
func NewUcloudClientConfig(accessKeyId, accessKeySecret string) *UcloudClientConfig
func (*UcloudClientConfig) CloudproviderConfig ¶
func (cfg *UcloudClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *UcloudClientConfig
func (*UcloudClientConfig) Debug ¶
func (cfg *UcloudClientConfig) Debug(debug bool) *UcloudClientConfig
func (*UcloudClientConfig) ProjectId ¶
func (cfg *UcloudClientConfig) ProjectId(projectId string) *UcloudClientConfig