Liron Aravot has uploaded a new change for review. Change subject: rest: adding logicalName to Disk ......................................................................
rest: adding logicalName to Disk Change-Id: I61590c59cd0b85ebdda0f4a2c98de83983b0dccc 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/75/31675/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 ec1ee48..2729b76 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 @@ -3477,6 +3477,7 @@ <xs:element name="lun_storage" type="Storage" minOccurs="0"/> <xs:element name="sgio" type="xs:string" minOccurs="0"/> <xs:element ref="snapshot" 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 d1ed62a..a9b65b5 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 @@ -62,6 +62,10 @@ engineDisk.setReadOnly(disk.isReadOnly()); } + if (disk.isSetLogicalName()) { + engineDisk.setLogicalName(disk.getLogicalName()); + } + if (disk.isSetDescription()) { engineDisk.setDiskDescription(disk.getDescription()); } @@ -156,6 +160,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/31675 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I61590c59cd0b85ebdda0f4a2c98de83983b0dccc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
