Change in ovirt-engine[ovirt-engine-4.0]: restapi: Add cluster levels support

tnisan at redhat.com tnisan at redhat.com
Tue Jun 21 16:00:41 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: restapi: Add cluster levels support
......................................................................


restapi: Add cluster levels support

The top level 'capabilities' collection has been replaced by the new
'clusterlevels' collection. This new collection will contain the
information that isn't available in the model, like the list of CPU
types available for each cluster level:

  GET /clusterlevels

This will return a list of `ClusterLevel` objects containing the details
for all the cluster levels supported by the system:

  <cluster_levels>
    <cluster_level id="3.6" href="/clusterlevels/3.6">
      <cpu_types>
        <cpu_type>
          <name>Intel Conroe Family</name>
          <level>2</level>
          <architecture>x86_64</architecture>
        </cpu_type>
        ...
      </cpu_types>
      ...
    </cluster_level>
  </cluster_levels>

Each specific cluster level has it's own subresource, identified by the
version itself:

  GET /clusterlevels/3.6

This will return the details of that version:

  <cluster_level id="3.6" href="/clusterlevels/3.6">
    <cpu_types>
      <cpu_type>
        <name>Intel Conroe Family</name>
        <level>2</level>
        <architecture>x86_64</architecture>
      </cpu_type>
      ...
    </cpu_types>
    ...
  </cluster_level>

Change-Id: Ifcd16aa01e2e8e959fdd25977e21b154e949d934
Bug-Url: https://bugzilla.redhat.com/1347157
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
(cherry picked from commit cdc3e2a46be6d26af6c94b32f947b4a5427eb666)
---
M backend/manager/modules/restapi/README.adoc
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/ApiRootLinksCreator.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendApiResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterLevelResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterLevelsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/LinkHelper.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/adapters/V3ApiOutAdapter.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendApiResourceTest.java
8 files changed, 241 insertions(+), 3 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifcd16aa01e2e8e959fdd25977e21b154e949d934
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list