Merge pull request #655 in YUNIONIO/onecloud from ~QUXUAN/onecloud:bugfix/qx-qcloud-eip to release/2.3.0

* commit '07eab509aafddd72a34fa60269b0d1ccb1ded51f':
  避免eip为空返回其他的eip
This commit is contained in:
邱剑
2018-12-04 20:17:46 +08:00
+3
View File
@@ -91,6 +91,9 @@ func (self *SRegion) GetClient() *SQcloudClient {
}
func (self *SRegion) GetIEipById(eipId string) (cloudprovider.ICloudEIP, error) {
if len(eipId) == 0 {
return nil, cloudprovider.ErrNotFound
}
eips, total, err := self.GetEips(eipId, "", 0, 1)
if err != nil {
return nil, err