mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
避免eip为空返回其他的eip
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user