summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/nbi/apis/resources/ApiTest.java74
-rw-r--r--src/test/java/org/onap/nbi/apis/resources/ServiceInventoryAssertions.java88
-rw-r--r--src/test/resources/application.properties15
-rw-r--r--src/test/resources/mappings/aai_get_6490_service-subscriptions.json24
-rw-r--r--src/test/resources/mappings/aai_get_customer_6490.json18
-rw-r--r--src/test/resources/mappings/aai_get_customer_generic.json18
-rw-r--r--src/test/resources/mappings/aai_get_generic_service-subscriptions.json20
-rw-r--r--src/test/resources/mappings/aai_get_service-subscription.json55
-rw-r--r--src/test/resources/mappings/aai_get_service-subscription_vnf.json58
-rw-r--r--src/test/resources/mappings/aai_get_service-subscriptionsVFW.json43
-rw-r--r--src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json43
-rw-r--r--src/test/resources/mappings/aai_get_tenants.json167
-rw-r--r--src/test/resources/mappings/aai_put_customer.json12
-rw-r--r--src/test/resources/mappings/aai_put_customer_service.json12
14 files changed, 645 insertions, 2 deletions
diff --git a/src/test/java/org/onap/nbi/apis/resources/ApiTest.java b/src/test/java/org/onap/nbi/apis/resources/ApiTest.java
index 05d332c..df2fb24 100644
--- a/src/test/java/org/onap/nbi/apis/resources/ApiTest.java
+++ b/src/test/java/org/onap/nbi/apis/resources/ApiTest.java
@@ -8,6 +8,7 @@ import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.nbi.apis.servicecatalog.ServiceSpecificationResource;
+import org.onap.nbi.apis.serviceinventory.ServiceInventoryResource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
@@ -26,12 +27,14 @@ public class ApiTest {
String realServerPort;
-
static public WireMockServer wireMockServer = new WireMockServer(8091);
@Autowired
ServiceSpecificationResource serviceSpecificationResource;
+ @Autowired
+ ServiceInventoryResource serviceInventoryResource;
+
@BeforeClass
public static void setUp() throws Exception {
wireMockServer.start();
@@ -48,6 +51,8 @@ public class ApiTest {
wireMockServer.resetToDefaultMappings();
}
+ // serviceCatalog
+
@Test
@Ignore
public void testServiceResourceGetCatalog() throws Exception {
@@ -86,4 +91,71 @@ public class ApiTest {
}
+ // serviceInventory
+
+ @Test
+ public void testServiceResourceGetInventory() throws Exception {
+
+ String serviceName = "vFW";
+ String serviceId = "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb";
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ params.add("serviceSpecification.name", serviceName);
+ params.add("relatedParty.id", "6490");
+ ResponseEntity<Object> resource = serviceInventoryResource.getServiceInventory(serviceId, params);
+ ServiceInventoryAssertions.assertServiceInventoryGet(resource);
+
+ }
+
+
+ @Test
+ public void testServiceResourceGetInventoryWithServiceSpecId() throws Exception {
+
+ String serviceId = "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb";
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ params.add("serviceSpecification.id", "1e3feeb0-8e36-46c6-862c-236d9c626439");
+ params.add("relatedParty.id", "6490");
+ ResponseEntity<Object> resource = serviceInventoryResource.getServiceInventory(serviceId, params);
+ ServiceInventoryAssertions.assertServiceInventoryGet(resource);
+
+ }
+
+
+ @Test
+ public void testServiceInventoryFind() throws Exception {
+
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ String serviceName = "vFW";
+ params.add("serviceSpecification.name", serviceName);
+ params.add("relatedParty.id", "6490");
+
+ ResponseEntity<Object> resource = serviceInventoryResource.findServiceInventory(params);
+ ServiceInventoryAssertions.assertServiceInventoryFind(resource);
+
+ }
+
+
+ @Test
+ public void testServiceInventoryFindWithServiceSpecId() throws Exception {
+
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ params.add("serviceSpecification.id", "1e3feeb0-8e36-46c6-862c-236d9c626439");
+ params.add("relatedParty.id", "6490");
+
+ ResponseEntity<Object> resource = serviceInventoryResource.findServiceInventory(params);
+ ServiceInventoryAssertions.assertServiceInventoryFind(resource);
+
+ }
+
+
+ @Test
+ public void testServiceInventoryFindWithoutParameter() throws Exception {
+
+ MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
+ params.add("relatedParty.id", "6490");
+
+ ResponseEntity<Object> resource = serviceInventoryResource.findServiceInventory(params);
+ ServiceInventoryAssertions.assertServiceInventoryFindWithoutParameter(resource);
+
+ }
+
}
diff --git a/src/test/java/org/onap/nbi/apis/resources/ServiceInventoryAssertions.java b/src/test/java/org/onap/nbi/apis/resources/ServiceInventoryAssertions.java
new file mode 100644
index 0000000..e8afc9c
--- /dev/null
+++ b/src/test/java/org/onap/nbi/apis/resources/ServiceInventoryAssertions.java
@@ -0,0 +1,88 @@
+package org.onap.nbi.apis.resources;
+
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class ServiceInventoryAssertions {
+
+
+
+
+ public static void assertServiceInventoryGet(ResponseEntity<Object> resource) {
+ assertThat(resource.getStatusCode()).isEqualTo(HttpStatus.OK);
+ LinkedHashMap service = (LinkedHashMap)resource.getBody();
+ assertThat(service.get("id")).isEqualTo("e4688e5f-61a0-4f8b-ae02-a2fbde623bcb");
+ assertThat(service.get("name")).isEqualTo("NewFreeRadius-service-instance-01");
+ assertThat(service.get("hasStarted")).isEqualTo("yes");
+ assertThat(service.get("type")).isEqualTo("service-instance");
+ assertThat(service.get("@type")).isEqualTo("serviceONAP");
+ LinkedHashMap relatedParty = (LinkedHashMap) service.get("relatedParty");
+ assertThat(relatedParty.get("role")).isEqualTo("ONAPcustomer");
+ assertThat(relatedParty.get("id")).isEqualTo("6490");
+ LinkedHashMap serviceSpecification = (LinkedHashMap)service.get("serviceSpecification");
+ assertThat(serviceSpecification.get("id")).isEqualTo("98d95267-5e0f-4531-abf8-f14b90031dc5");
+ assertThat(serviceSpecification.get("invariantUUID")).isEqualTo("709d157b-52fb-4250-976e-7133dff5c347");
+ assertThat(serviceSpecification.get("@type")).isEqualTo("ONAPservice");
+
+
+ assertThat(((ArrayList)service.get("supportingResource")).size()).isEqualTo(2);
+ LinkedHashMap resource1 = (LinkedHashMap) ((ArrayList) service.get("supportingResource")).get(0);
+ assertThat(resource1.get("id")).isEqualTo("cb80fbb6-9aa7-4ac5-9541-e14f45de533e");
+ assertThat(resource1.get("name")).isEqualTo("NewFreeRadius-VNF-instance-01");
+ assertThat(resource1.get("status")).isEqualTo("PREPROV");
+ assertThat(resource1.get("modelInvariantId")).isEqualTo("f5993703-977f-4346-a1c9-c1884f8cfd8d");
+ assertThat(resource1.get("modelVersionId")).isEqualTo("902438f7-1e4c-492d-b7cc-8650e13b8aeb");
+ assertThat(resource1.get("@referredType")).isEqualTo("ONAP resource");
+ }
+
+
+ public static void assertServiceInventoryFind(ResponseEntity<Object> resource) {
+ assertThat(resource.getStatusCode()).isEqualTo(HttpStatus.OK);
+ ArrayList body = (ArrayList)resource.getBody();
+ assertThat(body.size()).isEqualTo(1);
+ LinkedHashMap service1 = (LinkedHashMap)body.get(0);
+ assertThat(service1.get("id")).isEqualTo("e4688e5f-61a0-4f8b-ae02-a2fbde623bcb");
+ assertThat(service1.get("name")).isEqualTo("NewFreeRadius-service-instance-01");
+ LinkedHashMap relatedParty = (LinkedHashMap) service1.get("relatedParty");
+ assertThat(relatedParty.get("role")).isEqualTo("ONAPcustomer");
+ assertThat(relatedParty.get("id")).isEqualTo("6490");
+ LinkedHashMap serviceSpecification = (LinkedHashMap) service1.get("serviceSpecification");
+ assertThat(serviceSpecification.get("name")).isEqualTo("vFW");
+ assertThat(serviceSpecification.get("id")).isEqualTo("98d95267-5e0f-4531-abf8-f14b90031dc5");
+ }
+
+
+ public static void assertServiceInventoryFindWithoutParameter(ResponseEntity<Object> resource) {
+ assertThat(resource.getStatusCode()).isEqualTo(HttpStatus.OK);
+ ArrayList body = (ArrayList)resource.getBody();
+ assertThat(body.size()).isEqualTo(2);
+ LinkedHashMap service1 = (LinkedHashMap)body.get(0);
+ assertThat(service1.get("id")).isEqualTo("vfw-service-id");
+ assertThat(service1.get("name")).isEqualTo("vfw-service-name");
+ LinkedHashMap relatedParty = (LinkedHashMap) service1.get("relatedParty");
+ assertThat(relatedParty.get("role")).isEqualTo("ONAPcustomer");
+ assertThat(relatedParty.get("id")).isEqualTo("6490");
+ LinkedHashMap serviceSpecification = (LinkedHashMap) service1.get("serviceSpecification");
+ assertThat(serviceSpecification.get("name")).isEqualTo("vFW-service-2VF-based");
+ assertThat(serviceSpecification.get("id")).isEqualTo("9vfw-service-modek-version-id");
+
+
+ LinkedHashMap service2 = (LinkedHashMap)body.get(1);
+ assertThat(service2.get("id")).isEqualTo("e4688e5f-61a0-4f8b-ae02-a2fbde623bcb");
+ assertThat(service2.get("name")).isEqualTo("NewFreeRadius-service-instance-01");
+ relatedParty = (LinkedHashMap) service1.get("relatedParty");
+ assertThat(relatedParty.get("role")).isEqualTo("ONAPcustomer");
+ assertThat(relatedParty.get("id")).isEqualTo("6490");
+ serviceSpecification = (LinkedHashMap) service2.get("serviceSpecification");
+ assertThat(serviceSpecification.get("name")).isEqualTo("vFW");
+ assertThat(serviceSpecification.get("id")).isEqualTo("98d95267-5e0f-4531-abf8-f14b90031dc5");
+
+ }
+
+}
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index 5d18ec8..f778b8a 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -4,10 +4,23 @@ server.port = 8080
# LOGGING
logging.level.org.onap.nbi=DEBUG
-logging.level.org.springframework.cloud.contract.wiremock=DEBUG
+
+# ONAP
+onap.lcpCloudRegionId=RegionOne
+onap.tenantId=31047205ce114b60833b23e400d6a535
+onap.cloudOwner=CloudOwner
+
+# NBI
+nbi.url=http://127.0.0.1:8080/nbi/api/v1
# SDC
sdc.host=http://127.0.0.1:8091
sdc.header.ecompInstanceId=Rene
sdc.header.authorization=Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
+# AAI
+aai.host=http://127.0.0.1:8091
+aai.header.authorization=Basic QUFJOkFBSQ==
+aai.api.id=AAI
+
+
diff --git a/src/test/resources/mappings/aai_get_6490_service-subscriptions.json b/src/test/resources/mappings/aai_get_6490_service-subscriptions.json
new file mode 100644
index 0000000..5582990
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_6490_service-subscriptions.json
@@ -0,0 +1,24 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/6490/service-subscriptions"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "service-subscription": [
+ {
+ "service-type": "vFW-service-2VF-based",
+ "resource-version": "1519809287769"
+ },
+ {
+ "service-type": "vFW",
+ "resource-version": "1519660513613"
+ }
+ ]
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_customer_6490.json b/src/test/resources/mappings/aai_get_customer_6490.json
new file mode 100644
index 0000000..eaf5a4b
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_customer_6490.json
@@ -0,0 +1,18 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/6490"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "global-customer-id": "6490",
+ "subscriber-name": "Jean Pontus",
+ "subscriber-type": "BSS",
+ "resource-version": "1518595364087"
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_customer_generic.json b/src/test/resources/mappings/aai_get_customer_generic.json
new file mode 100644
index 0000000..250f5d6
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_customer_generic.json
@@ -0,0 +1,18 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/generic"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "global-customer-id": "generic",
+ "subscriber-name": "generic",
+ "subscriber-type": "BSS",
+ "resource-version": "1518595364087"
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_generic_service-subscriptions.json b/src/test/resources/mappings/aai_get_generic_service-subscriptions.json
new file mode 100644
index 0000000..5cf9ddd
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_generic_service-subscriptions.json
@@ -0,0 +1,20 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/generic/service-subscriptions"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "service-subscription": [
+ {
+ "service-type": "vFW",
+ "resource-version": "1519660513613"
+ }
+ ]
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_service-subscription.json b/src/test/resources/mappings/aai_get_service-subscription.json
new file mode 100644
index 0000000..03558a9
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_service-subscription.json
@@ -0,0 +1,55 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/6490/service-subscriptions/service-subscription/vFW/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb",
+ "service-instance-name": "NewFreeRadius-service-instance-01",
+ "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347",
+ "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5",
+ "resource-version": "1518508381261",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "NewFreeRadius-VNF-instance-01"
+ }
+ ]
+ },
+ {
+ "related-to": "generic-vnf",
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "NewFreeRadius-VNF-instance-01"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_service-subscription_vnf.json b/src/test/resources/mappings/aai_get_service-subscription_vnf.json
new file mode 100644
index 0000000..7c33979
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_service-subscription_vnf.json
@@ -0,0 +1,58 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "vnf-id": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e",
+ "vnf-name": "NewFreeRadius-VNF-instance-01",
+ "vnf-type": "NewFreeRadius-service/New-FreeRadius 0",
+ "service-id": "709d157b-52fb-4250-976e-7133dff5c347",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1516871905399",
+ "model-invariant-id": "f5993703-977f-4346-a1c9-c1884f8cfd8d",
+ "model-version-id": "902438f7-1e4c-492d-b7cc-8650e13b8aeb",
+ "model-customization-id": "a2def5c8-ab15-482b-a2cd-2af0b987300f",
+ "nf-type": "",
+ "nf-function": "",
+ "nf-role": "",
+ "nf-naming-code": "",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/NewFreeRadius-service/service-instances/service-instance/e4688e5f-61a0-4f8b-ae02-a2fbde623bcb",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Sina"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "NewFreeRadius-service"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "NewFreeRadius-service-instance-01"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_service-subscriptionsVFW.json b/src/test/resources/mappings/aai_get_service-subscriptionsVFW.json
new file mode 100644
index 0000000..093dd96
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_service-subscriptionsVFW.json
@@ -0,0 +1,43 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/6490/service-subscriptions/service-subscription/vFW/service-instances/"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "service-instance": [
+ {
+ "service-instance-id": "e4688e5f-61a0-4f8b-ae02-a2fbde623bcb",
+ "service-instance-name": "NewFreeRadius-service-instance-01",
+ "model-invariant-id": "709d157b-52fb-4250-976e-7133dff5c347",
+ "model-version-id": "98d95267-5e0f-4531-abf8-f14b90031dc5",
+ "resource-version": "1518508381261",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "NewFreeRadius-VNF-instance-01"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json b/src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json
new file mode 100644
index 0000000..444e3cd
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_service-subscriptionsvFW-service-2VF-based.json
@@ -0,0 +1,43 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/business/customers/customer/6490/service-subscriptions/service-subscription/vFW-service-2VF-based/service-instances/"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "service-instance": [
+ {
+ "service-instance-id": "vfw-service-id",
+ "service-instance-name": "vfw-service-name",
+ "model-invariant-id": "vfw-service-invariant-id",
+ "model-version-id": "9vfw-service-modek-version-id",
+ "resource-version": "1518508381261",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/cb80fbb6-9aa7-4ac5-9541-e14f45de533e",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "cb80fbb6-9aa7-4ac5-9541-e14f45de533e"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "NewFreeRadius-VNF-instance-01"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_get_tenants.json b/src/test/resources/mappings/aai_get_tenants.json
new file mode 100644
index 0000000..7581a91
--- /dev/null
+++ b/src/test/resources/mappings/aai_get_tenants.json
@@ -0,0 +1,167 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+
+ "tenant": [
+ {
+ "tenant-id": "31047205ce114b60833b23e400d6a535",
+ "tenant-name": "onap-vnfs",
+ "resource-version": "1516022902124",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/OPL-User/service-subscriptions/service-subscription/OPL_FWtest1_service_type",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "OPL-User"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "OPL_FWtest1_service_type"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/NewFreeRadius-service",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Sina"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "NewFreeRadius-service"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/vMRFaaS3",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Sina"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vMRFaaS3"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/FreeRadius-service",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Sina"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "FreeRadius-service"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/6401/service-subscriptions/service-subscription/vFW-service-model",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "6401"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vFW-service-model"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/vFW-service-model",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Sina"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vFW-service-model"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/6404/service-subscriptions/service-subscription/vFW-service-model",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "6404"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vFW-service-model"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/6405/service-subscriptions/service-subscription/vFW-service-model",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "6405"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vFW-service-model"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/6406/service-subscriptions/service-subscription/vFW-service-model",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "6406"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vFW-service-model"
+ }
+ ]
+ },
+ {
+ "related-to": "service-subscription",
+ "related-link": "/aai/v11/business/customers/customer/Sina/service-subscriptions/service-subscription/serviceFRDBS",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Sina"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "serviceFRDBS"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_put_customer.json b/src/test/resources/mappings/aai_put_customer.json
new file mode 100644
index 0000000..ec28b72
--- /dev/null
+++ b/src/test/resources/mappings/aai_put_customer.json
@@ -0,0 +1,12 @@
+{
+ "request": {
+ "method": "PUT",
+ "url": "/aai/v11/business/customers/customer/new"
+ },
+ "response": {
+ "status": 201,
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/mappings/aai_put_customer_service.json b/src/test/resources/mappings/aai_put_customer_service.json
new file mode 100644
index 0000000..889627a
--- /dev/null
+++ b/src/test/resources/mappings/aai_put_customer_service.json
@@ -0,0 +1,12 @@
+{
+ "request": {
+ "method": "PUT",
+ "url": "/aai/v11/business/customers/customer/new/service-subscriptions/service-subscription/vFW"
+ },
+ "response": {
+ "status": 201,
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+} \ No newline at end of file