aws create bugfix

This commit is contained in:
TangBin
2020-11-02 17:32:58 +08:00
parent f127253e3f
commit 0bf274f125
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -377,7 +377,7 @@ func (self *SAwsClient) GetIHostById(id string) (cloudprovider.ICloudHost, error
ihost, err := self.iregions[i].GetIHostById(id)
if err == nil {
return ihost, nil
} else if err != cloudprovider.ErrNotFound {
} else if errors.Cause(err) != cloudprovider.ErrNotFound {
return nil, err
}
}
@@ -389,7 +389,7 @@ func (self *SAwsClient) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)
ihost, err := self.iregions[i].GetIVpcById(id)
if err == nil {
return ihost, nil
} else if err != cloudprovider.ErrNotFound {
} else if errors.Cause(err) != cloudprovider.ErrNotFound {
return nil, err
}
}
@@ -401,7 +401,7 @@ func (self *SAwsClient) GetIStorageById(id string) (cloudprovider.ICloudStorage,
ihost, err := self.iregions[i].GetIStorageById(id)
if err == nil {
return ihost, nil
} else if err != cloudprovider.ErrNotFound {
} else if errors.Cause(err) != cloudprovider.ErrNotFound {
return nil, err
}
}
+2 -2
View File
@@ -545,7 +545,7 @@ func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error) {
ihost, err := izones[i].GetIHostById(id)
if err == nil {
return ihost, nil
} else if err != cloudprovider.ErrNotFound {
} else if errors.Cause(err) != cloudprovider.ErrNotFound {
return nil, err
}
}
@@ -561,7 +561,7 @@ func (self *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, er
istore, err := izones[i].GetIStorageById(id)
if err == nil {
return istore, nil
} else if err != cloudprovider.ErrNotFound {
} else if errors.Cause(err) != cloudprovider.ErrNotFound {
return nil, err
}
}