Arik Hadas has uploaded a new change for review. Change subject: restapi: add memory attribute to snapshot ......................................................................
restapi: add memory attribute to snapshot Add memory attribute of type boolean to the snapshot entity, which is set according to the memory volume attribute of the snapshot business entity: if the volume is not empty the attribute is true, or false otherwise. Change-Id: Id04e7944c4ee58cc05aafc95b6bfc451742b4eff Signed-off-by: Arik Hadas <aha...@redhat.com> --- M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SnapshotMapper.java 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/86/15186/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 c57c0a3..00883e8 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 @@ -2498,6 +2498,7 @@ <xs:element ref="vm" minOccurs="0"/> <xs:element name="date" type="xs:dateTime" minOccurs="0"/> <xs:element name="snapshot_status" type="xs:string" minOccurs="0"/> + <xs:element name="snapshot_memory" type="xs:boolean" minOccurs="0"/> <!-- Also a rel="prev" link --> </xs:sequence> </xs:extension> diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SnapshotMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SnapshotMapper.java index 72eec48..837c77a 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SnapshotMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/SnapshotMapper.java @@ -21,6 +21,7 @@ if (entity.getType() != null) { model.setType(map(entity.getType(), null)); } + model.setSnapshotMemory(!entity.getMemoryVolume().isEmpty()); return model; } -- To view, visit http://gerrit.ovirt.org/15186 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id04e7944c4ee58cc05aafc95b6bfc451742b4eff Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches