summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test
diff options
context:
space:
mode:
authoras221v <as221v@intl.att.com>2019-09-09 17:56:41 +0300
committerAlexey Sandler <alexey.sandler@intl.att.com>2019-09-12 15:55:52 +0300
commitc4814252e8ef58dde843824d1c4d57ea708a961e (patch)
treeb870ffa4e3fbc4791b87fcbc2815a6dec7f97276 /vid-app-common/src/test
parent2609cc76f0565466667fff8ae4d0707b94993877 (diff)
Reduce vnf data response from A&AI in change management flows
Issue-ID: VID-596 Signed-off-by: Amir Skalka <as221v@intl.att.com> Change-Id: I4462ef0c2dbc9880d1a0d204f6552e3842aad821 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-app-common/src/test')
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java21
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java175
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/controller/ServicePermissionsTest.java2
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/changeManagement/get_vnf_data_by_globalid_and_service_type_reduced_response.json295
4 files changed, 402 insertions, 91 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java b/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
index 7c08e942a..9629e4634 100644
--- a/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/aai/AaiClientTest.java
@@ -137,6 +137,23 @@ public class AaiClientTest {
};
}
+ @Test
+ public void testAaiPutCustomQueryByParams() {
+ String globalCustomerId = "globalCustomerId1-360-as988q";
+ String serviceType = "TEST1-360";
+ String nfRole = "test360";
+ String queryFormat = "query?format=simple";
+ final ResponseWithRequestInfo mockedResponseWithRequestInfo = mockedResponseWithRequestInfo(Response.Status.OK,
+ TestUtils.readFileAsString("/payload_jsons/changeManagement/get_vnf_data_by_globalid_and_service_type_reduced_response.json"),
+ "query?format=simple&Mock=True",
+ HttpMethod.PUT);
+ when(aaiClientMock.getVnfsByParamsForChangeManagement(anyString(), anyString(),anyString(), nullable(String.class))).thenCallRealMethod();
+ when(aaiClientMock.doAaiPut(eq(queryFormat), anyString(), anyBoolean(), anyBoolean())).thenReturn(mockedResponseWithRequestInfo);
+ AaiResponse response = aaiClientMock.getVnfsByParamsForChangeManagement(globalCustomerId, serviceType, nfRole, null);
+ verify(aaiClientMock).doAaiPut(anyString(), anyString(),anyBoolean(),anyBoolean());
+ response.toString();
+ }
+
@Test(dataProvider = "logicalLinkData")
public void getLogicalLink_Link_Is_Empty(String link, String expectedUrl) {
@@ -518,7 +535,7 @@ public class AaiClientTest {
}
@Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = "A&AI has no homing data associated to vfModule 'vfModuleId' of vnf 'vnfInstanceId'")
- public void getVfMoudule_Homing_Arguments_Are_Valid_But_Not_Exists() {
+ public void getVfModule_Homing_Arguments_Are_Valid_But_Not_Exists() {
when(aaiClientMock.getHomingDataByVfModule(any(String.class), any(String.class))).thenCallRealMethod();
Response generalEmptyResponse = mock(Response.class);
@@ -536,7 +553,7 @@ public class AaiClientTest {
}
@Test(dataProvider = "invalidDataId", expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = "Failed to retrieve homing data associated to vfModule from A&AI, VNF InstanceId or VF Module Id is missing.")
- public void getVfMoudule_Homing_Arguments_Are_Empty_Or_Null(String data) {
+ public void getVfModule_Homing_Arguments_Are_Empty_Or_Null(String data) {
when(aaiClientMock.getHomingDataByVfModule(any(), any())).thenCallRealMethod();
aaiClientMock.getHomingDataByVfModule(data, data);
}
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
index f9a374948..3e38ba883 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/AaiControllerTest.java
@@ -88,7 +88,6 @@ public class AaiControllerTest {
private RoleProvider roleProvider;
@Mock
private SystemPropertiesWrapper systemPropertiesWrapper;
-
@Mock
private FeatureManager featureManager;
@@ -98,7 +97,7 @@ public class AaiControllerTest {
@Before
public void setUp() {
aaiController = new AaiController(aaiService, aaiRestInterface, roleProvider, systemPropertiesWrapper,
- featureManager);
+ featureManager);
mockMvc = MockMvcBuilders.standaloneSetup(aaiController).build();
}
@@ -112,12 +111,12 @@ public class AaiControllerTest {
given(aaiService.getAicZoneForPnf(globalCustomerId, serviceType, serviceId)).willReturn(aaiResponse);
mockMvc.perform(
- get("/aai_get_aic_zone_for_pnf/{globalCustomerId}/{serviceType}/{serviceId}", globalCustomerId, serviceType,
- serviceId)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().string(objectMapper.writeValueAsString(expectedResponseBody)));
+ get("/aai_get_aic_zone_for_pnf/{globalCustomerId}/{serviceType}/{serviceId}", globalCustomerId, serviceType,
+ serviceId)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().string(objectMapper.writeValueAsString(expectedResponseBody)));
}
@Test
@@ -128,10 +127,10 @@ public class AaiControllerTest {
given(aaiService.getInstanceGroupsByVnfInstanceId(vnfInstanceId)).willReturn(aaiResponse);
mockMvc.perform(get("/aai_get_instance_groups_by_vnf_instance_id/{vnfInstanceId}", vnfInstanceId)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().string(objectMapper.writeValueAsString(expectedResponseBody)));
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().string(objectMapper.writeValueAsString(expectedResponseBody)));
}
@Test
@@ -144,17 +143,17 @@ public class AaiControllerTest {
given(response.getStatus()).willReturn(HttpStatus.OK.value());
given(aaiRestInterface.RestGet(eq("VidAaiController"), anyString(), eq(Unchecked.toURI(
- "search/nodes-query?search-node-type=service-instance&filter=service-instance-id:EQUALS:"
- + serviceInstanceId)),
- eq(false)).getResponse()).willReturn(response);
+ "search/nodes-query?search-node-type=service-instance&filter=service-instance-id:EQUALS:"
+ + serviceInstanceId)),
+ eq(false)).getResponse()).willReturn(response);
mockMvc
- .perform(get("/aai_get_service_instance/{service-instance-id}/{service-instance-type}", serviceInstanceId,
- serviceInstanceType)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().string(expectedResponseBody));
+ .perform(get("/aai_get_service_instance/{service-instance-id}/{service-instance-type}", serviceInstanceId,
+ serviceInstanceType)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().string(expectedResponseBody));
}
@Test
@@ -167,17 +166,17 @@ public class AaiControllerTest {
given(response.getStatus()).willReturn(HttpStatus.OK.value());
given(aaiRestInterface.RestGet(eq("VidAaiController"), anyString(), eq(Unchecked.toURI(
- "search/nodes-query?search-node-type=service-instance&filter=service-instance-name:EQUALS:"
- + serviceInstanceId)),
- eq(false)).getResponse()).willReturn(response);
+ "search/nodes-query?search-node-type=service-instance&filter=service-instance-name:EQUALS:"
+ + serviceInstanceId)),
+ eq(false)).getResponse()).willReturn(response);
mockMvc
- .perform(get("/aai_get_service_instance/{service-instance-id}/{service-instance-type}", serviceInstanceId,
- serviceInstanceType)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().string(expectedResponseBody));
+ .perform(get("/aai_get_service_instance/{service-instance-id}/{service-instance-type}", serviceInstanceId,
+ serviceInstanceType)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().string(expectedResponseBody));
}
@Test
@@ -190,21 +189,21 @@ public class AaiControllerTest {
given(response.getStatus()).willReturn(HttpStatus.OK.value());
given(aaiRestInterface.RestGet(
- eq("VidAaiController"),
- anyString(),
- eq(Unchecked.toURI(
- "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/"
- + serviceSubscriptionId + "?depth=0")),
- eq(false)).getResponse()).willReturn(response);
+ eq("VidAaiController"),
+ anyString(),
+ eq(Unchecked.toURI(
+ "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/"
+ + serviceSubscriptionId + "?depth=0")),
+ eq(false)).getResponse()).willReturn(response);
mockMvc
- .perform(
- get("/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", globalCustomerId,
- serviceSubscriptionId)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().string(expectedResponseBody));
+ .perform(
+ get("/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", globalCustomerId,
+ serviceSubscriptionId)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().string(expectedResponseBody));
}
@Test
@@ -213,21 +212,21 @@ public class AaiControllerTest {
String serviceSubscriptionId = "testServiceSubscriptionId";
String expectedResponseBody = "Failed to fetch data from A&AI, check server logs for details.";
given(aaiRestInterface.RestGet(
- eq("VidAaiController"),
- anyString(),
- eq(Unchecked.toURI(
- "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/"
- + serviceSubscriptionId + "?depth=0")),
- eq(false)).getResponse()).willReturn(null);
+ eq("VidAaiController"),
+ anyString(),
+ eq(Unchecked.toURI(
+ "business/customers/customer/" + globalCustomerId + "/service-subscriptions/service-subscription/"
+ + serviceSubscriptionId + "?depth=0")),
+ eq(false)).getResponse()).willReturn(null);
mockMvc
- .perform(
- get("/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", globalCustomerId,
- serviceSubscriptionId)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isInternalServerError())
- .andExpect(content().string(expectedResponseBody));
+ .perform(
+ get("/aai_get_service_subscription/{global-customer-id}/{service-subscription-id}", globalCustomerId,
+ serviceSubscriptionId)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isInternalServerError())
+ .andExpect(content().string(expectedResponseBody));
}
@Test
@@ -235,18 +234,18 @@ public class AaiControllerTest {
PortMirroringConfigDataOk okConfigData = new PortMirroringConfigDataOk("foo");
PortMirroringConfigDataError errorConfigData = new PortMirroringConfigDataError("bar", "{ baz: qux }");
Map<String, PortMirroringConfigData> expectedJson = ImmutableMap.of(
- ID_1, okConfigData,
- ID_2, errorConfigData);
+ ID_1, okConfigData,
+ ID_2, errorConfigData);
given(aaiService.getPortMirroringConfigData(ID_1)).willReturn(okConfigData);
given(aaiService.getPortMirroringConfigData(ID_2)).willReturn(errorConfigData);
mockMvc
- .perform(get("/aai_getPortMirroringConfigsData")
- .param("configurationIds", ID_1, ID_2)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().json(objectMapper.writeValueAsString(expectedJson)));
+ .perform(get("/aai_getPortMirroringConfigsData")
+ .param("configurationIds", ID_1, ID_2)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().json(objectMapper.writeValueAsString(expectedJson)));
}
@Test
@@ -254,18 +253,18 @@ public class AaiControllerTest {
PortDetailsOk portDetailsOk = new PortDetailsOk("foo", "testInterface", true);
PortDetailsError portDetailsError = new PortDetailsError("bar", "{ baz: qux }");
Multimap<String, PortDetails> expectedJson = ImmutableMultimap.of(
- ID_1, portDetailsOk,
- ID_2, portDetailsError);
+ ID_1, portDetailsOk,
+ ID_2, portDetailsError);
given(aaiService.getPortMirroringSourcePorts(ID_1)).willReturn(Lists.newArrayList(portDetailsOk));
given(aaiService.getPortMirroringSourcePorts(ID_2)).willReturn(Lists.newArrayList(portDetailsError));
mockMvc
- .perform(get("/aai_getPortMirroringSourcePorts")
- .param("configurationIds", ID_1, ID_2)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().json(objectMapper.writeValueAsString(expectedJson.asMap())));
+ .perform(get("/aai_getPortMirroringSourcePorts")
+ .param("configurationIds", ID_1, ID_2)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().json(objectMapper.writeValueAsString(expectedJson.asMap())));
}
@Test
@@ -279,15 +278,15 @@ public class AaiControllerTest {
String expectedResponseBody = "myResponse";
AaiResponse<String> aaiResponse = new AaiResponse<>(expectedResponseBody, "", HttpStatus.OK.value());
given(aaiService
- .getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion))
- .willReturn(aaiResponse);
+ .getNodeTemplateInstances(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion))
+ .willReturn(aaiResponse);
mockMvc
- .perform(get(urlTemplate, globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion)
- .contentType(MediaType.APPLICATION_JSON)
- .accept(MediaType.APPLICATION_JSON))
- .andExpect(status().isOk())
- .andExpect(content().string(expectedResponseBody));
+ .perform(get(urlTemplate, globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON))
+ .andExpect(status().isOk())
+ .andExpect(content().string(expectedResponseBody));
}
@Test
@@ -306,7 +305,7 @@ public class AaiControllerTest {
public void getAicZones_shouldReturnErrorResponse_whenAaiHttpStatusOtherThanOK() throws Exception {
String expectedErrorMessage = "Calling AAI Failed";
given(aaiService.getAaiZones())
- .willReturn(new AaiResponse(null, expectedErrorMessage, HttpStatus.INTERNAL_SERVER_ERROR.value()));
+ .willReturn(new AaiResponse(null, expectedErrorMessage, HttpStatus.INTERNAL_SERVER_ERROR.value()));
mockMvc.perform(get("/aai_get_aic_zones")
.contentType(MediaType.APPLICATION_JSON)
@@ -363,8 +362,8 @@ public class AaiControllerTest {
AaiResponse<String> aaiResponse = new AaiResponse<>(expectedResponseBody, "", HttpStatus.OK.value());
given(aaiService
- .getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor,
- equipModel)).willReturn(aaiResponse);
+ .getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor,
+ equipModel)).willReturn(aaiResponse);
mockMvc.perform(
get(urlTemplate, globalCustomerId, serviceType, modelVersionId,
@@ -383,7 +382,7 @@ public class AaiControllerTest {
Response response = mock(Response.class);
given(response.readEntity(String.class)).willReturn(expectedResponse);
given(aaiService
- .getVersionByInvariantId(request.versions)).willReturn(response);
+ .getVersionByInvariantId(request.versions)).willReturn(response);
mockMvc.perform(
post("/aai_get_version_by_invariant_id")
@@ -396,7 +395,7 @@ public class AaiControllerTest {
@Test
public void getSubscriberDetails_shouldOmitServiceInstancesFromSubscriberData_whenFeatureEnabled_andOmitFlagIsTrue()
- throws Exception {
+ throws Exception {
boolean isFeatureActive = true;
boolean omitServiceInstances = true;
@@ -405,8 +404,8 @@ public class AaiControllerTest {
AaiResponse<String> aaiResponse = new AaiResponse<>(okResponseBody, "", HttpStatus.OK.value());
given(featureManager.isActive(Features.FLAG_1906_AAI_SUB_DETAILS_REDUCE_DEPTH)).willReturn(isFeatureActive);
given(aaiService.getSubscriberData(eq(subscriberId), isA(RoleValidatorByRoles.class),
- eq(isFeatureActive && omitServiceInstances)))
- .willReturn(aaiResponse);
+ eq(isFeatureActive && omitServiceInstances)))
+ .willReturn(aaiResponse);
mockMvc.perform(
get("/aai_sub_details/{subscriberId}", subscriberId)
@@ -419,7 +418,7 @@ public class AaiControllerTest {
@Test
public void getSubscriberDetails_shouldIncludeServiceInstancesFromSubscriberData_whenFeatureEnabled_andOmitFlagIsFalse()
- throws Exception {
+ throws Exception {
boolean isFeatureActive = true;
boolean omitServiceInstances = false;
@@ -428,7 +427,7 @@ public class AaiControllerTest {
@Test
public void getSubscriberDetails_shouldIncludeServiceInstancesFromSubscriberData_whenFeatureDisabled_andOmitFlagIsTrue()
- throws Exception {
+ throws Exception {
boolean isFeatureActive = false;
boolean omitServiceInstances = true;
diff --git a/vid-app-common/src/test/java/org/onap/vid/controller/ServicePermissionsTest.java b/vid-app-common/src/test/java/org/onap/vid/controller/ServicePermissionsTest.java
index 36af92c0c..ac3da50ab 100644
--- a/vid-app-common/src/test/java/org/onap/vid/controller/ServicePermissionsTest.java
+++ b/vid-app-common/src/test/java/org/onap/vid/controller/ServicePermissionsTest.java
@@ -55,7 +55,7 @@ public class ServicePermissionsTest {
when(roleProvider.getUserRolesValidator(any())).thenReturn(roleValidator);
when(roleValidator.isServicePermitted(subscriberId, serviceType)).thenReturn(expected);
- AaiController2 aaiController2 = new AaiController2(null, roleProvider, null);
+ AaiController2 aaiController2 = new AaiController2(null, roleProvider, null, null);
Permissions permissions = aaiController2.servicePermissions(unimportantRequest(), subscriberId, serviceType);
assertThat(permissions, is(new Permissions(expected)));
diff --git a/vid-app-common/src/test/resources/payload_jsons/changeManagement/get_vnf_data_by_globalid_and_service_type_reduced_response.json b/vid-app-common/src/test/resources/payload_jsons/changeManagement/get_vnf_data_by_globalid_and_service_type_reduced_response.json
new file mode 100644
index 000000000..d9a120a49
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/changeManagement/get_vnf_data_by_globalid_and_service_type_reduced_response.json
@@ -0,0 +1,295 @@
+{
+ "results": [
+ {
+ "service-instance": {
+ "service-instance-id": "serviceInstanceID1-369-as988q",
+ "service-instance-name": "EUd8Test",
+ "service-type": "xBoJHJbWTest",
+ "service-role": "sc7OWTest",
+ "environment-context": "O7OVp5Test",
+ "workload-context": "VmnxNeJIgWq7HTest",
+ "model-invariant-id": "modelInvariantValue2-369 -as988q",
+ "model-version-id": "modelVersionKey2-369-as988q",
+ "widget-model-id": "HT7KA2FoRKH3cTest",
+ "widget-model-version": "CsGp5Test",
+ "bandwidth-total": "1Yijkk1Test",
+ "vhn-portal-url": "40PzTest",
+ "service-instance-location-id": "zcAaHJTAt5Hj8Test",
+ "resource-version": "1563820653329",
+ "selflink": "mZP2EVvwwHnlTest",
+ "orchestration-status": "6QvhzNgLudLBTest",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v17/network/generic-vnfs/generic-vnf/test-gvnf2-369-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "test-gvnf2-369-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "test-name2-gvnf-369"
+ }
+ ]
+ },
+ {
+ "related-to": "generic-vnf",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v17/network/generic-vnfs/generic-vnf/test-gvnf1-369-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "test-gvnf1-369-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "test-name-gvnf-369"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "model-ver": {
+ "model-version-id": "modelVersionKey2-369-as988q",
+ "model-name": "vnfc8",
+ "model-version": "1.1",
+ "resource-version": "1563820653007"
+ }
+ },
+ {
+ "model": {
+ "model-invariant-id": "modelInvariantValue2-369-as988q",
+ "model-type": "widget3",
+ "resource-version": "1563820652703",
+ "model-vers": {
+ "model-ver": [
+ {
+ "model-version-id": "modelVersionKey2-369-as988q",
+ "model-name": "vnfc8",
+ "model-version": "1.1",
+ "resource-version": "1563820653007"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "generic-vnf": {
+ "vnf-id": "test-gvnf2-369-as988q",
+ "vnf-name": "test-name2-gvnf-369",
+ "vnf-type": "SW",
+ "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
+ "equipment-role": "UCPE",
+ "orchestration-status": "created",
+ "ipv4-oam-address": "12.80.1.18",
+ "nm-lan-v6-address": "2001:1890:e00e:fffe::33c4",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1563820654611",
+ "model-invariant-id": "modelInvariantValue-369-as988q",
+ "model-version-id": "modelVersionKey-369-as988q",
+ "nf-role": "test360",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v17/business/customers/customer/globalCustomerId1-369-as988q/service-subscriptions/service-subscription/TEST1-369/service-instances/service-instance/serviceInstanceID1-369-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "globalCustomerId1-369-as988q"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "TEST1-369"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "serviceInstanceID1-369-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "EUd8Test"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "model-ver": {
+ "model-version-id": "modelVersionKey-369-as988q",
+ "model-name": "vnfc8",
+ "model-version": "1.1",
+ "resource-version": "1563820652380"
+ }
+ },
+ {
+ "model": {
+ "model-invariant-id": "modelInvariantValue-369-as988q",
+ "model-type": "service",
+ "resource-version": "1563820652072",
+ "model-vers": {
+ "model-ver": [
+ {
+ "model-version-id": "modelVersionKey-369-as988q",
+ "model-name": "vnfc8",
+ "model-version": "1.1",
+ "resource-version": "1563820652380"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "generic-vnf": {
+ "vnf-id": "test-gvnf1-369-as988q",
+ "vnf-name": "test-name-gvnf-369",
+ "vnf-type": "SW",
+ "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
+ "equipment-role": "UCPE",
+ "orchestration-status": "created",
+ "ipv4-oam-address": "12.80.1.18",
+ "nm-lan-v6-address": "2001:1890:e00e:fffe::33c4",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1563820654296",
+ "model-invariant-id": "modelInvariantValue-369-as988q",
+ "model-version-id": "modelVersionKey-369-as988q",
+ "nf-role": "test360",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v17/business/customers/customer/globalCustomerId1-369-as988q/service-subscriptions/service-subscription/TEST1-369/service-instances/service-instance/serviceInstanceID1-369-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "globalCustomerId1-369-as988q"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "TEST1-369"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "serviceInstanceID1-369-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "EUd8Test"
+ }
+ ]
+ },
+ {
+ "related-to": "vserver",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v17/cloud-infrastructure/cloud-regions/cloud-region/cloudOwnerKeyValue1-369-as988q/cloudRegionIdKeyValue1-369-as988q/tenants/tenant/tenantID1-369-as988q/vservers/vserver/vserver1-369-test-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "cloud-region.cloud-owner",
+ "relationship-value": "cloudOwnerKeyValue1-369-as988q"
+ },
+ {
+ "relationship-key": "cloud-region.cloud-region-id",
+ "relationship-value": "cloudRegionIdKeyValue1-369-as988q"
+ },
+ {
+ "relationship-key": "tenant.tenant-id",
+ "relationship-value": "tenantID1-369-as988q"
+ },
+ {
+ "relationship-key": "vserver.vserver-id",
+ "relationship-value": "vserver1-369-test-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "vserver.vserver-name",
+ "property-value": "vserver-name11-369-as988q"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "tenant": {
+ "tenant-id": "tenantID1-369-as988q",
+ "tenant-name": "tenant-name1-369-as988q",
+ "resource-version": "1563820651384",
+ "vservers": {
+ "vserver": [
+ {
+ "vserver-id": "vserver1-369-test-as988q",
+ "vserver-name": "vserver-name11-369-as988q",
+ "vserver-name2": "vserver-name22-360-as988q",
+ "prov-status": "ACTIVE",
+ "vserver-selflink": "TRINITY vserverLink",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1563820654917",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "generic-vnf",
+ "relationship-label": "tosca.relationships.HostedOn",
+ "related-link": "/aai/v17/network/generic-vnfs/generic-vnf/test-gvnf1-369-as988q",
+ "relationship-data": [
+ {
+ "relationship-key": "generic-vnf.vnf-id",
+ "relationship-value": "test-gvnf1-369-as988q"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "generic-vnf.vnf-name",
+ "property-value": "test-name-gvnf-369"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "cloud-region": {
+ "cloud-owner": "cloudOwnerKeyValue1-369-as988q",
+ "cloud-region-id": "cloudRegionIdKeyValue1-369-as988q",
+ "resource-version": "1563820651058",
+ "orchestration-disabled": false,
+ "in-maint": false,
+ "tenants": {
+ "tenant": [
+ {
+ "tenant-id": "tenantID1-369-as988q",
+ "tenant-name": "tenant-name1-369-as988q",
+ "resource-version": "1563820651384"
+ }
+ ]
+ }
+ }
+ }
+ ]
+} \ No newline at end of file