Juan Hernandez has uploaded a new change for review.

Change subject: restapi: Always pass "pause" to backend
......................................................................

restapi: Always pass "pause" to backend

Currently when we start a VM we support a "pause" parameter that
indicates if the VM should be started and inmediately paused. But the
RESTAPI only passes the parameter given by the user to the backend if
the value is "true". This means that VMs that are configured to start
paused by default can't be started normally via the RESTAPI. To fix that
this patch changes the RESTAPI so that it always passes the value of the
"pause" parameter to the backend, regardless of its value.

Change-Id: I4580b9326bd89d004047a15dcad0159cd83bccd6
Bug-Url: https://bugzilla.redhat.com/1095635
Signed-off-by: Juan Hernandez <[email protected]>
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/27518/1

diff --git 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
index 1f4880d..aea3544 100644
--- 
a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
+++ 
b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
@@ -314,8 +314,8 @@
             actionType = VdcActionType.RunVm;
             params = new RunVmParams(guid);
         }
-        if (action.isSetPause() && action.isPause()) {
-            params.setRunAndPause(true);
+        if (action.isSetPause()) {
+            params.setRunAndPause(action.isPause());
         }
         return doAction(actionType, params, action);
     }


-- 
To view, visit http://gerrit.ovirt.org/27518
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4580b9326bd89d004047a15dcad0159cd83bccd6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to