You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2021/03/16 08:00:09 UTC

[camel-quarkus] branch master updated: openstack: added cinder snapshots and glance tests #1943

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/master by this push:
     new a05fa67  openstack: added cinder snapshots and glance tests #1943
a05fa67 is described below

commit a05fa67e9bc5880c792746391849e48427804605
Author: aldettinger <al...@gmail.com>
AuthorDate: Mon Mar 15 10:10:43 2021 +0100

    openstack: added cinder snapshots and glance tests #1943
---
 .../it/OpenstackCinderSnapshotResource.java        |  63 ++++++++++
 .../it/OpenstackCinderVolumeResource.java          |  54 ++++-----
 .../openstack/it/OpenstackGlanceResource.java      | 131 +++++++++++++++++++++
 .../openstack/it/OpenstackCinderSnapshotTest.java  |  34 ++++++
 .../openstack/it/OpenstackGlanceTest.java          |  53 +++++++++
 .../mappings/cinder/snapshot/volume_snapshots.json |  18 +++
 .../volume}/createVolume_multiattach.json          |   0
 .../mappings/{ => cinder/volume}/volume.json       |   0
 .../{ => cinder/volume}/volume_delete.json         |   0
 .../mappings/{ => cinder/volume}/volume_types.json |   0
 .../{ => cinder/volume}/volume_update.json         |   0
 .../mappings/{ => cinder/volume}/volumes.json      |   0
 .../src/test/resources/mappings/glance/image.json  |  18 +++
 .../resources/mappings/glance/image_delete.json    |  14 +++
 .../resources/mappings/glance/image_upload.json    |  18 +++
 .../src/test/resources/mappings/glance/images.json |  18 +++
 .../resources/mappings/glance/images_detail.json   |  18 +++
 .../mappings/{ => keystone}/authv3_project.json    |   0
 18 files changed, 412 insertions(+), 27 deletions(-)

diff --git a/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderSnapshotResource.java b/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderSnapshotResource.java
new file mode 100644
index 0000000..e67b73d
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderSnapshotResource.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.openstack.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.openstack.cinder.CinderConstants;
+import org.apache.camel.component.openstack.common.OpenstackConstants;
+import org.jboss.logging.Logger;
+import org.openstack4j.model.storage.block.VolumeSnapshot;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@Path("/openstack/cinder/snapshots/")
+@ApplicationScoped
+public class OpenstackCinderSnapshotResource {
+
+    private static final Logger LOG = Logger.getLogger(OpenstackCinderSnapshotResource.class);
+
+    private static final String URI_FORMAT = "openstack-cinder://{{camel.openstack.test.host-url}}?username=user&password=secret&project=project&operation=%s&subsystem="
+            + CinderConstants.SNAPSHOTS;
+
+    @Inject
+    ProducerTemplate template;
+
+    @Path("/getAllShouldSucceed")
+    @POST
+    public void getAllShouldSucceed() {
+        LOG.debug("Calling OpenstackCinderSnapshotResource.getAllShouldSucceed()");
+
+        String uri = String.format(URI_FORMAT, OpenstackConstants.GET_ALL);
+        VolumeSnapshot[] volumeSnapshots = template.requestBody(uri, null, VolumeSnapshot[].class);
+
+        assertEquals(2, volumeSnapshots.length);
+        assertEquals("a06b0531-c14b-4a7b-8749-de1378dd1007", volumeSnapshots[0].getId());
+        assertEquals("b0e394e6-bb10-4bfe-960d-edf72100c810", volumeSnapshots[0].getVolumeId());
+        assertNotNull(volumeSnapshots[0].getMetaData());
+        assertTrue(volumeSnapshots[0].getMetaData().isEmpty());
+        assertEquals("6489c55f-b9f4-442e-8d0a-5a87349d2d07", volumeSnapshots[1].getId());
+        assertEquals("7f47ab73-303c-4a19-b311-6123bb115775", volumeSnapshots[1].getVolumeId());
+    }
+
+}
diff --git a/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderVolumeResource.java b/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderVolumeResource.java
index 542dac4..3964683 100644
--- a/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderVolumeResource.java
+++ b/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderVolumeResource.java
@@ -59,8 +59,8 @@ public class OpenstackCinderVolumeResource {
         String uri = String.format(URI_FORMAT, OpenstackConstants.CREATE);
         Volume out = template.requestBody(uri, in, Volume.class);
 
-        assertEquals(out.getSize(), 10);
-        assertEquals(out.multiattach(), Boolean.TRUE);
+        assertEquals(10, out.getSize());
+        assertEquals(Boolean.TRUE, out.multiattach());
     }
 
     @Path("/getShouldSucceed")
@@ -72,30 +72,30 @@ public class OpenstackCinderVolumeResource {
         String id = "8a9287b7-4f4d-4213-8d75-63470f19f27c";
         Volume out = template.requestBodyAndHeader(uri, null, CinderConstants.VOLUME_ID, id, Volume.class);
 
-        assertEquals(out.getId(), id);
-        assertEquals(out.getName(), "test-volume");
-        assertEquals(out.getDescription(), "a description");
+        assertEquals(id, out.getId());
+        assertEquals("test-volume", out.getName());
+        assertEquals("a description", out.getDescription());
         assertNotNull(out.getCreated());
-        assertEquals(out.getZone(), "nova");
-        assertEquals(out.getSize(), 100);
-        assertEquals(out.getStatus(), Volume.Status.IN_USE);
-        assertEquals(out.getSnapshotId(), "22222222-2222-2222-2222-222222222222");
-        assertEquals(out.getSourceVolid(), "11111111-1111-1111-1111-111111111111");
-        assertEquals(out.getVolumeType(), "Gold");
+        assertEquals("nova", out.getZone());
+        assertEquals(100, out.getSize());
+        assertEquals(Volume.Status.IN_USE, out.getStatus());
+        assertEquals("22222222-2222-2222-2222-222222222222", out.getSnapshotId());
+        assertEquals("11111111-1111-1111-1111-111111111111", out.getSourceVolid());
+        assertEquals("Gold", out.getVolumeType());
 
         assertNotNull(out.getMetaData());
         Map<String, String> metadata = out.getMetaData();
-        assertEquals(metadata.get("readonly"), "False");
-        assertEquals(metadata.get("attached_mode"), "rw");
+        assertEquals("False", metadata.get("readonly"));
+        assertEquals("rw", metadata.get("attached_mode"));
 
         assertNotNull(out.getAttachments());
         List<? extends VolumeAttachment> attachments = out.getAttachments();
         assertEquals(1, attachments.size());
-        assertEquals(attachments.get(0).getDevice(), "/dev/vdd");
-        assertEquals(attachments.get(0).getHostname(), "myhost");
-        assertEquals(attachments.get(0).getId(), "8a9287b7-4f4d-4213-8d75-63470f19f27c");
-        assertEquals(attachments.get(0).getServerId(), "eaa6a54d-35c1-40ce-831d-bb61f991e1a9");
-        assertEquals(attachments.get(0).getVolumeId(), "8a9287b7-4f4d-4213-8d75-63470f19f27c");
+        assertEquals("/dev/vdd", attachments.get(0).getDevice());
+        assertEquals("myhost", attachments.get(0).getHostname());
+        assertEquals("8a9287b7-4f4d-4213-8d75-63470f19f27c", attachments.get(0).getId());
+        assertEquals("eaa6a54d-35c1-40ce-831d-bb61f991e1a9", attachments.get(0).getServerId());
+        assertEquals("8a9287b7-4f4d-4213-8d75-63470f19f27c", attachments.get(0).getVolumeId());
     }
 
     @Path("/getAllShouldSucceed")
@@ -106,8 +106,8 @@ public class OpenstackCinderVolumeResource {
         String uri = String.format(URI_FORMAT, OpenstackConstants.GET_ALL);
         Volume[] volumes = template.requestBody(uri, null, Volume[].class);
 
-        assertEquals(volumes.length, 3);
-        assertEquals(volumes[0].getTenantId(), "b0b5ed7ae06049688349fe43737796d4");
+        assertEquals(3, volumes.length);
+        assertEquals("b0b5ed7ae06049688349fe43737796d4", volumes[0].getTenantId());
     }
 
     @Path("/getAllTypesShouldSucceed")
@@ -118,15 +118,15 @@ public class OpenstackCinderVolumeResource {
         String uri = String.format(URI_FORMAT, CinderConstants.GET_ALL_TYPES);
         VolumeType[] volumeTypes = template.requestBody(uri, null, VolumeType[].class);
 
-        assertEquals(volumeTypes.length, 2);
-        assertEquals(volumeTypes[0].getId(), "6a65bc1b-197b-45bf-8056-9695dc82191f");
-        assertEquals(volumeTypes[0].getName(), "testVolume1");
+        assertEquals(2, volumeTypes.length);
+        assertEquals("6a65bc1b-197b-45bf-8056-9695dc82191f", volumeTypes[0].getId());
+        assertEquals("testVolume1", volumeTypes[0].getName());
         assertNotNull(volumeTypes[0].getExtraSpecs());
-        assertEquals(volumeTypes[0].getExtraSpecs().get("capabilities"), "gpu");
-        assertEquals(volumeTypes[1].getId(), "10f00bb7-46d8-4f3f-b89b-702693a3dcdc");
-        assertEquals(volumeTypes[1].getName(), "testVolume2");
+        assertEquals("gpu", volumeTypes[0].getExtraSpecs().get("capabilities"));
+        assertEquals("10f00bb7-46d8-4f3f-b89b-702693a3dcdc", volumeTypes[1].getId());
+        assertEquals("testVolume2", volumeTypes[1].getName());
         assertNotNull(volumeTypes[1].getExtraSpecs());
-        assertEquals(volumeTypes[1].getExtraSpecs().get("capabilities"), "gpu");
+        assertEquals("gpu", volumeTypes[1].getExtraSpecs().get("capabilities"));
     }
 
     @Path("/updateShouldSucceed")
diff --git a/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackGlanceResource.java b/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackGlanceResource.java
new file mode 100644
index 0000000..2d0cfdb
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/main/java/org/apache/camel/quarkus/component/openstack/it/OpenstackGlanceResource.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.openstack.it;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.openstack.common.OpenstackConstants;
+import org.apache.camel.component.openstack.glance.GlanceConstants;
+import org.jboss.logging.Logger;
+import org.openstack4j.model.common.Payload;
+import org.openstack4j.model.common.Payloads;
+import org.openstack4j.model.image.ContainerFormat;
+import org.openstack4j.model.image.DiskFormat;
+import org.openstack4j.model.image.Image;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+@Path("/openstack/glance/")
+@ApplicationScoped
+public class OpenstackGlanceResource {
+
+    private static final Logger LOG = Logger.getLogger(OpenstackGlanceResource.class);
+
+    private static final String URI_FORMAT = "openstack-glance://{{camel.openstack.test.host-url}}?username=user&password=secret&project=project&operation=%s";
+
+    @Inject
+    ProducerTemplate template;
+
+    @Path("/createShouldSucceed")
+    @POST
+    public void createShouldSucceed() {
+        LOG.debug("Calling OpenstackGlanceResource.createShouldSucceed()");
+
+        Map<String, Object> headers = new HashMap<>();
+        headers.put(OpenstackConstants.NAME, "amphora-x64-haproxy");
+        headers.put(GlanceConstants.DISK_FORMAT, DiskFormat.QCOW2);
+        headers.put(GlanceConstants.CONTAINER_FORMAT, ContainerFormat.BARE);
+        headers.put(GlanceConstants.MIN_DISK, 0L);
+        headers.put(GlanceConstants.MIN_RAM, 0L);
+
+        Payload<InputStream> payload = Payloads.create(new ByteArrayInputStream(new byte[] { 10, 11, 12 }));
+        String uri = String.format(URI_FORMAT, OpenstackConstants.CREATE);
+        Image out = template.requestBodyAndHeaders(uri, payload, headers, Image.class);
+
+        assertNotNull(out);
+        assertEquals("8a2ea42d-06b5-42c2-a54d-97105420f2bb", out.getId());
+        assertEquals("amphora-x64-haproxy", out.getName());
+        assertEquals(ContainerFormat.BARE, out.getContainerFormat());
+        assertEquals(DiskFormat.QCOW2, out.getDiskFormat());
+        assertEquals(0L, out.getMinDisk());
+        assertEquals(0L, out.getMinRam());
+    }
+
+    @Path("/uploadShouldSucceed")
+    @POST
+    public void uploadShouldSucceed() {
+        LOG.debug("Calling OpenstackGlanceResource.uploadShouldSucceed()");
+
+        Map<String, Object> headers = new HashMap<>();
+        headers.put(OpenstackConstants.NAME, "amphora-x64-haproxy");
+        headers.put(OpenstackConstants.ID, "4b434528-032b-4467-946c-b5880ce15c06");
+        headers.put(GlanceConstants.DISK_FORMAT, DiskFormat.QCOW2);
+        headers.put(GlanceConstants.CONTAINER_FORMAT, ContainerFormat.BARE);
+        headers.put(GlanceConstants.MIN_DISK, 0L);
+        headers.put(GlanceConstants.MIN_RAM, 0L);
+
+        Payload<InputStream> payload = Payloads.create(new ByteArrayInputStream(new byte[] { 10, 11, 12 }));
+        String uri = String.format(URI_FORMAT, GlanceConstants.UPLOAD);
+        Image out = template.requestBodyAndHeaders(uri, payload, headers, Image.class);
+
+        assertNotNull(out);
+        assertEquals("4b434528-032b-4467-946c-b5880ce15c06", out.getId());
+    }
+
+    @Path("/getShouldSucceed")
+    @POST
+    public void getShouldSucceed() {
+        LOG.debug("Calling OpenstackGlanceResource.getShouldSucceed()");
+
+        String uri = String.format(URI_FORMAT, OpenstackConstants.GET);
+        String id = "8a2ea42d-06b5-42c2-a54d-97105420f2bb";
+        Image out = template.requestBodyAndHeader(uri, null, OpenstackConstants.ID, id, Image.class);
+
+        assertEquals(id, out.getId());
+    }
+
+    @Path("/getAllShouldSucceed")
+    @POST
+    public void getAllShouldSucceed() {
+        LOG.debug("Calling OpenstackGlanceResource.getAllShouldSucceed()");
+
+        String uri = String.format(URI_FORMAT, OpenstackConstants.GET_ALL);
+        Image[] images = template.requestBody(uri, null, Image[].class);
+
+        assertEquals(2, images.length);
+        assertEquals("7541b8be-c62b-46c3-b5a5-5bb5ce43ce01", images[0].getId());
+    }
+
+    @Path("/deleteShouldSucceed")
+    @POST
+    public void deleteShouldSucceed() {
+        LOG.debug("Calling OpenstackGlanceResource.deleteShouldSucceed()");
+
+        String uri = String.format(URI_FORMAT, OpenstackConstants.DELETE);
+        template.requestBodyAndHeader(uri, null, OpenstackConstants.ID, "8a2ea42d-06b5-42c2-a54d-97105420f2bb");
+    }
+}
diff --git a/extensions-jvm/openstack/integration-test/src/test/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderSnapshotTest.java b/extensions-jvm/openstack/integration-test/src/test/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderSnapshotTest.java
new file mode 100644
index 0000000..53a819a
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/java/org/apache/camel/quarkus/component/openstack/it/OpenstackCinderSnapshotTest.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.openstack.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.post;
+
+@QuarkusTest
+@QuarkusTestResource(OpenStackTestResource.class)
+class OpenstackCinderSnapshotTest {
+
+    @Test
+    public void getAllShouldSucceed() {
+        post("/openstack/cinder/snapshots/getAllShouldSucceed").then().statusCode(204);
+    }
+
+}
diff --git a/extensions-jvm/openstack/integration-test/src/test/java/org/apache/camel/quarkus/component/openstack/it/OpenstackGlanceTest.java b/extensions-jvm/openstack/integration-test/src/test/java/org/apache/camel/quarkus/component/openstack/it/OpenstackGlanceTest.java
new file mode 100644
index 0000000..5e6b88e
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/java/org/apache/camel/quarkus/component/openstack/it/OpenstackGlanceTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.openstack.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.post;
+
+@QuarkusTest
+@QuarkusTestResource(OpenStackTestResource.class)
+class OpenstackGlanceTest {
+
+    @Test
+    public void createShouldSucceed() {
+        post("/openstack/glance/createShouldSucceed").then().statusCode(204);
+    }
+
+    @Test
+    public void uploadShouldSucceed() {
+        post("/openstack/glance/uploadShouldSucceed").then().statusCode(204);
+    }
+
+    @Test
+    public void getShouldSucceed() {
+        post("/openstack/glance/getShouldSucceed").then().statusCode(204);
+    }
+
+    @Test
+    public void getAllShouldSucceed() {
+        post("/openstack/glance/getAllShouldSucceed").then().statusCode(204);
+    }
+
+    @Test
+    public void deleteShouldSucceed() {
+        post("/openstack/glance/deleteShouldSucceed").then().statusCode(204);
+    }
+}
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/snapshot/volume_snapshots.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/snapshot/volume_snapshots.json
new file mode 100644
index 0000000..a63c10f
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/snapshot/volume_snapshots.json
@@ -0,0 +1,18 @@
+{
+  "id" : "abd83ce9-92e5-41dd-8bad-b5ce5408c775",
+  "name" : "volume_snapshots.json",
+  "request" : {
+    "url" : "/v2/123ac695d4db400a9001b91bb3b8aa46/snapshots",
+    "method" : "GET"
+  },
+  "response" : {
+    "status" : 200,
+    "body" : "{\"snapshots\":[{\"status\":\"available\",\"display_name\":\"snap-vol-test-1\",\"created_at\":\"2015-04-23T11:32:28.364877\",\"display_description\":\"\",\"volume_id\":\"b0e394e6-bb10-4bfe-960d-edf72100c810\",\"metadata\":{},\"id\":\"a06b0531-c14b-4a7b-8749-de1378dd1007\",\"size\":1},{\"status\":\"available\",\"display_name\":\"snap-vol-test-2\",\"created_at\":\"2015-04-23T11:32:14.620321\",\"display_description\":\"\",\"volume_id\":\"7f47ab73-303c-4a19-b311-6123bb115775\", [...]
+    "headers" : {
+      "Content-Type" : "application/json; charset=UTF-8"
+    }
+  },
+  "uuid" : "abd83ce9-92e5-41dd-8bad-b5ce5408c775",
+  "persistent" : true,
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/createVolume_multiattach.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/createVolume_multiattach.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/createVolume_multiattach.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/createVolume_multiattach.json
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume.json
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume_delete.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume_delete.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume_delete.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume_delete.json
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume_types.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume_types.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume_types.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume_types.json
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume_update.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume_update.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/volume_update.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volume_update.json
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/volumes.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volumes.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/volumes.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/cinder/volume/volumes.json
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image.json
new file mode 100644
index 0000000..26b99b2
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image.json
@@ -0,0 +1,18 @@
+{
+  "id" : "82d0d9f5-c8fa-4256-b3dd-a606c176f0b4",
+  "name" : "image.json",
+  "request" : {
+    "url" : "/v1/images/8a2ea42d-06b5-42c2-a54d-97105420f2bb",
+    "method" : "HEAD"
+  },
+  "response" : {
+    "status" : 200,
+    "headers" : {
+      "Content-Type" : "application/json; charset=UTF-8",
+      "X-Image-Meta-Id" : "8a2ea42d-06b5-42c2-a54d-97105420f2bb"
+    }
+  },
+  "uuid" : "82d0d9f5-c8fa-4256-b3dd-a606c176f0b4",
+  "persistent" : true,
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image_delete.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image_delete.json
new file mode 100644
index 0000000..e4c3788
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image_delete.json
@@ -0,0 +1,14 @@
+{
+  "id" : "badc456b-f0b4-4542-a30f-1578e56dad95",
+  "name" : "image_delete.json",
+  "request" : {
+    "url" : "/v2/123ac695d4db400a9001b91bb3b8aa46/images/8a2ea42d-06b5-42c2-a54d-97105420f2bb",
+    "method" : "DELETE"
+  },
+  "response" : {
+    "status" : 200
+  },
+  "uuid" : "badc456b-f0b4-4542-a30f-1578e56dad95",
+  "persistent" : true,
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image_upload.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image_upload.json
new file mode 100644
index 0000000..af0a6ed
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/image_upload.json
@@ -0,0 +1,18 @@
+{
+  "id" : "05e9228c-af70-4878-83fa-093113eaa53b",
+  "name" : "image_upload.json",
+  "request" : {
+    "url" : "/v1/images/4b434528-032b-4467-946c-b5880ce15c06",
+    "method" : "PUT"
+  },
+  "response" : {
+    "status" : 200,
+    "body" : "{\"image\":{\"status\":\"active\",\"name\":\"amphora-x64-haproxy\",\"tags\":[],\"container_format\":\"bare\",\"created_at\":\"2016-08-09T21:36:25Z\",\"size\":566600704,\"disk_format\":\"qcow2\",\"updated_at\":\"2016-08-09T21:36:29Z\",\"self\":\"\/v2\/images\/8a2ea42d-06b5-42c2-a54d-97105420f2bb\",\"min_disk\":0,\"protected\":false,\"id\":\"4b434528-032b-4467-946c-b5880ce15c06\",\"file\":\"\/v1\/images\/4b434528-032b-4467-946c-b5880ce15c06\/file\",\"checksum\":\"896e5473caaa [...]
+    "headers" : {
+      "Content-Type" : "application/json; charset=UTF-8"
+    }
+  },
+  "uuid" : "05e9228c-af70-4878-83fa-093113eaa53b",
+  "persistent" : true,
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/images.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/images.json
new file mode 100644
index 0000000..1898103
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/images.json
@@ -0,0 +1,18 @@
+{
+  "id" : "f0fd049a-9325-4a60-a0fe-9987f7e791d1",
+  "name" : "images.json",
+  "request" : {
+    "url" : "/v1/images",
+    "method" : "POST"
+  },
+  "response" : {
+    "status" : 200,
+    "body" : "{\"image\":{\"status\":\"active\",\"name\":\"amphora-x64-haproxy\",\"tags\":[],\"container_format\":\"bare\",\"created_at\":\"2016-08-09T21:36:25Z\",\"size\":566600704,\"disk_format\":\"qcow2\",\"updated_at\":\"2016-08-09T21:36:29Z\",\"self\":\"\/v2\/images\/8a2ea42d-06b5-42c2-a54d-97105420f2bb\",\"min_disk\":0,\"protected\":false,\"id\":\"8a2ea42d-06b5-42c2-a54d-97105420f2bb\",\"file\":\"\/v1\/images\/8a2ea42d-06b5-42c2-a54d-97105420f2bb\/file\",\"checksum\":\"896e5473caaa [...]
+    "headers" : {
+      "Content-Type" : "application/json; charset=UTF-8"
+    }
+  },
+  "uuid" : "f0fd049a-9325-4a60-a0fe-9987f7e791d1",
+  "persistent" : true,
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/images_detail.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/images_detail.json
new file mode 100644
index 0000000..257a10b
--- /dev/null
+++ b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/glance/images_detail.json
@@ -0,0 +1,18 @@
+{
+  "id" : "3ca2b6da-cfbb-463a-9205-7843cbbdf087",
+  "name" : "images_detail.json",
+  "request" : {
+    "url" : "/v1/images/detail",
+    "method" : "GET"
+  },
+  "response" : {
+    "status" : 200,
+    "body" : "{\"images\":[{\"status\":\"active\",\"name\":\"Fedora-x86_64-20-20140407-sda\",\"tags\":[\"testTag\"],\"container_format\":\"bare\",\"created_at\":\"2016-08-09T21:32:02Z\",\"size\":210829312,\"disk_format\":\"qcow2\",\"updated_at\":\"2016-08-15T20:28:15Z\",\"visibility\":\"public\",\"self\":\"\/v2\/images\/7541b8be-c62b-46c3-b5a5-5bb5ce43ce01\",\"min_disk\":0,\"protected\":false,\"id\":\"7541b8be-c62b-46c3-b5a5-5bb5ce43ce01\",\"file\":\"\/v2\/images\/7541b8be-c62b-46c3-b5a5 [...]
+    "headers" : {
+      "Content-Type" : "application/json; charset=UTF-8"
+    }
+  },
+  "uuid" : "3ca2b6da-cfbb-463a-9205-7843cbbdf087",
+  "persistent" : true,
+  "insertionIndex" : 1
+}
\ No newline at end of file
diff --git a/extensions-jvm/openstack/integration-test/src/test/resources/mappings/authv3_project.json b/extensions-jvm/openstack/integration-test/src/test/resources/mappings/keystone/authv3_project.json
similarity index 100%
rename from extensions-jvm/openstack/integration-test/src/test/resources/mappings/authv3_project.json
rename to extensions-jvm/openstack/integration-test/src/test/resources/mappings/keystone/authv3_project.json