mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 06:09:39 +08:00
Merge pull request #651 in YUNIONIO/onecloud from release/2.3.0 to release/2.4.0
* commit '818c2af8c7ff09b193f8bec30b527df312102cc3': 避免id为空时返回其他机器 aws security group add tags aws security group fix
This commit is contained in:
@@ -243,6 +243,9 @@ func (self *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error) {
|
||||
}
|
||||
|
||||
func (self *SHost) GetIVMById(gid string) (cloudprovider.ICloudVM, error) {
|
||||
if len(gid) == 0 {
|
||||
return nil, cloudprovider.ErrNotFound
|
||||
}
|
||||
parts, _, err := self.zone.region.GetInstances(self.zone.Zone, []string{gid}, 0, 1)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user