Liron Aravot has uploaded a new change for review. Change subject: rest: adding logicalName to Disk ......................................................................
rest: adding logicalName to Disk Change-Id: I61590c59cd0b85ebdda0f4a2c98de83983b0dccc Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063597 Signed-off-by: Liron Aravot <[email protected]> --- 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/DiskMapper.java M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/DiskMapperTest.java 3 files changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/34482/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 036f673..aa2f55b 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 @@ -3452,6 +3452,7 @@ <xs:element name="sgio" type="xs:string" minOccurs="0"/> <xs:element ref="snapshot" minOccurs="0" maxOccurs="1"/> <xs:element ref="disk_profile" minOccurs="0" maxOccurs="1"/> + <xs:element name="logical_name" type="xs:string" minOccurs="0" maxOccurs="1"/> </xs:sequence> </xs:extension> </xs:complexContent> diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskMapper.java index 26cca9a..ad359fd 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/DiskMapper.java @@ -63,6 +63,10 @@ engineDisk.setReadOnly(disk.isReadOnly()); } + if (disk.isSetLogicalName()) { + engineDisk.setLogicalName(disk.getLogicalName()); + } + if (disk.isSetDescription()) { engineDisk.setDiskDescription(disk.getDescription()); } @@ -160,6 +164,7 @@ model.setReadOnly(entity.getReadOnly()); model.setShareable(entity.isShareable()); model.setDescription(entity.getDiskDescription()); + model.setLogicalName(entity.getLogicalName()); if (entity.getDiskStorageType() == DiskStorageType.IMAGE) { mapDiskImageToDiskFields((DiskImage) entity, model); } else { diff --git a/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/DiskMapperTest.java b/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/DiskMapperTest.java index 600aeee..b62639d 100644 --- a/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/DiskMapperTest.java +++ b/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/DiskMapperTest.java @@ -37,6 +37,7 @@ assertEquals(model.isActive(), transform.isActive()); assertEquals(model.isReadOnly(), transform.isReadOnly()); assertEquals(model.getDescription(), transform.getDescription()); + assertEquals(model.getLogicalName(), transform.getLogicalName()); assertNotNull(model.getSnapshot()); assertEquals(model.getSnapshot().getId(), transform.getSnapshot().getId()); assertEquals("unexpected status", model.getStatus().getState(), transform.getStatus().getState()); -- To view, visit http://gerrit.ovirt.org/34482 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61590c59cd0b85ebdda0f4a2c98de83983b0dccc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Liron Aravot <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
