mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(region): Pass 'auto_start' parameter to GuestSaveGuestImageTask if have
The parameter 'auto_start' from client was not pass to GuestSaveGuestImageTask.
This commit is contained in:
@@ -252,6 +252,9 @@ func (self *SGuest) PerformSaveGuestImage(ctx context.Context, userCred mcclient
|
||||
return nil, fmt.Errorf("create subimage of guest image error")
|
||||
}
|
||||
taskParams := jsonutils.NewDict()
|
||||
if restart, _ := kwargs.Bool("auto_start"); restart {
|
||||
taskParams.Add(jsonutils.JSONTrue, "auto_start")
|
||||
}
|
||||
taskParams.Add(imageIds, "image_ids")
|
||||
return nil, self.StartGuestSaveGuestImage(ctx, userCred, taskParams, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user