Daniel Erez has uploaded a new change for review. Change subject: restapi: optional disks list for snapshot restore ......................................................................
restapi: optional disks list for snapshot restore BackendSnapshotResource -> restore: set parameters' disks list when needed (doAdd method). Feature: http://www.ovirt.org/Features/Single_Disk_Snapshot Change-Id: I82ed06edf8c82522585d78c02953cae6831b3a4a Signed-off-by: Daniel Erez <[email protected]> --- M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java 2 files changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/22782/1 diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd index a88507b..1d567a9 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd @@ -185,6 +185,8 @@ <xs:element name="clone" type="xs:boolean" minOccurs="0" maxOccurs="1"/> <!-- indicates whether to restore snapshot's memory on preview/restore snapshot --> <xs:element name="restore_memory" type="xs:boolean" minOccurs="0" maxOccurs="1"/> + <!-- Custom disks list for preview/restore snapshot --> + <xs:element ref="disks" minOccurs="0" maxOccurs="1"/> <!-- Used for external job --> <xs:element name="succeeded" type="xs:boolean" minOccurs="0"/> <!-- resolve GlusterHook using one of the resolution --> diff --git a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java index 68a3fed..391bcf4 100644 --- a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java +++ b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java @@ -53,6 +53,9 @@ if (action.isSetRestoreMemory()) { tryBackParams.setRestoreMemory(action.isRestoreMemory()); } + if (action.isSetDisks()) { + tryBackParams.setDisks(collection.mapDisks(action.getDisks())); + } tryBackParams.setCorrelationId(RESTORE_SNAPSHOT_CORRELATION_ID); //TODO: if user supplied, override with user value Response response = doAction(VdcActionType.TryBackToAllSnapshotsOfVm, tryBackParams, -- To view, visit http://gerrit.ovirt.org/22782 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82ed06edf8c82522585d78c02953cae6831b3a4a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Daniel Erez <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
