aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java5
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java43
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java7
-rwxr-xr-xsrc/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java21
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestDetails.java12
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java17
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java9
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIOwningEntityManager.java62
-rw-r--r--src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java19
-rw-r--r--src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java3
-rw-r--r--src/main/resources/application-test.properties2
-rw-r--r--src/main/resources/application.properties8
-rw-r--r--src/test/resources/karatetest/features/02--ServiceOrder.feature37
-rw-r--r--src/test/resources/mappings/aai/aai_get_owningentites.json755
-rw-r--r--src/test/resources/mappings/aai/aai_get_owningentity.json755
-rw-r--r--src/test/resources/mappings/aai/aai_put_owning-entity.json12
16 files changed, 1736 insertions, 31 deletions
diff --git a/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java b/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java
index d9d2cb9..602b88c 100644
--- a/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java
+++ b/src/main/java/org/onap/nbi/OnapComponentsUrlPaths.java
@@ -55,7 +55,10 @@ public final class OnapComponentsUrlPaths {
"/aai/v14/nodes/service-instances/service-instance/$serviceId?format=resource_and_url";
public static final String AAI_GET_SERVICE_INSTANCES_PATH =
"/aai/v14/business/customers/customer/$customerId/service-subscriptions/service-subscription/$serviceSpecName/service-instances/";
-
+ public static final String AAI_GET_OWNING_ENTITIES =
+ "/aai/v14/business/owning-entities";
+ public static final String AAI_PUT_OWNING_ENTITIES =
+ "/aai/v14/business/owning-entities/owning-entity/$onap.owning.entity.id";
// MSO
public static final String MSO_CREATE_SERVICE_INSTANCE_PATH = "/onap/so/infra/serviceInstantiation/v7/serviceInstances/";
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java b/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java
index 2bc654b..6a38fbc 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/MultiClient.java
@@ -69,6 +69,12 @@ public class MultiClient {
@Value("${onap.cloudOwner}")
private String cloudOwner;
+ @Value("${so.owning.entity.id}")
+ private String owningEntityId;
+
+ @Value("${so.owning.entity.name}")
+ private String owningEntityName;
+
@Autowired
private ServiceCatalogUrl serviceCatalogUrl;
@@ -148,6 +154,27 @@ public class MultiClient {
return false;
}
+
+ public String getOwningEntityIdInAAI(ServiceOrder serviceOrder) {
+ StringBuilder callURL = new StringBuilder().append(aaiHost).append(OnapComponentsUrlPaths.AAI_GET_OWNING_ENTITIES);
+ String callUrlFormated = callURL.toString();
+
+ ResponseEntity<Object> response = callApiGet(callUrlFormated, buildRequestHeaderForAAI(), null);
+ if (response.getStatusCode().is2xxSuccessful()) {
+ LinkedHashMap body = (LinkedHashMap) response.getBody();
+ List<LinkedHashMap> owningEntities = (List<LinkedHashMap>) body.get("owning-entity");
+ for (LinkedHashMap owningEntity : owningEntities) {
+ if (owningEntityName.equalsIgnoreCase((String) owningEntity.get("owning-entity-name"))) {
+ return owningEntity.get("owning-entity-id").toString();
+ }
+ }
+ } else {
+ serviceOrderService.addOrderMessage(serviceOrder, "501");
+ }
+ return null;
+ }
+
+
public boolean isCustomerPresentInAAI(String customerId,
ServiceOrder serviceOrder) {
StringBuilder callURL = new StringBuilder().append(aaiHost).append(OnapComponentsUrlPaths.AAI_GET_CUSTOMER_PATH)
@@ -161,6 +188,22 @@ public class MultiClient {
}
+ public boolean putOwningEntity(ServiceOrder serviceOrder) {
+ Map<String, String> param = new HashMap<>();
+ param.put("owning-entity-id", owningEntityId);
+ param.put("owning-entity-name", owningEntityName);
+ String callURL =
+ aaiHost + OnapComponentsUrlPaths.AAI_PUT_OWNING_ENTITIES;
+ String callUrlFormated = callURL.replace("$onap.owning.entity.id", owningEntityId);
+ ResponseEntity<Object> response = putRequest(param, callUrlFormated, buildRequestHeaderForAAI());
+ if(response.getStatusCode().equals(HttpStatus.INTERNAL_SERVER_ERROR)) {
+ serviceOrderService.addOrderMessage(serviceOrder, "501");
+ return false;
+ }
+ return response.getStatusCode().equals(HttpStatus.CREATED);
+ }
+
+
public boolean putCustomer(SubscriberInfo subscriberInfo,
ServiceOrder serviceOrder) {
Map<String, String> param = new HashMap<>();
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java b/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java
index 90d84a4..c48965a 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java
@@ -16,6 +16,7 @@ import java.util.List;
import java.util.Optional;
import javax.validation.Valid;
import org.onap.nbi.OnapComponentsUrlPaths;
+import org.onap.nbi.apis.serviceorder.workflow.CreateAAIOwningEntityManager;
import org.onap.nbi.commons.EWInterfaceUtils;
import org.onap.nbi.apis.serviceorder.model.ServiceOrder;
import org.onap.nbi.apis.serviceorder.model.StateType;
@@ -62,6 +63,9 @@ public class ServiceOrderResource extends ResourceManagement {
CreateAAICustomerManager createAAICustomer;
@Autowired
+ CreateAAIOwningEntityManager createAAIOwningEntityManager;
+
+ @Autowired
CreateAAIServiceTypeManager createAAIServiceType;
@Autowired
@@ -158,10 +162,13 @@ public class ServiceOrderResource extends ResourceManagement {
serviceOrderService.updateOrderState(serviceOrder, StateType.COMPLETED);
} else {
createAAICustomer.createAAICustomer(serviceOrder, serviceOrderInfo);
+ createAAIOwningEntityManager.createAAIOwningEntity(serviceOrder, serviceOrderInfo);
+
if (StateType.ACKNOWLEDGED == serviceOrder.getState()) {
createAAIServiceType.createAAIServiceType(serviceOrder, serviceOrderInfo);
if (StateType.ACKNOWLEDGED == serviceOrder.getState()) {
serviceOrchestratorManager.registerServiceOrder(serviceOrder, serviceOrderInfo);
+ serviceOrderService.updateOrderState(serviceOrder, StateType.INPROGRESS_TASK_CREATED);
}
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java
index af5e6e6..9f51eac 100755
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/StateType.java
@@ -40,6 +40,8 @@ package org.onap.nbi.apis.serviceorder.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.ArrayList;
+import java.util.List;
/**
*
@@ -64,6 +66,8 @@ public enum StateType {
PARTIAL("partial"),
+ INPROGRESS_TASK_CREATED("inProgressTaskCreated"),
+
INPROGRESS_MODIFY_REQUEST_DELETE_SEND("inProgressModifyRequestDeleteSend"),
INPROGRESS_MODIFY_ITEM_TO_CREATE("inProgressModifyItemToCreate"),
@@ -92,10 +96,27 @@ public enum StateType {
return null;
}
+ public static List<StateType> fromValueSearch(String text){
+ List<StateType> values = new ArrayList<>();
+ for (StateType b : StateType.values()) {
+ if (String.valueOf(b.value).equals(text)) {
+ if(b.equals(StateType.INPROGRESS)) {
+ values.add(INPROGRESS_TASK_CREATED);
+ values.add(INPROGRESS_MODIFY_REQUEST_DELETE_SEND);
+ values.add(INPROGRESS_MODIFY_ITEM_TO_CREATE);
+ values.add(INPROGRESS_MODIFY_REQUEST_CREATE_SEND);
+ }
+ values.add(b);
+ }
+ }
+ return values;
+ }
+
@JsonValue
public String value()
{
if("inProgressModifyRequestDeleteSend".equalsIgnoreCase(this.value) || "inProgressModifyItemToCreate".equalsIgnoreCase(this.value)
+ || "inProgressTaskCreated".equalsIgnoreCase(this.value)
|| "inProgressModifyRequestCreateSend".equalsIgnoreCase(this.value)) {
return INPROGRESS.value;
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestDetails.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestDetails.java
index 2354b39..748af0d 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestDetails.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestDetails.java
@@ -89,8 +89,14 @@ public class RequestDetails {
@Override
public String toString() {
- return "RequestDetails{" + "modelInfo=" + modelInfo + ", subscriberInfo=" + subscriberInfo + ", requestInfo="
- + requestInfo + ", requestParameters=" + requestParameters + ", cloudConfiguration="
- + cloudConfiguration + '}';
+ return "RequestDetails{" +
+ "modelInfo=" + modelInfo +
+ ", subscriberInfo=" + subscriberInfo +
+ ", requestInfo=" + requestInfo +
+ ", requestParameters=" + requestParameters +
+ ", cloudConfiguration=" + cloudConfiguration +
+ ", owningEntity=" + owningEntity +
+ ", project=" + project +
+ '}';
}
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java
index e4bbfbb..147ad71 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/consumer/RequestParameters.java
@@ -26,6 +26,15 @@ public class RequestParameters {
private boolean aLaCarte;
+ private String testApi;
+
+ public String getTestApi() {
+ return testApi;
+ }
+
+ public void setTestApi(String testApi) {
+ this.testApi = testApi;
+ }
public String getSubscriptionServiceType() {
return subscriptionServiceType;
@@ -69,7 +78,11 @@ public class RequestParameters {
@Override
public String toString() {
- return "RequestParameters{" + "subscriptionServiceType='" + subscriptionServiceType + '\'' + ", userParams="
- + userParams + ", aLaCarte=" + aLaCarte + '}';
+ return "RequestParameters{" +
+ "subscriptionServiceType='" + subscriptionServiceType + '\'' +
+ ", userParams=" + userParams +
+ ", aLaCarte=" + aLaCarte +
+ ", testApi='" + testApi + '\'' +
+ '}';
}
}
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java
index fd0eed5..2068fdf 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/model/orchestrator/ServiceOrderInfo.java
@@ -29,6 +29,15 @@ public class ServiceOrderInfo {
private boolean allItemsCompleted;
private boolean serviceOrderRejected= false;
private String serviceOrderId;
+ private String owningEntityId;
+
+ public String getOwningEntityId() {
+ return owningEntityId;
+ }
+
+ public void setOwningEntityId(String owningEntityId) {
+ this.owningEntityId = owningEntityId;
+ }
public String getServiceOrderId() {
return serviceOrderId;
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIOwningEntityManager.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIOwningEntityManager.java
new file mode 100644
index 0000000..27cb6c8
--- /dev/null
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIOwningEntityManager.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2019 Orange
+ * <p>
+ * Licensed 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.onap.nbi.apis.serviceorder.workflow;
+
+import org.onap.nbi.apis.serviceorder.MultiClient;
+import org.onap.nbi.apis.serviceorder.model.ServiceOrder;
+import org.onap.nbi.apis.serviceorder.model.StateType;
+import org.onap.nbi.apis.serviceorder.model.orchestrator.ServiceOrderInfo;
+import org.onap.nbi.apis.serviceorder.service.ServiceOrderService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CreateAAIOwningEntityManager {
+
+
+ @Autowired
+ private MultiClient serviceOrderConsumerService;
+
+ @Autowired
+ ServiceOrderService serviceOrderService;
+
+ @Value("${so.owning.entity.id}")
+ private String owningEntityId;
+
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(CreateAAIOwningEntityManager.class);
+
+
+ public void createAAIOwningEntity(ServiceOrder serviceOrder,
+ ServiceOrderInfo serviceOrderInfo) {
+
+ String owningEntityIdToSo=serviceOrderConsumerService.getOwningEntityIdInAAI(serviceOrder);
+ if (owningEntityIdToSo==null) {
+ owningEntityIdToSo=owningEntityId;
+ boolean owningEntity = serviceOrderConsumerService.putOwningEntity(serviceOrder);
+ if (!owningEntity) {
+ serviceOrderService.updateOrderState(serviceOrder, StateType.REJECTED);
+ LOGGER.warn("serviceOrder {} rejected : cannot create owning entity ", serviceOrder.getId());
+ serviceOrderService.addOrderMessage(serviceOrder, "501");
+ }
+ }
+ serviceOrderInfo.setOwningEntityId(owningEntityIdToSo);
+ }
+
+
+}
+
+
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java
index deb4e55..7fdcdaa 100644
--- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java
+++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/PostSoProcessor.java
@@ -117,10 +117,7 @@ public class PostSoProcessor {
private ResponseEntity<CreateServiceInstanceResponse> postSORequest(
ServiceOrderItem serviceOrderItem, ServiceOrderInfo serviceOrderInfo) {
RequestDetails requestDetails =
- buildSoRequest(
- serviceOrderItem, serviceOrderInfo.getServiceOrderItemInfos()
- .get(serviceOrderItem.getId()).getCatalogResponse(),
- serviceOrderInfo.getSubscriberInfo());
+ buildSoRequest(serviceOrderItem,serviceOrderInfo);
MSOPayload msoPayload = new MSOPayload(requestDetails);
ResponseEntity<CreateServiceInstanceResponse> response = null;
@@ -186,16 +183,15 @@ public class PostSoProcessor {
* Build SO CREATE request from the ServiceOrder and catalog informations from SDC
*
* @param orderItem
- * @param sdcInfos
- * @param subscriberInfo
+ * @param serviceOrderInfo
* @return
*/
- private RequestDetails buildSoRequest(ServiceOrderItem orderItem, Map<String, Object> sdcInfos,
- SubscriberInfo subscriberInfo) {
+ private RequestDetails buildSoRequest(ServiceOrderItem orderItem,ServiceOrderInfo serviceOrderInfo) {
RequestDetails requestDetails = new RequestDetails();
- requestDetails.setSubscriberInfo(subscriberInfo);
-
+ requestDetails.setSubscriberInfo( serviceOrderInfo.getSubscriberInfo());
+ Map<String, Object> sdcInfos=serviceOrderInfo.getServiceOrderItemInfos()
+ .get(orderItem.getId()).getCatalogResponse();
ModelInfo modelInfo = new ModelInfo();
modelInfo.setModelType("service");
modelInfo.setModelInvariantId((String) sdcInfos.get("invariantUUID"));
@@ -217,13 +213,14 @@ public class PostSoProcessor {
requestParameters.setUserParams(retrieveUserParamsFromServiceCharacteristics(
orderItem.getService().getServiceCharacteristic()));
requestParameters.setaLaCarte(true);
+ requestParameters.setTestApi("GR_API");
requestDetails.setRequestParameters(requestParameters);
CloudConfiguration cloudConfiguration = new CloudConfiguration(lcpCloudRegionId, tenantId, cloudOwner);
requestDetails.setCloudConfiguration(cloudConfiguration);
OwningEntity owningEntity = new OwningEntity();
- owningEntity.setOwningEntityId(soOwningEntityId);
+ owningEntity.setOwningEntityId(serviceOrderInfo.getOwningEntityId());
owningEntity.setOwningEntityName(soOwningEntityName);
requestDetails.setOwningEntity(owningEntity);
diff --git a/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java b/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java
index 968f1dd..36902fe 100644
--- a/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java
+++ b/src/main/java/org/onap/nbi/commons/MultiCriteriaRequestBuilder.java
@@ -51,8 +51,7 @@ public class MultiCriteriaRequestBuilder {
if (!CollectionUtils.isEmpty(states)) {
String state = states.get(0);
LOGGER.debug("add criterion state {}", state);
- query.addCriteria(Criteria.where("state").is(StateType.fromValue(state)));
-
+ query.addCriteria(Criteria.where("state").in(StateType.fromValueSearch(state)));
}
List<String> descriptions = params.get("description");
if (!CollectionUtils.isEmpty(descriptions)) {
diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties
index 1ab93e3..1a73f16 100644
--- a/src/main/resources/application-test.properties
+++ b/src/main/resources/application-test.properties
@@ -58,7 +58,7 @@ aai.header.transaction.id = 808b54e3-e563-4144-a1b9-e24e2ed93d4f
so.host = http://127.0.0.1:8091
so.header.authorization =
so.api.id = SO
-so.owning.entity.id = 6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
+so.owning.entity.id = OE-generic
so.owning.entity.name = OE-generic
so.project.name = Project-generic
so.onap.partner.name = NBI
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 2925137..fe0b9d1 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -54,21 +54,21 @@ dmaapCheck.schedule = 10000
dmaapCheck.initial = 1
# SDC
-sdc.host = http://10.0.3.1:8080
+sdc.host = http://localhost:8081
sdc.header.ecompInstanceId = demo
sdc.header.authorization = Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
# AAI
-aai.host = https://10.0.1.1:8443
+aai.host = http://localhost:8081
aai.header.authorization = Basic QUFJOkFBSQ==
aai.api.id = NBI
aai.header.transaction.id = 808b54e3-e563-4144-a1b9-e24e2ed93d4f
# SO
-so.host = http://10.0.5.1:8080
+so.host = http://localhost:8081
so.header.authorization = Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==
so.api.id = SO
-so.owning.entity.id = 6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e
+so.owning.entity.id = OE-generic
so.owning.entity.name = OE-generic
so.project.name = Project-generic
so.onap.partner.name = NBI
diff --git a/src/test/resources/karatetest/features/02--ServiceOrder.feature b/src/test/resources/karatetest/features/02--ServiceOrder.feature
index b827381..f1ee4bc 100644
--- a/src/test/resources/karatetest/features/02--ServiceOrder.feature
+++ b/src/test/resources/karatetest/features/02--ServiceOrder.feature
@@ -48,7 +48,7 @@ And request $
When method put
Then status 201
And match $.id == serviceOrderId
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
Given path 'serviceOrder',serviceOrderId
When method get
Then status 200
@@ -88,7 +88,7 @@ Given path 'serviceOrder','test',serviceOrderId
And request $
When method put
Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
Given path 'serviceOrder',serviceOrderId
When method get
Then status 200
@@ -106,7 +106,7 @@ Given path 'serviceOrder','test',serviceOrderId
And request $
When method put
Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
Given path 'serviceOrder',serviceOrderId
When method get
Then status 200
@@ -125,7 +125,7 @@ Given path 'serviceOrder','test',serviceOrderId
And request $
When method put
Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
Given path 'serviceOrder',serviceOrderId
When method get
Then status 200
@@ -226,7 +226,7 @@ Given path 'serviceOrder','test',serviceOrderId
And request $
When method put
Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
Given path 'serviceOrder',serviceOrderId
When method get
Then status 200
@@ -284,7 +284,7 @@ Given path 'serviceOrder','test',serviceOrderId
And request $
When method put
Then status 201
-And match $.state == 'acknowledged'
+And match $.state == 'inProgress'
And match $.orderItem[0].state == 'completed'
Given path 'serviceOrder',serviceOrderId
When method get
@@ -358,9 +358,10 @@ When method get
Then status 200
And match $ == '#[2]'
Given path 'serviceOrder'
-And params {externalId : 'extid1' , state : 'acknowledged'}
+And params {externalId : 'extid1' , state : 'inProgress'}
When method get
Then status 200
+And print response
And match $ == '#[1]'
Given path 'serviceOrder',serviceOrderId15
When method get
@@ -426,6 +427,8 @@ When method get
Then status 200
* call Context.startServers();
+
+
Scenario: testCheckServiceOrderWithSDCNotResponding
* call Context.removeWireMockMapping("/sdc/v1/catalog/services/1e3feeb0-8e36-46c6-862c-236d9c626439/metadata");
Given path 'serviceOrder'
@@ -463,3 +466,23 @@ Given path 'serviceOrder',serviceOrderId
When method get
Then status 200
* call Context.startServers();
+
+Scenario: testCheckServiceOrderNoOwningEntities
+* call Context.removeWireMockMapping("/aai/v14/business/owning-entities");
+Given path 'serviceOrder'
+And request data[9]
+When method post
+Then status 201
+And def serviceOrderId = $.id
+Given path 'serviceOrder','test',serviceOrderId
+And request $
+When method put
+Then status 201
+And match $.state == 'inProgress'
+Given path 'serviceOrder',serviceOrderId
+When method get
+Then status 200
+Given path 'serviceOrder',serviceOrderId
+When method delete
+Then status 204
+* call Context.startServers();
diff --git a/src/test/resources/mappings/aai/aai_get_owningentites.json b/src/test/resources/mappings/aai/aai_get_owningentites.json
new file mode 100644
index 0000000..a862192
--- /dev/null
+++ b/src/test/resources/mappings/aai/aai_get_owningentites.json
@@ -0,0 +1,755 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v14/business/owning-entities"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "owning-entity": [
+ {
+ "owning-entity-id": "6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e",
+ "owning-entity-name": "OE-generic",
+ "resource-version": "1575866094429",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/5f3f73b0-b201-43ef-a73d-06d5daa09931",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "5f3f73b0-b201-43ef-a73d-06d5daa09931"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-R3DO1R"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/df22c42b-324e-46d7-8f39-1fda8d0d9ee7",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "df22c42b-324e-46d7-8f39-1fda8d0d9ee7"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-7AK9OI"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/60dd8ce5-50ff-4b12-a1e9-f3dc8772c8c3",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "60dd8ce5-50ff-4b12-a1e9-f3dc8772c8c3"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-PEYTTI"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/0ae53dd4-b2af-4045-ad79-4f760bf310fe",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "0ae53dd4-b2af-4045-ad79-4f760bf310fe"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_1GAQ20"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ims/service-instances/service-instance/20c18875-421c-48cb-958f-c3f82cbe098b",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ims"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "20c18875-421c-48cb-958f-c3f82cbe098b"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ims-service-instance-JGI9UO"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/414dffcd-e56b-41a6-92bc-5e22e2db69a7",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "414dffcd-e56b-41a6-92bc-5e22e2db69a7"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-C36GKE"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/a9c601e3-0bb5-442c-99fc-93919b3dd12d",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "a9c601e3-0bb5-442c-99fc-93919b3dd12d"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-8N74GT"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/46815952-077d-40d1-9e1a-2af87a18c428",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "46815952-077d-40d1-9e1a-2af87a18c428"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_7NXRH7"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/affe8f55-4dba-442d-b71c-4a2c49c80fff",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "affe8f55-4dba-442d-b71c-4a2c49c80fff"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-KOWHS7"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/8937b9c4-2946-4324-a895-fb16ca1cda9d",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "8937b9c4-2946-4324-a895-fb16ca1cda9d"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-OJYKB6"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/59ca1615-773b-47d9-b18f-fd96c8004bcf",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "59ca1615-773b-47d9-b18f-fd96c8004bcf"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-E4W08X"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/386c9480-aff9-4202-8313-aec93b5b745a",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "386c9480-aff9-4202-8313-aec93b5b745a"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-HR2N83"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/910ac412-f5c4-4772-be53-3768b790a533",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "910ac412-f5c4-4772-be53-3768b790a533"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-RWVWR1"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/5b155fba-d315-4416-97f7-1fa0c98a4290",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "5b155fba-d315-4416-97f7-1fa0c98a4290"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-CI2FTJ"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/7ac1cb0d-4230-4485-8d6b-be74c357ce19",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "7ac1cb0d-4230-4485-8d6b-be74c357ce19"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_5M03I5"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/c8136ff7-cdbc-40bd-af24-bbfece01d4ed",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "c8136ff7-cdbc-40bd-af24-bbfece01d4ed"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_KG5IZ6"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/d6609346-b569-490b-80f1-4aab943c925a",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "d6609346-b569-490b-80f1-4aab943c925a"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_OXEQ33"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/e356b833-2580-41ea-bdd2-02334027f1ef",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "e356b833-2580-41ea-bdd2-02334027f1ef"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_YE6EMY"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/cbcefc28-4b8b-4b1c-b20b-292c09b8c8cd",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cbcefc28-4b8b-4b1c-b20b-292c09b8c8cd"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-1DGLAN"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/a6ac6000-a715-4de7-bce0-909b2c0f9981",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "a6ac6000-a715-4de7-bce0-909b2c0f9981"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_YRKEYG"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/143a5ce0-630b-4be6-85cd-386f35a137c3",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "143a5ce0-630b-4be6-85cd-386f35a137c3"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_I6Z0M7"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ims/service-instances/service-instance/95eaf6bb-c3d8-43d8-98c3-9e0276445a49",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ims"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "95eaf6bb-c3d8-43d8-98c3-9e0276445a49"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ims-service-instance-6FJ4KX"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/b1a1ca78-ccc6-4fc6-9bff-5576d0365c82",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "b1a1ca78-ccc6-4fc6-9bff-5576d0365c82"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-DO2AKT"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/e4869f42-812b-4475-b9cd-9e50df2be0b1",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "e4869f42-812b-4475-b9cd-9e50df2be0b1"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_01M7L1"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/ad9ccfc3-afe2-4802-9d6f-0dc420a1c4a7",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "ad9ccfc3-afe2-4802-9d6f-0dc420a1c4a7"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_6NSUMS"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/bb9e6588-e37d-4848-b311-6fe688afd52d",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "bb9e6588-e37d-4848-b311-6fe688afd52d"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-AT6CPC"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/ef43cc8f-3b6f-4f6c-8d5b-f2f26cab7f28",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "ef43cc8f-3b6f-4f6c-8d5b-f2f26cab7f28"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_4EIEQA"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/9af7ae2e-5c32-4dc3-a5eb-8898d49da97e",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "9af7ae2e-5c32-4dc3-a5eb-8898d49da97e"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_5Z6N24"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/042ccff3-f0c8-4a52-96ad-6516541702b5",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "042ccff3-f0c8-4a52-96ad-6516541702b5"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-A0CZXY"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "owning-entity-id": "Useless_But_Mandatory",
+ "owning-entity-name": "Useless_But_Mandatory",
+ "resource-version": "1575382554324"
+ }
+ ]
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+}
diff --git a/src/test/resources/mappings/aai/aai_get_owningentity.json b/src/test/resources/mappings/aai/aai_get_owningentity.json
new file mode 100644
index 0000000..ad8ff74
--- /dev/null
+++ b/src/test/resources/mappings/aai/aai_get_owningentity.json
@@ -0,0 +1,755 @@
+{
+ "request": {
+ "method": "GET",
+ "url": "/aai/v14/business/owning-entities/owning-entity/6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e"
+ },
+ "response": {
+ "status": 200,
+ "jsonBody": {
+ "owning-entity": [
+ {
+ "owning-entity-id": "6b5b6b70-4e9a-4f6f-8b7b-cbd7cf990c6e",
+ "owning-entity-name": "OE-generic",
+ "resource-version": "1575866094429",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/5f3f73b0-b201-43ef-a73d-06d5daa09931",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "5f3f73b0-b201-43ef-a73d-06d5daa09931"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-R3DO1R"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/df22c42b-324e-46d7-8f39-1fda8d0d9ee7",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "df22c42b-324e-46d7-8f39-1fda8d0d9ee7"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-7AK9OI"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/60dd8ce5-50ff-4b12-a1e9-f3dc8772c8c3",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "60dd8ce5-50ff-4b12-a1e9-f3dc8772c8c3"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-PEYTTI"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/0ae53dd4-b2af-4045-ad79-4f760bf310fe",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "0ae53dd4-b2af-4045-ad79-4f760bf310fe"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_1GAQ20"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ims/service-instances/service-instance/20c18875-421c-48cb-958f-c3f82cbe098b",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ims"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "20c18875-421c-48cb-958f-c3f82cbe098b"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ims-service-instance-JGI9UO"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/414dffcd-e56b-41a6-92bc-5e22e2db69a7",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "414dffcd-e56b-41a6-92bc-5e22e2db69a7"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-C36GKE"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/a9c601e3-0bb5-442c-99fc-93919b3dd12d",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "a9c601e3-0bb5-442c-99fc-93919b3dd12d"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-8N74GT"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/46815952-077d-40d1-9e1a-2af87a18c428",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "46815952-077d-40d1-9e1a-2af87a18c428"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_7NXRH7"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/affe8f55-4dba-442d-b71c-4a2c49c80fff",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "affe8f55-4dba-442d-b71c-4a2c49c80fff"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-KOWHS7"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/8937b9c4-2946-4324-a895-fb16ca1cda9d",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "8937b9c4-2946-4324-a895-fb16ca1cda9d"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-OJYKB6"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/59ca1615-773b-47d9-b18f-fd96c8004bcf",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "59ca1615-773b-47d9-b18f-fd96c8004bcf"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-E4W08X"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/386c9480-aff9-4202-8313-aec93b5b745a",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "386c9480-aff9-4202-8313-aec93b5b745a"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-HR2N83"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/910ac412-f5c4-4772-be53-3768b790a533",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "910ac412-f5c4-4772-be53-3768b790a533"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-RWVWR1"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/5b155fba-d315-4416-97f7-1fa0c98a4290",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "5b155fba-d315-4416-97f7-1fa0c98a4290"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-CI2FTJ"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/7ac1cb0d-4230-4485-8d6b-be74c357ce19",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "7ac1cb0d-4230-4485-8d6b-be74c357ce19"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_5M03I5"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/c8136ff7-cdbc-40bd-af24-bbfece01d4ed",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "c8136ff7-cdbc-40bd-af24-bbfece01d4ed"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_KG5IZ6"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/d6609346-b569-490b-80f1-4aab943c925a",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "d6609346-b569-490b-80f1-4aab943c925a"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_OXEQ33"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/e356b833-2580-41ea-bdd2-02334027f1ef",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "e356b833-2580-41ea-bdd2-02334027f1ef"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_YE6EMY"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/cbcefc28-4b8b-4b1c-b20b-292c09b8c8cd",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "cbcefc28-4b8b-4b1c-b20b-292c09b8c8cd"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-1DGLAN"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/a6ac6000-a715-4de7-bce0-909b2c0f9981",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "a6ac6000-a715-4de7-bce0-909b2c0f9981"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_YRKEYG"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/143a5ce0-630b-4be6-85cd-386f35a137c3",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "143a5ce0-630b-4be6-85cd-386f35a137c3"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_I6Z0M7"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ims/service-instances/service-instance/95eaf6bb-c3d8-43d8-98c3-9e0276445a49",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ims"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "95eaf6bb-c3d8-43d8-98c3-9e0276445a49"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ims-service-instance-6FJ4KX"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/b1a1ca78-ccc6-4fc6-9bff-5576d0365c82",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "b1a1ca78-ccc6-4fc6-9bff-5576d0365c82"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-DO2AKT"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/e4869f42-812b-4475-b9cd-9e50df2be0b1",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "e4869f42-812b-4475-b9cd-9e50df2be0b1"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_01M7L1"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/ad9ccfc3-afe2-4802-9d6f-0dc420a1c4a7",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "ad9ccfc3-afe2-4802-9d6f-0dc420a1c4a7"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_6NSUMS"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/bb9e6588-e37d-4848-b311-6fe688afd52d",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "bb9e6588-e37d-4848-b311-6fe688afd52d"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-AT6CPC"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/ef43cc8f-3b6f-4f6c-8d5b-f2f26cab7f28",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "ef43cc8f-3b6f-4f6c-8d5b-f2f26cab7f28"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_4EIEQA"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/freeradius/service-instances/service-instance/9af7ae2e-5c32-4dc3-a5eb-8898d49da97e",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "freeradius"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "9af7ae2e-5c32-4dc3-a5eb-8898d49da97e"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "test_freeradius_5Z6N24"
+ }
+ ]
+ },
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.BelongsTo",
+ "related-link": "/aai/v13/business/customers/customer/generic/service-subscriptions/service-subscription/ubuntu16/service-instances/service-instance/042ccff3-f0c8-4a52-96ad-6516541702b5",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "generic"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "ubuntu16"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "042ccff3-f0c8-4a52-96ad-6516541702b5"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "ubuntu16-service-instance-A0CZXY"
+ }
+ ]
+ }
+ ]
+ }
+ },
+ {
+ "owning-entity-id": "Useless_But_Mandatory",
+ "owning-entity-name": "Useless_But_Mandatory",
+ "resource-version": "1575382554324"
+ }
+ ]
+ },
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+}
diff --git a/src/test/resources/mappings/aai/aai_put_owning-entity.json b/src/test/resources/mappings/aai/aai_put_owning-entity.json
new file mode 100644
index 0000000..15df2ee
--- /dev/null
+++ b/src/test/resources/mappings/aai/aai_put_owning-entity.json
@@ -0,0 +1,12 @@
+{
+ "request": {
+ "method": "PUT",
+ "url": "/aai/v14/business/owning-entities/owning-entity/OE-generic"
+ },
+ "response": {
+ "status": 201,
+ "headers": {
+ "Content-Type": "application/json"
+ }
+ }
+}