mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
@@ -329,6 +329,8 @@ type ICloudVM interface {
|
||||
|
||||
GetIEIP() (ICloudEIP, error)
|
||||
|
||||
GetInternetMaxBandwidthOut() int
|
||||
GetThroughput() int
|
||||
// GetStatus() string
|
||||
// GetRemoteStatus() string
|
||||
|
||||
@@ -960,6 +962,7 @@ type ICloudDBInstance interface {
|
||||
GetZone2Id() string
|
||||
GetZone3Id() string
|
||||
GetIVpcId() string
|
||||
GetIops() int
|
||||
|
||||
GetDBNetworks() ([]SDBInstanceNetwork, error)
|
||||
GetIDBInstanceParameters() ([]ICloudDBInstanceParameter, error)
|
||||
@@ -1431,6 +1434,8 @@ type ICloudMongoDB interface {
|
||||
GetInstanceType() string
|
||||
GetMaintainTime() string
|
||||
GetPort() int
|
||||
GetIops() int
|
||||
GetNetworkAddress() string
|
||||
|
||||
GetIBackups() ([]SMongoDBBackup, error)
|
||||
|
||||
|
||||
@@ -106,6 +106,9 @@ type SDBInstance struct {
|
||||
// example: ha
|
||||
Category string `nullable:"false" list:"user" create:"optional"`
|
||||
|
||||
// 最大连接数
|
||||
Iops int `nullable:"true" list:"user" create:"optional"`
|
||||
|
||||
// 引擎
|
||||
// example: MySQL
|
||||
Engine string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
|
||||
@@ -1600,6 +1603,9 @@ func (self *SDBInstance) SyncWithCloudDBInstance(ctx context.Context, userCred m
|
||||
self.Category = ext.GetCategory()
|
||||
self.Status = ext.GetStatus()
|
||||
self.Port = ext.GetPort()
|
||||
if iops := ext.GetIops(); iops > 0 {
|
||||
self.Iops = iops
|
||||
}
|
||||
|
||||
self.ConnectionStr = ext.GetConnectionStr()
|
||||
self.InternalConnectionStr = ext.GetInternalConnectionStr()
|
||||
@@ -1688,6 +1694,7 @@ func (manager *SDBInstanceManager) newFromCloudDBInstance(ctx context.Context, u
|
||||
instance.Status = extInstance.GetStatus()
|
||||
instance.Port = extInstance.GetPort()
|
||||
|
||||
instance.Iops = extInstance.GetIops()
|
||||
instance.Engine = extInstance.GetEngine()
|
||||
instance.EngineVersion = extInstance.GetEngineVersion()
|
||||
instance.InstanceType = extInstance.GetInstanceType()
|
||||
|
||||
@@ -129,6 +129,9 @@ type SDisk struct {
|
||||
|
||||
// 最大连接数
|
||||
Iops int `nullable:"true" list:"user" create:"optional"`
|
||||
|
||||
// 磁盘吞吐量
|
||||
Throughput int `nullable:"true" list:"user" create:"optional"`
|
||||
}
|
||||
|
||||
func (manager *SDiskManager) GetContextManagers() [][]db.IModelManager {
|
||||
|
||||
@@ -165,6 +165,11 @@ type SGuest struct {
|
||||
SshableLastState tristate.TriState `default:"false" list:"user"`
|
||||
|
||||
IsDaemon tristate.TriState `default:"false" list:"admin" create:"admin_optional" update:"admin"`
|
||||
|
||||
// 最大内网带宽
|
||||
InternetMaxBandwidthOut int `nullable:"false" list:"user" create:"optional"`
|
||||
// 磁盘吞吐量
|
||||
Throughput int `nullable:"true" list:"user" create:"optional"`
|
||||
}
|
||||
|
||||
func (manager *SGuestManager) GetPropertyStatistics(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*apis.StatusStatistic, error) {
|
||||
@@ -2705,6 +2710,8 @@ func (self *SGuest) syncWithCloudVM(ctx context.Context, userCred mcclient.Token
|
||||
if !recycle {
|
||||
self.HostId = host.Id
|
||||
}
|
||||
self.InternetMaxBandwidthOut = extVM.GetInternetMaxBandwidthOut()
|
||||
self.Throughput = extVM.GetThroughput()
|
||||
|
||||
instanceType := extVM.GetInstanceType()
|
||||
|
||||
@@ -2791,6 +2798,8 @@ func (manager *SGuestManager) newCloudVM(ctx context.Context, userCred mcclient.
|
||||
guest.Machine = extVM.GetMachine()
|
||||
guest.Hypervisor = extVM.GetHypervisor()
|
||||
guest.Hostname = extVM.GetHostname()
|
||||
guest.InternetMaxBandwidthOut = extVM.GetInternetMaxBandwidthOut()
|
||||
guest.Throughput = extVM.GetThroughput()
|
||||
|
||||
guest.IsEmulated = extVM.IsEmulated()
|
||||
|
||||
|
||||
@@ -96,6 +96,9 @@ type SMongoDB struct {
|
||||
// example: 3
|
||||
ReplicationNum int `nullable:"false" default:"0" list:"user" create:"optional"`
|
||||
|
||||
// 最大连接数
|
||||
Iops int `nullable:"true" list:"user" create:"optional"`
|
||||
|
||||
// 实例IP地址
|
||||
IpAddr string `nullable:"false" list:"user"`
|
||||
|
||||
@@ -118,6 +121,9 @@ type SMongoDB struct {
|
||||
|
||||
// 所属网络ID
|
||||
NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" json:"network_id"`
|
||||
|
||||
// 连接地址
|
||||
NetworkAddress string `width:"256" charset:"ascii" nullable:"true" list:"user" create:"optional"`
|
||||
}
|
||||
|
||||
func (manager *SMongoDBManager) GetContextManagers() [][]db.IModelManager {
|
||||
@@ -495,6 +501,10 @@ func (self *SMongoDB) SyncWithCloudMongoDB(ctx context.Context, userCred mcclien
|
||||
self.MaintainTime = ext.GetMaintainTime()
|
||||
self.Status = ext.GetStatus()
|
||||
self.Port = ext.GetPort()
|
||||
if iops := ext.GetIops(); iops > 0 {
|
||||
self.Iops = iops
|
||||
}
|
||||
self.NetworkAddress = ext.GetNetworkAddress()
|
||||
|
||||
if vpcId := ext.GetVpcId(); len(vpcId) > 0 {
|
||||
vpc, err := db.FetchByExternalIdAndManagerId(VpcManager, vpcId, func(q *sqlchemy.SQuery) *sqlchemy.SQuery {
|
||||
@@ -567,6 +577,8 @@ func (self *SCloudregion) newFromCloudMongoDB(ctx context.Context, userCred mccl
|
||||
ins.MaintainTime = ext.GetMaintainTime()
|
||||
ins.Port = ext.GetPort()
|
||||
ins.ReplicationNum = ext.GetReplicationNum()
|
||||
ins.Iops = ext.GetIops()
|
||||
ins.NetworkAddress = ext.GetNetworkAddress()
|
||||
|
||||
if zoneId := ext.GetZoneId(); len(zoneId) > 0 {
|
||||
zone, err := self.GetZoneBySuffix(zoneId)
|
||||
|
||||
@@ -60,6 +60,7 @@ type SDBInstance struct {
|
||||
DBInstanceId string
|
||||
ConnectionMode string
|
||||
ConnectionString string
|
||||
ConnectionDomain string
|
||||
CurrentKernelVersion string
|
||||
DBInstanceCPU int
|
||||
CreateTime time.Time
|
||||
@@ -284,6 +285,17 @@ func (rds *SDBInstance) GetZone3Id() string {
|
||||
return rds.getZoneId(3)
|
||||
}
|
||||
|
||||
func (rds *SDBInstance) GetIOPS() int {
|
||||
if rds.MaxIOPS == 0 {
|
||||
rds.Refresh()
|
||||
}
|
||||
return rds.MaxIOPS
|
||||
}
|
||||
|
||||
func (rds *SDBInstance) GetNetworkAddress() string {
|
||||
return rds.ConnectionDomain
|
||||
}
|
||||
|
||||
func (rds *SDBInstance) getZone(index int) string {
|
||||
zoneStr := strings.Replace(rds.ZoneId, ")", "", -1)
|
||||
zoneInfo := strings.Split(zoneStr, ",")
|
||||
|
||||
@@ -130,6 +130,7 @@ type SInstance struct {
|
||||
VlanId string
|
||||
VpcAttributes SVpcAttributes
|
||||
ZoneId string
|
||||
Throughput int
|
||||
}
|
||||
|
||||
// {"AutoReleaseTime":"","ClusterId":"","Cpu":1,"CreationTime":"2018-05-23T07:58Z","DedicatedHostAttribute":{"DedicatedHostId":"","DedicatedHostName":""},"Description":"","DeviceAvailable":true,"EipAddress":{"AllocationId":"","InternetChargeType":"","IpAddress":""},"ExpiredTime":"2018-05-30T16:00Z","GPUAmount":0,"GPUSpec":"","HostName":"iZ2ze57isp1ali72tzkjowZ","ImageId":"centos_7_04_64_20G_alibase_201701015.vhd","InnerIpAddress":{"IpAddress":[]},"InstanceChargeType":"PrePaid","InstanceId":"i-2ze57isp1ali72tzkjow","InstanceName":"gaoxianqi-test-7days","InstanceNetworkType":"vpc","InstanceType":"ecs.t5-lc2m1.nano","InstanceTypeFamily":"ecs.t5","InternetChargeType":"PayByBandwidth","InternetMaxBandwidthIn":-1,"InternetMaxBandwidthOut":0,"IoOptimized":true,"Memory":512,"NetworkInterfaces":{"NetworkInterface":[{"MacAddress":"00:16:3e:10:f0:c9","NetworkInterfaceId":"eni-2zecqsagtpztl6x5hu2r","PrimaryIpAddress":"192.168.220.214"}]},"OSName":"CentOS 7.4 64位","OSType":"linux","OperationLocks":{"LockReason":[]},"PublicIpAddress":{"IpAddress":[]},"Recyclable":false,"RegionId":"cn-beijing","ResourceGroupId":"","SaleCycle":"Week","SecurityGroupIds":{"SecurityGroupId":["sg-2zecqsagtpztl6x9zynl"]},"SerialNumber":"df05d9b4-df3d-4400-88d1-5f843f0dd088","SpotPriceLimit":0.000000,"SpotStrategy":"NoSpot","StartTime":"2018-05-23T07:58Z","Status":"Running","StoppedMode":"Not-applicable","VlanId":"","VpcAttributes":{"NatIpAddress":"","PrivateIpAddress":{"IpAddress":["192.168.220.214"]},"VSwitchId":"vsw-2ze9cqwza4upoyujq1thd","VpcId":"vpc-2zer4jy8ix3i8f0coc5uw"},"ZoneId":"cn-beijing-f"}
|
||||
@@ -976,6 +977,14 @@ func (self *SInstance) Renew(bc billing.SBillingCycle) error {
|
||||
return self.host.zone.region.RenewInstance(self.InstanceId, bc)
|
||||
}
|
||||
|
||||
func (self *SInstance) GetThroughput() int {
|
||||
return self.Throughput
|
||||
}
|
||||
|
||||
func (self *SInstance) GetInternetMaxBandwidthOut() int {
|
||||
return self.InternetMaxBandwidthOut
|
||||
}
|
||||
|
||||
func billingCycle2Params(bc *billing.SBillingCycle, params map[string]string) error {
|
||||
if bc.GetMonths() > 0 {
|
||||
params["PeriodUnit"] = "Month"
|
||||
|
||||
@@ -31,19 +31,31 @@ import (
|
||||
"yunion.io/x/onecloud/pkg/multicloud"
|
||||
)
|
||||
|
||||
type SMOngoDBAttribute struct {
|
||||
// 实例最大IOPS
|
||||
MaxIops int
|
||||
ReplicaSets struct {
|
||||
ReplicaSet []struct {
|
||||
ConnectionDomain string `json:"ConnectionDomain"`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type SMongoDB struct {
|
||||
region *SRegion
|
||||
multicloud.AliyunTags
|
||||
multicloud.SBillingBase
|
||||
multicloud.SResourceBase
|
||||
|
||||
ChargeType TChargeType `json:"ChargeType"`
|
||||
LockMode string `json:"LockMode"`
|
||||
DBInstanceClass string `json:"DBInstanceClass"`
|
||||
ResourceGroupId string `json:"ResourceGroupId"`
|
||||
DBInstanceId string `json:"DBInstanceId"`
|
||||
ZoneId string `json:"ZoneId"`
|
||||
MongosList struct {
|
||||
ConnectionDomain string `json:"ConnectionDomain"`
|
||||
NetworkAddress string
|
||||
ChargeType TChargeType `json:"ChargeType"`
|
||||
LockMode string `json:"LockMode"`
|
||||
DBInstanceClass string `json:"DBInstanceClass"`
|
||||
ResourceGroupId string `json:"ResourceGroupId"`
|
||||
DBInstanceId string `json:"DBInstanceId"`
|
||||
ZoneId string `json:"ZoneId"`
|
||||
MongosList struct {
|
||||
MongosAttribute []struct {
|
||||
NodeId string `json:"NodeId"`
|
||||
NodeClass string `json:"NodeClass"`
|
||||
@@ -237,6 +249,16 @@ func (self *SMongoDB) GetVmemSizeMb() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (self *SMongoDB) GetIops() int {
|
||||
iops, _ := self.region.GetIops(self.DBInstanceId)
|
||||
return iops
|
||||
}
|
||||
|
||||
func (self *SMongoDB) GetNetworkAddress() string {
|
||||
addr, _ := self.region.GetNetworkAddress(self.DBInstanceId)
|
||||
return addr
|
||||
}
|
||||
|
||||
func (self *SRegion) GetMongoDBsByType(mongoType string) ([]SMongoDB, error) {
|
||||
dbs := []SMongoDB{}
|
||||
for {
|
||||
@@ -281,6 +303,47 @@ func (self *SRegion) GetICloudMongoDBs() ([]cloudprovider.ICloudMongoDB, error)
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetIops(id string) (int, error) {
|
||||
ret, err := self.GetMongoDBAttribute(id)
|
||||
if err != nil {
|
||||
return 0, errors.Wrapf(err, "DescribeDBInstanceAttribute err")
|
||||
}
|
||||
if len(ret) == 0 {
|
||||
return 0, errors.Wrapf(err, "ret missing err")
|
||||
}
|
||||
return ret[0].MaxIops, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetNetworkAddress(id string) (string, error) {
|
||||
ret, err := self.GetMongoDBAttribute(id)
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "DescribeDBInstanceAttribute err")
|
||||
}
|
||||
addrList := make([]string, 0)
|
||||
for _, v := range ret[0].ReplicaSets.ReplicaSet {
|
||||
addrList = append(addrList, v.ConnectionDomain)
|
||||
}
|
||||
addrs := strings.Join(addrList, ",")
|
||||
return addrs, nil
|
||||
}
|
||||
|
||||
func (self *SRegion) GetMongoDBAttribute(id string) ([]SMOngoDBAttribute, error) {
|
||||
params := map[string]string{
|
||||
"Action": "DescribeDBInstanceAttribute",
|
||||
"DBInstanceId": id,
|
||||
}
|
||||
resp, err := self.mongodbRequest("DescribeDBInstanceAttribute", params)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "DescribeDBInstanceAttribute err")
|
||||
}
|
||||
ret := []SMOngoDBAttribute{}
|
||||
err = resp.Unmarshal(&ret, "DBInstances", "DBInstance")
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "unmarshal err")
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (self *SRegion) GetMongoDBs(mongoType string, pageSize int, pageNum int) ([]SMongoDB, int, error) {
|
||||
if pageSize < 1 || pageSize > 100 {
|
||||
pageSize = 100
|
||||
|
||||
@@ -49,6 +49,7 @@ func init() {
|
||||
}
|
||||
printObject(db)
|
||||
return nil
|
||||
|
||||
})
|
||||
|
||||
shellutils.R(&MongoDBIdOptions{}, "mongodb-delete", "Delete mongodb", func(cli *aliyun.SRegion, args *MongoDBIdOptions) error {
|
||||
|
||||
@@ -178,6 +178,10 @@ func (rds *SDBInstance) GetStorageType() string {
|
||||
return rds.DBInstanceStorageType
|
||||
}
|
||||
|
||||
func (rds *SDBInstance) GetIops() int {
|
||||
return rds.MaxIOPS
|
||||
}
|
||||
|
||||
func (rds *SDBInstance) GetEngine() string {
|
||||
switch rds.Engine {
|
||||
case "MySQL":
|
||||
|
||||
@@ -128,6 +128,7 @@ type SInstance struct {
|
||||
VlanId string
|
||||
VpcAttributes SVpcAttributes
|
||||
ZoneId string
|
||||
|
||||
DepartmentInfo
|
||||
}
|
||||
|
||||
@@ -201,6 +202,10 @@ func (self *SInstance) GetInstanceType() string {
|
||||
return self.InstanceType
|
||||
}
|
||||
|
||||
func (self *SInstance) GetInternetMaxBandwidthOut() int {
|
||||
return self.InternetMaxBandwidthOut
|
||||
}
|
||||
|
||||
func (self *SInstance) getVpc() (*SVpc, error) {
|
||||
return self.host.zone.region.getVpc(self.VpcAttributes.VpcId)
|
||||
}
|
||||
|
||||
@@ -72,31 +72,33 @@ type SInstance struct {
|
||||
InstanceId string
|
||||
ImageId string
|
||||
|
||||
HostName string
|
||||
InstanceName string
|
||||
InstanceType string
|
||||
Cpu int
|
||||
Memory int // MB
|
||||
IoOptimized bool
|
||||
KeyPairName string
|
||||
CreationTime time.Time // LaunchTime
|
||||
ExpiredTime time.Time
|
||||
ProductCodes []string
|
||||
PublicDNSName string
|
||||
InnerIpAddress SIpAddress
|
||||
PublicIpAddress SIpAddress
|
||||
RootDeviceName string
|
||||
Status string // state
|
||||
VlanId string // subnet ID ?
|
||||
VpcAttributes SVpcAttributes
|
||||
SecurityGroupIds SSecurityGroupIds
|
||||
NetworkInterfaces []SNetworkInterface
|
||||
EipAddress SEipAddress
|
||||
Disks []string
|
||||
DeviceNames []string
|
||||
OSName string
|
||||
OSType string
|
||||
Description string
|
||||
HostName string
|
||||
InstanceName string
|
||||
InstanceType string
|
||||
Cpu int
|
||||
Memory int // MB
|
||||
IoOptimized bool
|
||||
KeyPairName string
|
||||
CreationTime time.Time // LaunchTime
|
||||
ExpiredTime time.Time
|
||||
ProductCodes []string
|
||||
PublicDNSName string
|
||||
InnerIpAddress SIpAddress
|
||||
PublicIpAddress SIpAddress
|
||||
RootDeviceName string
|
||||
Status string // state
|
||||
VlanId string // subnet ID ?
|
||||
VpcAttributes SVpcAttributes
|
||||
SecurityGroupIds SSecurityGroupIds
|
||||
NetworkInterfaces []SNetworkInterface
|
||||
EipAddress SEipAddress
|
||||
Disks []string
|
||||
DeviceNames []string
|
||||
OSName string
|
||||
OSType string
|
||||
Description string
|
||||
InternetMaxBandwidthOut int
|
||||
Throughput int
|
||||
|
||||
TagSpec TagSpec
|
||||
|
||||
@@ -241,6 +243,14 @@ func (self *SInstance) GetIHost() cloudprovider.ICloudHost {
|
||||
return self.host
|
||||
}
|
||||
|
||||
func (self *SInstance) GetThroughput() int {
|
||||
return self.Throughput
|
||||
}
|
||||
|
||||
func (self *SInstance) GetInternetMaxBandwidthOut() int {
|
||||
return self.InternetMaxBandwidthOut
|
||||
}
|
||||
|
||||
func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error) {
|
||||
disks, _, err := self.host.zone.region.GetDisks(self.InstanceId, "", "", nil, 0, 0)
|
||||
if err != nil {
|
||||
|
||||
@@ -111,3 +111,7 @@ func (instance *SDBInstanceBase) CreateIBackup(conf *cloudprovider.SDBInstanceBa
|
||||
func (instance *SDBInstanceBase) RecoveryFromBackup(conf *cloudprovider.SDBInstanceRecoveryConfig) error {
|
||||
return errors.Wrapf(cloudprovider.ErrNotImplemented, "RecoveryFromBackup")
|
||||
}
|
||||
|
||||
func (instance *SDBInstanceBase) GetIops() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ type SDisk struct {
|
||||
multicloud.SDisk
|
||||
multicloud.GoogleTags
|
||||
|
||||
ProvisionedIops int
|
||||
CreationTimestamp time.Time
|
||||
SizeGB int
|
||||
Zone string
|
||||
@@ -156,6 +157,10 @@ func (disk *SDisk) GetAccessPath() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (disk *SDisk) GetIops() int {
|
||||
return disk.ProvisionedIops
|
||||
}
|
||||
|
||||
func (disk *SDisk) Delete(ctx context.Context) error {
|
||||
return disk.storage.zone.region.Delete(disk.SelfLink)
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@ type SDBInstance struct {
|
||||
multicloud.HuaweiTags
|
||||
region *SRegion
|
||||
|
||||
flavorCache []SDBInstanceFlavor
|
||||
|
||||
flavorCache []SDBInstanceFlavor
|
||||
BackupStrategy SBackupStrategy
|
||||
Created string //time.Time
|
||||
Datastore SDatastore
|
||||
@@ -79,6 +78,7 @@ type SDBInstance struct {
|
||||
Ha SHa
|
||||
Id string
|
||||
MaintenanceWindow string
|
||||
MaxIops int
|
||||
Name string
|
||||
Nodes []SNonde
|
||||
Port int
|
||||
@@ -310,6 +310,10 @@ func (rds *SDBInstance) GetZone3Id() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (rds *SDBInstance) GetIops() int {
|
||||
return rds.MaxIops
|
||||
}
|
||||
|
||||
type SRdsNetwork struct {
|
||||
SubnetId string
|
||||
IP string
|
||||
|
||||
@@ -78,3 +78,11 @@ func (self *SInstanceBase) GetOSArch() string {
|
||||
func (self *SInstanceBase) CreateDisk(ctx context.Context, opts *cloudprovider.GuestDiskCreateOptions) (string, error) {
|
||||
return "", errors.Wrapf(cloudprovider.ErrNotImplemented, "CreateDisk")
|
||||
}
|
||||
|
||||
func (self *SInstanceBase) GetThroughput() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (self *SInstanceBase) GetInternetMaxBandwidthOut() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -62,6 +62,10 @@ func (d *SDisk) GetGlobalId() string {
|
||||
return d.GetId()
|
||||
}
|
||||
|
||||
func (d *SDisk) GetIops() int {
|
||||
return d.Iops
|
||||
}
|
||||
|
||||
func (d *SDisk) GetStatus() string {
|
||||
switch d.Status {
|
||||
case "available", "in-use":
|
||||
|
||||
@@ -37,6 +37,8 @@ type SMongoDB struct {
|
||||
multicloud.SBillingBase
|
||||
region *SRegion
|
||||
|
||||
IOPS int
|
||||
NetworkAddress string
|
||||
AutoRenewFlag int `json:"AutoRenewFlag"`
|
||||
CloneInstances []interface{} `json:"CloneInstances"`
|
||||
ClusterType int `json:"ClusterType"`
|
||||
@@ -299,6 +301,14 @@ func (self *SRegion) GetMongoDBs(ids []string, limit, offset int) ([]SMongoDB, i
|
||||
return dbs, int(totalCount), nil
|
||||
}
|
||||
|
||||
func (self *SMongoDB) GetIops() int {
|
||||
return self.IOPS
|
||||
}
|
||||
|
||||
func (self *SMongoDB) GetNetworkAddress() string {
|
||||
return self.NetworkAddress
|
||||
}
|
||||
|
||||
func (self *SRegion) GetICloudMongoDBs() ([]cloudprovider.ICloudMongoDB, error) {
|
||||
dbs := []SMongoDB{}
|
||||
for {
|
||||
|
||||
@@ -29,8 +29,8 @@ import (
|
||||
)
|
||||
|
||||
type STDSQL struct {
|
||||
multicloud.SVirtualResourceBase
|
||||
multicloud.SBillingBase
|
||||
multicloud.SDBInstanceBase
|
||||
// multicloud.SBillingBase
|
||||
multicloud.QcloudTags
|
||||
region *SRegion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user