diff options
author | 2018-08-12 14:51:28 +0300 | |
---|---|---|
committer | 2018-08-12 15:02:57 +0300 | |
commit | 4a4dcc5185f8ba5a28c7f9fef509f32c0c2389e6 (patch) | |
tree | 23e55ee7e1ad9b91bcc3ef1dbe1fb7b183f8b2b6 /vid-automation/src/test/java/org/opencomp/vid/api/SdcApiTest.java | |
parent | 661a24fd57de02869a9771761e0fcba7eb77d121 (diff) |
vid-automation selenium tests
Change-Id: I6c1b0a0cf3bbfa4314c81f0cc72507db805ec632
Issue-ID: VID-281
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'vid-automation/src/test/java/org/opencomp/vid/api/SdcApiTest.java')
-rw-r--r-- | vid-automation/src/test/java/org/opencomp/vid/api/SdcApiTest.java | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/vid-automation/src/test/java/org/opencomp/vid/api/SdcApiTest.java b/vid-automation/src/test/java/org/opencomp/vid/api/SdcApiTest.java new file mode 100644 index 00000000..8a924338 --- /dev/null +++ b/vid-automation/src/test/java/org/opencomp/vid/api/SdcApiTest.java @@ -0,0 +1,163 @@ +package org.opencomp.vid.api; + +import com.fasterxml.jackson.databind.JsonNode; +import com.google.common.collect.ImmutableList; +import org.opencomp.simulator.presetGenerator.presets.BasePresets.BasePreset; +import org.opencomp.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet; +import org.opencomp.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.testng.Assert; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; +import vid.automation.test.infra.FeatureTogglingTest; +import vid.automation.test.infra.Features; + +import java.io.IOException; +import java.net.URISyntaxException; + +import static net.javacrumbs.jsonunit.JsonMatchers.jsonStringEquals; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.either; +import static org.hamcrest.core.Is.is; +import static org.hamcrest.core.IsNot.not; +import static org.testng.Assert.assertFalse; +import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND; +import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET; +import static vid.automation.test.services.SimulatorApi.registerExpectation; +import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets; + +public class SdcApiTest extends BaseApiTest { + + private static final String SDC_GET_SERVICE_MODEL = "/rest/models/services/"; + + + private static final String A_LA_CARTE_INSTANTIATION_TYPE_UUID = "4d71990b-d8ad-4510-ac61-496288d9078e"; + private static final String A_LA_CARTE_INSTANTIATION_TYPE_INVARIANT_UUID = "d27e42cf-087e-4d31-88ac-6c4b7585f800"; + private static final String A_LA_CARTE_INSTANTIATION_TYPE_FILE_PATH = "csar15782222_instantiationTypeAlacarte_invariantUUIDMacro.zip"; + private static final String A_LA_CARTE_INSTANTIATION_TYPE_EXPECTED_RESPONSE = "{\"service\":{\"uuid\":\"4d71990b-d8ad-4510-ac61-496288d9078e\",\"invariantUuid\":\"d27e42cf-087e-4d31-88ac-6c4b7585f800\",\"name\":\"vidmacrofalsenaming\",\"version\":\"1.0\",\"toscaModelURL\":null,\"category\":\"Network L1-3\",\"serviceType\":\"\",\"serviceRole\":\"\",\"description\":\"vidmacrofalsenaming\",\"serviceEcompNaming\":\"false\",\"instantiationType\":\"A-La-Carte\",\"inputs\":{}},\"vnfs\":{},\"networks\":{\"MULTI_PROVIDER_PORT_GROUP 0\":{\"uuid\":\"e5d235de-2188-4f9f-a28c-fe38967883f2\",\"invariantUuid\":\"b0303003-0abb-454c-9119-8cbe2e09e003\",\"description\":\"Creates a neutron multi-provider VLAN network with dummy subnet\",\"name\":\"MULTI_PROVIDER_PORT_GROUP\",\"version\":\"1.0\",\"customizationUuid\":\"0fde4286-ee4c-439d-9556-74b6be6bbc42\",\"inputs\":{},\"commands\":{},\"properties\":{\"network_assignments\":\"{is_external_network=false, ipv4_subnet_default_assignment={min_subnets_count=1}, ecomp_generated_network_assignment=false, ipv6_subnet_default_assignment={min_subnets_count=1}}\",\"network_flows\":\"{is_network_policy=false, is_bound_to_vpn=false}\",\"network_scope\":\"GLOBAL\",\"network_ecomp_naming\":\"{ecomp_generated_naming=true}\",\"network_type\":\"MULTI_PROVIDER_PORT_GROUP\",\"network_technology\":\"MULTI_GROUP\",\"network_homing\":\"{ecomp_selected_instance_node_target=false}\"},\"type\":\"VL\",\"modelCustomizationName\":\"MULTI_PROVIDER_PORT_GROUP 0\"}},\"collectionResource\":{},\"configurations\":{},\"serviceProxies\":{},\"vfModules\":{},\"volumeGroups\":{},\"pnfs\":{}}"; + + + private static final String MACRO_INSTANTIATION_TYPE_FILE_PATH = "csar15782222_instantiationTypeMacro_invariantUUIDAlacarte.zip"; + private static final String MACRO_INSTANTIATION_TYPE_UUID = "4d71990b-d8ad-4510-ac61-496288d9078e"; + private static final String MACRO_INSTANTIATION_TYPE_INVARIANT_UUID = "a8dcd72d-d44d-44f2-aa85-53aa9ca99cba"; + private static final String MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE = "{\"service\":{\"uuid\":\"4d71990b-d8ad-4510-ac61-496288d9078e\",\"invariantUuid\":\"a8dcd72d-d44d-44f2-aa85-53aa9ca99cba\",\"name\":\"vidmacrofalsenaming\",\"version\":\"1.0\",\"toscaModelURL\":null,\"category\":\"Network L1-3\",\"serviceType\":\"\",\"serviceRole\":\"\",\"description\":\"vidmacrofalsenaming\",\"serviceEcompNaming\":\"false\",\"instantiationType\":\"Macro\",\"inputs\":{}},\"vnfs\":{},\"networks\":{\"MULTI_PROVIDER_PORT_GROUP 0\":{\"uuid\":\"e5d235de-2188-4f9f-a28c-fe38967883f2\",\"invariantUuid\":\"b0303003-0abb-454c-9119-8cbe2e09e003\",\"description\":\"Creates a neutron multi-provider VLAN network with dummy subnet\",\"name\":\"MULTI_PROVIDER_PORT_GROUP\",\"version\":\"1.0\",\"customizationUuid\":\"0fde4286-ee4c-439d-9556-74b6be6bbc42\",\"inputs\":{},\"commands\":{},\"properties\":{\"network_assignments\":\"{is_external_network=false, ipv4_subnet_default_assignment={min_subnets_count=1}, ecomp_generated_network_assignment=false, ipv6_subnet_default_assignment={min_subnets_count=1}}\",\"network_flows\":\"{is_network_policy=false, is_bound_to_vpn=false}\",\"network_scope\":\"GLOBAL\",\"network_ecomp_naming\":\"{ecomp_generated_naming=true}\",\"network_type\":\"MULTI_PROVIDER_PORT_GROUP\",\"network_technology\":\"MULTI_GROUP\",\"network_homing\":\"{ecomp_selected_instance_node_target=false}\"},\"type\":\"VL\",\"modelCustomizationName\":\"MULTI_PROVIDER_PORT_GROUP 0\"}},\"collectionResource\":{},\"configurations\":{},\"serviceProxies\":{},\"vfModules\":{},\"volumeGroups\":{},\"pnfs\":{}}"; + + + private static final String EMPTY_INSTANTIATION_TYPE_FILE_PATH = "csar15782222_instantiationTypeEmpty_invariantUUIDAlacarte.zip"; + private static final String EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE = "{\"service\":{\"uuid\":\"4d71990b-d8ad-4510-ac61-496288d9078e\",\"invariantUuid\":\"a8dcd72d-d44d-44f2-aa85-53aa9ca99cba\",\"name\":\"vidmacrofalsenaming\",\"version\":\"1.0\",\"toscaModelURL\":null,\"category\":\"Network L1-3\",\"serviceType\":\"\",\"serviceRole\":\"\",\"description\":\"vidmacrofalsenaming\",\"serviceEcompNaming\":\"false\",\"instantiationType\":\"ClientConfig\",\"inputs\":{}},\"vnfs\":{},\"networks\":{\"MULTI_PROVIDER_PORT_GROUP 0\":{\"uuid\":\"e5d235de-2188-4f9f-a28c-fe38967883f2\",\"invariantUuid\":\"b0303003-0abb-454c-9119-8cbe2e09e003\",\"description\":\"Creates a neutron multi-provider VLAN network with dummy subnet\",\"name\":\"MULTI_PROVIDER_PORT_GROUP\",\"version\":\"1.0\",\"customizationUuid\":\"0fde4286-ee4c-439d-9556-74b6be6bbc42\",\"inputs\":{},\"commands\":{},\"properties\":{\"network_assignments\":\"{is_external_network=false, ipv4_subnet_default_assignment={min_subnets_count=1}, ecomp_generated_network_assignment=false, ipv6_subnet_default_assignment={min_subnets_count=1}}\",\"network_flows\":\"{is_network_policy=false, is_bound_to_vpn=false}\",\"network_scope\":\"GLOBAL\",\"network_ecomp_naming\":\"{ecomp_generated_naming=true}\",\"network_type\":\"MULTI_PROVIDER_PORT_GROUP\",\"network_technology\":\"MULTI_GROUP\",\"network_homing\":\"{ecomp_selected_instance_node_target=false}\"},\"type\":\"VL\",\"modelCustomizationName\":\"MULTI_PROVIDER_PORT_GROUP 0\"}},\"collectionResource\":{},\"configurations\":{},\"serviceProxies\":{},\"vfModules\":{},\"volumeGroups\":{},\"pnfs\":{}}"; + + private static final String BOTH_INSTANTIATION_TYPE_FILE_PATH = "csar15782222_instantiationTypeBoth_invariantUUIDAlacarte.zip"; + + + private static final String MIN_MAX_INITIAL_UUID = "43f13072-fe50-496b-b673-7af075d10143"; + private static final String MIN_MAX_INITIAL_INVARIANT_UUID = "35fb95d8-d1f0-4e46-99ac-e01b423e8e3f"; + private static final String MIN_MAX_INITIAL_FILE_PATH = "min_max_initial_vfModule_csar_v4.0.zip"; + private static final String MIN_MAX_INITIAL_EXPECTED_RESPONSE = "{\"service\":{\"uuid\":\"43f13072-fe50-496b-b673-7af075d10143\",\"invariantUuid\":\"35fb95d8-d1f0-4e46-99ac-e01b423e8e3f\",\"name\":\"ADIOD vMX VPE BV Service 488 test\",\"version\":\"1.0\",\"toscaModelURL\":null,\"category\":\"Network L1-3\",\"serviceType\":\"\",\"serviceRole\":\"\",\"description\":\"Model Creation for PID 291247b . OAM Network Service Name : ADIOD vPE Tenant OAM Network 1 SRIOV Network Service Name : vPE ADIOD Provider Net 1\",\"serviceEcompNaming\":\"true\",\"instantiationType\":\"ClientConfig\",\"inputs\":{\"2017488adiodvpe20_ASN\":{\"type\":\"string\",\"description\":\"AV/PE\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"AV_vPE\"},\"2017488adiodvpe20_bandwidth\":{\"type\":\"string\",\"description\":\"Requested VPE bandwidth\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"10\"},\"2017488adiodvpe20_bandwidth_units\":{\"type\":\"string\",\"description\":\"Units of bandwidth\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"Gbps\"},\"2017488adiodvpe20_AIC_CLLI\":{\"type\":\"string\",\"description\":\"AIC Site CLLI\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"ATLMY8GA\"},\"2017488adiodvpe20_vnf_config_template_version\":{\"type\":\"string\",\"description\":\"VPE Software Version\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"17.2\"},\"2017488adiodvpe20_vnf_instance_name\":{\"type\":\"string\",\"description\":\"The hostname assigned to the vpe.\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"mtnj309me6\"}}},\"vnfs\":{\"2017 488 ADIOD vPE 2 0\":{\"uuid\":\"079266b1-fcf5-44ae-bc04-cc3215b28737\",\"invariantUuid\":\"e2dcd546-e647-4854-9ed9-e0a4d6880636\",\"description\":\"Name ADIOD vPE Description The Provider edge function for the ADIOD service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release code 17.2 Owners Mary Fragale Updated 9-25-17 for version 8.0 of the VLM \",\"name\":\"2017 488 ADIOD vPE 2\",\"version\":\"4.0\",\"customizationUuid\":\"2b4e9125-b607-49a3-81c7-9260f8ca32f4\",\"inputs\":{\"vnf_config_template_version\":{\"type\":\"string\",\"description\":\"VPE Software Version\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"17.2\"},\"bandwidth_units\":{\"type\":\"string\",\"description\":\"Units of bandwidth\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"Gbps\"},\"bandwidth\":{\"type\":\"string\",\"description\":\"Requested VPE bandwidth\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"10\"},\"AIC_CLLI\":{\"type\":\"string\",\"description\":\"AIC Site CLLI\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"ATLMY8GA\"},\"ASN\":{\"type\":\"string\",\"description\":\"AV/PE\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"AV_vPE\"},\"vnf_instance_name\":{\"type\":\"string\",\"description\":\"The hostname assigned to the vpe.\",\"entry_schema\":null,\"inputProperties\":null,\"constraints\":[],\"required\":true,\"default\":\"mtnj309me6\"}},\"commands\":{\"vnf_config_template_version\":{\"displayName\":\"vnf_config_template_version\",\"command\":\"get_input\",\"inputName\":\"2017488adiodvpe20_vnf_config_template_version\"},\"bandwidth_units\":{\"displayName\":\"bandwidth_units\",\"command\":\"get_input\",\"inputName\":\"2017488adiodvpe20_bandwidth_units\"},\"bandwidth\":{\"displayName\":\"bandwidth\",\"command\":\"get_input\",\"inputName\":\"2017488adiodvpe20_bandwidth\"},\"AIC_CLLI\":{\"displayName\":\"AIC_CLLI\",\"command\":\"get_input\",\"inputName\":\"2017488adiodvpe20_AIC_CLLI\"},\"ASN\":{\"displayName\":\"ASN\",\"command\":\"get_input\",\"inputName\":\"2017488adiodvpe20_ASN\"},\"vnf_instance_name\":{\"displayName\":\"vnf_instance_name\",\"command\":\"get_input\",\"inputName\":\"2017488adiodvpe20_vnf_instance_name\"}},\"properties\":{\"vmxvre_retype\":\"RE-VMX\",\"vnf_config_template_version\":\"get_input:2017488adiodvpe20_vnf_config_template_version\",\"sriov44_net_id\":\"48d399b3-11ee-48a8-94d2-f0ea94d6be8d\",\"int_ctl_net_id\":\"2f323477-6936-4d01-ac53-d849430281d9\",\"vmxvpfe_sriov41_0_port_mac\":\"00:11:22:EF:AC:DF\",\"int_ctl_net_name\":\"VMX-INTXI\",\"vmx_int_ctl_prefix\":\"128.0.0.0\",\"sriov43_net_id\":\"da349ca1-6de9-4548-be88-2d88e99bfef5\",\"sriov42_net_id\":\"760669ba-013d-4d9b-b0e7-4151fe2e6279\",\"sriov41_net_id\":\"25ad52d5-c165-40f8-b3b0-ddfc2373280a\",\"nf_type\":\"vPE\",\"vmxvpfe_int_ctl_ip_1\":\"128.0.0.16\",\"is_AVPN_service\":\"false\",\"vmx_RSG_name\":\"vREXI-affinity\",\"vmx_int_ctl_forwarding\":\"l2\",\"vmxvre_oam_ip_0\":\"10.40.123.5\",\"vmxvpfe_sriov44_0_port_mac\":\"00:11:22:EF:AC:DF\",\"vmxvpfe_sriov41_0_port_vlanstrip\":\"false\",\"vmxvpfe_sriov42_0_port_vlanfilter\":\"4001\",\"vmxvpfe_sriov44_0_port_unknownunicastallow\":\"true\",\"vmxvre_image_name_0\":\"VRE-ENGINE_17.2-S2.1.qcow2\",\"vmxvre_instance\":\"0\",\"vmxvpfe_sriov43_0_port_mac\":\"00:11:22:EF:AC:DF\",\"vmxvre_flavor_name\":\"ns.c1r16d32.v5\",\"vmxvpfe_volume_size_0\":\"40.0\",\"vmxvpfe_sriov43_0_port_vlanfilter\":\"4001\",\"nf_naming\":\"{ecomp_generated_naming=true}\",\"multi_stage_design\":\"false\",\"nf_naming_code\":\"tvpr\",\"vmxvre_name_0\":\"vREXI\",\"vmxvpfe_sriov42_0_port_vlanstrip\":\"false\",\"vmxvpfe_volume_name_0\":\"vPFEXI_FBVolume\",\"vmx_RSG_id\":\"bd89a33c-13c3-4a04-8fde-1a57eb123141\",\"vmxvpfe_image_name_0\":\"VPE_ROUTING-ENGINE_17.2R1-S2.1.qcow2\",\"vmxvpfe_sriov43_0_port_unknownunicastallow\":\"true\",\"vmxvpfe_sriov44_0_port_unknownmulticastallow\":\"true\",\"vmxvre_console\":\"vidconsole\",\"vmxvpfe_sriov44_0_port_vlanfilter\":\"4001\",\"vmxvpfe_sriov42_0_port_mac\":\"00:11:22:EF:AC:DF\",\"vmxvpfe_volume_id_0\":\"47cede15-da2f-4397-a101-aa683220aff3\",\"vmxvpfe_sriov42_0_port_unknownmulticastallow\":\"true\",\"vmxvpfe_sriov44_0_port_vlanstrip\":\"false\",\"vf_module_id\":\"123\",\"nf_function\":\"Firewall\",\"vmxvpfe_sriov43_0_port_unknownmulticastallow\":\"true\",\"vmxvre_int_ctl_ip_0\":\"128.0.0.1\",\"ecomp_generated_naming\":\"true\",\"AIC_CLLI\":\"get_input:2017488adiodvpe20_AIC_CLLI\",\"vnf_name\":\"mtnj309me6vre\",\"vmxvpfe_sriov41_0_port_unknownunicastallow\":\"true\",\"vmxvre_volume_type_1\":\"HITACHI\",\"vmxvpfe_sriov44_0_port_broadcastallow\":\"true\",\"vmxvre_volume_type_0\":\"HITACHI\",\"vmxvpfe_volume_type_0\":\"HITACHI\",\"vmxvpfe_sriov43_0_port_broadcastallow\":\"true\",\"bandwidth_units\":\"get_input:2017488adiodvpe20_bandwidth_units\",\"vnf_id\":\"123\",\"vmxvre_oam_prefix\":\"24\",\"availability_zone_0\":\"mtpocfo-kvm-az01\",\"ASN\":\"get_input:2017488adiodvpe20_ASN\",\"vmxvre_chassis_i2cid\":\"161\",\"vmxvpfe_name_0\":\"vPFEXI\",\"bandwidth\":\"get_input:2017488adiodvpe20_bandwidth\",\"availability_zone_max_count\":\"1\",\"vmxvre_volume_size_0\":\"45.0\",\"vmxvre_volume_size_1\":\"50.0\",\"vmxvpfe_sriov42_0_port_broadcastallow\":\"true\",\"vmxvre_oam_gateway\":\"10.40.123.1\",\"vmxvre_volume_name_1\":\"vREXI_FAVolume\",\"vmxvre_ore_present\":\"0\",\"vmxvre_volume_name_0\":\"vREXI_FBVolume\",\"vmxvre_type\":\"0\",\"vnf_instance_name\":\"get_input:2017488adiodvpe20_vnf_instance_name\",\"vmxvpfe_sriov41_0_port_unknownmulticastallow\":\"true\",\"oam_net_id\":\"b95eeb1d-d55d-4827-abb4-8ebb94941429\",\"vmx_int_ctl_len\":\"24\",\"vmxvpfe_sriov43_0_port_vlanstrip\":\"false\",\"vmxvpfe_sriov41_0_port_broadcastallow\":\"true\",\"vmxvre_volume_id_1\":\"6e86797e-03cd-4fdc-ba72-2957119c746d\",\"vmxvpfe_sriov41_0_port_vlanfilter\":\"4001\",\"nf_role\":\"MIS\",\"vmxvre_volume_id_0\":\"f4eacb79-f687-4e9d-b760-21847c8bb15a\",\"vmxvpfe_sriov42_0_port_unknownunicastallow\":\"true\",\"vmxvpfe_flavor_name\":\"ns.c20r16d25.v5\"},\"type\":\"VF\",\"modelCustomizationName\":\"2017 488 ADIOD vPE 2 0\",\"vfModules\":{\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\":{\"uuid\":\"13bea14d-9405-43c6-920b-97bab64b6a01\",\"invariantUuid\":\"83dc51de-a337-498e-9fee-763603a057b4\",\"customizationUuid\":\"a90865d5-6de0-4ef8-bf53-d45fa3edddfc\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"properties\":{\"minCountInstances\":null,\"maxCountInstances\":null,\"initialCount\":null,\"vfModuleLabel\":\"ADIOD_vPFE_BV\"},\"inputs\":{},\"volumeGroupAllowed\":true},\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vRE_BV..module-1\":{\"uuid\":\"3f6d5e51-a9a0-4c53-bb6d-be836767d96f\",\"invariantUuid\":\"54466b6d-e33c-4f4d-87e2-32bc5b103589\",\"customizationUuid\":\"dba1d1ff-77e2-4f4d-b1b4-1bed564f13b1\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":\"ADIOD_vRE_BV\"},\"inputs\":{},\"volumeGroupAllowed\":true},\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_base_vPE_BV..module-0\":{\"uuid\":\"0a45a870-3a19-4238-a72a-eadfc583d4fe\",\"invariantUuid\":\"c636b302-fba2-4ed7-9f3b-c99715b6bb2e\",\"customizationUuid\":\"a0b634e6-514e-4977-91dd-3b8c295e6bc8\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_base_vPE_BV..module-0\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_base_vPE_BV..module-0\",\"properties\":{\"minCountInstances\":1,\"maxCountInstances\":1,\"initialCount\":1,\"vfModuleLabel\":\"ADIOD_base_vPE_BV\"},\"inputs\":{},\"volumeGroupAllowed\":false}},\"volumeGroups\":{\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\":{\"uuid\":\"13bea14d-9405-43c6-920b-97bab64b6a01\",\"invariantUuid\":\"83dc51de-a337-498e-9fee-763603a057b4\",\"customizationUuid\":\"a90865d5-6de0-4ef8-bf53-d45fa3edddfc\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"properties\":{\"minCountInstances\":null,\"maxCountInstances\":null,\"initialCount\":null,\"vfModuleLabel\":\"ADIOD_vPFE_BV\"},\"inputs\":{}},\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vRE_BV..module-1\":{\"uuid\":\"3f6d5e51-a9a0-4c53-bb6d-be836767d96f\",\"invariantUuid\":\"54466b6d-e33c-4f4d-87e2-32bc5b103589\",\"customizationUuid\":\"dba1d1ff-77e2-4f4d-b1b4-1bed564f13b1\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":\"ADIOD_vRE_BV\"},\"inputs\":{}}},\"vfcInstanceGroups\":{}}},\"networks\":{},\"collectionResource\":{},\"configurations\":{},\"serviceProxies\":{},\"vfModules\":{\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\":{\"uuid\":\"13bea14d-9405-43c6-920b-97bab64b6a01\",\"invariantUuid\":\"83dc51de-a337-498e-9fee-763603a057b4\",\"customizationUuid\":\"a90865d5-6de0-4ef8-bf53-d45fa3edddfc\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"properties\":{\"minCountInstances\":null,\"maxCountInstances\":null,\"initialCount\":null,\"vfModuleLabel\":\"ADIOD_vPFE_BV\"},\"inputs\":{},\"volumeGroupAllowed\":true},\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_base_vPE_BV..module-0\":{\"uuid\":\"0a45a870-3a19-4238-a72a-eadfc583d4fe\",\"invariantUuid\":\"c636b302-fba2-4ed7-9f3b-c99715b6bb2e\",\"customizationUuid\":\"a0b634e6-514e-4977-91dd-3b8c295e6bc8\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_base_vPE_BV..module-0\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_base_vPE_BV..module-0\",\"properties\":{\"minCountInstances\":1,\"maxCountInstances\":1,\"initialCount\":1,\"vfModuleLabel\":\"ADIOD_base_vPE_BV\"},\"inputs\":{},\"volumeGroupAllowed\":false},\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vRE_BV..module-1\":{\"uuid\":\"3f6d5e51-a9a0-4c53-bb6d-be836767d96f\",\"invariantUuid\":\"54466b6d-e33c-4f4d-87e2-32bc5b103589\",\"customizationUuid\":\"dba1d1ff-77e2-4f4d-b1b4-1bed564f13b1\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":\"ADIOD_vRE_BV\"},\"inputs\":{},\"volumeGroupAllowed\":true}},\"volumeGroups\":{\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\":{\"uuid\":\"13bea14d-9405-43c6-920b-97bab64b6a01\",\"invariantUuid\":\"83dc51de-a337-498e-9fee-763603a057b4\",\"customizationUuid\":\"a90865d5-6de0-4ef8-bf53-d45fa3edddfc\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vPFE_BV..module-2\",\"properties\":{\"minCountInstances\":null,\"maxCountInstances\":null,\"initialCount\":null,\"vfModuleLabel\":\"ADIOD_vPFE_BV\"},\"inputs\":{}},\"2017488adiodvpe20..2017488AdiodVpe2..ADIOD_vRE_BV..module-1\":{\"uuid\":\"3f6d5e51-a9a0-4c53-bb6d-be836767d96f\",\"invariantUuid\":\"54466b6d-e33c-4f4d-87e2-32bc5b103589\",\"customizationUuid\":\"dba1d1ff-77e2-4f4d-b1b4-1bed564f13b1\",\"description\":null,\"name\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"2017488AdiodVpe2..ADIOD_vRE_BV..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":\"ADIOD_vRE_BV\"},\"inputs\":{}}},\"pnfs\":{}}"; + + + private static final String MIN_MAX_INITIAL_UUID_OLD_CSAR = "245562de-3984-49ef-a708-6c9d7cfcabd1"; + private static final String MIN_MAX_INITIAL_INVARIANT_UUID_OLD_CSAR = "24216d6-71d0-41c8-ac81-0c5acfee514a"; + private static final String MIN_MAX_INITIAL_FILE_PATH_OLD_CSAR = "service-VmmeRvpmsFeAic3011217Svc-csar.csar.zip"; + private static final String MIN_MAX_INITIAL_EXPECTED_RESPONSE_OLD_CSAR = "{\"service\":{\"uuid\":\"281b5f7d-c7ac-4ea9-92fb-2c1d625ca681\",\"invariantUuid\":\"a977af77-db15-4375-a637-e9b994ecd569\",\"name\":\"vMME_rVPMS_FE AIC3.0-11.2.1.7_SVC\",\"version\":\"1.0\",\"toscaModelURL\":null,\"category\":\"Mobility\",\"serviceType\":null,\"serviceRole\":null,\"description\":\"New service for vMME vProbe Front End AIC3.0 VPMS Radcom 11.2.1.7. Front End includes Qrouter, vProbe aff, vLB Agent aff and vLB.\",\"serviceEcompNaming\":\"true\",\"instantiationType\":null,\"inputs\":{}},\"vnfs\":{\"vMMEvProbe_FE_AIC3-11.2.1_VF 1\":{\"uuid\":\"245562de-3984-49ef-a708-6c9d7cfcabd1\",\"invariantUuid\":\"124216d6-71d0-41c8-ac81-0c5acfee514a\",\"description\":\" New service for vMME vProbe Front End AIC3.0 VPMS Radcom 11.2.1.7. Front End includes Qrouter, vProbe aff, vLB Agent aff and vLB. \",\"name\":\"vMMEvProbe_FE_AIC3-11.2.1_VF\",\"version\":\"1.0\",\"customizationUuid\":\"8293273d-0e76-4661-926f-06a01ad2e683\",\"inputs\":{},\"commands\":{},\"properties\":{},\"type\":null,\"modelCustomizationName\":\"vMMEvProbe_FE_AIC3-11.2.1_VF 1\",\"vfModules\":{\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\":{\"uuid\":\"e67e5b39-1f3b-4692-beec-eda94a0375a5\",\"invariantUuid\":\"21c1b57d-a618-4397-a7f4-9c37169ea09b\",\"customizationUuid\":\"a7d59494-3710-4b05-b4cd-e45dadbdc7ac\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Base_Module..module-0\":{\"uuid\":\"59bb7d14-278f-4ff5-bd5a-1a720c8b0d19\",\"invariantUuid\":\"9b5589c2-e4d1-4456-a23b-e0001c349155\",\"customizationUuid\":\"b9d6f6e8-e24a-4ad9-b863-1c3f6757bfe7\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Base_Module..module-0\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Base_Module..module-0\",\"properties\":{\"minCountInstances\":1,\"maxCountInstances\":1,\"initialCount\":1,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":false},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\":{\"uuid\":\"530e5e9f-2e82-4946-bf59-630f4d7ef4de\",\"invariantUuid\":\"d1fb14d9-0fa8-4ead-b5cc-be311c7a95bd\",\"customizationUuid\":\"c1f95365-716c-4f6c-9477-a8f760a2edce\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\":{\"uuid\":\"064385f9-795b-4fcb-9e3b-51d7d0ccad80\",\"invariantUuid\":\"603e8f71-88ad-4bbf-9992-2e9a72a91e29\",\"customizationUuid\":\"3b5efcd3-d14d-4b0e-91cf-937db5aa65b5\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\":{\"uuid\":\"85b712e0-af62-4255-aeb6-ec9ae0f4eb13\",\"invariantUuid\":\"cba59330-855a-460b-8856-f6bff0dac6c2\",\"customizationUuid\":\"962479d7-b5b7-4129-bf9f-bfe4775e7921\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true}},\"volumeGroups\":{\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\":{\"uuid\":\"e67e5b39-1f3b-4692-beec-eda94a0375a5\",\"invariantUuid\":\"21c1b57d-a618-4397-a7f4-9c37169ea09b\",\"customizationUuid\":\"a7d59494-3710-4b05-b4cd-e45dadbdc7ac\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\":{\"uuid\":\"530e5e9f-2e82-4946-bf59-630f4d7ef4de\",\"invariantUuid\":\"d1fb14d9-0fa8-4ead-b5cc-be311c7a95bd\",\"customizationUuid\":\"c1f95365-716c-4f6c-9477-a8f760a2edce\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\":{\"uuid\":\"064385f9-795b-4fcb-9e3b-51d7d0ccad80\",\"invariantUuid\":\"603e8f71-88ad-4bbf-9992-2e9a72a91e29\",\"customizationUuid\":\"3b5efcd3-d14d-4b0e-91cf-937db5aa65b5\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\":{\"uuid\":\"85b712e0-af62-4255-aeb6-ec9ae0f4eb13\",\"invariantUuid\":\"cba59330-855a-460b-8856-f6bff0dac6c2\",\"customizationUuid\":\"962479d7-b5b7-4129-bf9f-bfe4775e7921\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null}},\"vfcInstanceGroups\":{}}},\"networks\":{},\"collectionResource\":null,\"configurations\":null,\"serviceProxies\":null,\"vfModules\":{\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\":{\"uuid\":\"e67e5b39-1f3b-4692-beec-eda94a0375a5\",\"invariantUuid\":\"21c1b57d-a618-4397-a7f4-9c37169ea09b\",\"customizationUuid\":\"a7d59494-3710-4b05-b4cd-e45dadbdc7ac\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Base_Module..module-0\":{\"uuid\":\"59bb7d14-278f-4ff5-bd5a-1a720c8b0d19\",\"invariantUuid\":\"9b5589c2-e4d1-4456-a23b-e0001c349155\",\"customizationUuid\":\"b9d6f6e8-e24a-4ad9-b863-1c3f6757bfe7\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Base_Module..module-0\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Base_Module..module-0\",\"properties\":{\"minCountInstances\":1,\"maxCountInstances\":1,\"initialCount\":1,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":false},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\":{\"uuid\":\"530e5e9f-2e82-4946-bf59-630f4d7ef4de\",\"invariantUuid\":\"d1fb14d9-0fa8-4ead-b5cc-be311c7a95bd\",\"customizationUuid\":\"c1f95365-716c-4f6c-9477-a8f760a2edce\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\":{\"uuid\":\"064385f9-795b-4fcb-9e3b-51d7d0ccad80\",\"invariantUuid\":\"603e8f71-88ad-4bbf-9992-2e9a72a91e29\",\"customizationUuid\":\"3b5efcd3-d14d-4b0e-91cf-937db5aa65b5\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\":{\"uuid\":\"85b712e0-af62-4255-aeb6-ec9ae0f4eb13\",\"invariantUuid\":\"cba59330-855a-460b-8856-f6bff0dac6c2\",\"customizationUuid\":\"962479d7-b5b7-4129-bf9f-bfe4775e7921\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null,\"volumeGroupAllowed\":true}},\"volumeGroups\":{\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\":{\"uuid\":\"e67e5b39-1f3b-4692-beec-eda94a0375a5\",\"invariantUuid\":\"21c1b57d-a618-4397-a7f4-9c37169ea09b\",\"customizationUuid\":\"a7d59494-3710-4b05-b4cd-e45dadbdc7ac\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\":{\"uuid\":\"530e5e9f-2e82-4946-bf59-630f4d7ef4de\",\"invariantUuid\":\"d1fb14d9-0fa8-4ead-b5cc-be311c7a95bd\",\"customizationUuid\":\"c1f95365-716c-4f6c-9477-a8f760a2edce\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\":{\"uuid\":\"064385f9-795b-4fcb-9e3b-51d7d0ccad80\",\"invariantUuid\":\"603e8f71-88ad-4bbf-9992-2e9a72a91e29\",\"customizationUuid\":\"3b5efcd3-d14d-4b0e-91cf-937db5aa65b5\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null},\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\":{\"uuid\":\"85b712e0-af62-4255-aeb6-ec9ae0f4eb13\",\"invariantUuid\":\"cba59330-855a-460b-8856-f6bff0dac6c2\",\"customizationUuid\":\"962479d7-b5b7-4129-bf9f-bfe4775e7921\",\"description\":null,\"name\":\"VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"version\":\"1\",\"modelCustomizationName\":\"vmmevprobe_fe_aic31121_vf1..VmmevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3\",\"properties\":{\"minCountInstances\":0,\"maxCountInstances\":null,\"initialCount\":0,\"vfModuleLabel\":null},\"inputs\":null}},\"pnfs\":null}"; + + @BeforeClass + public void login() { + super.login(); + } + + @BeforeMethod + public void invalidateTheCache(){ + if(Features.FLAG_SERVICE_MODEL_CACHE.isActive()) { + restTemplate.postForObject(uri + "/rest/models/reset", "", Object.class); + } + } + + @Test + public void getServiceModelALaCarteInstantiation() throws IOException, URISyntaxException { + registerToSimulatorWithPresets(A_LA_CARTE_INSTANTIATION_TYPE_UUID, A_LA_CARTE_INSTANTIATION_TYPE_INVARIANT_UUID, A_LA_CARTE_INSTANTIATION_TYPE_FILE_PATH); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + A_LA_CARTE_INSTANTIATION_TYPE_UUID), String.class); + Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); + assertThat("The response is in the format of JSON", response.getBody(), either(is(A_LA_CARTE_INSTANTIATION_TYPE_EXPECTED_RESPONSE)).or(jsonStringEquals(A_LA_CARTE_INSTANTIATION_TYPE_EXPECTED_RESPONSE))); + } + + + @Test + public void getServiceModelMacroInstantiation() throws IOException, URISyntaxException { + registerToSimulatorWithPresets(MACRO_INSTANTIATION_TYPE_UUID, MACRO_INSTANTIATION_TYPE_INVARIANT_UUID, MACRO_INSTANTIATION_TYPE_FILE_PATH); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MACRO_INSTANTIATION_TYPE_UUID), String.class); + Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); + assertThat("The response is in the format of JSON", response.getBody(), either(is(MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE)).or(jsonStringEquals(MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE))); + } + + + @Test + public void getServiceModelWithoutInstantiationType(){ + registerToSimulatorWithPresets(MACRO_INSTANTIATION_TYPE_UUID, MACRO_INSTANTIATION_TYPE_INVARIANT_UUID, EMPTY_INSTANTIATION_TYPE_FILE_PATH); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MACRO_INSTANTIATION_TYPE_UUID), String.class); + Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); + assertThat("The response is in the format of JSON", response.getBody(), either(is(EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE)).or(jsonStringEquals(EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE))); + + } + + @Test + public void getServiceModelBothInstantiationType(){ + registerToSimulatorWithPresets(MACRO_INSTANTIATION_TYPE_UUID, MACRO_INSTANTIATION_TYPE_INVARIANT_UUID, BOTH_INSTANTIATION_TYPE_FILE_PATH); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MACRO_INSTANTIATION_TYPE_UUID), String.class); + Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); + assertThat("The response is in the format of JSON", response.getBody(), either(is(MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE)).or(jsonStringEquals(MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE))); + } + + @Test + public void getServiceModelWithGroupsAndCheckMinMaxInitialParams(){ + registerToSimulatorWithPresets(MIN_MAX_INITIAL_UUID, MIN_MAX_INITIAL_INVARIANT_UUID, MIN_MAX_INITIAL_FILE_PATH); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MIN_MAX_INITIAL_UUID), String.class); + Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); + assertThat("The response is in the format of JSON", response.getBody(), either(is(MIN_MAX_INITIAL_EXPECTED_RESPONSE)).or(jsonStringEquals(MIN_MAX_INITIAL_EXPECTED_RESPONSE))); + } + + @Test + public void getServiceModelWithGroupsAndCheckMinMaxInitialParamsOldCsar(){ + registerToSimulatorWithPresets(MIN_MAX_INITIAL_UUID_OLD_CSAR, MIN_MAX_INITIAL_INVARIANT_UUID_OLD_CSAR, MIN_MAX_INITIAL_FILE_PATH_OLD_CSAR); + ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + MIN_MAX_INITIAL_UUID_OLD_CSAR), String.class); + Assert.assertEquals(response.getStatusCode(), HttpStatus.OK); + assertThat("The response is in the format of JSON", response.getBody(), either(is(MIN_MAX_INITIAL_EXPECTED_RESPONSE_OLD_CSAR)).or(jsonStringEquals(MIN_MAX_INITIAL_EXPECTED_RESPONSE_OLD_CSAR))); + } + + private void registerToSimulatorWithPresets(String uuid, String invariantUuid, String pathPath){ + ImmutableList<BasePreset> presets = ImmutableList.of( + new PresetSDCGetServiceToscaModelGet(uuid, pathPath), + new PresetSDCGetServiceMetadataGet(uuid,invariantUuid, pathPath)); + registerExpectationFromPresets(presets, CLEAR_THEN_SET); + } + + @Test + public void withModelFromE2eWithToscaParserButNewFlow_requestModels_expectVnfRelatedVfModulesNotNull() { + + /* + We had a problem that this exact model vnfs returned with no vfModules and + volumeGroups, because a 'isNewFlow' value in org.onap.vid.asdc.parser.ToscaParserImpl + was always false because a coding error. + */ + registerExpectation("get_sdc_catalog_services_VmmeRvpmsFeAic3011217Svc.json", CLEAR_THEN_SET); + registerExpectation("aai_get_full_subscribers.json", APPEND); + + final JsonNode response = restTemplate.getForObject(uri + "/rest/models/services/" + "245562de-3984-49ef-a708-6c9d7cfcabd1", JsonNode.class); + + // using json-pointers instead of path, because vnf name has + // dots and spaces + final String myVnf = "vMMEvProbe_FE_AIC3-11.2.1_VF 1"; + final String base = "/vnfs/" + myVnf; + + assertFalse(response.at(base).isMissingNode(), + "test relies on '" + myVnf + "' to be in model; got: " + response); + + assertThat("vfModules under '" + myVnf + "' must not be empty; got: " + response, + response.at(base + "/vfModules").size(), is(not(0))); + + assertThat("volumeGroups under '" + myVnf + "' must not be empty; got: " + response, + response.at(base + "/volumeGroups").size(), is(not(0))); + + } +} |