fix(region): mongodb sync fix

This commit is contained in:
Qu Xuan
2021-08-03 11:59:56 +08:00
parent b5a45e8535
commit b5d0467bd2
+8
View File
@@ -252,6 +252,14 @@ func (self *SRegion) GetMongoDBsByType(mongoType string) ([]SMongoDB, error) {
return dbs, nil
}
func (self *SRegion) GetICloudMongoDBById(id string) (cloudprovider.ICloudMongoDB, error) {
db, err := self.GetMongoDB(id)
if err != nil {
return nil, errors.Wrapf(err, "GetMongoDB(%s)", id)
}
return db, nil
}
func (self *SRegion) GetICloudMongoDBs() ([]cloudprovider.ICloudMongoDB, error) {
dbs := []SMongoDB{}
for _, mongoType := range []string{"sharding", "replicate", "serverless"} {