aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-openstack-adapters/src/test/java')
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditVServerTest.java102
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/HeatStackAuditTest.java105
2 files changed, 104 insertions, 103 deletions
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditVServerTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditVServerTest.java
index 11e54404f4..02557d8c20 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditVServerTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditVServerTest.java
@@ -79,7 +79,7 @@ public class AuditVServerTest extends AuditVServer {
private AAIResourceUri ssc_1_trusted_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db").queryParam("interface-id", "dec8bdc7-5718-41dc-bfbb-561ff6eeb81c");
- private AAIResourceUri ssc_1_avpn_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
+ private AAIResourceUri ssc_1_service1_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db").queryParam("interface-id", "1c56a24b-5f03-435a-850d-31cd4252de56");
private AAIResourceUri ssc_1_mgmt_port_1_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
@@ -88,7 +88,7 @@ public class AuditVServerTest extends AuditVServer {
private AAIResourceUri ssc_1_mgmt_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db").queryParam("interface-id", "80baec42-ffae-425f-ad8c-3f7b2c24bfff");
- private AAIResourceUri ssc_1_mis_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
+ private AAIResourceUri ssc_1_service2_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db").queryParam("interface-id", "13eddf95-4cf3-45f2-823a-2d890a6549b4");
private AAIResourceUri ssc_1_int_ha_port_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.L_INTERFACE,
@@ -103,13 +103,13 @@ public class AuditVServerTest extends AuditVServer {
- private AAIResourceUri mis_sub_1_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SUB_L_INTERFACE,
+ private AAIResourceUri service2_sub_1_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SUB_L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db","interface-name").queryParam("interface-id", "f711be16-2654-4a09-b89d-0511fda20e81");
- private AAIResourceUri avpn_sub_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SUB_L_INTERFACE,
+ private AAIResourceUri service1_sub_0_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SUB_L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db","interface-name").queryParam("interface-id", "0d9cd813-2ae1-46c0-9ebb-48081f6cffbb");
- private AAIResourceUri avpn_sub_1_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SUB_L_INTERFACE,
+ private AAIResourceUri service1_sub_1_uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SUB_L_INTERFACE,
cloudOwner, cloudRegion, tenantId, "3a4c2ca5-27b3-4ecc-98c5-06804867c4db","interface-name").queryParam("interface-id", "b7019dd0-2ee9-4447-bdef-ac25676b205a");
@@ -120,25 +120,25 @@ public class AuditVServerTest extends AuditVServer {
LInterface test_port_1 = new LInterface();
LInterface test_port_2 = new LInterface();
LInterface ssc_1_int_ha_port_0 = new LInterface();
- LInterface mis_sub_interface_1 = new LInterface();
- LInterface ssc_1_mis_port_0 = new LInterface();
+ LInterface service2_sub_interface_1 = new LInterface();
+ LInterface ssc_1_service2_port_0 = new LInterface();
LInterface ssc_1_mgmt_port_0 = new LInterface();
LInterface ssc_1_mgmt_port_1 = new LInterface();
- LInterface avpn_sub_interface_2 = new LInterface();
- LInterface avpn_sub_interface_1 = new LInterface();
- LInterface ssc_1_avpn_port_0 = new LInterface();
+ LInterface service1_sub_interface_2 = new LInterface();
+ LInterface service1_sub_interface_1 = new LInterface();
+ LInterface ssc_1_service1_port_0 = new LInterface();
LInterface ssc_1_trusted_port_0 = new LInterface();
LInterfaces test_port_1_plural = new LInterfaces();
LInterfaces test_port_2_plural = new LInterfaces();
LInterfaces ssc_1_int_ha_port_0_plural = new LInterfaces();
- LInterfaces mis_sub_interface_1_plural = new LInterfaces();
- LInterfaces ssc_1_mis_port_0_plural = new LInterfaces();
+ LInterfaces service2_sub_interface_1_plural = new LInterfaces();
+ LInterfaces ssc_1_service2_port_0_plural = new LInterfaces();
LInterfaces ssc_1_mgmt_port_0_plural = new LInterfaces();
LInterfaces ssc_1_mgmt_port_1_plural = new LInterfaces();
- LInterfaces avpn_sub_interface_2_plural = new LInterfaces();
- LInterfaces avpn_sub_interface_1_plural = new LInterfaces();
- LInterfaces ssc_1_avpn_port_0_plural = new LInterfaces();
+ LInterfaces service1_sub_interface_2_plural = new LInterfaces();
+ LInterfaces service1_sub_interface_1_plural = new LInterfaces();
+ LInterfaces ssc_1_service1_port_0_plural = new LInterfaces();
LInterfaces ssc_1_trusted_port_0_plural = new LInterfaces();
@@ -156,18 +156,18 @@ public class AuditVServerTest extends AuditVServer {
vServer1.getLInterfaces().getLInterface().add(ssc_1_trusted_port_0);
- ssc_1_avpn_port_0.setInterfaceId("1c56a24b-5f03-435a-850d-31cd4252de56");
- ssc_1_avpn_port_0.setInterfaceName("interface-name");
- vServer1.getLInterfaces().getLInterface().add(ssc_1_avpn_port_0);
- ssc_1_avpn_port_0.setLInterfaces(new LInterfaces());
+ ssc_1_service1_port_0.setInterfaceId("1c56a24b-5f03-435a-850d-31cd4252de56");
+ ssc_1_service1_port_0.setInterfaceName("interface-name");
+ vServer1.getLInterfaces().getLInterface().add(ssc_1_service1_port_0);
+ ssc_1_service1_port_0.setLInterfaces(new LInterfaces());
- avpn_sub_interface_1.setInterfaceId("0d9cd813-2ae1-46c0-9ebb-48081f6cffbb");
- ssc_1_avpn_port_0.getLInterfaces().getLInterface().add(avpn_sub_interface_1);
+ service1_sub_interface_1.setInterfaceId("0d9cd813-2ae1-46c0-9ebb-48081f6cffbb");
+ ssc_1_service1_port_0.getLInterfaces().getLInterface().add(service1_sub_interface_1);
- avpn_sub_interface_2.setInterfaceId("b7019dd0-2ee9-4447-bdef-ac25676b205a");
- ssc_1_avpn_port_0.getLInterfaces().getLInterface().add(avpn_sub_interface_2);
+ service1_sub_interface_2.setInterfaceId("b7019dd0-2ee9-4447-bdef-ac25676b205a");
+ ssc_1_service1_port_0.getLInterfaces().getLInterface().add(service1_sub_interface_2);
ssc_1_mgmt_port_1.setInterfaceId("12afcd28-929f-4d80-8a5a-0833bfd5e20b");
@@ -179,14 +179,14 @@ public class AuditVServerTest extends AuditVServer {
vServer1.getLInterfaces().getLInterface().add(ssc_1_mgmt_port_0);
- ssc_1_mis_port_0.setLInterfaces(new LInterfaces());
- ssc_1_mis_port_0.setInterfaceId("13eddf95-4cf3-45f2-823a-2d890a6549b4");
- ssc_1_mis_port_0.setInterfaceName("interface-name");
- vServer1.getLInterfaces().getLInterface().add(ssc_1_mis_port_0);
+ ssc_1_service2_port_0.setLInterfaces(new LInterfaces());
+ ssc_1_service2_port_0.setInterfaceId("13eddf95-4cf3-45f2-823a-2d890a6549b4");
+ ssc_1_service2_port_0.setInterfaceName("interface-name");
+ vServer1.getLInterfaces().getLInterface().add(ssc_1_service2_port_0);
- mis_sub_interface_1.setInterfaceId("f711be16-2654-4a09-b89d-0511fda20e81");
- ssc_1_mis_port_0.getLInterfaces().getLInterface().add(mis_sub_interface_1);
+ service2_sub_interface_1.setInterfaceId("f711be16-2654-4a09-b89d-0511fda20e81");
+ ssc_1_service2_port_0.getLInterfaces().getLInterface().add(service2_sub_interface_1);
ssc_1_int_ha_port_0.setInterfaceId("9cab2903-70f7-44fd-b681-491d6ae2adb8");
@@ -215,10 +215,10 @@ public class AuditVServerTest extends AuditVServer {
test_port_1_plural.getLInterface().add(test_port_1);
test_port_2_plural.getLInterface().add(test_port_2);
ssc_1_int_ha_port_0_plural.getLInterface().add(ssc_1_int_ha_port_0);
- ssc_1_mis_port_0_plural.getLInterface().add(ssc_1_mis_port_0);
+ ssc_1_service2_port_0_plural.getLInterface().add(ssc_1_service2_port_0);
ssc_1_mgmt_port_0_plural.getLInterface().add(ssc_1_mgmt_port_0);
ssc_1_mgmt_port_1_plural.getLInterface().add(ssc_1_mgmt_port_1);
- ssc_1_avpn_port_0_plural.getLInterface().add(ssc_1_avpn_port_0);
+ ssc_1_service1_port_0_plural.getLInterface().add(ssc_1_service1_port_0);
ssc_1_trusted_port_0_plural.getLInterface().add(ssc_1_trusted_port_0);
}
@@ -234,17 +234,17 @@ public class AuditVServerTest extends AuditVServer {
doReturn(true).when(aaiResourcesMock).exists(vserverURI);
doReturn(true).when(aaiResourcesMock).exists(vserverURI2);
doReturn(Optional.of(ssc_1_trusted_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_trusted_port_0_uri);
- doReturn(Optional.of(ssc_1_avpn_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_avpn_port_0_uri);
+ doReturn(Optional.of(ssc_1_service1_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_service1_port_0_uri);
doReturn(Optional.of(ssc_1_mgmt_port_1_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_mgmt_port_1_uri);
doReturn(Optional.of(ssc_1_mgmt_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_mgmt_port_0_uri);
- doReturn(Optional.of(ssc_1_mis_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_mis_port_0_uri);
+ doReturn(Optional.of(ssc_1_service2_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_service2_port_0_uri);
doReturn(Optional.of(ssc_1_int_ha_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_int_ha_port_0_uri);
doReturn(Optional.of(test_port_1_plural)).when(aaiResourcesMock).get(LInterfaces.class,test_port_1_uri);
doReturn(Optional.of(test_port_2_plural)).when(aaiResourcesMock).get(LInterfaces.class,test_port_2_uri);
- doReturn(true).when(aaiResourcesMock).exists(mis_sub_1_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_0_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service2_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_0_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_1_uri);
boolean exists = auditNova.auditVservers(vserversToAudit, tenantId, cloudOwner, cloudRegion);
assertEquals(true, exists);
@@ -256,17 +256,17 @@ public class AuditVServerTest extends AuditVServer {
doReturn(true).when(aaiResourcesMock).exists(vserverURI);
doReturn(true).when(aaiResourcesMock).exists(vserverURI2);
doReturn(Optional.of(ssc_1_trusted_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_trusted_port_0_uri);
- doReturn(Optional.of(ssc_1_avpn_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_avpn_port_0_uri);
+ doReturn(Optional.of(ssc_1_service1_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_service1_port_0_uri);
doReturn(Optional.of(ssc_1_mgmt_port_1_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_mgmt_port_1_uri);
doReturn(Optional.empty()).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_mgmt_port_0_uri);
- doReturn(Optional.of(ssc_1_mis_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_mis_port_0_uri);
+ doReturn(Optional.of(ssc_1_service2_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_service2_port_0_uri);
doReturn(Optional.of(ssc_1_int_ha_port_0_plural)).when(aaiResourcesMock).get(LInterfaces.class,ssc_1_int_ha_port_0_uri);
doReturn(Optional.of(test_port_1_plural)).when(aaiResourcesMock).get(LInterfaces.class,test_port_1_uri);
doReturn(Optional.of(test_port_2_plural)).when(aaiResourcesMock).get(LInterfaces.class,test_port_2_uri);
- doReturn(true).when(aaiResourcesMock).exists(mis_sub_1_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_0_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service2_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_0_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_1_uri);
boolean exists = auditNova.auditVservers(vserversToAudit, tenantId, cloudOwner, cloudRegion);
assertEquals(false, exists);
@@ -278,16 +278,16 @@ public class AuditVServerTest extends AuditVServer {
doReturn(true).when(aaiResourcesMock).exists(vserverURI);
doReturn(true).when(aaiResourcesMock).exists(vserverURI2);
doReturn(Optional.of(ssc_1_trusted_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_trusted_port_0_uri);
- doReturn(Optional.of(ssc_1_avpn_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_avpn_port_0_uri);
+ doReturn(Optional.of(ssc_1_service1_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_service1_port_0_uri);
doReturn(Optional.of(ssc_1_mgmt_port_1_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_mgmt_port_1_uri);
doReturn(Optional.of(ssc_1_mgmt_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_mgmt_port_0_uri);
- doReturn(Optional.of(ssc_1_mis_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_mis_port_0_uri);
+ doReturn(Optional.of(ssc_1_service2_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_service2_port_0_uri);
doReturn(Optional.of(ssc_1_int_ha_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_int_ha_port_0_uri);
doReturn(Optional.of(test_port_1_plural)).when(aaiResourcesMock).get(LInterface.class,test_port_1_uri);
doReturn(Optional.empty()).when(aaiResourcesMock).get(LInterface.class,test_port_2_uri);
- doReturn(true).when(aaiResourcesMock).exists(mis_sub_1_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_0_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service2_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_0_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_1_uri);
boolean exists = auditNova.auditVservers(vserversToAudit, tenantId, cloudOwner, cloudRegion);
assertEquals(false, exists);
}
@@ -314,16 +314,16 @@ public class AuditVServerTest extends AuditVServer {
public void audit_Vserver_Second_Not_Found_Test() throws JsonParseException, JsonMappingException, IOException {
doReturn(true).when(aaiResourcesMock).exists(vserverURI);
doReturn(Optional.of(ssc_1_trusted_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_trusted_port_0_uri);
- doReturn(Optional.of(ssc_1_avpn_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_avpn_port_0_uri);
+ doReturn(Optional.of(ssc_1_service1_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_service1_port_0_uri);
doReturn(Optional.of(ssc_1_mgmt_port_1_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_mgmt_port_1_uri);
doReturn(Optional.of(ssc_1_mgmt_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_mgmt_port_0_uri);
- doReturn(Optional.of(ssc_1_mis_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_mis_port_0_uri);
+ doReturn(Optional.of(ssc_1_service2_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_service2_port_0_uri);
doReturn(Optional.of(ssc_1_int_ha_port_0_plural)).when(aaiResourcesMock).get(LInterface.class,ssc_1_int_ha_port_0_uri);
doReturn(Optional.of(test_port_1_plural)).when(aaiResourcesMock).get(LInterface.class,test_port_1_uri);
doReturn(Optional.of(test_port_2_plural)).when(aaiResourcesMock).get(LInterface.class,test_port_2_uri);
- doReturn(true).when(aaiResourcesMock).exists(mis_sub_1_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_0_uri);
- doReturn(true).when(aaiResourcesMock).exists(avpn_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service2_sub_1_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_0_uri);
+ doReturn(true).when(aaiResourcesMock).exists(service1_sub_1_uri);
doReturn(false).when(aaiResourcesMock).exists(vserverURI2);
boolean exists = auditNova.auditVservers(vserversToAudit, tenantId, cloudOwner, cloudRegion);
assertEquals(false, exists);
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 5df5d8200f..b3cdd467bb 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
@@ -80,19 +80,19 @@ public class HeatStackAuditTest extends HeatStackAudit {
@Test
public void extract_proper_path_Test(){
- Optional<String> actualResult = extractStackPathFromHref("https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81");
- assertEquals("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81", actualResult.get());
+ Optional<String> actualResult = extractStackPathFromHref("https://orchestration.com:8004/v1/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81");
+ assertEquals("/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81", actualResult.get());
}
@Test
public void extract_proper_resources_path_Test(){
- Optional<String> actualResult = extractResourcePathFromHref("https://orchestration.com:8004/v1/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81");
- assertEquals("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81/resources", actualResult.get());
+ Optional<String> actualResult = extractResourcePathFromHref("https://orchestration.com:8004/v1/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81");
+ assertEquals("/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81/resources", actualResult.get());
}
@Test
public void extract_invalid_uri_Test(){
- Optional<String> actualResult = extractStackPathFromHref("orchestrn.com:8004/v18b44d60a6f94bdcb2738f9e/stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81");
+ Optional<String> actualResult = extractStackPathFromHref("orchestrn.com:8004/v18b44d60a6f94bdcb2738f9e//stacks/test_stack/f711be16-2654-4a09-b89d-0511fda20e81");
assertEquals(false, actualResult.isPresent());
}
@@ -124,67 +124,68 @@ public class HeatStackAuditTest extends HeatStackAudit {
ssc_1_mgmt_port_0.setInterfaceId("8d93f63e-e972-48c7-ad98-b2122da47315");
vServer1.getLInterfaces().getLInterface().add(ssc_1_mgmt_port_0);
- LInterface ssc_1_mis_port_0 = new LInterface();
- ssc_1_mis_port_0.setLInterfaces(new LInterfaces());
- ssc_1_mis_port_0.setInterfaceId("0594a2f2-7ea4-42eb-abc2-48ea49677fca");
- vServer1.getLInterfaces().getLInterface().add(ssc_1_mis_port_0);
+ LInterface ssc_1_service2_port_0 = new LInterface();
+ ssc_1_service2_port_0.setLInterfaces(new LInterfaces());
+ ssc_1_service2_port_0.setInterfaceId("0594a2f2-7ea4-42eb-abc2-48ea49677fca");
+ vServer1.getLInterfaces().getLInterface().add(ssc_1_service2_port_0);
- LInterface mis_sub_interface_1 = new LInterface();
- mis_sub_interface_1.setInterfaceId("2bbfa345-33bb-495a-94b2-fb514ee1cffc");
- ssc_1_mis_port_0.getLInterfaces().getLInterface().add(mis_sub_interface_1);
+ LInterface service2_sub_interface_1 = new LInterface();
+ service2_sub_interface_1.setInterfaceId("2bbfa345-33bb-495a-94b2-fb514ee1cffc");
+ ssc_1_service2_port_0.getLInterfaces().getLInterface().add(service2_sub_interface_1);
LInterface ssc_1_int_ha_port_0 = new LInterface();
ssc_1_int_ha_port_0.setInterfaceId("00bb8407-650e-48b5-b919-33b88d6f8fe3");
vServer1.getLInterfaces().getLInterface().add(ssc_1_int_ha_port_0);
- LInterface ssc_1_avpn_port_0 = new LInterface();
- ssc_1_avpn_port_0.setInterfaceId("27391d94-33af-474a-927d-d409249e8fd3");
- vServer1.getLInterfaces().getLInterface().add(ssc_1_avpn_port_0);
- ssc_1_avpn_port_0.setLInterfaces(new LInterfaces());
+ LInterface ssc_1_service1_port_0 = new LInterface();
+ ssc_1_service1_port_0.setInterfaceId("27391d94-33af-474a-927d-d409249e8fd3");
+ vServer1.getLInterfaces().getLInterface().add(ssc_1_service1_port_0);
+ ssc_1_service1_port_0.setLInterfaces(new LInterfaces());
- LInterface avpn_sub_interface_0 = new LInterface();
- avpn_sub_interface_0.setInterfaceId("d54dfd09-75c6-4e04-b204-909455b8f933");
- ssc_1_avpn_port_0.getLInterfaces().getLInterface().add(avpn_sub_interface_0);
+ LInterface service1_sub_interface_0 = new LInterface();
+ service1_sub_interface_0.setInterfaceId("d54dfd09-75c6-4e04-b204-909455b8f933");
+ ssc_1_service1_port_0.getLInterfaces().getLInterface().add(service1_sub_interface_0);
- LInterface avpn_sub_interface_1 = new LInterface();
- avpn_sub_interface_1.setInterfaceId("f7a998c0-8939-4b07-bf4a-0862e9c325e1");
- ssc_1_avpn_port_0.getLInterfaces().getLInterface().add(avpn_sub_interface_1);
+ LInterface service1_sub_interface_1 = new LInterface();
+ service1_sub_interface_1.setInterfaceId("f7a998c0-8939-4b07-bf4a-0862e9c325e1");
+ ssc_1_service1_port_0.getLInterfaces().getLInterface().add(service1_sub_interface_1);
- LInterface avpn_sub_interface_2 = new LInterface();
- avpn_sub_interface_2.setInterfaceId("621c1fea-60b8-44ee-aede-c01b8b1aaa70");
- ssc_1_avpn_port_0.getLInterfaces().getLInterface().add(avpn_sub_interface_2);
+ LInterface service1_sub_interface_2 = new LInterface();
+ service1_sub_interface_2.setInterfaceId("621c1fea-60b8-44ee-aede-c01b8b1aaa70");
+ ssc_1_service1_port_0.getLInterfaces().getLInterface().add(service1_sub_interface_2);
expectedVservers.add(vServer1);
- Resources avpnQueryResponse = objectMapper.readValue(new File("src/test/resources/AVPNResourceGroupResponse.json"), Resources.class);
- doReturn(avpnQueryResponse).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources", cloudRegion, tenantId, Resources.class);
- Resources misQueryResponse =objectMapper.readValue(new File("src/test/resources/MISResourceGroupResponse.json"), Resources.class);
- doReturn(misQueryResponse).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_mis_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources", cloudRegion, tenantId, Resources.class);
+ Resources service1QueryResponse = objectMapper.readValue(new File("src/test/resources/Service1ResourceGroupResponse.json"), Resources.class);
+ doReturn(service1QueryResponse).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz/31d0647a-6043-49a4-81b6-ccab29380672/resources", cloudRegion, tenantId, Resources.class);
+ Resources service2QueryResponse =objectMapper.readValue(new File("src/test/resources/Service2ResourceGroupResponse.json"), Resources.class);
+ doReturn(service2QueryResponse).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst/447a9b41-714e-434b-b1d0-6cce8d9f0f0c/resources", cloudRegion, tenantId, Resources.class);
- Stack misStackQuerySubInt = stackObjectMapper.readValue(new File("src/test/resources/MISSubInterface0.json"), Stack.class);
- doReturn(misStackQuerySubInt).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_mis_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", cloudRegion,tenantId, Stack.class);
- Resources misResourceQuerySubInt = objectMapper.readValue(new File("src/test/resources/MISSubInterface1Resources.json"), Resources.class);
- doReturn(misResourceQuerySubInt).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_mis_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources", cloudRegion,tenantId, Resources.class);
- Stack avpnStackQuerySubInt1 =stackObjectMapper.readValue(new File("src/test/resources/AVPNSubInterface0.json"), Stack.class);
- doReturn(avpnStackQuerySubInt1).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", cloudRegion,tenantId, Stack.class);
- Resources avpnResourceQuerySubInt1 = objectMapper.readValue(new File("src/test/resources/AVPNSubInterface0Resources.json"), Resources.class);
- doReturn(avpnResourceQuerySubInt1).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb/resources", cloudRegion,tenantId, Resources.class);
+ Stack service2StackQuerySubInt = stackObjectMapper.readValue(new File("src/test/resources/Service2SubInterface0.json"), Stack.class);
+ doReturn(service2StackQuerySubInt).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81", cloudRegion,tenantId, Stack.class);
+ Resources service2ResourceQuerySubInt = objectMapper.readValue(new File("src/test/resources/Service2SubInterface1Resources.json"), Resources.class);
+ doReturn(service2ResourceQuerySubInt).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service2_port_0_subinterfaces-hlzdigtimzst-0-upfi5nhurk7y/f711be16-2654-4a09-b89d-0511fda20e81/resources", cloudRegion,tenantId, Resources.class);
+
+ Stack service1StackQuerySubInt1 =stackObjectMapper.readValue(new File("src/test/resources/Service1SubInterface0.json"), Stack.class);
+ doReturn(service1StackQuerySubInt1).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb", cloudRegion,tenantId, Stack.class);
+ Resources service1ResourceQuerySubInt1 = objectMapper.readValue(new File("src/test/resources/Service1SubInterface0Resources.json"), Resources.class);
+ doReturn(service1ResourceQuerySubInt1).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-1-fmn5laetg5cs/0d9cd813-2ae1-46c0-9ebb-48081f6cffbb/resources", cloudRegion,tenantId, Resources.class);
- Stack avpnStackQuerySubInt2 =stackObjectMapper.readValue(new File("src/test/resources/AVPNSubInterface1.json"), Stack.class);
- doReturn(avpnStackQuerySubInt2).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a", cloudRegion,tenantId, Stack.class);
- Resources avpnResourceQuerySubInt2 = objectMapper.readValue(new File("src/test/resources/AVPNSubInterface1Resources.json"), Resources.class);
- doReturn(avpnResourceQuerySubInt2).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a/resources", cloudRegion,tenantId, Resources.class);
-
- Stack avpnStackQuerySubInt3 =stackObjectMapper.readValue(new File("src/test/resources/AVPNSubInterface2.json"), Stack.class);
- doReturn(avpnStackQuerySubInt3).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c", cloudRegion,tenantId, Stack.class);
- Resources avpnResourceQuerySubInt3 = objectMapper.readValue(new File("src/test/resources/AVPNSubInterface2Resources.json"), Resources.class);
- doReturn(avpnResourceQuerySubInt3).when(msoHeatUtilsMock).executeHeatClientRequest("/ea2d13cc98b44d60a6f94bdcb2738f9e/stacks/tsbc0005vm002ssc001-ssc_1_subint_avpn_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c/resources", cloudRegion,tenantId, Resources.class);
+ Stack service1StackQuerySubInt2 =stackObjectMapper.readValue(new File("src/test/resources/Service1SubInterface1.json"), Stack.class);
+ doReturn(service1StackQuerySubInt2).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a", cloudRegion,tenantId, Stack.class);
+ Resources service1ResourceQuerySubInt2 = objectMapper.readValue(new File("src/test/resources/Service1SubInterface1Resources.json"), Resources.class);
+ doReturn(service1ResourceQuerySubInt2).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-0-yghihziaf36m/b7019dd0-2ee9-4447-bdef-ac25676b205a/resources", cloudRegion,tenantId, Resources.class);
+
+ Stack service1StackQuerySubInt3 =stackObjectMapper.readValue(new File("src/test/resources/Service1SubInterface2.json"), Stack.class);
+ doReturn(service1StackQuerySubInt3).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c", cloudRegion,tenantId, Stack.class);
+ Resources service1ResourceQuerySubInt3 = objectMapper.readValue(new File("src/test/resources/Service1SubInterface2Resources.json"), Resources.class);
+ doReturn(service1ResourceQuerySubInt3).when(msoHeatUtilsMock).executeHeatClientRequest("/stacks/tsbc0005vm002ssc001-ssc_1_subint_service1_port_0_subinterfaces-dtmxjmny7yjz-2-y3ndsavmsymv/bd0fc728-cbde-4301-a581-db56f494675c/resources", cloudRegion,tenantId, Resources.class);
Set<Vserver> vServersToAudit = heatStackAudit.createVserverSet(resources, novaResources);
Set<Vserver> vserversWithSubInterfaces = heatStackAudit.processSubInterfaces(cloudRegion,tenantId,resourceGroups, vServersToAudit);
@@ -210,9 +211,9 @@ public class HeatStackAuditTest extends HeatStackAudit {
ssc_1_trusted_port_0.setInterfaceId("d2f51f82-0ec2-4581-bd1a-d2a82073e52b");
vServer1.getLInterfaces().getLInterface().add(ssc_1_trusted_port_0);
- LInterface ssc_1_avpn_port_0 = new LInterface();
- ssc_1_avpn_port_0.setInterfaceId("27391d94-33af-474a-927d-d409249e8fd3");
- vServer1.getLInterfaces().getLInterface().add(ssc_1_avpn_port_0);
+ LInterface ssc_1_service1_port_0 = new LInterface();
+ ssc_1_service1_port_0.setInterfaceId("27391d94-33af-474a-927d-d409249e8fd3");
+ vServer1.getLInterfaces().getLInterface().add(ssc_1_service1_port_0);
LInterface ssc_1_mgmt_port_1 = new LInterface();
ssc_1_mgmt_port_1.setInterfaceId("07f5b14c-147a-4d14-8c94-a9e94dbc097b");
@@ -222,9 +223,9 @@ public class HeatStackAuditTest extends HeatStackAudit {
ssc_1_mgmt_port_0.setInterfaceId("8d93f63e-e972-48c7-ad98-b2122da47315");
vServer1.getLInterfaces().getLInterface().add(ssc_1_mgmt_port_0);
- LInterface ssc_1_mis_port_0 = new LInterface();
- ssc_1_mis_port_0.setInterfaceId("0594a2f2-7ea4-42eb-abc2-48ea49677fca");
- vServer1.getLInterfaces().getLInterface().add(ssc_1_mis_port_0);
+ LInterface ssc_1_service2_port_0 = new LInterface();
+ ssc_1_service2_port_0.setInterfaceId("0594a2f2-7ea4-42eb-abc2-48ea49677fca");
+ vServer1.getLInterfaces().getLInterface().add(ssc_1_service2_port_0);
LInterface ssc_1_int_ha_port_0 = new LInterface();
ssc_1_int_ha_port_0.setInterfaceId("00bb8407-650e-48b5-b919-33b88d6f8fe3");