mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #303 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-aliyuncli-snapshot to release/2.2.0
* commit '7ca7052d11623a9a9251f561b651d385e19e3643': 补充aliyuncli delete-snapshot命令
This commit is contained in:
@@ -107,9 +107,13 @@ func (self *SSnapshot) Delete() error {
|
||||
if self.region == nil {
|
||||
return fmt.Errorf("not init region for snapshot %s", self.SnapshotId)
|
||||
}
|
||||
return self.region.DeleteSnapshot(self.SnapshotId)
|
||||
}
|
||||
|
||||
func (self *SRegion) DeleteSnapshot(snapshotId string) error {
|
||||
params := make(map[string]string)
|
||||
params["SnapshotId"] = self.SnapshotId
|
||||
_, err := self.region.ecsRequest("DeleteSnapshot", params)
|
||||
params["SnapshotId"] = snapshotId
|
||||
_, err := self.ecsRequest("DeleteSnapshot", params)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user