Change in ovirt-engine[master]: restapi: Use "logical_units" instead of multiple "logical_unit"

juan.hernandez at redhat.com juan.hernandez at redhat.com
Mon Sep 28 18:03:56 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Use "logical_units" instead of multiple "logical_unit"
......................................................................


restapi: Use "logical_units" instead of multiple "logical_unit"

Currently the logical units that are part of a volume group are reported
as an unbounded number of "logical_unit" elements. For example, when
reporting the details of a storage domain:

  GET /storagedomains/{storagedomain:id}
  <storage_domain>
    ...
    <storage>
      ...
      <volume_group>
        <logical_unit>
          <!-- First LU -->
        </logical_unit>
        <logical_unit>
          <!-- Second LU -->
        </logical_unit>
        ...
      </volume_group>
    </storage>
  </storage_domain>

This is contrary to the usual practice in the API, as list of elements
are always wrapped with an element. This has been fixed now, so the list
of logical units will be wrapped with the "logical_units" element:

  GET /storagedomains/{storagedomain:id}
  <storage_domain>
    ...
    <storage>
      ...
      <volume_group>
        <logical_units>
          <logical_unit>
            <!-- First LU -->
          </logical_unit>
          <logical_unit>
            <!-- Second LU -->
          </logical_unit>
          ...
        </logical_units>
      </volume_group>
    </storage>
  </storage_domain>

Change-Id: I08a71b3ca7873cfee6dcd0d7b881ce6bae935581
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/README.md
M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M backend/manager/modules/restapi/interface/definition/src/main/schema/api.xsd
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDisksResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostStorageResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmDisksResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/utils/DiskResourceUtils.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostStorageResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainsResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmDisksResourceTest.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/StorageLogicalUnitMapper.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/StorageLogicalUnitMapperTest.java
14 files changed, 315 insertions(+), 135 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/46764
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I08a71b3ca7873cfee6dcd0d7b881ce6bae935581
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list