避免eip为空返回其他的eip

This commit is contained in:
屈轩
2018-12-04 19:49:49 +08:00
parent 818c2af8c7
commit 07eab509aa
+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