Change in ovirt-engine[master]: restapi: OpenStack image provider
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Thu Nov 20 14:06:11 UTC 2014
Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: OpenStack image provider
......................................................................
restapi: OpenStack image provider
This patch adds the resources for the OpenStack image providers. The
representation of the resource will look like this:
GET /openstackimageproviders
<openstack_image_providers>
<openstack_image_provider id="{provider:id}">...</openstack_image_provider>
...
</openstack_image_providers>
GET /openstackimageproviders/{provider:id}
<openstack_image_provider id="{provider:id}">
<name>myprovider</name>
<description>My provider</description>
<url>http://glance.example.com</url>
<requires_authentication>true</requires_authentication>
<username>myuser</username>
<password>mypass</password>
<tenant_name>mytenant</tenant_name>
<properties>
<property>
<name>prop1</name>
<value>value1</myvalue>
</property>
<property>
<name>prop2</name>
<value>value2</myvalue>
</property>
</properties>
</openstack_image_provider>
The providers collection will support listing, getting, adding, and
removing providers, with the usual methods.
The provider resource will support getting, deleting and updating the
provider, with the usual methods. In addition it will support the
"testconnectivity" and "importcertificates" operations. The first is
used to check the connectivity with the external provider:
POST /openstackimageproviders/{provider:id}/testconnectivity
<action/>
The second is used to import the chain of certificates of the external
provider:
POST /openstackimageproviders/{provider:id}/importcertificates
<action/>
The third is used to import the image:
POST /openstackimageproviders/{provider:id}/importcertificates
<action/>
The provider resource includes subcollections for certificates and
images. For certificates it will look like this:
GET /openstackimageproviders/{provider:id}/certificates
<certificates>
<certificate id="{host:id}">...</certificate>
...
</certificates>
GET /openstackimageproviders/{provider:id}/certificates/{certificate:id}
<certificate id="{certificate:id}">
<subject>CN=glance.example.com</subject>
<content>...</content>
</certificate>
For images:
GET /openstackimageproviders/{provider:id}/images
<openstack_images>
<openstack_image id="{image:id}">...</openstack_image>
...
</openstack_images>
GET /openstackimageproviders/{provider:id}/images/{image:id}
<openstack_image id="{image:id}">
<name>myimage</name>
</openstack_image>
The image resource supports the "import" operation:
POST /openstackimageproviders/{provider:id}/images/{image:id}/import
<action>
<storagedomain>
<name>mysd</name>
</storagedomain>
<cluster>
<name>mycluster</name>
</cluster>
<import_as_template>false</import_as_template>
</action>
Change-Id: I77fca2208b18d54f9177ec8b0178768a6b815f20
Related-To: https://bugzilla.redhat.com/1132259
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/openstack/OpenStackImageProviderResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/openstack/OpenStackImageProvidersResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/openstack/OpenStackImageResource.java
A backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/openstack/OpenStackImagesResource.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/ApiRootLinksCreator.java
M backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/utils/LinkHelper.java
M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/BackendApplication.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageProviderHelper.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageProviderResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageProvidersResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageResource.java
A backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImagesResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/utils/FeaturesHelper.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendApiResourceTest.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageProviderResourceTest.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageProvidersResourceTest.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImageResourceTest.java
A backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/openstack/BackendOpenStackImagesResourceTest.java
A backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/openstack/OpenStackImageMapper.java
A backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/openstack/OpenStackImageProviderMapper.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/openstack/OpenStackImageMapperTest.java
A backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/openstack/OpenStackImageProviderMapperTest.java
25 files changed, 1,445 insertions(+), 2 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Daniel Erez: Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/33975
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I77fca2208b18d54f9177ec8b0178768a6b815f20
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list