Maor Lipchuk has uploaded a new change for review.

Change subject: REST: Adding validation for snapshot id on preview
......................................................................

REST: Adding validation for snapshot id on preview

Adding validation for snapshot id, when issuing PREVIEW on a VM.

Change-Id: Ib325c7d1a23eb0558f360cc0916bb0fcca981186
Signed-off-by: Maor Lipchuk <[email protected]>
---
M 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/26237/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 c6a1fb4..8744e70 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
@@ -268,6 +268,7 @@
 
     @Override
     public Response previewSnapshot(Action action) {
+        validateParameters(action, "snapshot.id");
         TryBackToAllSnapshotsOfVmParameters tryBackParams =
                 new TryBackToAllSnapshotsOfVmParameters(guid, 
asGuid(action.getSnapshot().getId()));
         Response response = doAction(VdcActionType.TryBackToAllSnapshotsOfVm,


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

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

Reply via email to