summaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-08 09:52:32 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-08 09:53:04 -0400
commitfc6b48f9d2a2df77dcb9327d645d2bb262285d90 (patch)
tree62949ceec925d3f30f66198fc23aaf1ae17d710e /adapters
parente757e801c665a1758cf4c976b24df13adda38b2b (diff)
Query param to pull back nested stack information
Add Query param to pull back nested stack information Change-Id: Idf83291107e2ef7e86bb2de914469b0401eda0ac Issue-ID: SO-1760 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/HeatStackAuditTest.java19
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/GetNestedResources.json277
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/GetResources.json368
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/NestedExpectedValue.json1
6 files changed, 667 insertions, 6 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
index 054234015f..300d06b5d1 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
@@ -1710,12 +1710,12 @@ public class MsoHeatUtils extends MsoCommonUtils implements VduPlugin{
return vduStatus;
}
-
- public Resources queryStackResources(String cloudSiteId, String tenantId, String stackName) throws MsoException {
+
+ public Resources queryStackResources(String cloudSiteId, String tenantId, String stackName, int nestedDepth) throws MsoException {
CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId)
.orElseThrow(() -> new MsoCloudSiteNotFound(cloudSiteId));
Heat heatClient = getHeatClient(cloudSite, tenantId);
- OpenStackRequest<Resources> request = heatClient.getResources().listResources(stackName);
+ OpenStackRequest<Resources> request = heatClient.getResources().listResources(stackName).queryParam("nested_depth", nestedDepth);
return executeAndRecordOpenstackRequest(request);
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
index 31e913dc27..b522300b6a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
@@ -68,7 +68,7 @@ public class HeatStackAudit {
public Optional<AAIObjectAuditList> auditHeatStack(String cloudRegion, String cloudOwner, String tenantId, String heatStackName) {
try {
logger.debug("Fetching Top Level Stack Information");
- Resources resources = heat.queryStackResources(cloudRegion, tenantId, heatStackName);
+ Resources resources = heat.queryStackResources(cloudRegion, tenantId, heatStackName, 3);
List<Resource> novaResources = resources.getList().stream()
.filter(p -> "OS::Nova::Server".equals(p.getType())).collect(Collectors.toList());
List<Resource> resourceGroups = resources.getList().stream()
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/HeatStackAuditTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/HeatStackAuditTest.java
index a7744a2ea7..e728cfd0d4 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/HeatStackAuditTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/HeatStackAuditTest.java
@@ -169,19 +169,34 @@ public class HeatStackAuditTest extends HeatStackAudit {
String actualValue = objectMapper.writeValueAsString(vserversWithSubInterfaces);
String expectedValue = getJson("ExpectedVserversToAudit.json");
- System.out.println(actualValue);
JSONAssert.assertEquals(expectedValue, actualValue, false);
}
@Test
public void auditHeatStackNoServers_Test() throws Exception{
Resources getResource = objectMapper.readValue(new File("src/test/resources/Service1ResourceGroupResponse.json"), Resources.class);
- doReturn(getResource).when(msoHeatUtilsMock).queryStackResources(cloudRegion, tenantId, "heatStackName");
+ doReturn(getResource).when(msoHeatUtilsMock).queryStackResources(cloudRegion, tenantId, "heatStackName", 3);
Optional<AAIObjectAuditList> actual = heatStackAudit.auditHeatStack(cloudRegion, "cloudOwner", tenantId, "heatStackName");
assertEquals(true, actual.get().getAuditList().isEmpty());
}
+ @Test
+ public void auditHeatStackNestedServers_Test() throws Exception{
+ Resources getResource = objectMapper.readValue(new File("src/test/resources/GetNestedResources.json"), Resources.class);
+ List<Resource> novaResources = getResource.getList().stream()
+ .filter(p -> "OS::Nova::Server".equals(p.getType())).collect(Collectors.toList());
+ List<Resource> resourceGroups = getResource.getList().stream()
+ .filter(p -> "OS::Heat::ResourceGroup".equals(p.getType())).collect(Collectors.toList());
+
+ doReturn(getResource).when(msoHeatUtilsMock).queryStackResources(cloudRegion, tenantId, "heatStackName", 3);
+ Set<Vserver> vServersToAudit = heatStackAudit.createVserverSet(resources, novaResources,portList);
+ Set<Vserver> vserversWithSubInterfaces = heatStackAudit.processSubInterfaces(cloudRegion,tenantId,resourceGroups, vServersToAudit);
+ String actualValue = objectMapper.writeValueAsString(vserversWithSubInterfaces);
+ String expectedValue = getJson("NestedExpectedValue.json");
+ JSONAssert.assertEquals(expectedValue, actualValue, false);
+ }
+
@Test
public void findInterfaceInformation_Test(){
diff --git a/adapters/mso-openstack-adapters/src/test/resources/GetNestedResources.json b/adapters/mso-openstack-adapters/src/test/resources/GetNestedResources.json
new file mode 100644
index 0000000000..73769d745d
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/test/resources/GetNestedResources.json
@@ -0,0 +1,277 @@
+{
+ "resources": [
+ {
+ "resource_name": "rar_keypair",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module/9b93aecf-fe05-4047-ba36-d5eb7bc7354e/resources/rar_keypair",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module/9b93aecf-fe05-4047-ba36-d5eb7bc7354e",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_keypair",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:49Z",
+ "required_by": [
+ "rar_node_0"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "rdm6ararf8001v-key_pair",
+ "resource_type": "OS::Nova::KeyPair"
+ },
+ {
+ "resource_name": "rar_node_0",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module/9b93aecf-fe05-4047-ba36-d5eb7bc7354e/resources/rar_node_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module/9b93aecf-fe05-4047-ba36-d5eb7bc7354e",
+ "rel": "stack"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "nested"
+ }
+ ],
+ "logical_resource_id": "rar_node_0",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:49Z",
+ "required_by": [],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "resource_type": "nest_rareport_server.yaml"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_volumeattachment_0",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_volumeattachment_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_volumeattachment_0",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "a27b9151-f439-437e-b7b0-94068cc856fa",
+ "resource_type": "OS::Cinder::VolumeAttachment"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_volume_0",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_volume_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_volume_0",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_volumeattachment_0"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "a27b9151-f439-437e-b7b0-94068cc856fa",
+ "resource_type": "OS::Cinder::Volume"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_RMM",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_RMM",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_RMM",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_server_0"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "dd23e047-d169-4cc3-a90a-6bc81b1ea17a",
+ "resource_type": "OS::Heat::MultipartMime"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_server_0",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_server_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_server_0",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_volumeattachment_0"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "03a31a65-91ed-4563-9d5d-4f7223df9767",
+ "resource_type": "OS::Nova::Server"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_RSC",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_RSC",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_RSC",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_RMM"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "7cea5faf-f5a8-4182-a686-05964f51ad95",
+ "resource_type": "OS::Heat::SoftwareConfig"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_0_oam_port_0",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_0_oam_port_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_0_oam_port_0",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_server_0"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "d2bc253c-96a5-47df-a00f-5b9f3eebe684",
+ "resource_type": "OS::Neutron::Port"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_RCC_2",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_RCC_2",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_RCC_2",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_RMM"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "15d092ab-4702-4635-8da9-24fff85c175b",
+ "resource_type": "OS::Heat::CloudConfig"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_RCC_0",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_RCC_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_RCC_0",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_RMM"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "9420ad4c-49da-4f23-89fc-109f9d5a4505",
+ "resource_type": "OS::Heat::CloudConfig"
+ },
+ {
+ "parent_resource": "rar_node_0",
+ "resource_name": "rar_RCC_1",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5/resources/rar_RCC_1",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module-rar_node_0-4pkqvamx52u6/c4876377-22bb-45d2-9fc3-f36a32207fa5",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_RCC_1",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:56Z",
+ "required_by": [
+ "rar_RMM"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "321b91fb-f265-4e56-8025-3c3e88da320a",
+ "resource_type": "OS::Heat::CloudConfig"
+ },
+ {
+ "resource_name": "rar_Sec_Grp",
+ "links": [
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module/9b93aecf-fe05-4047-ba36-d5eb7bc7354e/resources/rar_Sec_Grp",
+ "rel": "self"
+ },
+ {
+ "href": "https://test.com:8004/v1/326799122bd4451c801153f5db7f8509/stacks/rdm6ararf8001v_base_module/9b93aecf-fe05-4047-ba36-d5eb7bc7354e",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "rar_Sec_Grp",
+ "resource_status": "CREATE_COMPLETE",
+ "updated_time": "2019-04-02T20:13:49Z",
+ "required_by": [
+ "rar_node_0"
+ ],
+ "resource_status_reason": "state changed",
+ "physical_resource_id": "99fc77c6-019b-441c-ad99-b48dd1059f71",
+ "resource_type": "OS::Neutron::SecurityGroup"
+ }
+ ]
+} \ No newline at end of file
diff --git a/adapters/mso-openstack-adapters/src/test/resources/GetResources.json b/adapters/mso-openstack-adapters/src/test/resources/GetResources.json
index 3366ce4a05..0d403a62b5 100644
--- a/adapters/mso-openstack-adapters/src/test/resources/GetResources.json
+++ b/adapters/mso-openstack-adapters/src/test/resources/GetResources.json
@@ -223,6 +223,374 @@
"resource_status_reason": "state changed",
"resource_type": "OS::Heat::ResourceGroup",
"updated_time": "2019-01-23T19:34:15Z"
+ },
+ {
+ "resources": [
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources/1",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672",
+ "rel": "stack"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb",
+ "rel": "nested"
+ }
+ ],
+ "logical_resource_id": "1",
+ "parent_resource": "ssc_1_subint_service1_port_0_subinterfaces",
+ "physical_resource_id": "0d9cd813-2ae1-46c0-9ebb-48081f6cffbb",
+ "required_by": [],
+ "resource_name": "1",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "vlan_subinterface_ssc_service1.yaml",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources/0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672",
+ "rel": "stack"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a",
+ "rel": "nested"
+ }
+ ],
+ "logical_resource_id": "0",
+ "parent_resource": "ssc_1_subint_service1_port_0_subinterfaces",
+ "physical_resource_id": "b7019dd0-2ee9-4447-bdef-ac25676b205a",
+ "required_by": [],
+ "resource_name": "0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "vlan_subinterface_ssc_service1.yaml",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources/2",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672",
+ "rel": "stack"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c",
+ "rel": "nested"
+ }
+ ],
+ "logical_resource_id": "2",
+ "parent_resource": "ssc_1_subint_service1_port_0_subinterfaces",
+ "physical_resource_id": "bd0fc728-cbde-4301-a581-db56f494675c",
+ "required_by": [],
+ "resource_name": "2",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "vlan_subinterface_ssc_service1.yaml",
+ "updated_time": "2019-01-23T19:34:56Z"
+ }
+ ]
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0",
+ "parent_resource": "0",
+ "physical_resource_id": "d54dfd09-75c6-4e04-b204-909455b8f933",
+ "required_by": [
+ "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "ssc_subint_service_1_vmi_0_ip_0"
+ ],
+ "resource_name": "ssc_subint_service_1_vmi_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::VirtualMachineInterface",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0_v6_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f",
+ "required_by": [],
+ "resource_name": "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506",
+ "required_by": [],
+ "resource_name": "ssc_subint_service_1_vmi_0_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0",
+ "parent_resource": "0",
+ "physical_resource_id": "f7a998c0-8939-4b07-bf4a-0862e9c325e1",
+ "required_by": [
+ "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "ssc_subint_service_1_vmi_0_ip_0"
+ ],
+ "resource_name": "ssc_subint_service_1_vmi_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::VirtualMachineInterface",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0_v6_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f",
+ "required_by": [],
+ "resource_name": "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506",
+ "required_by": [],
+ "resource_name": "ssc_subint_service_1_vmi_0_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0",
+ "parent_resource": "0",
+ "physical_resource_id": "621c1fea-60b8-44ee-aede-c01b8b1aaa70",
+ "required_by": [
+ "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "ssc_subint_service_1_vmi_0_ip_0"
+ ],
+ "resource_name": "ssc_subint_service_1_vmi_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::VirtualMachineInterface",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0_v6_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f",
+ "required_by": [],
+ "resource_name": "ssc_subint_service_1_vmi_0_v6_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service_1_vmi_0_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service_1_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service_1_vmi_0_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506",
+ "required_by": [],
+ "resource_name": "ssc_subint_service_1_vmi_0_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources/0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c",
+ "rel": "stack"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "nested"
+ }
+ ],
+ "logical_resource_id": "0",
+ "parent_resource": "ssc_1_subint_service2_port_0_subinterfaces",
+ "physical_resource_id": "f711be16-2654-4a09-b89d-0511fda20e81",
+ "required_by": [],
+ "resource_name": "0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "vlan_subinterface_ssc_service2.yaml",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service2_vmi_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service2_vmi_0",
+ "parent_resource": "0",
+ "physical_resource_id": "2bbfa345-33bb-495a-94b2-fb514ee1cffc",
+ "required_by": [
+ "ssc_subint_service2_vmi_0_v6_ip_0",
+ "ssc_subint_service2_vmi_0_ip_0"
+ ],
+ "resource_name": "ssc_subint_service2_vmi_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::VirtualMachineInterface",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service2_vmi_0_v6_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service2_vmi_0_v6_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "e7f25707-12fd-454f-95ac-6a05cd70806f",
+ "required_by": [],
+ "resource_name": "ssc_subint_service2_vmi_0_v6_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
+ },
+ {
+ "links": [
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources/ssc_subint_service2_vmi_0_ip_0",
+ "rel": "self"
+ },
+ {
+ "href": "https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81",
+ "rel": "stack"
+ }
+ ],
+ "logical_resource_id": "ssc_subint_service2_vmi_0_ip_0",
+ "parent_resource": "0",
+ "physical_resource_id": "6d23f4d3-8f7b-42c5-bb9e-4aee5797d506",
+ "required_by": [],
+ "resource_name": "ssc_subint_service2_vmi_0_ip_0",
+ "resource_status": "CREATE_COMPLETE",
+ "resource_status_reason": "state changed",
+ "resource_type": "OS::ContrailV2::InstanceIp",
+ "updated_time": "2019-01-23T19:34:56Z"
}
]
}
diff --git a/adapters/mso-openstack-adapters/src/test/resources/NestedExpectedValue.json b/adapters/mso-openstack-adapters/src/test/resources/NestedExpectedValue.json
new file mode 100644
index 0000000000..337f3ce853
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/test/resources/NestedExpectedValue.json
@@ -0,0 +1 @@
+[{"vserverId":"03a31a65-91ed-4563-9d5d-4f7223df9767","linterfaces":{"linterface":[]}}] \ No newline at end of file