Merge pull request #4440 from ioito/hotfix/qx-api-struct

fix: struct api params
This commit is contained in:
Zexi Li
2019-12-31 15:46:03 +08:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -102,3 +102,7 @@ func (i ServerRebuildRootInput) GetKeypairName() string {
}
return ""
}
type ServerResumeInput struct {
apis.Meta
}
+1 -1
View File
@@ -757,7 +757,7 @@ func (self *SGuest) AllowPerformResume(ctx context.Context, userCred mcclient.To
return self.IsOwner(userCred) || db.IsAdminAllowPerform(userCred, self, "resume")
}
func (self *SGuest) PerformResume(ctx context.Context, userCred mcclient.TokenCredential, query struct{}, data struct{}) (jsonutils.JSONObject, error) {
func (self *SGuest) PerformResume(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ServerResumeInput) (jsonutils.JSONObject, error) {
if self.Status == api.VM_SUSPEND {
err := self.StartResumeTask(ctx, userCred, "")
return nil, err