Change in ovirt-engine[master]: restapi: Rename the random number generator "source" elements

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Sep 29 17:43:26 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Rename the random number generator "source" elements
......................................................................


restapi: Rename the random number generator "source" elements

Currently the random number generator sources are reported using a
collection of "source" elements wrapped by an element with a name
reflecting its use. For example, the required random number generator
sources of a cluster are reported as follows:

  GET /clusters/{cluster:id}
  <cluster>
    ...
    <required_rng_sources>
      <source>RANDOM</source>
    </required_rng_sources>
    ...
  </cluster>

And the random number generator sources suported by a host are reported
as follows:

  GET /hosts/{host:id}
  <host>
    ...
    <hardware_information>
      <supported_rng_sources>
        <source>RANDOM</source>
      </supported_rng_sources>
    </hardware_information>
    ...
  </host>

This isn't consistent with the rest of the API, where collections are
wrapped by a name in plural and elements by the same name in singular.
This patch fixes that. The required random number generator sources will
now be reported as follows:

  GET /clusters/{cluster:id}
  <cluster>
    ...
    <required_rng_sources>
      <required_rng_sourcesRANDOM</required_rng_source>
    </required_rng_sources>
    ...
  </cluster>

And the random number generator sources supported by a host will be
reported as follows:

  GET /hosts/{host:id}
  <host>
    ...
    <hardware_information>
      <supported_rng_sources>
        <supported_rng_source>RANDOM</supported_rng_source>
      </supported_rng_sources>
    </hardware_information>
    ...
  </host>

Note the use of "required_rng_source" and "supported_rng_source" instead
of just "source".

Change-Id: I316139c2521a5dde573a3d2396944281c9c68fb9
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/schema/api.xsd
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/validation/ClusterValidator.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/HostMapper.java
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/RngDeviceMapper.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java
7 files changed, 116 insertions(+), 30 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I316139c2521a5dde573a3d2396944281c9c68fb9
Gerrit-PatchSet: 4
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