mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.2.0 -> release/2.3.0
* commit '0f8f7e570ea1c99431a03193d55addef5f360830': add snapshot details
This commit is contained in:
@@ -208,12 +208,16 @@ func init() {
|
||||
return nil
|
||||
})
|
||||
type DiskResetOptions struct {
|
||||
DISK string `help:"ID or name of disk"`
|
||||
SNAPSHOT string `help:"snapshots ID of disk`
|
||||
DISK string `help:"ID or name of disk"`
|
||||
SNAPSHOT string `help:"snapshots ID of disk`
|
||||
AutoStart bool `help:"Autostart guest"`
|
||||
}
|
||||
R(&DiskResetOptions{}, "disk-reset", "Resize a disk", func(s *mcclient.ClientSession, args *DiskResetOptions) error {
|
||||
params := jsonutils.NewDict()
|
||||
params.Add(jsonutils.NewString(args.SNAPSHOT), "snapshot_id")
|
||||
if args.AutoStart {
|
||||
params.Add(jsonutils.JSONTrue, "auto_start")
|
||||
}
|
||||
disk, err := modules.Disks.PerformAction(s, args.DISK, "disk-reset", params)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user