Change in ovirt-engine[master]: restapi: Initial support for multiple versions

juan.hernandez at redhat.com juan.hernandez at redhat.com
Wed Jan 20 15:56:37 UTC 2016


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Initial support for multiple versions
......................................................................


restapi: Initial support for multiple versions

This patch adds initial support for having multiple versions of the API
in the same server. It covers only the metadata part, that is, the XML
schema and the RSDL.

The versions supported will be "3" and "4".

The metadata for version "3" is just a copy of the metadata files used
in the 3.x branch of the engine. This will need to be updated from time
to time to keep it in sync with the 3.6 branch, till that branch is
definitively closed.

The metadata for version "4" is automatically generated from the model.

The patch also adds initial support for the "Version" header, so that
the user can indicate what version of the API to use, right now only for
the metadata. For example, to request version 3 of the XML schema the
user can send a request like this:

  GET /ovirt-engine/api?schema
  Version: 3

Same for the RSDL:

  GET /ovirt-engine/api?rsdl
  Version: 3

When the "Version" header isn't provided the default will be used,
whichis currently version 4.

Change-Id: I13adfd3feb0a3d56133facb399a93c2e7e0d9ac3
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/interface/definition/pom.xml
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlIOManager.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/rsdl/RsdlManager.java
A backend/manager/modules/restapi/interface/definition/src/main/resources/v3/api.xsd
A backend/manager/modules/restapi/interface/definition/src/main/resources/v3/rsdl.xml
A backend/manager/modules/restapi/interface/definition/src/main/resources/v3/rsdl_gluster.xml
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/invocation/Current.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/invocation/CurrentFilter.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendApiResource.java
M pom.xml
10 files changed, 36,685 insertions(+), 59 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13adfd3feb0a3d56133facb399a93c2e7e0d9ac3
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: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list