aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/test
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-03-11 09:34:34 +0200
committerIttay Stern <ittay.stern@att.com>2019-03-17 17:02:43 +0200
commit66af8b9b391879be78660d6ccb0a1f1f9340b423 (patch)
treefc0d510f7ea28a437bcb1e3b950d1281ac88a4e4 /vid-automation/src/test
parent37ad0cc1d36ec6ff68ec39fcaaf2617eef7d08fe (diff)
Merge automation from ECOMP's repository
Reference commit in ECOMP: 8e92a8c6 Issue-ID: VID-378 Change-Id: Ia32f4813378ef95097f788246aa5b1172e20ca48 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/test')
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AaiApiTest.java270
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInfraApiTest.java177
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java532
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java211
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java645
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java431
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java203
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java78
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/CategoryParametersApiTest.java1
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java135
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java209
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java3
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java88
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java51
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ServicePermissionsApiTest.java63
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java370
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/TestUtils.java81
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java26
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/VidConfigurationApiTest.java1
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/pProbeAaiApiTest.java21
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/pProbeMsoApiTest.java42
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/JobAuditStatus.java121
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/ServiceInfo.java75
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java4
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java60
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java15
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java11
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java5
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java4
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java6
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java8
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java5
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java123
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java2
-rw-r--r--vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java28
-rw-r--r--vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java44
-rw-r--r--vid-automation/src/test/java/org/onap/vid/more/SimulatorLoaderTest.java24
-rw-r--r--vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json40
-rw-r--r--vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json204
-rw-r--r--vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json178
-rw-r--r--vid-automation/src/test/resources/VnfGroup/groupingServiceRoleResponse.json139
-rw-r--r--vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json178
-rw-r--r--vid-automation/src/test/resources/VnfGroup/searchMembersResponse.json114
-rw-r--r--vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroping_serviceInstance.json30
-rw-r--r--vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json65
-rw-r--r--vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupsChildren_serviceInstance.json171
-rw-r--r--vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json123
-rw-r--r--vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json209
-rw-r--r--vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarte.json18
-rw-r--r--vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json194
-rw-r--r--vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json195
-rw-r--r--vid-automation/src/test/resources/a-la-carte/redux-multiple-vnf-network.json118
-rw-r--r--vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceInstance.json274
-rw-r--r--vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceModel.json392
-rw-r--r--vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json263
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json62
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json67
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/auditModalFailedServiceInstance.json12
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json26
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json44
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateBulkOfMacro.json4
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json117
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json286
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithNetwork.json86
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json71
-rw-r--r--vid-automation/src/test/resources/changeManagement/reduced_vnf_data_by_globalid_and_service_type.json539
-rw-r--r--vid-automation/src/test/resources/changeManagement/vnfInPlaceSoftwareUpdate.json26
-rw-r--r--vid-automation/src/test/resources/changeManagement/vnfReplaceRequest.json40
-rw-r--r--vid-automation/src/test/resources/changeManagement/vnfUpdateRequest.json45
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/aai_get_full_subscribers.json107
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region_error.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf_error.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration.json (renamed from vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations.json)4
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration_error.json10
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/activate_service_instance.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/activate_service_instance_error.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_configuration.json34
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_fabric_configuration.json22
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_create_configuration.json68
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_deactivate_and_cloud_delete.json5
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance_error.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance_error.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/ecompportal_getSessionSlotCheckInterval.json22
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/get_logical_link.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/get_logical_link_not_found.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/get_operational_environments_aai.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/get_sdc_catalog_services_VflorenceRvpmsFeAic3011217Svc.json (renamed from vid-automation/src/test/resources/registration_to_simulator/get_sdc_catalog_services_VmmeRvpmsFeAic3011217Svc.json)4
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/get_service_instance_not_found.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_activate_configurations.json21
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships_error.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_404.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_409.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_config_update_ok.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations_error.json10
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_404.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_409.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_ok.json2
-rw-r--r--vid-automation/src/test/resources/registration_to_simulator/portal_remote_users.json18
-rw-r--r--vid-automation/src/test/resources/sdcApiTest/aLaCarteInstantiationTypeResponse.json54
-rw-r--r--vid-automation/src/test/resources/sdcApiTest/emptyInstantiationTypeResponse.json54
-rw-r--r--vid-automation/src/test/resources/sdcApiTest/macroInstantiationTypeResponse.json54
-rw-r--r--vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponse.json454
-rw-r--r--vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponseOldCsar.json363
-rw-r--r--vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksToVlansByServiceInstance.json31
-rw-r--r--vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksWithVlansToVnfByServiceInstance.json58
-rw-r--r--vid-automation/src/test/resources/test_config.properties5
-rw-r--r--vid-automation/src/test/resources/viewEdit/aaiHomingDataResponse.json8
119 files changed, 8261 insertions, 1706 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AaiApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AaiApiTest.java
index 7d558940d..952aa522d 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/AaiApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/AaiApiTest.java
@@ -1,12 +1,33 @@
package org.onap.vid.api;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet.ofL3Network;
+import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet.ofServiceInstance;
+import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet.ofVlanTag;
+import static org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet.ofVnf;
+import static org.onap.simulator.presetGenerator.presets.ecompportal_att.EcompPortalPresetsUtils.getEcompPortalPresets;
+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.utils.TestHelper.GET_SERVICE_MODELS_BY_DISTRIBUTION_STATUS;
+
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMultimap;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URISyntaxException;
+import java.util.UUID;
import net.javacrumbs.jsonunit.JsonAssert;
+import net.javacrumbs.jsonunit.core.Configuration;
+import net.javacrumbs.jsonunit.core.Option;
import org.apache.commons.text.StringEscapeUtils;
-import org.codehaus.jackson.map.ObjectMapper;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIBadBodyForGetServicesGet;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAICloudRegionAndSourceFromConfigurationPut;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetHomingForVfModule;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetInstanceGroupsByCloudRegion;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetInstanceGroupsByCloudRegionInvalidRequest;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetInstanceGroupsByCloudRegionRequiredMissing;
@@ -17,6 +38,9 @@ import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetPortMirroringS
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetPortMirroringSourcePortsError;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetRelatedInstanceGroupsByVnfId;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIStandardQueryGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
import org.onap.vid.model.aai.AaiResponse;
import org.onap.vid.model.mso.OperationalEnvironmentList;
import org.onap.vid.more.LoggerFormatTest;
@@ -29,31 +53,23 @@ import org.springframework.web.client.HttpServerErrorException;
import org.springframework.web.util.UriComponentsBuilder;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import vid.automation.test.infra.FeatureTogglingTest;
+import vid.automation.test.infra.Features;
import vid.automation.test.services.SimulatorApi;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URISyntaxException;
-
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.*;
-import static org.onap.simulator.presetGenerator.presets.ecompportal_att.EcompPortalPresetsUtils.getEcompPortalPresets;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.APPEND;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+import vid.automation.test.utils.TestHelper;
public class AaiApiTest extends BaseApiAaiTest {
-
+ private static final String AAI_HOMING_DATA_RESPONSE = "viewEdit/aaiHomingDataResponse.json";
public static final String GET_OPERATIONAL_ENVIRONMENTS_JSON = "get_operational_environments_aai.json";
public static final String GET_OPERATIONAL_ENVIRONMENTS_JSON_ERROR = "get_operational_environments_aai_error.json";
- public static final String[] AAI_GET_SERVICES_ERROR_SIMULATOR_RESPONSES = {"getServicesAaiErrorResp.json", "aai_get_full_subscribers.json"};
- public static final String[] AAI_GET_SERVICES_FINE_SIMULATOR_RESPONSES = {"getServicesAaiFineResp.json", "aai_get_full_subscribers.json"};
-
+ public static final String[] AAI_GET_SERVICES_ERROR_SIMULATOR_RESPONSES = {"getServicesAaiErrorResp.json", "create_new_instance/aai_get_full_subscribers.json"};
+ public static final String[] AAI_GET_SERVICES_FINE_SIMULATOR_RESPONSES = {"getServicesAaiFineResp.json", "create_new_instance/aai_get_full_subscribers.json"};
+ public static final String AAI_VNFS_FOR_CHANGE_MANAGEMENT_JSON = "changeManagement/get_vnf_data_by_globalid_and_service_type.json";
public static final String OPERATIONAL_ENVIRONMENT_TYPE = "VNF";
public static final String OPERATIONAL_ENVIRONMENT_STATUS = "Activate";
- public static final String BASE_GET_SERVICES_AAI_REQUEST_BODY = "{\"start\" : \"service-design-and-creation/models\", \"query\" : \"query/serviceModels-byDistributionStatus?distributionStatus=DISTRIBUTION_COMPLETE_OK\";}";
public static final String GET_INSTANCE_GROUPS_BY_CLOUDREGION_EXPECTED_RESPONSE = "{\"results\":[{\"instance-group\":{\"id\":\"AAI-12002-test3-vm230w\",\"description\":\"a9DEa0kpY\",\"instance-group-role\":\"JZmha7QSS4tJ\",\"model-invariant-id\":\"model-id3\",\"model-version-id\":\"a0efd5fc-f7be-4502-936a-a6c6392b958f\",\"instance-group-type\":\"type\",\"resource-version\":\"1520888659539\",\"instance-group-name\":\"wKmBXiO1xm8bK\",\"instance-group-function\":\"testfunction2\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"cloud-region.cloud-owner\",\"relationship-value\":\"AAI-12002-vm230w\"},{\"relationship-key\":\"cloud-region.cloud-region-id\",\"relationship-value\":\"AAI-region-vm230w\"}],\"relatedToPropertyList\":[{\"property-key\":\"cloud-region.owner-defined-type\",\"property-value\":null}],\"related-to\":\"cloud-region\",\"related-link\":\"/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/AAI-12002-vm230w/AAI-region-vm230w\",\"relationship-label\":\"org.onap.relationships.inventory.Uses\",\"relationship-data\":[{\"relationship-key\":\"cloud-region.cloud-owner\",\"relationship-value\":\"AAI-12002-vm230w\"},{\"relationship-key\":\"cloud-region.cloud-region-id\",\"relationship-value\":\"AAI-region-vm230w\"}],\"related-to-property\":[{\"property-key\":\"cloud-region.owner-defined-type\",\"property-value\":null}]}]}}},{\"instance-group\":{\"id\":\"AAI-12002-test1-vm230w\",\"description\":\"a9DEa0kpY\",\"instance-group-role\":\"JZmha7QSS4tJ\",\"model-invariant-id\":\"model-id1\",\"model-version-id\":\"a0efd5fc-f7be-4502-936a-a6c6392b958f\",\"instance-group-type\":\"type\",\"resource-version\":\"1520886467989\",\"instance-group-name\":\"wKmBXiO1xm8bK\",\"instance-group-function\":\"testfunction2\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"cloud-region.cloud-owner\",\"relationship-value\":\"AAI-12002-vm230w\"},{\"relationship-key\":\"cloud-region.cloud-region-id\",\"relationship-value\":\"AAI-region-vm230w\"}],\"relatedToPropertyList\":[{\"property-key\":\"cloud-region.owner-defined-type\",\"property-value\":null}],\"related-to\":\"cloud-region\",\"related-link\":\"/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/AAI-12002-vm230w/AAI-region-vm230w\",\"relationship-label\":\"org.onap.relationships.inventory.Uses\",\"relationship-data\":[{\"relationship-key\":\"cloud-region.cloud-owner\",\"relationship-value\":\"AAI-12002-vm230w\"},{\"relationship-key\":\"cloud-region.cloud-region-id\",\"relationship-value\":\"AAI-region-vm230w\"}],\"related-to-property\":[{\"property-key\":\"cloud-region.owner-defined-type\",\"property-value\":null}]}]}}},{\"instance-group\":{\"id\":\"AAI-12002-test2-vm230w\",\"description\":\"a9DEa0kpY\",\"instance-group-role\":\"JZmha7QSS4tJ\",\"model-invariant-id\":\"model-id2\",\"model-version-id\":\"version2\",\"instance-group-type\":\"type\",\"resource-version\":\"1520888629970\",\"instance-group-name\":\"wKmBXiO1xm8bK\",\"instance-group-function\":\"testfunction2\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"cloud-region.cloud-owner\",\"relationship-value\":\"AAI-12002-vm230w\"},{\"relationship-key\":\"cloud-region.cloud-region-id\",\"relationship-value\":\"AAI-region-vm230w\"}],\"relatedToPropertyList\":[{\"property-key\":\"cloud-region.owner-defined-type\",\"property-value\":null}],\"related-to\":\"cloud-region\",\"related-link\":\"/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/AAI-12002-vm230w/AAI-region-vm230w\",\"relationship-label\":\"org.onap.relationships.inventory.Uses\",\"relationship-data\":[{\"relationship-key\":\"cloud-region.cloud-owner\",\"relationship-value\":\"AAI-12002-vm230w\"},{\"relationship-key\":\"cloud-region.cloud-region-id\",\"relationship-value\":\"AAI-region-vm230w\"}],\"related-to-property\":[{\"property-key\":\"cloud-region.owner-defined-type\",\"property-value\":null}]}]}}}]}\n";
- public static final String GET_NETWORK_COLLECTION_EXPECTED_RESPONSE = "{\"results\":{\"collection\":{\"collection-id\":\"collection-1-2018-rs804s\",\"model-invariant-id\":\"5761e0a7-defj777\",\"model-version-id\":\"5761e0a7-defj232\",\"collection-name\":\"collection-name\",\"collection-type\":\"L3-NETWORK\",\"collection-role\":\"SUB-INTERFACE\",\"collection-function\":\"collection-function\",\"collection-customization-id\":\"custom-unique-data-id\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"customer.global-customer-id\",\"relationship-value\":\"customer-1-2017-rs804s\"},{\"relationship-key\":\"service-subscription.service-type\",\"relationship-value\":\"service-value7-rs804s\"},{\"relationship-key\":\"service-instance.service-instance-id\",\"relationship-value\":\"2UJZZ01777-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":null}],\"related-to\":\"service-instance\",\"related-link\":\"/aai/v13/business/customers/customer/customer-1-2017-rs804s/service-subscriptions/service-subscription/service-value7-rs804s/service-instances/service-instance/2UJZZ01777-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"customer.global-customer-id\",\"relationship-value\":\"customer-1-2017-rs804s\"},{\"relationship-key\":\"service-subscription.service-type\",\"relationship-value\":\"service-value7-rs804s\"},{\"relationship-key\":\"service-instance.service-instance-id\",\"relationship-value\":\"2UJZZ01777-rs804s\"}],\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":null}]},{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]},\"resource-version\":\"1521662811309\"},\"networks\":[{\"network-id\":\"l3network-id-rs804s\",\"network-name\":\"oam-net\",\"network-type\":\"Tenant_Layer_3\",\"network-role\":\"HngwProtectedOam.OAM\",\"network-technology\":\"Contrail\",\"is-bound-to-vpn\":false,\"resource-version\":\"1521662814627\",\"is-provider-network\":false,\"is-shared-network\":false,\"is-external-network\":false,\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]}},{\"network-id\":\"l3network-id-3-rs804s\",\"network-name\":\"oam-net\",\"network-type\":\"Tenant_Layer_3\",\"network-role\":\"HngwProtectedOam.OAM\",\"network-technology\":\"Contrail\",\"is-bound-to-vpn\":false,\"resource-version\":\"1521662816043\",\"is-provider-network\":false,\"is-shared-network\":false,\"is-external-network\":false,\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]}},{\"network-id\":\"l3network-id-2-rs804s\",\"network-name\":\"oam-net\",\"network-type\":\"Tenant_Layer_3\",\"network-role\":\"HngwProtectedOam.OAM\",\"network-technology\":\"Contrail\",\"is-bound-to-vpn\":false,\"resource-version\":\"1521662815304\",\"is-provider-network\":false,\"is-shared-network\":false,\"is-external-network\":false,\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]}}],\"service-instance\":{\"service-instance-id\":\"2UJZZ01777-rs804s\",\"resource-version\":\"1521662813382\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"relatedToPropertyList\":null,\"related-to\":\"collection\",\"related-link\":\"/aai/v13/network/collections/collection/collection-1-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"related-to-property\":null}]}},\"instance-group\":{\"id\":\"instanceGroup-2018-rs804s\",\"description\":\"zr6h\",\"instance-group-role\":\"JZmha7QSS4tJ\",\"model-invariant-id\":\"5761e0a7-defj777\",\"model-version-id\":\"5761e0a7-defj22\",\"instance-group-type\":\"7DDjOdNL\",\"resource-version\":\"1521662814023\",\"instance-group-name\":\"wKmBXiO1xm8bK\",\"instance-group-function\":\"testfunction2\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}],\"related-to\":\"l3-network\",\"related-link\":\"/aai/v13/network/l3-networks/l3-network/l3network-id-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-rs804s\"}],\"related-to-property\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}]},{\"relationDataList\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"relatedToPropertyList\":null,\"related-to\":\"collection\",\"related-link\":\"/aai/v13/network/collections/collection/collection-1-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"related-to-property\":null},{\"relationDataList\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-3-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}],\"related-to\":\"l3-network\",\"related-link\":\"/aai/v13/network/l3-networks/l3-network/l3network-id-3-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-3-rs804s\"}],\"related-to-property\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}]},{\"relationDataList\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-2-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}],\"related-to\":\"l3-network\",\"related-link\":\"/aai/v13/network/l3-networks/l3-network/l3network-id-2-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-2-rs804s\"}],\"related-to-property\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}]}]}}}}\n";
+ public static final String GET_NETWORK_COLLECTION_EXPECTED_RESPONSE = "{\"results\":{\"collection\":{\"collection-id\":\"collection-1-2018-rs804s\",\"model-invariant-id\":\"5761e0a7-defj777\",\"model-version-id\":\"5761e0a7-defj232\",\"collection-name\":\"collection-name\",\"collection-type\":\"L3-NETWORK\",\"collection-role\":\"SUB-INTERFACE\",\"collection-function\":\"collection-function\",\"collection-customization-id\":\"custom-unique-data-id\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"customer.global-customer-id\",\"relationship-value\":\"customer-1-2017-rs804s\"},{\"relationship-key\":\"service-subscription.service-type\",\"relationship-value\":\"service-value7-rs804s\"},{\"relationship-key\":\"service-instance.service-instance-id\",\"relationship-value\":\"2UJZZ01777-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":null}],\"related-to\":\"service-instance\",\"related-link\":\"/aai/v13/business/customers/customer/customer-1-2017-rs804s/service-subscriptions/service-subscription/service-value7-rs804s/service-instances/service-instance/2UJZZ01777-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"customer.global-customer-id\",\"relationship-value\":\"customer-1-2017-rs804s\"},{\"relationship-key\":\"service-subscription.service-type\",\"relationship-value\":\"service-value7-rs804s\"},{\"relationship-key\":\"service-instance.service-instance-id\",\"relationship-value\":\"2UJZZ01777-rs804s\"}],\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":null}]},{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]},\"resource-version\":\"1521662811309\"},\"networks\":[{\"network-id\":\"l3network-id-rs804s\",\"network-name\":\"oam-net\",\"network-type\":\"Tenant_Layer_3\",\"network-role\":\"RosemaProtectedOam.OAM\",\"network-technology\":\"Contrail\",\"is-bound-to-vpn\":false,\"resource-version\":\"1521662814627\",\"orchestration-status\":\"Created\",\"is-provider-network\":false,\"is-shared-network\":false,\"is-external-network\":false,\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]}},{\"network-id\":\"l3network-id-3-rs804s\",\"network-name\":\"oam-net\",\"network-type\":\"Tenant_Layer_3\",\"network-role\":\"RosemaProtectedOam.OAM\",\"network-technology\":\"Contrail\",\"is-bound-to-vpn\":false,\"resource-version\":\"1521662816043\",\"orchestration-status\":\"Created\",\"is-provider-network\":false,\"is-shared-network\":false,\"is-external-network\":false,\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]}},{\"network-id\":\"l3network-id-2-rs804s\",\"network-name\":\"oam-net\",\"network-type\":\"Tenant_Layer_3\",\"network-role\":\"RosemaProtectedOam.OAM\",\"network-technology\":\"Contrail\",\"is-bound-to-vpn\":false,\"resource-version\":\"1521662815304\",\"orchestration-status\":\"Created\",\"is-provider-network\":false,\"is-shared-network\":false,\"is-external-network\":false,\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}],\"related-to\":\"instance-group\",\"related-link\":\"/aai/v13/network/instance-groups/instance-group/instanceGroup-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"instance-group.id\",\"relationship-value\":\"instanceGroup-2018-rs804s\"}],\"related-to-property\":[{\"property-key\":\"instance-group.description\",\"property-value\":\"zr6h\"},{\"property-key\":\"instance-group.instance-group-name\",\"property-value\":\"wKmBXiO1xm8bK\"}]}]}}],\"service-instance\":{\"service-instance-id\":\"2UJZZ01777-rs804s\",\"resource-version\":\"1521662813382\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"relatedToPropertyList\":null,\"related-to\":\"collection\",\"related-link\":\"/aai/v13/network/collections/collection/collection-1-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"related-to-property\":null}]}},\"instance-group\":{\"id\":\"instanceGroup-2018-rs804s\",\"description\":\"zr6h\",\"instance-group-role\":\"JZmha7QSS4tJ\",\"model-invariant-id\":\"5761e0a7-defj777\",\"model-version-id\":\"5761e0a7-defj22\",\"instance-group-type\":\"7DDjOdNL\",\"resource-version\":\"1521662814023\",\"instance-group-name\":\"wKmBXiO1xm8bK\",\"instance-group-function\":\"testfunction2\",\"relationship-list\":{\"relationship\":[{\"relationDataList\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}],\"related-to\":\"l3-network\",\"related-link\":\"/aai/v13/network/l3-networks/l3-network/l3network-id-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-rs804s\"}],\"related-to-property\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}]},{\"relationDataList\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"relatedToPropertyList\":null,\"related-to\":\"collection\",\"related-link\":\"/aai/v13/network/collections/collection/collection-1-2018-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"collection.collection-id\",\"relationship-value\":\"collection-1-2018-rs804s\"}],\"related-to-property\":null},{\"relationDataList\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-3-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}],\"related-to\":\"l3-network\",\"related-link\":\"/aai/v13/network/l3-networks/l3-network/l3network-id-3-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-3-rs804s\"}],\"related-to-property\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}]},{\"relationDataList\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-2-rs804s\"}],\"relatedToPropertyList\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}],\"related-to\":\"l3-network\",\"related-link\":\"/aai/v13/network/l3-networks/l3-network/l3network-id-2-rs804s\",\"relationship-label\":\"org.onap.relationships.inventory.MemberOf\",\"relationship-data\":[{\"relationship-key\":\"l3-network.network-id\",\"relationship-value\":\"l3network-id-2-rs804s\"}],\"related-to-property\":[{\"property-key\":\"l3-network.network-name\",\"property-value\":\"oam-net\"}]}]}}}}\n";
public static final String GET_AAI_SERVIES_EXPECTED_RESULT = "{\n" +
" \"services\": [{\n" +
" \"uuid\": \"20c4431c-246d-11e7-93ae-92361f002671\",\n" +
@@ -202,8 +218,6 @@ public class AaiApiTest extends BaseApiAaiTest {
" \"readOnly\": false\n" +
"}";
- static final ObjectMapper om = new ObjectMapper();
-
private String getGetOperationEnvironmentsUri() {
return uri.toASCIIString() + "/get_operational_environments";
}
@@ -262,18 +276,9 @@ public class AaiApiTest extends BaseApiAaiTest {
assertEquals(1, list.getOperationalEnvironment().get(0).getRelationshipList().getRelationship().size());
}
-
- @Test
- public void testVoid(){
- SimulatorApi.registerExpectation(SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET,
- "add_subinterface/aai_get_tenants.json"
- , "add_subinterface/aai_get_services.json"
- );
- }
-
-
@Test(dataProvider = "errorCodes")
public void getServicesWitErrorResponse(int errorCode) throws IOException, URISyntaxException {
+ TestHelper.resetAaiCache(GET_SERVICE_MODELS_BY_DISTRIBUTION_STATUS, restTemplate, uri);
final String expectedResult = "{\"services\":[],\"readOnly\":false}";
callAaiWithSimulatedErrorResponse(AAI_GET_SERVICES_ERROR_SIMULATOR_RESPONSES,
@@ -284,11 +289,25 @@ public class AaiApiTest extends BaseApiAaiTest {
@Test
public void getServicesFineRequest() throws IOException, URISyntaxException {
-
+ TestHelper.resetAaiCache(GET_SERVICE_MODELS_BY_DISTRIBUTION_STATUS, restTemplate, uri);
callAaiWithSimulatedErrorResponse(AAI_GET_SERVICES_FINE_SIMULATOR_RESPONSES,
ImmutableMap.of(),
getAaiServicesUri(), "", 200, GET_AAI_SERVIES_EXPECTED_RESULT, HttpMethod.GET);
+ }
+ @Test
+ public void whenGetServicesErrorResponse_badResponseIsNotCached() throws IOException, URISyntaxException {
+ TestHelper.resetAaiCache(GET_SERVICE_MODELS_BY_DISTRIBUTION_STATUS, restTemplate, uri);
+
+
+ final String expectedErrorResult = "{\"services\":[],\"readOnly\":false}";
+ //call AAI with bad response by clear exceptions from simulator, bad response shall not be cached
+ callAaiWithSimulatedErrorResponse(new String[]{}, ImmutableMap.of(), getAaiServicesUri(), "", 200, expectedErrorResult, HttpMethod.GET);
+
+ //call AAI with fine response
+ callAaiWithSimulatedErrorResponse(AAI_GET_SERVICES_FINE_SIMULATOR_RESPONSES,
+ ImmutableMap.of(),
+ getAaiServicesUri(), "", 200, GET_AAI_SERVIES_EXPECTED_RESULT, HttpMethod.GET);
}
@DataProvider
@@ -305,7 +324,7 @@ public class AaiApiTest extends BaseApiAaiTest {
SimulatorApi.registerExpectationFromPresets(getEcompPortalPresets(), APPEND);
SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), APPEND);
- restTemplateErrorAgnostic.getForEntity(uri + "/aai_get_services",String.class);
+ restTemplateErrorAgnostic.getForEntity(uri + "/aai_get_services", String.class);
String logLines = LoggerFormatTest.getLogLines("error", 15, 0, restTemplate, uri);
assertThat("not found in error log", logLines, containsString("Failed to parse aai response"));
@@ -425,12 +444,13 @@ public class AaiApiTest extends BaseApiAaiTest {
assertResponse(GET_NETWORK_COLLECTION_EXPECTED_RESPONSE, response);
}
+
@Test
public void getNetworkCollectionDetailsByServiceInstanceId_given404ErrorAaiResponse_yield200OkWithErrorMsg() {
SimulatorApi.clearAll();
try {
restTemplate.getForObject(uri + "/aai_get_network_collection_details/" + "SOME-RANDOM-UUID", String.class);
- }catch (HttpClientErrorException e){
+ } catch (HttpClientErrorException e) {
assertEquals(HttpStatus.NOT_FOUND, e.getStatusCode());
}
}
@@ -442,7 +462,7 @@ public class AaiApiTest extends BaseApiAaiTest {
SimulatorApi.registerExpectationFromPreset(presetAAIGetNetworkCollectionDetails, CLEAR_THEN_SET);
try {
restTemplate.getForObject(uri + "/aai_get_network_collection_details/" + "SOME-RANDOM-UUID", String.class);
- }catch (HttpServerErrorException e){
+ } catch (HttpServerErrorException e) {
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, e.getStatusCode());
}
}
@@ -450,9 +470,9 @@ public class AaiApiTest extends BaseApiAaiTest {
@Test
public void getGetInstanceGroupsByCloudRegion_yieldValidResponse() {
SimulatorApi.clearAll();
- final PresetAAIGetInstanceGroupsByCloudRegion presetAAIGetInstanceGroupsByCloudRegion = new PresetAAIGetInstanceGroupsByCloudRegion("CLOUD-OWNER", "CLOUD-REGION-ID", "NETWORK-FUNCTION");
+ final PresetAAIGetInstanceGroupsByCloudRegion presetAAIGetInstanceGroupsByCloudRegion = new PresetAAIGetInstanceGroupsByCloudRegion("CLOUD%20OWNER", "CLOUD-REGION-ID", "NETWORK%20FUNCTION");
SimulatorApi.registerExpectationFromPreset(presetAAIGetInstanceGroupsByCloudRegion, CLEAR_THEN_SET);
- final String response = restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" +"NETWORK-FUNCTION", String.class);
+ final String response = restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD OWNER" + "/" + "CLOUD-REGION-ID" + "/" + "NETWORK FUNCTION", String.class);
assertResponse(GET_INSTANCE_GROUPS_BY_CLOUDREGION_EXPECTED_RESPONSE, response);
}
@@ -462,16 +482,17 @@ public class AaiApiTest extends BaseApiAaiTest {
SimulatorApi.clearAll();
final PresetAAIGetInstanceGroupsByCloudRegionInvalidRequest presetAAIGetInstanceGroupsByCloudRegion = new PresetAAIGetInstanceGroupsByCloudRegionInvalidRequest("CLOUD-OWNER", "CLOUD-REGION-ID", "NETWORK-FUNCTION");
SimulatorApi.registerExpectationFromPreset(presetAAIGetInstanceGroupsByCloudRegion, CLEAR_THEN_SET);
- final String response = restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" +"NETWORK-FUNCTION", String.class);
+ final String response = restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" + "NETWORK-FUNCTION", String.class);
assertResponse(GET_INSTANCE_GROUPS_BY_CLOUDREGION_EXPECTED_RESPONSE, response);
}
+
@Test
public void getGetInstanceGroupsByCloudRegion_given404ErrorAaiResponse_yield200OkWithErrorMsg() {
SimulatorApi.clearAll();
try {
- restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" +"NETWORK-FUNCTION", String.class);
- }catch (HttpClientErrorException e){
+ restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" + "NETWORK-FUNCTION", String.class);
+ } catch (HttpClientErrorException e) {
assertEquals(HttpStatus.NOT_FOUND, e.getStatusCode());
}
}
@@ -482,8 +503,8 @@ public class AaiApiTest extends BaseApiAaiTest {
final PresetAAIGetInstanceGroupsByCloudRegionRequiredMissing presetAAIGetInstanceGroupsByCloudRegion = new PresetAAIGetInstanceGroupsByCloudRegionRequiredMissing("CLOUD-OWNER", "CLOUD-REGION-ID", "NETWORK-FUNCTION");
SimulatorApi.registerExpectationFromPreset(presetAAIGetInstanceGroupsByCloudRegion, CLEAR_THEN_SET);
try {
- restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" +"NETWORK-FUNCTION", String.class);
- }catch (HttpServerErrorException e){
+ restTemplate.getForObject(uri + "/aai_get_instance_groups_by_cloudregion/" + "CLOUD-OWNER" + "/" + "CLOUD-REGION-ID" + "/" + "NETWORK-FUNCTION", String.class);
+ } catch (HttpServerErrorException e) {
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, e.getStatusCode());
}
}
@@ -510,18 +531,28 @@ public class AaiApiTest extends BaseApiAaiTest {
final PresetAAIGetRelatedInstanceGroupsByVnfId getRelatedInstanceGroupsByVnfId = new PresetAAIGetRelatedInstanceGroupsByVnfId(vnfId);
SimulatorApi.registerExpectationFromPreset(getRelatedInstanceGroupsByVnfId, CLEAR_THEN_SET);
- final String response = restTemplate.getForObject(uri + "/aai_get_instance_groups_by_vnf_instance_id/" + vnfId, String.class);
+ final String response = restTemplate.getForObject(uri + "/aai_get_instance_groups_by_vnf_instance_id/" + vnfId,
+ String.class);
assertResponse("[{\"type\":\"instance-group\",\"name\":\"instance group name\"},{\"type\":\"instance-group\",\"name\":\"instance group name\"}]", response);
}
@Test
+ public void getHomingDataForVfModule(){
+ String vnfId= "0846287b-65bf-45a6-88f6-6a1af4149fac", vfModuleId= "a9b70ac0-5917-4203-a308-0e6920e6d09b";
+ SimulatorApi.registerExpectationFromPreset(new PresetAAIGetHomingForVfModule(vnfId,vfModuleId), CLEAR_THEN_SET);
+ final String response = restTemplate.getForObject(uri + "/aai_get_homing_by_vfmodule/"+ vnfId +"/"+vfModuleId, String.class);
+ String exectedResponse = TestUtils.convertRequest(objectMapper, AAI_HOMING_DATA_RESPONSE);
+ assertResponse(exectedResponse,response);
+ }
+
+ @Test
public void getGetRelatedInstanceGroupsByVnfId__yield404NotFound() {
final PresetAAIGetRelatedInstanceGroupsByVnfId getRelatedInstanceGroupsByVnfId = new PresetAAIGetRelatedInstanceGroupsByVnfId("abcd");
SimulatorApi.registerExpectationFromPreset(getRelatedInstanceGroupsByVnfId, CLEAR_THEN_SET);
try {
restTemplate.getForObject(uri + "/aai_get_instance_groups_by_vnf_instance_id/" + "dcba", String.class);
- } catch (HttpClientErrorException e){
+ } catch (HttpClientErrorException e) {
assertEquals(HttpStatus.NOT_FOUND, e.getStatusCode());
}
@@ -547,9 +578,162 @@ public class AaiApiTest extends BaseApiAaiTest {
assertResponse(expected, response);
}
+ @Test
+ @FeatureTogglingTest(Features.FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS)
+ public void networksToVlans_simpleRequest_responseIsCorrect() {
+ // Prepare randomized values
+ // Some of these random values are persisted to match with the
+ // cypress preset "aaiGetNetworksToVlansByServiceInstance.json".
+ String globalCustomerId = UUID.randomUUID().toString();
+ String sdcModelUuid = "5a3ad576-c01d-4bed-8194-0e72b4a3d020";
+ String serviceType = "vMOG";
+ int vlanIdOuter = 34612;
+ int vlanIdOuter2 = 8568012;
+ int vlanIdOuter3 = 4;
+
+ // build hierarchical presets:
+ //
+ // service instance
+ // ║
+ // ╠═ network 1
+ // ║ ╠═ vlan 1
+ // ║ ╚═ vlan 2
+ // ║
+ // ╠═ network 2
+ // ║ ╚═ vlan 3
+ // ║
+ PresetAAIStandardQueryGet vlanTagPreset1 = ofVlanTag(vlanIdOuter);
+ PresetAAIStandardQueryGet vlanTagPreset2 = ofVlanTag(vlanIdOuter2);
+ PresetAAIStandardQueryGet vlanTagPreset3 = ofVlanTag(vlanIdOuter3);
+
+ PresetAAIStandardQueryGet l3NetworkPreset1 = ofL3Network("7989a6d2-ba10-4a5d-8f15-4520bc833090", "DDDEEEFFF", "Provider Network",
+ ImmutableMultimap.of("vlan-tag", vlanTagPreset1.getReqPath(), "vlan-tag", vlanTagPreset2.getReqPath()), "Failed");
+ PresetAAIStandardQueryGet l3NetworkPreset2 = ofL3Network("e8e2332e-1f84-4237-bc97-3b5b842f52e4","GGGHHHIII", "Network",
+ ImmutableMultimap.of("vlan-tag", vlanTagPreset3.getReqPath()), "Assigned");
+
+ PresetAAIStandardQueryGet serviceInstance = ofServiceInstance("9cdd1b2a-43a7-47bc-a88e-759ba2399f0b",
+ "7a6ee536-f052-46fa-aa7e-2fca9d674c44", "6e59c5de-f052-46fa-aa7e-2fca9d674c44", globalCustomerId, serviceType,
+ ImmutableMultimap.of("l3-network", l3NetworkPreset1.getReqPath(), "l3-network", l3NetworkPreset2.getReqPath()));
+
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ serviceInstance, l3NetworkPreset1, l3NetworkPreset2, vlanTagPreset1, vlanTagPreset2, vlanTagPreset3,
+ new PresetSDCGetServiceMetadataGet(sdcModelUuid, UUID.randomUUID().toString(), "service-vl-with-5g-network-provider-alacarte.zip"),
+ new PresetSDCGetServiceToscaModelGet(sdcModelUuid, "service-vl-with-5g-network-provider-alacarte.zip")
+ ), CLEAR_THEN_SET);
+
+ // THE TEST
+ final String response = restTemplate.getForObject(uri + "/aai/standardQuery/vlansByNetworks"
+ + "?serviceInstanceId=" + serviceInstance.getInstanceId()
+ + "&serviceType=" + serviceType
+ + "&globalCustomerId=" + globalCustomerId
+ + "&sdcModelUuid=" + sdcModelUuid
+ , String.class);
+
+ assertResponse(JsonAssert.when(Option.IGNORING_ARRAY_ORDER),
+ getResourceAsString("serviceWithNetwork/aaiGetNetworksToVlansByServiceInstance.json"),
+ response);
+ }
+
+ @Test
+ @FeatureTogglingTest(Features.FLAG_PRESENT_PROVIDER_NETWORKS_ASSOCIATIONS)
+ public void networksWithVlansToVnf_simpleRequest_responseIsCorrect() {
+ // Prepare randomized values
+ // Some of these random values are persisted to match with the
+ // cypress preset "aaiGetNetworksWithVlansToVnfByServiceInstance.json".
+ String globalCustomerId = UUID.randomUUID().toString();
+ String sdcModelUuid = "5a3ad576-c01d-4bed-8194-0e72b4a3d020";
+ String serviceType = "vMOG";
+ int vlanIdOuter = 34123;
+ int vlanIdOuter2 = 65540;
+ int vlanIdOuter3 = 12345;
+ int vlanIdOuter4 = 67890;
+ int vlanIdOuter5 = 417695;
+ int vlanIdOuter6 = 783243;
+
+ // build hierarchical presets:
+ //
+ // service instance
+ // ║
+ // ╠═ vnf 1
+ // ║ ╚═ network 1
+ // ║ ╠═ vlan 1
+ // ║ ╚═ vlan 2
+ // ║ ╚═ network 2
+ // ║ ╠═ vlan 3
+ // ║ ╚═ vlan 4
+ // ║
+ // ╠═ vnf 2
+ // ║ ╚═ network 3
+ // ║ ╠═ vlan 5
+ // ║ ╚═ vlan 6
+ // ║
+ PresetAAIStandardQueryGet vlanTagPreset1 = ofVlanTag(vlanIdOuter);
+ PresetAAIStandardQueryGet vlanTagPreset2 = ofVlanTag(vlanIdOuter2);
+ PresetAAIStandardQueryGet vlanTagPreset3 = ofVlanTag(vlanIdOuter3);
+ PresetAAIStandardQueryGet vlanTagPreset4 = ofVlanTag(vlanIdOuter4);
+ PresetAAIStandardQueryGet vlanTagPreset5 = ofVlanTag(vlanIdOuter5);
+ PresetAAIStandardQueryGet vlanTagPreset6 = ofVlanTag(vlanIdOuter6);
+
+ PresetAAIStandardQueryGet l3NetworkPreset1 = ofL3Network("36517f3d-2bc2-48f5-aaf8-418520c54330","AAAAABBBBCCCC", "Provider Network",
+ ImmutableMultimap.of("vlan-tag", vlanTagPreset1.getReqPath(), "vlan-tag", vlanTagPreset2.getReqPath()), "Assigned");
+
+ PresetAAIStandardQueryGet l3NetworkPreset2 = ofL3Network("12347f3d-2bc2-48f5-aaf8-418520c54330","DDDEEEE", "Provider Network",
+ ImmutableMultimap.of("vlan-tag", vlanTagPreset3.getReqPath(), "vlan-tag", vlanTagPreset4.getReqPath()), "Created");
+
+ PresetAAIStandardQueryGet vnfPreset1 = ofVnf("c015cc0f-0f37-4488-aabf-53795fd93cd3",
+ ImmutableMultimap.of("l3-network", l3NetworkPreset1.getReqPath() , "l3-network", l3NetworkPreset2.getReqPath()));
+
+ PresetAAIStandardQueryGet l3NetworkPreset3 = ofL3Network("12aa7f3d-2bc2-48f5-aaf8-418520c54330","XXXYYYZZZ", "Network",
+ ImmutableMultimap.of("vlan-tag", vlanTagPreset5.getReqPath(), "vlan-tag", vlanTagPreset6.getReqPath()), "Created");
+
+ PresetAAIStandardQueryGet vnfPreset2 = ofVnf("c55da606-cf38-42c7-bc3c-be8e23b19299", ImmutableMultimap.of("l3-network", l3NetworkPreset3.getReqPath()));
+
+ PresetAAIStandardQueryGet serviceInstance = ofServiceInstance("9cdd1b2a-43a7-47bc-a88e-759ba2399f0b",
+ "7a6ee536-f052-46fa-aa7e-2fca9d674c44", "6e59c5de-f052-46fa-aa7e-2fca9d674c44", globalCustomerId, serviceType,
+ ImmutableMultimap.of("generic-vnf", vnfPreset1.getReqPath(), "generic-vnf", vnfPreset2.getReqPath()));
+
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ serviceInstance, vnfPreset1, vnfPreset2, l3NetworkPreset1, l3NetworkPreset2, l3NetworkPreset3, vlanTagPreset1, vlanTagPreset2, vlanTagPreset3, vlanTagPreset4, vlanTagPreset5, vlanTagPreset6,
+ new PresetSDCGetServiceMetadataGet(sdcModelUuid, UUID.randomUUID().toString(), "service-vl-with-5g-network-provider-alacarte.zip"),
+ new PresetSDCGetServiceToscaModelGet(sdcModelUuid, "service-vl-with-5g-network-provider-alacarte.zip")
+ ), CLEAR_THEN_SET);
+
+ // THE TEST
+ final String response = restTemplate.getForObject(uri + "/aai/standardQuery/vlansByNetworks"
+ + "?serviceInstanceId=" + serviceInstance.getInstanceId()
+ + "&serviceType=" + serviceType
+ + "&globalCustomerId=" + globalCustomerId
+ + "&sdcModelUuid=" + sdcModelUuid
+ , String.class);
+
+ assertResponse(JsonAssert.when(Option.IGNORING_ARRAY_ORDER),
+ getResourceAsString("serviceWithNetwork/aaiGetNetworksWithVlansToVnfByServiceInstance.json"),
+ response);
+ }
+
+ @Test
+ public void getVnfDataByGlobalIdAndServiceType() {
+
+ SimulatorApi.registerExpectation(AAI_VNFS_FOR_CHANGE_MANAGEMENT_JSON, APPEND);
+
+ String url = uri + "/get_vnf_data_by_globalid_and_service_type/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/vFlowLogic";
+
+ ResponseEntity<String> response = restTemplate.getForEntity(url, String.class);
+//reduced_vnf_data_by_globalid_and_service_type.json
+ assertTrue(false == response.getBody().contains("generic-vfmodule"));
+ assertResponse(JsonAssert.when(Option.IGNORING_ARRAY_ORDER),
+ getResourceAsString("changeManagement/reduced_vnf_data_by_globalid_and_service_type.json"),
+ response.getBody());
+
+ }
+
private void assertResponse(Object expected, String response) {
+ assertResponse(Configuration.empty(), expected, response);
+ }
+
+ private void assertResponse(Configuration configuration, Object expected, String response) {
try {
- JsonAssert.assertJsonEquals(expected, response);
+ JsonAssert.assertJsonEquals(expected, response, configuration);
} catch (Exception | AssertionError e) {
System.err.println("response was: " + response);
throw e;
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInfraApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInfraApiTest.java
index 5f83f36dc..058cb2f5b 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInfraApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInfraApiTest.java
@@ -1,205 +1,30 @@
package org.onap.vid.api;
import com.google.common.collect.ImmutableList;
-import com.google.gson.JsonObject;
-import net.codestory.http.WebServer;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
import org.onap.vid.more.LoggerFormatTest;
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.Features;
-import vid.automation.test.infra.Wait;
-import vid.automation.test.model.JobBulk;
-import vid.automation.test.model.JobModel;
import vid.automation.test.services.SimulatorApi;
-import java.net.Inet4Address;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.List;
import java.util.UUID;
-import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.TimeUnit;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.containsString;
import static org.testng.AssertJUnit.assertEquals;
public class AsyncInfraApiTest extends BaseApiTest {
- private static final String PENDING = "PENDING";
public static final String API_URL = "asyncForTests";
- private boolean asyncJobsIsOn() {
- return Features.FLAG_ASYNC_JOBS.isActive()
- && Features.FLAG_ASYNC_INSTANTIATION.isActive();
- }
-
@BeforeClass
public void login() {
super.login();
}
- @BeforeMethod
- protected void deleteAllPendingJobs() {
- System.out.println("Connecting database...");
-
- try (Connection connection = DriverManager.getConnection(DB_CONFIG.url, DB_CONFIG.username, DB_CONFIG.password)) {
- System.out.println("Database connected!");
- try (Statement stmt = connection.createStatement()) {
- stmt.addBatch("DELETE from `vid_service_info`");
- stmt.addBatch("DELETE FROM `vid_job`");
-
- int[] executeBatch = stmt.executeBatch();
- }
-
- } catch (SQLException e) {
- throw new IllegalStateException("Cannot connect the database!", e);
- }
- }
-
-
- @Test
- public void createBulkOfJobsViaApi_thenGetEachOneOfThem() {
- int jobCount = 10;
- final String url = "http://localhost:1234/testMe";
- ResponseEntity<JobBulk> result = postJobBulk(jobCount, url, "NoOp");
- assertEquals(HttpStatus.OK, result.getStatusCode());
- Assert.assertNotNull(result.getBody());
- assertEquals(jobCount, getJobChildren(result).size());
-
-
- result.getBody().getJobs().forEach(job -> {
- assertThat(job.getUuid(), not(isEmptyOrNullString()));
- assertEquals(PENDING, job.getStatus());
- });
-
- result.getBody().getJobs().forEach(job -> {
- ResponseEntity<JobModel> jobResult = restTemplate.getForEntity(buildUri(API_URL+"/job/{uuid}"), JobModel.class, job.getUuid());
- assertEquals(job.getUuid(), jobResult.getBody().getUuid());
- //assertEquals(PENDING, jobResult.getBody().getStatus());
- });
- }
-
- private List<JobModel> getJobChildren(ResponseEntity<JobBulk> result) {
- return result.getBody().getJobs().stream().filter(job -> job.getTemplateId() != null).collect(Collectors.toList());
- }
-
- private ResponseEntity<JobBulk> postJobBulk(int jobCount, String url, String type) {
- JsonObject jsonObject = new JsonObject();
- jsonObject.addProperty("name", "service-"+random.nextInt());
- jsonObject.addProperty("count", jobCount);
- jsonObject.addProperty("url", url);
- jsonObject.addProperty("type", type);
- ResponseEntity<JobBulk> result = restTemplate.postForEntity(buildUri(API_URL), jsonObject.toString(), JobBulk.class);
- return result;
- }
-
- @Test
- public void addFewJobs_verifyCallbacksAreAllAndNoDuplicates() throws InterruptedException {
- final Collection<String> expected = new ConcurrentSkipListSet<>();
- final Collection<String> results = new ConcurrentSkipListSet<>();
- final Collection<String> duplicates = new ConcurrentSkipListSet<>();
- final String targetPath = "/my-mso";
-
- // https://github.com/CodeStory/fluent-http
- final WebServer server = new WebServer().configure(routes -> routes
- .post(targetPath, (context) -> {
- final String body = context.extract(String.class);
- if (!results.add(body)) {
- duplicates.add(body);
- }
- return body;
- })
- ).startOnRandomPort();
-
- final int jobCount = 10;
- final int childCount = 2;
-
- InetAddress inetAddress = getExternalInetAddress();
-
- final String returnUrl = "http://" + inetAddress.getHostAddress() + ":" + server.port() + targetPath;
- System.out.println(returnUrl);
-
- // POST jobs
- IntStream.range(0, jobCount).parallel().forEach(i -> {
- ResponseEntity<JobBulk> result = postJobBulk(childCount, returnUrl, "HttpCall");
- getJobChildren(result).forEach(child -> {
- expected.add(child.getUuid());
- });
- });
- Wait.waitFor((actual -> actual.size() == expected.size()), results, 75, 200, TimeUnit.MILLISECONDS);
- // wait some another time give change for duplications
- TimeUnit.SECONDS.sleep(5);
-
- if (asyncJobsIsOn()) {
- assertThat("async jobs is on: should callback for all jobs - no more, no less", results, equalTo(expected));
- assertThat("async jobs is on: should callback for exactly number of jobs", results, hasSize(jobCount * childCount));
- assertThat("async jobs is on: should have no duplicate jobs callback", duplicates, empty());
- } else {
- assertThat("async jobs is off: should not callback for any job", results, empty());
- assertThat("async jobs is off: should have no duplicate jobs callback", duplicates, empty());
- }
-
- server.stop();
-
- }
-
- private InetAddress getExternalInetAddress() {
- // https://stackoverflow.com/questions/9481865/getting-the-ip-address-of-the-current-machine-using-java
- InetAddress candidateAddress = null;
- try {
- for (Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements(); ) {
- NetworkInterface iface = (NetworkInterface) ifaces.nextElement();
-
- if (iface.getName().contains("docker")) {
- // ignore local docker virtual gateway IPs
- continue;
- }
-
- // Iterate all IP addresses assigned to each card...
- for (Enumeration inetAddrs = iface.getInetAddresses(); inetAddrs.hasMoreElements(); ) {
- InetAddress inetAddr = (InetAddress) inetAddrs.nextElement();
-
- // take only non-loopback, ipv4 addresses
- if (!inetAddr.isLoopbackAddress() && inetAddr instanceof Inet4Address) {
-
- System.out.println("inetAddr (" + iface.getName() + "): " + inetAddr);
- if (inetAddr.isSiteLocalAddress()) {
- // Found non-loopback site-local address. Return it immediately...
- System.out.println("inetAddr, site-local (" + iface.getName() + "): " + inetAddr);
- candidateAddress = inetAddr;
- }
- else if (candidateAddress == null) {
- // Found non-loopback address, but not necessarily site-local.
- // Store it as a candidate to be returned if site-local address is not subsequently found...
- candidateAddress = inetAddr;
- // Note that we don't repeatedly assign non-loopback non-site-local addresses as candidates,
- // only the first. For subsequent iterations, candidate will be non-null.
- }
- }
- }
-
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- return candidateAddress;
- }
-
@Test
public void testGetStatusBadRequest() {
ResponseEntity<String> jobResult = getJob("1234");
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java
new file mode 100644
index 000000000..539e857c9
--- /dev/null
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest.java
@@ -0,0 +1,532 @@
+package org.onap.vid.api;
+
+import static java.util.Collections.emptyMap;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
+import static org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset.DEFAULT_INSTANCE_ID;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost.DEFAULT_REQUEST_ID;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.COMPLETE;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember.InstanceGroupMemberAction;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseDelete;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateNetworkALaCarteCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesAlacarteServiceCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVfModuleALaCarteCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVfModuleWithVolumeGroupALaCarteCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVnfALaCarteCypress2;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVnfGroup;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteALaCarteService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteInstanceGroup;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
+import org.onap.vid.model.asyncInstantiation.JobAuditStatus;
+import org.onap.vid.model.asyncInstantiation.JobAuditStatus.SourceStatus;
+import org.onap.vid.model.asyncInstantiation.ServiceInfo;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import vid.automation.test.Constants;
+import vid.automation.test.infra.FeatureTogglingTest;
+import vid.automation.test.infra.Features;
+import vid.automation.test.model.JobStatus;
+import vid.automation.test.model.ServiceAction;
+import vid.automation.test.services.AsyncJobsService;
+import vid.automation.test.services.SimulatorApi;
+import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
+
+@FeatureTogglingTest({Features.FLAG_ASYNC_JOBS, Features.FLAG_ASYNC_INSTANTIATION, Features.FLAG_ASYNC_ALACARTE_VNF})
+public class AsyncInstantiationALaCarteApiTest extends AsyncInstantiationBase {
+
+ private static final String CREATE_BULK_OF_ALACARTE_REQUEST = "asyncInstantiation/vidRequestCreateALaCarte.json";
+ private static final String CREATE_BULK_OF_ALACARTE_REQUEST_CYPRESS = "a-la-carte/redux-a-la-carte.json";
+ private static final String CREATE_BULK_OF_ALACARTE_NO_TESTAPI_REQUEST_CYPRESS = "a-la-carte/redux-a-la-carte-no-testapi.json";
+ private static final String DELETE_BULK_OF_ALACARTE_REQUEST = "VnfGroup/ServiceWithVnfGroupsDeleteRequest.json";
+ private static final String VIEW_EDIT_VNF_GROUPS_REQUEST = "VnfGroup/VnfGroupCreate1Delete1None1Request.json";
+ private static final String DELETE_TWO_VNF_GROUPS_MEMBER_AND_ADD_ONE_REQUEST = "VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json";
+ private static final String DELETE_SERVICE_WITH_TWO_VNF_GROUPS_REQUEST_WITH_GROUPMEMBERS = "VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json";
+
+
+ private static final String SERVICE_INSTANCE_ID = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ private static final String MSO_COMPLETE_STATUS = "COMPLETE";
+ private static final String MSO_FAILED_STATUS = "FAILED";
+
+
+ @DataProvider
+ public static Object[][] scenarios() {
+ return new Object[][]{
+ {Scenario.PARALLEL},
+ {Scenario.COMPLETED},
+// {Scenario.NAME_TAKEN}, Not relevant because the name uniqueness is supported only for bulk in Macro
+// {Scenario.DUPLICATE_NAME}, Not relevant because name duplication is not handled in A La Carte
+ {Scenario.IN_PROGRESS},
+ {Scenario.MSO_FAIL}
+ };
+ }
+
+ @AfterMethod
+ protected void dropAllFromNameCounter() {
+ AsyncJobsService asyncJobsService = new AsyncJobsService();
+ asyncJobsService.dropAllFromNameCounter();
+ }
+
+ @Test
+ public void deploy1Service0VnfWithStrictSimulatorCompare__verifyStatusAndAudit() {
+ /*
+ Legit Preset || deploy 1 Service, no VNF inside
+ -> JobStatus is Eventually success, audit
+ is adequate; strict simulator compare
+ */
+
+ final ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "calazixide85");
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(new PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService(names, 0, DEFAULT_REQUEST_ID));
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(new PresetMSOOrchestrationRequestGet());
+ List<BasePreset> presets = getPresets(createPresets, inProgressPresets);
+
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertServiceInfoSpecific1(jobId, JobStatus.COMPLETED, names.get(SERVICE_NAME));
+ assertAuditStatuses(jobId, vidAuditStatusesCompleted(jobId), msoAuditStatusesCompleted(jobId));
+ }
+
+ @Test
+ public void deleteServiceWithTwoVnfGroups_andRetry() {
+ String parentServiceInstanceId = "service-instance-id";
+ String firstVnfGroupToDeleteInstanceId = "VNF_GROUP1_INSTANCE_ID";
+ String secondVnfGroupToDeleteInstanceId = "VNF_GROUP2_INSTANCE_ID";
+ String firstVnfGroupToDeleteRequestId = UUID.randomUUID().toString();
+ String secondVnfGroupToDeleteRequestId = UUID.randomUUID().toString();
+ String parentServiceRequestId = UUID.randomUUID().toString();
+ List<String> vnfGroupMemberRemoveRequestsIds = ImmutableList.of(UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString());
+
+ //failed to delete vnf group, and then also service is not deleted
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(
+ new PresetMSOAddOrRemoveOneInstanceGroupMember(firstVnfGroupToDeleteInstanceId, "RELATED_VNF1_INSTANCE_ID", getUserCredentials().getUserId(), vnfGroupMemberRemoveRequestsIds.get(0), InstanceGroupMemberAction.Remove),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember(firstVnfGroupToDeleteInstanceId, "RELATED_VNF2_INSTANCE_ID", getUserCredentials().getUserId(), vnfGroupMemberRemoveRequestsIds.get(1), InstanceGroupMemberAction.Remove),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember(firstVnfGroupToDeleteInstanceId, "RELATED_VNF3_INSTANCE_ID", getUserCredentials().getUserId(), vnfGroupMemberRemoveRequestsIds.get(2), InstanceGroupMemberAction.Remove));
+
+ List<PresetMSOBaseDelete> deletePresets = ImmutableList.of(
+ new PresetMSODeleteInstanceGroup(firstVnfGroupToDeleteRequestId, firstVnfGroupToDeleteInstanceId, getUserCredentials().getUserId()),
+ new PresetMSODeleteInstanceGroup(secondVnfGroupToDeleteRequestId, secondVnfGroupToDeleteInstanceId, getUserCredentials().getUserId())
+ );
+
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = new ArrayList<>();
+ inProgressPresets.add(new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, firstVnfGroupToDeleteRequestId));
+ inProgressPresets.add(new PresetMSOOrchestrationRequestGet( MSO_FAILED_STATUS, secondVnfGroupToDeleteRequestId));
+ inProgressPresets.add(new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, vnfGroupMemberRemoveRequestsIds.get(0)));
+ inProgressPresets.add(new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, vnfGroupMemberRemoveRequestsIds.get(1)));
+ inProgressPresets.add(new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, vnfGroupMemberRemoveRequestsIds.get(2)));
+
+ List<BasePreset> presets = getPresets(deletePresets, createPresets, inProgressPresets);
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_SERVICE_WITH_TWO_VNF_GROUPS_REQUEST_WITH_GROUPMEMBERS);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+ assertServiceInfoSpecificDeletion(jobId, JobStatus.COMPLETED_WITH_ERRORS, "SERVICE_INSTANCE_NAME", "service-instance-type");
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(deletePresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(deletePresets.get(1).getReqPath(), 1L),
+
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(createPresets.get(0).getReqPath(), 3L)
+
+ ));
+
+ //retry to delete vnf-group and then delete service
+ List<BasePreset> retryPresets = ImmutableList.of(
+ new PresetMSODeleteInstanceGroup(secondVnfGroupToDeleteRequestId, secondVnfGroupToDeleteInstanceId, getUserCredentials().getUserId()),
+ new PresetMSODeleteALaCarteService(parentServiceRequestId,parentServiceInstanceId ),
+ new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, secondVnfGroupToDeleteRequestId),
+ new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, parentServiceRequestId));
+ registerExpectationFromPresets(retryPresets, RegistrationStrategy.CLEAR_THEN_SET);
+
+ List<String> retryUuids = retryJob(jobId);
+ assertThat(retryUuids, hasSize(1));
+ final String retryJobId = retryUuids.get(0);
+ assertServiceInfoSpecificDeletion(retryJobId, JobStatus.COMPLETED, "SERVICE_INSTANCE_NAME", "service-instance-type");
+
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(retryPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(retryPresets.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(retryPresets.get(2).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(retryPresets.get(3).getReqPath(), 1L)
+ ));
+ }
+
+ @DataProvider
+ public static Object[][] msoRequestStatusDataProvider() {
+ return new Object[][]{
+ {MSO_COMPLETE_STATUS, JobStatus.COMPLETED},
+ {MSO_FAILED_STATUS, JobStatus.FAILED}
+ };
+ }
+
+ @Test(dataProvider = "msoRequestStatusDataProvider")
+ public void deleteServiceWithStrictSimulatorCompare__verifyStatusAndAudit(String msoStatus, JobStatus expectedStatus) {
+ List<PresetMSOBaseDelete> deletePresets = ImmutableList.of(new PresetMSODeleteALaCarteService( DEFAULT_REQUEST_ID, SERVICE_INSTANCE_ID));
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of (new PresetMSOOrchestrationRequestGet(msoStatus),
+ new PresetMSOOrchestrationRequestGet(msoStatus));
+ List<BasePreset> presets = getDeletePresets(deletePresets, inProgressPresets);
+
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_BULK_OF_ALACARTE_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertServiceInfoSpecificDeletion(jobId, expectedStatus, "wowServiceWithVnfGroping", "TYLER SILVIA");
+ switch (expectedStatus) {
+ case COMPLETED:
+ assertAuditStatuses(jobId, vidAuditStatusesCompleted(jobId), msoAuditStatusesCompleted(jobId));
+ break;
+
+ case FAILED:
+ assertAuditStatuses(jobId, vidAuditStatusesFailed(jobId), null);
+ break;
+ }
+
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(deletePresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 1L)
+ ));
+ }
+
+ @Test(dataProvider = "msoRequestStatusDataProvider")
+ public void deleteTwoGroupsAddOneGroup(String msoStatus, JobStatus expectedStatus) {
+ String parentServiceInstanceId = "service-instance-id";
+ String firstVnfGroupToDeleteInstanceId = "VNF_GROUP1_INSTANCE_ID";
+ String secondVnfGroupToDeleteInstanceId = "VNF_GROUP2_INSTANCE_ID";
+ String firstVnfGroupToDeleteRequestId = UUID.randomUUID().toString();
+ String secondVnfGroupToDeleteRequestId = UUID.randomUUID().toString();
+ String vnfGroupToCreateRequestId = UUID.randomUUID().toString();
+
+ List<PresetMSOBaseDelete> deletePresets = ImmutableList.of(
+ new PresetMSODeleteInstanceGroup(firstVnfGroupToDeleteRequestId, firstVnfGroupToDeleteInstanceId, getUserCredentials().getUserId()),
+ new PresetMSODeleteInstanceGroup(secondVnfGroupToDeleteRequestId, secondVnfGroupToDeleteInstanceId, getUserCredentials().getUserId()));
+
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(
+ new PresetMSOCreateVnfGroup("VNF_GROUP3_INSTANCE_NAME", vnfGroupToCreateRequestId,
+ PresetMSOCreateVnfGroup.MODEL_INFO_0, parentServiceInstanceId, false));
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet(msoStatus, firstVnfGroupToDeleteRequestId),
+ new PresetMSOOrchestrationRequestGet(msoStatus, secondVnfGroupToDeleteRequestId),
+ new PresetMSOOrchestrationRequestGet(msoStatus, vnfGroupToCreateRequestId, "Instance group was created successfully.")
+ );
+ List<BasePreset> presets = getPresets(deletePresets, createPresets, inProgressPresets);
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_TWO_VNF_GROUPS_MEMBER_AND_ADD_ONE_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertServiceInfoSpecificUpdate(jobId, expectedStatus, "SERVICE_INSTANCE_NAME");
+ assertExpectedStatus(expectedStatus, jobId);
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(deletePresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(deletePresets.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(createPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(2).getReqPath(), 1L)
+ ));
+
+ }
+
+ @Test
+ public void viewEditVnfGroup__verifyStatusAndAudit() {
+ String parentServiceInstanceId = "service-instance-id";
+ String vnfGroupToDeleteInstanceId = "VNF_GROUP1_INSTANCE_ID";
+
+ //failed to create vnf group, failed to remove 1 member (and then also vnf group isn't deleted)
+ viewEditVnfGroup_registerPresets(parentServiceInstanceId, vnfGroupToDeleteInstanceId, MSO_FAILED_STATUS);
+
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), VIEW_EDIT_VNF_GROUPS_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertServiceInfoSpecificUpdate(jobId, JobStatus.COMPLETED_WITH_ERRORS, "SERVICE_INSTANCE_NAME");
+ assertExpectedStatus(JobStatus.COMPLETED_WITH_ERRORS, jobId);
+ Map<String, Long> recordedRequest = SimulatorApi.retrieveRecordedRequestsPathCounter();
+ assertThat(recordedRequest, allOf(
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./instanceGroups/" + vnfGroupToDeleteInstanceId, 0L), //delete vnf group
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./instanceGroups", 1L), //create vnf group
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./instanceGroups/" + vnfGroupToDeleteInstanceId + "/removeMembers", 3L) //remove vnf group members
+ ));
+
+ //retry - vnf group create, 1 member remove, vnf group delete
+ viewEditVnfGroup_registerPresets(parentServiceInstanceId, vnfGroupToDeleteInstanceId, MSO_COMPLETE_STATUS);
+ final List<String> retryUuids = retryJob(jobId);
+ assertThat(retryUuids, hasSize(1));
+ final String retryJobId = retryUuids.get(0);
+
+ assertServiceInfoSpecificUpdate(retryJobId, JobStatus.COMPLETED, "SERVICE_INSTANCE_NAME");
+ assertExpectedStatus(JobStatus.COMPLETED, retryJobId);
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./instanceGroups/" + vnfGroupToDeleteInstanceId, 1L), //delete vnf group
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./instanceGroups", 1L), //create vnf group
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./instanceGroups/" + vnfGroupToDeleteInstanceId + "/removeMembers", 1L) //remove vnf group members
+ ));
+ }
+
+ private void viewEditVnfGroup_registerPresets(String parentServiceInstanceId, String vnfGroupToDeleteInstanceId, String msoStatus) {
+ String vnfGroupToDeleteRequestId = UUID.randomUUID().toString();
+ String vnfGroupToCreateRequestId = UUID.randomUUID().toString();
+ List<String> vnfGroupMemberRemoveRequestsIds = ImmutableList.of(UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString());
+
+ List<PresetMSOBaseDelete> deletePresets = ImmutableList.of(
+ new PresetMSODeleteInstanceGroup(vnfGroupToDeleteRequestId, vnfGroupToDeleteInstanceId, getUserCredentials().getUserId()));
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(
+ new PresetMSOCreateVnfGroup("VNF_GROUP3_INSTANCE_NAME", vnfGroupToCreateRequestId,
+ PresetMSOCreateVnfGroup.MODEL_INFO_0, parentServiceInstanceId, false),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember(vnfGroupToDeleteInstanceId, "RELATED_VNF1_INSTANCE_ID", getUserCredentials().getUserId(), vnfGroupMemberRemoveRequestsIds.get(0), InstanceGroupMemberAction.Remove),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember(vnfGroupToDeleteInstanceId, "RELATED_VNF2_INSTANCE_ID", getUserCredentials().getUserId(), vnfGroupMemberRemoveRequestsIds.get(1), InstanceGroupMemberAction.Remove),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember(vnfGroupToDeleteInstanceId, "RELATED_VNF3_INSTANCE_ID", getUserCredentials().getUserId(), vnfGroupMemberRemoveRequestsIds.get(2), InstanceGroupMemberAction.Remove));
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, vnfGroupToDeleteRequestId), // delete instance group
+ new PresetMSOOrchestrationRequestGet(msoStatus, vnfGroupToCreateRequestId, "Instance group was created successfully."), // create instance group
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, vnfGroupMemberRemoveRequestsIds.get(0)), // remove instance group member
+ new PresetMSOOrchestrationRequestGet(msoStatus, vnfGroupMemberRemoveRequestsIds.get(1)), // remove instance group member
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, vnfGroupMemberRemoveRequestsIds.get(2))); // remove instance group member
+
+ List<BasePreset> presets = getPresets(deletePresets, createPresets, inProgressPresets);
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ }
+
+ private void assertExpectedStatus(JobStatus expectedStatus, String jobId) {
+ switch (expectedStatus) {
+ case COMPLETED:
+ assertAuditStatuses(jobId, vidAuditStatusesCompleted(jobId), null);
+ break;
+
+ case FAILED:
+ assertAuditStatuses(jobId, vidAuditStatusesFailed(jobId), null);
+ break;
+ }
+ }
+
+ @Test
+ public void deploy1Service1FailedVnf__verifyStatus_andRetry() {
+ //CreateServiceWithFailedVnf is common for API test and UI test,
+ //so if you change it, make sure both test are compatible with your changes
+ CreateServiceWithFailedVnf createServiceWithFailedVnf = new CreateServiceWithFailedVnf(this);
+ createServiceWithFailedVnf.deployService1FailedVnf();
+ createServiceWithFailedVnf.secondRegistration();
+ createServiceWithFailedVnf.retryJob();
+ createServiceWithFailedVnf.retryAssertion();
+ createServiceWithFailedVnf.simulatorCallsAssertion();
+ }
+
+ @DataProvider
+ Object[][] data_deploy1ServiceFromCypress__verifyStatusAndMsoCalls() {
+ return Features.FLAG_ASYNC_ALACARTE_VFMODULE.isActive() ? new Object[][]{
+ {"none", emptyMap(), emptyMap(), true},
+ {"none", emptyMap(), emptyMap(), false},
+ {"instance", ImmutableMap.of("vnfs", 0L, "networks", 0L, "vfModules", 0L, "volumeGroups", 0L),
+ ImmutableMap.of("serviceInstances", 1L, "vnfs", 1L, "networks", 1L, "vfModules", 3L, "volumeGroups", 1L),true},
+ {"network", emptyMap(),
+ ImmutableMap.of("networks", 1L), true},
+ {"vnf0", ImmutableMap.of("vfModules", 0L, "volumeGroups", 0L),
+ ImmutableMap.of("vnfs", 1L, "vfModules", 3L, "volumeGroups", 1L), true},
+ {"vfModule0", ImmutableMap.of("vfModules", 1L, "volumeGroups", 0L),
+ ImmutableMap.of("vfModules", 3L, "volumeGroups", 1L), true},
+ {"volumeGroup", ImmutableMap.of("vfModules", 2L),
+ ImmutableMap.of("vfModules", 1L, "volumeGroups", 1L), true},
+ {"vfModule1", emptyMap(),
+ ImmutableMap.of("vfModules", 1L, "volumeGroups", 1L), true},
+ {"vfModule2", emptyMap(),
+ ImmutableMap.of("vfModules", 1L), true}
+ } : new Object[][]{
+ {"none", ImmutableMap.of("vfModules", 0L, "volumeGroups", 0L), emptyMap(), true}
+ };
+ }
+
+ @Test(dataProvider = "data_deploy1ServiceFromCypress__verifyStatusAndMsoCalls")
+ public void deploy1ServiceFromCypress__verifyStatusAndMsoCalls_andRetry(String whatToFail, Map<String, Long> pathCounterOverride, Map<String, Long> retryPathCounterOverride, boolean withTestApi) {
+ final ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "serviceInstanceName");
+ String vnfRequestId = UUID.randomUUID().toString();
+ registerPresetsForRetryTest(whatToFail, names, vnfRequestId, withTestApi);
+
+ final List<String> uuids = createBulkOfInstances(false, 1, names, withTestApi? CREATE_BULK_OF_ALACARTE_REQUEST_CYPRESS: CREATE_BULK_OF_ALACARTE_NO_TESTAPI_REQUEST_CYPRESS);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ JobStatus finalJobStatus;
+ switch (whatToFail) {
+ case "none": finalJobStatus = JobStatus.COMPLETED; break;
+ case "instance": finalJobStatus = JobStatus.FAILED; break;
+ default: finalJobStatus = JobStatus.COMPLETED_WITH_ERRORS; break;
+ }
+ assertServiceInfoSpecific2(jobId, finalJobStatus, names.get(SERVICE_NAME));
+ assertRecordedRequests(pathCounterOverride, 1L, vnfRequestId);
+
+ if (!"none".equals(whatToFail)) {
+ registerPresetsForRetryTest("none", names, vnfRequestId, withTestApi);
+
+ List<String> retryUuids = retryJob(jobId);
+ assertThat(retryUuids, hasSize(1));
+ final String retryJobId = retryUuids.get(0);
+
+ ServiceAction serviceAction = "instance".equals(whatToFail) ? ServiceAction.INSTANTIATE : ServiceAction.UPDATE;
+ assertServiceInfoSpecific2(retryJobId, JobStatus.COMPLETED, names.get(SERVICE_NAME), serviceAction);
+
+ assertRecordedRequests(retryPathCounterOverride, 0L, vnfRequestId);
+ }
+ }
+
+ private void registerPresetsForRetryTest(String whatToFail, ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names, String vnfRequestId, boolean withTestApi ) {
+ String networkRequestId = UUID.randomUUID().toString();
+ String vfModule0RequestId = UUID.randomUUID().toString();
+ String vfModule1RequestId = UUID.randomUUID().toString();
+ String vfModule2RequestId = UUID.randomUUID().toString();
+ String volumeGroupRequestId = UUID.randomUUID().toString();
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(
+ new PresetMSOCreateServiceInstanceGen2WithNamesAlacarteServiceCypress(names, 0, DEFAULT_REQUEST_ID, Constants.GR_API, withTestApi),
+ new PresetMSOCreateVnfALaCarteCypress2(vnfRequestId, DEFAULT_INSTANCE_ID, vnfRequestId, "2017-488_PASQUALE-vPE", Constants.GR_API, withTestApi),
+ new PresetMSOCreateNetworkALaCarteCypress(networkRequestId, DEFAULT_INSTANCE_ID, networkRequestId, "ExtVL", Constants.GR_API, withTestApi)
+ );
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet("instance".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE),
+ new PresetMSOOrchestrationRequestGet("vnf0".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE, vnfRequestId),
+ new PresetMSOOrchestrationRequestGet("vfModule0".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE, vfModule0RequestId),
+ new PresetMSOOrchestrationRequestGet("vfModule1".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE, vfModule1RequestId),
+ new PresetMSOOrchestrationRequestGet("vfModule2".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE, vfModule2RequestId),
+ new PresetMSOOrchestrationRequestGet("volumeGroup".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE, volumeGroupRequestId),
+ new PresetMSOOrchestrationRequestGet("network".equals(whatToFail) ? MSO_FAILED_STATUS : COMPLETE, networkRequestId)
+ );
+ List<BasePreset> presetsWithoutVfModule = getPresets(createPresets, inProgressPresets);
+
+ ImmutableList<BasePreset> presets = new ImmutableList.Builder<BasePreset>()
+ .addAll(presetsWithoutVfModule)
+ .add(new PresetSDCGetServiceToscaModelGet("2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd", "csar-noDynamicFields-ecompNamingFalse-fullModelDetails.zip"))
+ .add(new PresetSDCGetServiceMetadataGet("2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd", "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0", "csar-noDynamicFields-ecompNamingFalse-fullModelDetails.zip"))
+ .add(new PresetMSOCreateVfModuleALaCarteCypress(vfModule0RequestId, DEFAULT_INSTANCE_ID, vnfRequestId, PresetMSOCreateVfModuleALaCarteCypress.module0Names, Constants.GR_API, withTestApi))
+ .add(PresetMSOCreateVfModuleWithVolumeGroupALaCarteCypress.forVolumeGroup(volumeGroupRequestId, DEFAULT_INSTANCE_ID, vnfRequestId, Constants.GR_API, withTestApi))
+ .add(PresetMSOCreateVfModuleWithVolumeGroupALaCarteCypress.forVfModule(vfModule1RequestId, DEFAULT_INSTANCE_ID, vnfRequestId, volumeGroupRequestId, Constants.GR_API, withTestApi))
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_JUST_ANOTHER_REGION_TO_ATT_AIC)
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC)
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MY_REGION_TO_ATT_AIC)
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_LCP_REGION_TEXT_TO_ATT_AIC)
+ .add(new PresetMSOCreateVfModuleALaCarteCypress(vfModule2RequestId, DEFAULT_INSTANCE_ID, vnfRequestId, PresetMSOCreateVfModuleALaCarteCypress.module2Names, Constants.GR_API, withTestApi))
+ .build();
+
+ registerExpectationFromPresets(
+ Features.FLAG_ASYNC_ALACARTE_VFMODULE.isActive() ? presets : presetsWithoutVfModule,
+ RegistrationStrategy.CLEAR_THEN_SET);
+ }
+
+ private void assertRecordedRequests(Map<String, Long> pathCounterOverride, Long defaultValue, String vnfRequestId) {
+ Long vfModulesDefaultValue = defaultValue == 1L ? 3L : 0L;
+
+ //noinspection unchecked
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./serviceInstances",
+ pathCounterOverride.getOrDefault("serviceInstances", defaultValue)),
+
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./serviceInstances/" + DEFAULT_INSTANCE_ID + "/networks",
+ pathCounterOverride.getOrDefault("networks", defaultValue)),
+
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./serviceInstances/" + DEFAULT_INSTANCE_ID + "/vnfs",
+ pathCounterOverride.getOrDefault("vnfs", defaultValue)),
+
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstances/v./" + DEFAULT_INSTANCE_ID + "/vnfs/" + vnfRequestId + "/volumeGroups",
+ pathCounterOverride.getOrDefault("volumeGroups", defaultValue)),
+
+ TestUtils.hasOrLacksOfEntry("/mso/serviceInstantiation/v./serviceInstances/" + DEFAULT_INSTANCE_ID + "/vnfs/" + vnfRequestId + "/vfModules",
+ pathCounterOverride.getOrDefault("vfModules", vfModulesDefaultValue))
+ ));
+ }
+
+ private ImmutableList<JobAuditStatus> vidAuditStatusesCompleted(String jobId) {
+ return ImmutableList.of(
+ vidAuditStatus(jobId, "PENDING", false),
+ vidAuditStatus(jobId, "IN_PROGRESS", false),
+ vidAuditStatus(jobId, "COMPLETED", true)
+ );
+ }
+
+ private ImmutableList<JobAuditStatus> msoAuditStatusesCompleted(String jobId ) {
+ return ImmutableList.of(
+ msoAuditStatus(jobId, "REQUESTED", null, UUID.fromString(DEFAULT_REQUEST_ID)),
+ msoAuditStatus(jobId, MSO_COMPLETE_STATUS, "Service Instance was created successfully.", UUID.fromString(DEFAULT_REQUEST_ID))
+ );
+ }
+
+ private JobAuditStatus msoAuditStatus(String jobId, String jobStatus, String additionalInfo, UUID requestId) {
+ return new JobAuditStatus(UUID.fromString(jobId), jobStatus, SourceStatus.MSO, requestId, additionalInfo, false);
+ }
+
+ private void assertServiceInfoSpecific2(String jobId, JobStatus jobStatus, String serviceInstanceName) {
+ assertServiceInfoSpecific2(jobId, jobStatus, serviceInstanceName, ServiceAction.INSTANTIATE);
+ }
+
+ private void assertServiceInfoSpecific2(String jobId, JobStatus jobStatus, String serviceInstanceName, ServiceAction serviceAction) {
+ assertExpectedStatusAndServiceInfo(jobStatus, jobId, true, new ServiceInfo(
+ "us16807000", jobStatus, false,
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc", "WayneHolland", "WATKINS",
+ "JAG1", null,
+ "092eb9e8e4b7412e8787dd091bc58e86", null,
+ "JANET25", null,
+ "TYLER SILVIA", null,
+ null, serviceInstanceName,
+ "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd", "action-data", "1.0",
+ jobId, null, serviceAction, false)
+ );
+ }
+
+ private void assertServiceInfoSpecificDeletion(String jobId, JobStatus jobStatus, String serviceInstanceName, String serviceType) {
+ assertExpectedStatusAndServiceInfo(jobStatus, jobId, true, new ServiceInfo(
+ "us16807000", jobStatus, false,
+ null, null, null,
+ null, null,
+ null, null,
+ null, null,
+ serviceType, null,
+ null, serviceInstanceName,
+ "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "Grouping Service for Test", "1.0",
+ jobId, null, ServiceAction.DELETE, false)
+ );
+ }
+
+ private void assertServiceInfoSpecificUpdate(String jobId, JobStatus jobStatus, String serviceInstanceName) {
+ assertExpectedStatusAndServiceInfo(jobStatus, jobId, true, new ServiceInfo(
+ "us16807000", jobStatus, false,
+ null, null, null,
+ null, null,
+ null, null,
+ null, null,
+ "service-instance-type", null,
+ "service-instance-id", serviceInstanceName,
+ "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "Grouping Service for Test", "1.0",
+ jobId, null, ServiceAction.UPDATE, false)
+ );
+ }
+
+ enum Scenario {
+ PARALLEL, COMPLETED, NAME_TAKEN, DUPLICATE_NAME, IN_PROGRESS, MSO_FAIL
+ }
+
+}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java
new file mode 100644
index 000000000..54f2cc66f
--- /dev/null
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest2.java
@@ -0,0 +1,211 @@
+package org.onap.vid.api;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost.DEFAULT_REQUEST_ID;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPreset;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseDelete;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2ErrorResponse;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteALaCarteService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGetErrorResponse;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGetByRequestId;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsGetByServiceInstanceId;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames;
+import org.onap.vid.model.asyncInstantiation.JobAuditStatus;
+import org.onap.vid.model.asyncInstantiation.JobAuditStatus.SourceStatus;
+import org.onap.vid.model.asyncInstantiation.ServiceInfo;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import vid.automation.test.infra.FeatureTogglingTest;
+import vid.automation.test.infra.Features;
+import vid.automation.test.model.JobStatus;
+import vid.automation.test.model.ServiceAction;
+import vid.automation.test.services.AsyncJobsService;
+import vid.automation.test.services.SimulatorApi;
+import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
+
+@FeatureTogglingTest({Features.FLAG_ASYNC_JOBS, Features.FLAG_ASYNC_INSTANTIATION, Features.FLAG_ASYNC_ALACARTE_VNF})
+public class AsyncInstantiationALaCarteApiTest2 extends AsyncInstantiationBase {
+
+ private static final String CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS = "a-la-carte/redux-multiple-vnf-network.json";
+ private static final String DELETE_BULK_OF_ALACARTE_REQUEST = "VnfGroup/ServiceWithVnfGroupsDeleteRequest.json";
+ private static final String SERVICE_INSTANCE_ID = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+
+
+ @DataProvider
+ public static Object[][] scenarios() {
+ return new Object[][]{
+ {Scenario.PARALLEL},
+ {Scenario.COMPLETED},
+// {Scenario.NAME_TAKEN}, Not relevant because the name uniqueness is supported only for bulk in Macro
+// {Scenario.DUPLICATE_NAME}, Not relevant because name duplication is not handled in A La Carte
+ {Scenario.IN_PROGRESS},
+ {Scenario.MSO_FAIL}
+ };
+ }
+
+ @AfterMethod
+ protected void dropAllFromNameCounter() {
+ AsyncJobsService asyncJobsService = new AsyncJobsService();
+ asyncJobsService.dropAllFromNameCounter();
+ }
+
+ @Test
+ public void deleteService_withBadResponseFromMso_verifyStatus() {
+ List<PresetMSOBaseDelete> deletePresets = ImmutableList.of(new PresetMSODeleteALaCarteService( DEFAULT_REQUEST_ID, SERVICE_INSTANCE_ID, 500));
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(new PresetMSOOrchestrationRequestGet());
+ List<BasePreset> presets = getDeletePresets(deletePresets, inProgressPresets);
+
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_BULK_OF_ALACARTE_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertServiceInfoSpecificDeletion(jobId, JobStatus.FAILED, "wowServiceWithVnfGroping", "TYLER SILVIA");
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(deletePresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 0L)
+ ));
+ }
+
+
+ @Test
+ public void instantiationFailedForService(){
+ CreateInstanceWithFailedService createInstanceWithFailedService = new CreateInstanceWithFailedService(this);
+ createInstanceWithFailedService.deployServiceFailedInstance();
+ }
+
+ @Test
+ void getBulkForRetry_notFoundException(){
+ CreateServiceWithFailedVnf createServiceWithFailedVnf = new CreateServiceWithFailedVnf(this);
+ createServiceWithFailedVnf.getBulkForRetryNotFound();
+ }
+
+
+ @Test
+ public void deploy1Service1FailedVnf_EditJobSendingSameDataAndRetry_verifyNewJobWithSameData() {
+ CreateServiceWithFailedVnf createServiceWithFailedVnf = new CreateServiceWithFailedVnf(this);
+ String bulkRetryPayload = createServiceWithFailedVnf.deployService1FailedVnf();
+ createServiceWithFailedVnf.assertResourceAuditStatus(bulkRetryPayload);
+ createServiceWithFailedVnf.secondRegistration();
+ createServiceWithFailedVnf.retryJobWithOtherDataAndAssert(bulkRetryPayload);
+ }
+
+ @Test
+ public void deploy1Service1FailedVnf_EditSomeDetailsAndRetry_verifyNewJobWithEditedData() {
+ CreateServiceWithFailedVnf createServiceWithFailedVnf = new CreateServiceWithFailedVnf(this);
+ String originalBulkForRetry = createServiceWithFailedVnf.deployService1FailedVnf();
+ createServiceWithFailedVnf.assertResourceAuditStatus(originalBulkForRetry);
+ String changedData = createServiceWithFailedVnf.changeSomeDataAndRegisterToSimulator(originalBulkForRetry);
+ createServiceWithFailedVnf.retryJobWithOtherDataAndAssert(changedData);
+ }
+
+ private List<JobAuditStatus> getExpectedAuditFromFile(String fileName) throws IOException {
+ String content = TestUtils.convertRequest(objectMapper, fileName);
+ List<JobAuditStatus> auditStatusList = ImmutableList.copyOf(objectMapper.readValue(content, JobAuditStatus[].class));
+ return auditStatusList;
+
+
+ }
+
+ @Test
+ public void getAuditInfoForALaCarteByServiceInstanceId() throws IOException {
+ final String expectedMsoAuditInfo = "a-la-carte/auditInfoMSOALaCarte.json";
+ registerExpectationFromPreset(
+ new PresetMSOOrchestrationRequestsGetByServiceInstanceId(),
+ RegistrationStrategy.CLEAR_THEN_SET);
+ List<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte(UUID.randomUUID().toString(), "aa1234d1-5a33-55df-13ab-12abad84e333", "bc305d54-75b4-431b-adb2-eb6b9e546014");
+ List<JobAuditStatus> expectedMsoAudits = getExpectedAuditFromFile(expectedMsoAuditInfo);
+ assertThat(actualMsoAudits, is(expectedMsoAudits));
+
+ }
+
+ @Test
+ public void getAuditInfoForALaCarteByRequestId() {
+ registerExpectationFromPreset(
+ new PresetMSOOrchestrationRequestsGetByRequestId(),
+ RegistrationStrategy.CLEAR_THEN_SET);
+ final ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "serviceInstanceName");
+ String uuid = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS).get(0);
+ List<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte( uuid, "405652f4-ceb3-4a75-9474-8aea71480a77", null);
+ List<JobAuditStatus> expectedMsoAudits = ImmutableList.of(
+ new JobAuditStatus("serviceInstanceName", "FAILED", UUID.fromString("405652f4-ceb3-4a75-9474-8aea71480a77"),"Service Instance was failed.",false, "service"));
+ assertThat(actualMsoAudits, is(expectedMsoAudits));
+
+ }
+
+ @Test
+ public void getAuditInfoForALaCarteByJobId() throws IOException {
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ new PresetMSOCreateServiceInstanceGen2ErrorResponse(),
+ new PresetGetSessionSlotCheckIntervalGet(),
+ new PresetAAIGetSubscribersGet()
+ ),
+ RegistrationStrategy.CLEAR_THEN_SET);
+ final ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "serviceInstanceName");
+ String uuid = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS).get(0);
+
+ assertAndRetryIfNeeded(() -> {
+ final List<JobAuditStatus> actualMsoAudits = getJobMsoAuditStatusForAlaCarte( uuid, null, null);
+ List<JobAuditStatus> expectedMsoAudits = ImmutableList.of(
+ new JobAuditStatus(UUID.fromString(uuid), "FAILED", SourceStatus.MSO, null,
+ "Http Code:500, \"messageId\":\"SVC0002\",\"text\":\"JSON Object Mapping Request\"", false, "serviceInstanceName"));
+ assertThat(actualMsoAudits, is(expectedMsoAudits));
+ }, 15);
+
+ //assert error audit status
+ Map<String, Object> bulkForRetry = objectMapper.readValue(getRetryBulk(uuid).getBody(), new TypeReference<Map<String, Object>>(){});
+ String serviceTrackById = bulkForRetry.get("trackById").toString();
+ Map<String, Object> resourceAuditInfo = (Map) getResourceAuditInfo(serviceTrackById);
+ assertThat(resourceAuditInfo.get("jobStatus"), equalTo("FAILED"));
+ assertThat(resourceAuditInfo.get("additionalInfo"), equalTo("Http Code:500, \"messageId\":\"SVC0002\",\"text\":\"JSON Object Mapping Request\""));
+ }
+
+ @Test(expectedExceptions = RuntimeException.class)
+ public void getAuditInfoForALaCarte_badResponseFromMso_throwsException() {
+ registerExpectationFromPreset(
+ new PresetMSOOrchestrationRequestGetErrorResponse(500),
+ RegistrationStrategy.CLEAR_THEN_SET);
+ getJobMsoAuditStatusForAlaCarte( UUID.randomUUID().toString(), "405652f4-ceb3-4a75-9474-8aea71480a77", null);
+ }
+
+ private void assertServiceInfoSpecificDeletion(String jobId, JobStatus jobStatus, String serviceInstanceName, String serviceType) {
+ assertExpectedStatusAndServiceInfo(jobStatus, jobId, true, new ServiceInfo(
+ "us16807000", jobStatus, false,
+ null, null, null,
+ null, null,
+ null, null,
+ null, null,
+ serviceType, null,
+ null, serviceInstanceName,
+ "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "Grouping Service for Test", "1.0",
+ jobId, null, ServiceAction.DELETE, false)
+ );
+ }
+
+
+ enum Scenario {
+ PARALLEL, COMPLETED, NAME_TAKEN, DUPLICATE_NAME, IN_PROGRESS, MSO_FAIL
+ }
+
+}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java
new file mode 100644
index 000000000..eed6ee90b
--- /dev/null
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationALaCarteApiTest3.java
@@ -0,0 +1,645 @@
+package org.onap.vid.api;
+
+import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost.DEFAULT_REQUEST_ID;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet.COMPLETE;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.RELATED_VNF1_ACTION;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.RELATED_VNF2_ACTION;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME;
+import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.VNF_GROUP1_ACTION;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPreset;
+import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.function.Function;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseMSOPreset;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAISearchNodeQueryNonEmptyResult;
+import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOAddOrRemoveOneInstanceGroupMember.InstanceGroupMemberAction;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOBaseCreateInstancePost;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateNetworkALaCarteServiceCypress2;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateServiceInstanceMultipleVnfsServiceCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVnfALaCarteServiceCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVnfALaCarteServiceCypress2;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOCreateVnfGroup;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteBaseVfModuleCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteNetworkAlaCarteCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteService;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteVfModuleCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeleteVnfAlaCarteCypress;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
+import org.onap.vid.model.asyncInstantiation.JobAuditStatus;
+import org.onap.vid.model.asyncInstantiation.JobAuditStatus.SourceStatus;
+import org.onap.vid.model.asyncInstantiation.ServiceInfo;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import vid.automation.test.infra.FeatureTogglingTest;
+import vid.automation.test.infra.Features;
+import vid.automation.test.model.JobStatus;
+import vid.automation.test.model.ServiceAction;
+import vid.automation.test.services.AsyncJobsService;
+import vid.automation.test.services.SimulatorApi;
+import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
+
+@FeatureTogglingTest({Features.FLAG_ASYNC_JOBS, Features.FLAG_ASYNC_INSTANTIATION, Features.FLAG_ASYNC_ALACARTE_VNF})
+public class AsyncInstantiationALaCarteApiTest3 extends AsyncInstantiationBase {
+
+ private static final String CREATE_BULK_OF_ALACARTE_REQUEST = "asyncInstantiation/vidRequestCreateALaCarte.json";
+ private static final String CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS = "a-la-carte/redux-multiple-vnf-network.json";
+ private static final String CREATE_BULK_OF_ALACARTE_REQUEST_WITH_VNF_GROUP = "VnfGroup/serviceWithVnfGroupCreateRequest.json";
+ private static final String PAYLOAD_TEMPLATE_1_VNF_GROUP_WITH_3_MEMBERS_REQUEST = "VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json";
+ private static final String DELETE_AND_CREATE_NETWORK_FROM_SERVICE = "asyncInstantiation/vidRequestDelete1Create1Network.json";
+ private static final String DELETE_SERVICE_WITH_NETWORK = "asyncInstantiation/vidRequestDeleteServiceWithNetwork.json";
+ private static final String DELETE_AND_CREATE_VNF_FROM_SERVICE = "asyncInstantiation/vidRequestDelete1Create1Vnf.json";
+ private static final String DELETE_SERVICE_WITH_VNF = "asyncInstantiation/vidRequestDeleteServiceWithVnf.json";
+
+
+ private static final String FIRST_REQUEST_ID = "d1011670-0e1a-4b74-945d-8bf5aede1d9c";
+ private static final String SECOND_REQUEST_ID = "e2011670-0e1a-4b74-945d-8bf5aede1d9c";
+ private static final String THIRD_REQUEST_ID = "f3011670-0e1a-4b74-945d-8bf5aede1d9c";
+ private static final String SERVICE_INSTANCE_ID = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ private static final String MSO_COMPLETE_STATUS = "COMPLETE";
+ private static final String MSO_FAILED_STATUS = "FAILED";
+
+
+ @DataProvider
+ public static Object[][] scenarios() {
+ return new Object[][]{
+ {Scenario.PARALLEL},
+ {Scenario.COMPLETED},
+// {Scenario.NAME_TAKEN}, Not relevant because the name uniqueness is supported only for bulk in Macro
+// {Scenario.DUPLICATE_NAME}, Not relevant because name duplication is not handled in A La Carte
+ {Scenario.IN_PROGRESS},
+ {Scenario.MSO_FAIL}
+ };
+ }
+
+ @AfterMethod
+ protected void dropAllFromNameCounter() {
+ AsyncJobsService asyncJobsService = new AsyncJobsService();
+ asyncJobsService.dropAllFromNameCounter();
+ }
+
+ @Test(dataProvider = "multipleVnfDataProvider")
+ public void deployServiceFromCypress__multipleVnfsAndNetwork(String expectedStatus, JobStatus expectedJobStatus) {
+ dropAllFromNameCounter();// needed because each data provider info not going to after method
+ final ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "serviceInstanceName");
+
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(
+ new PresetMSOCreateServiceInstanceMultipleVnfsServiceCypress(names, 0, DEFAULT_REQUEST_ID),
+ new PresetMSOCreateVnfALaCarteServiceCypress(FIRST_REQUEST_ID, SERVICE_INSTANCE_ID,"VFvGeraldine00001", "zzz1"),
+ new PresetMSOCreateVnfALaCarteServiceCypress(SECOND_REQUEST_ID, SERVICE_INSTANCE_ID,"VFvGeraldine00001_001", "ONAP"),
+ new PresetMSOCreateNetworkALaCarteServiceCypress2(THIRD_REQUEST_ID, SERVICE_INSTANCE_ID, "ExtVL")
+ );
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet(expectedStatus.equals("SERVICE_FAILED") ? MSO_FAILED_STATUS : MSO_COMPLETE_STATUS, DEFAULT_REQUEST_ID),
+ new PresetMSOOrchestrationRequestGet( MSO_COMPLETE_STATUS, FIRST_REQUEST_ID, "First VNF instance was created successfully." ),
+ new PresetMSOOrchestrationRequestGet(expectedStatus, SECOND_REQUEST_ID, expectedStatus.equals(MSO_COMPLETE_STATUS)?"Second VNF instance was created successfully.": MSO_BASE_ERROR),
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, THIRD_REQUEST_ID,"Network was created successfully.")
+ );
+ List<BasePreset> presets = getPresets( createPresets, inProgressPresets);
+
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ registerExpectationFromPreset(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC, RegistrationStrategy.APPEND);
+
+ final List<String> uuids = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_MULTIPLE_VNF_NETWORK_REQUEST_CYPRESS);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ //expected vid statuses
+ ImmutableList<JobAuditStatus> vidAuditStatuses;
+
+ if (expectedStatus.equals(MSO_COMPLETE_STATUS)){
+ vidAuditStatuses = vidAuditStatusesCompleted(jobId);
+ } else if (expectedStatus.equals("SERVICE_FAILED")){
+ vidAuditStatuses = vidAuditStatusesFailed(jobId);
+ } else {
+ vidAuditStatuses = vidAuditStatusesCompletedWithErrors(jobId);
+ }
+
+ assertServiceInfoSpecific3(jobId, expectedJobStatus , names.get(SERVICE_NAME));
+ assertAuditStatuses(jobId, vidAuditStatuses, null);
+ }
+
+
+ @DataProvider
+ Object[][] multipleVnfDataProvider() {
+ return new Object[][]{{MSO_FAILED_STATUS, JobStatus.COMPLETED_WITH_ERRORS},{MSO_COMPLETE_STATUS, JobStatus.COMPLETED}, {"SERVICE_FAILED", JobStatus.FAILED}};
+ }
+
+ @Test
+ @FeatureTogglingTest(Features.FLAG_1902_VNF_GROUPING)
+ public void deploy1ServiceWith1VnfGroup() {
+ final ImmutableMap<PresetMSOServiceInstanceGen2WithNames.Keys, String> names = ImmutableMap.of(SERVICE_NAME, "Grouping_Service_Instance");
+ String serviceReqId = "3cf5ea96-6b34-4945-b5b1-4a7798b1caf2";
+ String serviceInstanceId = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ String instanceGroupReqId = "715a5106-cdcc-44ee-8923-83d68a896908";
+
+ List<PresetMSOBaseCreateInstancePost> createPresets = ImmutableList.of(
+ new PresetMSOCreateServiceInstanceGen2WithNamesAlacarteGroupingService(names, 0, serviceReqId),
+ new PresetMSOCreateVnfGroup("ABC", instanceGroupReqId, PresetMSOCreateVnfGroup.MODEL_INFO_1, serviceInstanceId, false));
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet("COMPLETE", serviceReqId),
+ new PresetMSOOrchestrationRequestGet("COMPLETE", instanceGroupReqId, "Instance group was created successfully."));
+ List<BasePreset> presets = getPresets(createPresets, inProgressPresets);
+
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+
+ final List<String> uuids = createBulkOfInstances(false, 1, names, CREATE_BULK_OF_ALACARTE_REQUEST_WITH_VNF_GROUP);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertExpectedStatusAndServiceInfo(JobStatus.COMPLETED, jobId, new ServiceInfo(
+ "us16807000", JobStatus.COMPLETED, false,
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc", "WayneHolland", "WATKINS",
+ null, null,
+ null, null,
+ null, null,
+ "TYLER SILVIA", "SILVIA ROBBINS",
+ null, names.get(SERVICE_NAME),
+ "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "Grouping Service for Test", "1.0",
+ jobId, null, ServiceAction.INSTANTIATE, false));
+
+
+ assertAuditStatuses(jobId, vidAuditStatusesCompleted(jobId),null);
+
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(createPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(createPresets.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(1).getReqPath(), 1L)));
+ }
+
+ @DataProvider
+ public static Object[][] addAndDeleteMembersMsoStatus() {
+ return new Object[][]{
+ {MSO_COMPLETE_STATUS, MSO_COMPLETE_STATUS, JobStatus.COMPLETED},
+ {MSO_FAILED_STATUS, MSO_FAILED_STATUS, JobStatus.FAILED},
+ {MSO_COMPLETE_STATUS, MSO_FAILED_STATUS, JobStatus.COMPLETED_WITH_ERRORS}
+ };
+ }
+
+ @Test(dataProvider = "addAndDeleteMembersMsoStatus")
+ @FeatureTogglingTest(Features.FLAG_1902_VNF_GROUPING)
+ public void add1delete1GroupMembers_withGoodResponseFromMso_verifyStatusAndRequests(String firstMemberStatus, String secondMemberStatus, JobStatus expectedJobStatus) {
+
+ String firstMemberRequestId = UUID.randomUUID().toString();
+ String secondMemberRequestId = UUID.randomUUID().toString();
+
+ List<PresetMSOAddOrRemoveOneInstanceGroupMember> instanceGroupMemberPreset = ImmutableList.of(
+ new PresetMSOAddOrRemoveOneInstanceGroupMember("VNF_GROUP1_INSTANCE_ID", "RELATED_VNF1_INSTANCE_ID", getUserCredentials().getUserId(), firstMemberRequestId, InstanceGroupMemberAction.Add),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember("VNF_GROUP1_INSTANCE_ID", "RELATED_VNF2_INSTANCE_ID", getUserCredentials().getUserId(), secondMemberRequestId, InstanceGroupMemberAction.Remove)
+ );
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet(firstMemberStatus, firstMemberRequestId),
+ new PresetMSOOrchestrationRequestGet(secondMemberStatus, secondMemberRequestId)
+ );
+
+ List<BasePreset> presets = getGroupMembersPresets(instanceGroupMemberPreset,inProgressPresets);
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(
+ VNF_GROUP1_ACTION, "None",
+ RELATED_VNF1_ACTION, "Create",
+ RELATED_VNF2_ACTION, "None_Delete"
+ ), PAYLOAD_TEMPLATE_1_VNF_GROUP_WITH_3_MEMBERS_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertAuditStatuses(jobId, vidAuditStatuses(jobId, expectedJobStatus), null, 60);
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(instanceGroupMemberPreset.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(instanceGroupMemberPreset.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(1).getReqPath(), 1L)
+ ));
+ }
+
+ @Test
+ @FeatureTogglingTest(Features.FLAG_1902_VNF_GROUPING)
+ public void addVnfGroupWith2GroupMembers_withGoodResponseFromMso_verifyStatusAndRequests() {
+
+ String vnfGroupRequestId = UUID.randomUUID().toString();
+ String firstMemberRequestId = UUID.randomUUID().toString();
+ String secondMemberRequestId = UUID.randomUUID().toString();
+
+ List <PresetMSOCreateVnfGroup> vnfGroupPreset = ImmutableList.of(
+ new PresetMSOCreateVnfGroup("VNF_GROUP1_INSTANCE_NAME",vnfGroupRequestId,PresetMSOCreateVnfGroup.MODEL_INFO_0,"service-instance-id", true));
+ List<PresetMSOAddOrRemoveOneInstanceGroupMember> instanceGroupMemberPreset = ImmutableList.of(
+ new PresetMSOAddOrRemoveOneInstanceGroupMember("VNF_GROUP1_INSTANCE_ID", "RELATED_VNF1_INSTANCE_ID", getUserCredentials().getUserId(), firstMemberRequestId, InstanceGroupMemberAction.Add),
+ new PresetMSOAddOrRemoveOneInstanceGroupMember("VNF_GROUP1_INSTANCE_ID", "RELATED_VNF2_INSTANCE_ID", getUserCredentials().getUserId(), secondMemberRequestId, InstanceGroupMemberAction.Add)
+ );
+ List<PresetMSOOrchestrationRequestGet> inProgressPresets = ImmutableList.of(
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, vnfGroupRequestId),
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, firstMemberRequestId),
+ new PresetMSOOrchestrationRequestGet(MSO_COMPLETE_STATUS, secondMemberRequestId)
+ );
+
+ final ImmutableList.Builder<BasePreset> basePresetBuilder = new ImmutableList.Builder<>();
+ basePresetBuilder
+ .add(new PresetGetSessionSlotCheckIntervalGet())
+ .add(new PresetAAIGetSubscribersGet())
+ .addAll(instanceGroupMemberPreset)
+ .addAll(inProgressPresets)
+ .addAll(vnfGroupPreset);
+ List<BasePreset> presets = basePresetBuilder.build();
+
+ registerExpectationFromPresets(presets, RegistrationStrategy.CLEAR_THEN_SET);
+ final List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(
+ VNF_GROUP1_ACTION, "Create",
+ RELATED_VNF1_ACTION, "Create",
+ RELATED_VNF2_ACTION, "Create"
+ ), PAYLOAD_TEMPLATE_1_VNF_GROUP_WITH_3_MEMBERS_REQUEST);
+
+ assertThat(uuids, hasSize(1));
+ final String jobId = uuids.get(0);
+
+ assertAuditStatuses(jobId, vidAuditStatusesCompleted(jobId), null, 60);
+ assertThat(SimulatorApi.retrieveRecordedRequestsPathCounter(), allOf(
+ TestUtils.hasOrLacksOfEntry(vnfGroupPreset.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(instanceGroupMemberPreset.get(0).getReqPath(), 2L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(0).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(1).getReqPath(), 1L),
+ TestUtils.hasOrLacksOfEntry(inProgressPresets.get(2).getReqPath(), 1L)
+ ));
+ }
+
+ @Test(dataProvider = "scenarios")
+ public void aLaCarteServiceScenarioRunner(Scenario scenario) {
+ /*
+ This tests creates one or more a-la-carte requests, following one of the these scenarios:
+
+ MSO_FAIL: Submits to MSO, but while getting Orchestration status -> MSO
+ reports failure
+ COMPLETED: Clean legit flow.
+ NAME_TAKEN: Sends request for instance, where AAI reports the name is
+ already taken. Therefore, MSO expects added postfix _001.
+ IN_PROGRESS: Submits to MSO, but while getting Orchestration status -> MSO
+ reports IN_PROGRESS endlessly
+ DUPLICATE_NAME: Sends two requests for instances with the same name.
+ PARALLEL: Submits 3 requests, that must not interfere with each other.
+ */
+
+ registerExpectationFromPresets(ImmutableList.of(
+ new PresetGetSessionSlotCheckIntervalGet(),
+ new PresetAAIGetSubscribersGet()
+ ), RegistrationStrategy.CLEAR_THEN_SET);
+
+
+ final String name0 = randomAlphabetic(18);
+
+ OneServiceActor inProgressCase = new OneServiceActor(
+ scenario == Scenario.PARALLEL || scenario == Scenario.IN_PROGRESS || scenario == Scenario.DUPLICATE_NAME,
+ "IN_PROGRESS", "status #1",
+ ImmutableMap.of(SERVICE_NAME, name0), 0,
+ JobStatus.IN_PROGRESS, this::vidAuditStatusesInProgress
+ );
+
+ OneServiceActor completedCase = new OneServiceActor(
+ scenario == Scenario.PARALLEL || scenario == Scenario.COMPLETED,
+ MSO_COMPLETE_STATUS, "status #2",
+ ImmutableMap.of(SERVICE_NAME, randomAlphabetic(5)), 0,
+ JobStatus.COMPLETED, this::vidAuditStatusesCompleted
+ );
+
+ final String name1 = randomAlphabetic(5);
+ OneServiceActor occupiedNameCase = new OneServiceActor(
+ scenario == Scenario.NAME_TAKEN,
+ MSO_COMPLETE_STATUS, "status #6",
+ ImmutableMap.of(SERVICE_NAME, name1), 1,
+ JobStatus.COMPLETED, this::vidAuditStatusesCompleted,
+ ImmutableList.of(new PresetAAISearchNodeQueryNonEmptyResult("service-instance", name1))
+ );
+
+ OneServiceActor failedCase = new OneServiceActor(
+ scenario == Scenario.PARALLEL || scenario == Scenario.MSO_FAIL,
+ "FAILED", "status #3",
+ ImmutableMap.of(SERVICE_NAME, randomAlphabetic(10)), 0,
+ JobStatus.FAILED, this::vidAuditStatusesFailed
+ );
+
+ OneServiceActor duplicateNameCase = new OneServiceActor(
+ scenario == Scenario.DUPLICATE_NAME,
+ MSO_COMPLETE_STATUS, "status #4",
+ ImmutableMap.of(SERVICE_NAME, name0), 1,
+ JobStatus.COMPLETED, this::vidAuditStatusesCompleted
+ );
+
+ OneServiceActor inProgressTooLongCase = new OneServiceActor(
+ scenario == Scenario.IN_PROGRESS,
+ "IN_PROGRESS", "status #5",
+ ImmutableMap.of(SERVICE_NAME, randomAlphabetic(10)), 0,
+ JobStatus.FAILED, this::vidAuditStatusesFailed, 24
+ );
+
+ final List<OneServiceActor> servicesActors =
+ ImmutableList.of(inProgressCase, completedCase, occupiedNameCase, failedCase, duplicateNameCase, inProgressTooLongCase);
+
+ servicesActors.forEach(actor -> registerExpectationFromPresets(actor.getPresets(),
+ RegistrationStrategy.APPEND));
+
+ servicesActors.forEach(OneServiceActor::createInstances);
+
+ servicesActors.forEach(OneServiceActor::assertServiceInfo);
+ servicesActors.forEach(OneServiceActor::assertAuditStatuses2);
+ }
+
+ @Test
+ public void delete1Create1NetworkFromService() {
+ String deleteRequestId = UUID.randomUUID().toString();
+ String createRequestId = UUID.randomUUID().toString();
+ String serviceInstanceId = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ String networkInstanceId = "NETWORK_INSTANCE_ID";
+
+ registerExpectationFromPresets(ImmutableList.of(
+ new PresetMSODeleteNetworkAlaCarteCypress(deleteRequestId, serviceInstanceId, networkInstanceId, "us16807000"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteRequestId),
+ new PresetMSOCreateNetworkALaCarteServiceCypress2(createRequestId, serviceInstanceId, "ExtVL", "action-data", "6b528779-44a3-4472-bdff-9cd15ec93450"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, createRequestId),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC
+ ), RegistrationStrategy.CLEAR_THEN_SET);
+
+ List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_AND_CREATE_NETWORK_FROM_SERVICE);
+ assertThat(uuids, hasSize(1));
+ String jobId = uuids.get(0);
+
+ assertExpectedStatusAndServiceInfo(JobStatus.COMPLETED, jobId, true, new ServiceInfo(
+ "us16807000", JobStatus.COMPLETED, false,
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc", "WayneHolland", "WATKINS",
+ "JAG1", "YUDFJULP-JAG1",
+ "092eb9e8e4b7412e8787dd091bc58e86", "USP-SIP-IC-24335-T-01",
+ "JANET25", null,
+ "TYLER SILVIA", null,
+ null, "InstanceName",
+ "6b528779-44a3-4472-bdff-9cd15ec93450", "action-data", "1.0",
+ jobId, null, ServiceAction.UPDATE, false)
+ );
+ }
+
+ @Test
+ public void deleteServiceWithNetwork() {
+ String deleteNetworkRequestId = UUID.randomUUID().toString();
+ String deleteServiceRequestId = UUID.randomUUID().toString();
+ String serviceInstanceId = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ String networkInstanceId = "NETWORK_INSTANCE_ID";
+
+ registerExpectationFromPresets(ImmutableList.of(
+ new PresetMSODeleteNetworkAlaCarteCypress(deleteNetworkRequestId, serviceInstanceId, networkInstanceId, "us16807000"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteNetworkRequestId),
+ new PresetMSODeleteService(deleteServiceRequestId, serviceInstanceId),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteServiceRequestId),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC
+ ), RegistrationStrategy.CLEAR_THEN_SET);
+
+ List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_SERVICE_WITH_NETWORK);
+ assertThat(uuids, hasSize(1));
+ String jobId = uuids.get(0);
+
+ assertExpectedStatusAndServiceInfo(JobStatus.COMPLETED, jobId, true, new ServiceInfo(
+ "us16807000", JobStatus.COMPLETED, false,
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc", "WayneHolland", "WATKINS",
+ "JAG1", "YUDFJULP-JAG1",
+ "092eb9e8e4b7412e8787dd091bc58e86", "USP-SIP-IC-24335-T-01",
+ "JANET25", null,
+ "TYLER SILVIA", null,
+ null, "InstanceName",
+ "6b528779-44a3-4472-bdff-9cd15ec93450", "action-data", "1.0",
+ jobId, null, ServiceAction.DELETE, false)
+ );
+ }
+
+ @Test
+ public void delete1VnfWithVfModulesAndCreate1VnfFromService() {
+ String deleteVnfRequestId = UUID.randomUUID().toString();
+ String createVnfRequestId = UUID.randomUUID().toString();
+ String deleteVfModuleRequestId = UUID.randomUUID().toString();
+ String deleteBaseVfModuleRequestId = UUID.randomUUID().toString();
+ String serviceInstanceId = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ String vnfInstanceId = "VNF_INSTANCE_ID";
+
+ registerExpectationFromPresets(ImmutableList.of(
+ new PresetAAIGetSubscribersGet(),
+ new PresetMSODeleteVnfAlaCarteCypress(deleteVnfRequestId, serviceInstanceId, vnfInstanceId, "us16807000"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteVnfRequestId),
+ new PresetSDCGetServiceToscaModelGet("6b528779-44a3-4472-bdff-9cd15ec93450", "csar-withDynamicFields-ecompNamingFalse-partialModelDetails-vnfEcompNamingFalse.zip"),
+ new PresetSDCGetServiceMetadataGet("6b528779-44a3-4472-bdff-9cd15ec93450", "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0" , "csar-withDynamicFields-ecompNamingFalse-partialModelDetails-vnfEcompNamingFalse.zip"),
+ new PresetMSODeleteVfModuleCypress(deleteVfModuleRequestId, serviceInstanceId, vnfInstanceId, "VF_MODULE_INSTANCE_ID"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteVfModuleRequestId),
+ new PresetMSODeleteBaseVfModuleCypress(deleteBaseVfModuleRequestId, serviceInstanceId, vnfInstanceId, "VF_MODULE_BASE_INSTANCE_ID"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteBaseVfModuleRequestId),
+ new PresetMSOCreateVnfALaCarteServiceCypress2(createVnfRequestId, serviceInstanceId, "2017388_PASQUALEvPEmCaNkinstanceName", "zzz1"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, createVnfRequestId),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_SOME_LEGACY_REGION_TO_ATT_AIC,
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC,
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_AAIAIC25_TO_ATT_AIC
+ ), RegistrationStrategy.CLEAR_THEN_SET);
+
+ List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_AND_CREATE_VNF_FROM_SERVICE);
+ assertThat(uuids, hasSize(1));
+ String jobId = uuids.get(0);
+
+ assertExpectedStatusAndServiceInfo(JobStatus.COMPLETED, jobId, true, new ServiceInfo(
+ "us16807000", JobStatus.COMPLETED, false,
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc", "WayneHolland", "WATKINS",
+ "NFT1", "NFTJSSSS-NFT1",
+ "bae71557c5bb4d5aac6743a4e5f1d054", "AIN Web Tool-15-D-testalexandria",
+ "hvf6", null,
+ "TYLER SILVIA", null,
+ "f8791436-8d55-4fde-b4d5-72dd2cf13cfb", "mCaNkinstancename",
+ "6b528779-44a3-4472-bdff-9cd15ec93450", "action-data", "1.0",
+ jobId, null, ServiceAction.UPDATE, false)
+ );
+ }
+
+ @Test
+ public void deleteServiceWithVnf() {
+ String deleteVnfRequestId = UUID.randomUUID().toString();
+ String deleteServiceRequestId = UUID.randomUUID().toString();
+ String serviceInstanceId = BaseMSOPreset.DEFAULT_INSTANCE_ID;
+ String vnfInstanceId = "VNF_INSTANCE_ID";
+
+ registerExpectationFromPresets(ImmutableList.of(
+ new PresetMSODeleteVnfAlaCarteCypress(deleteVnfRequestId, serviceInstanceId, vnfInstanceId, "us16807000"),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteVnfRequestId),
+ new PresetMSODeleteService(deleteServiceRequestId, serviceInstanceId),
+ new PresetMSOOrchestrationRequestGet(COMPLETE, deleteServiceRequestId),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_SOME_LEGACY_REGION_TO_ATT_AIC
+ ), RegistrationStrategy.CLEAR_THEN_SET);
+
+ List<String> uuids = createBulkOfInstances(false, 1, ImmutableMap.of(), DELETE_SERVICE_WITH_VNF);
+ assertThat(uuids, hasSize(1));
+ String jobId = uuids.get(0);
+
+ assertExpectedStatusAndServiceInfo(JobStatus.COMPLETED, jobId, true, new ServiceInfo(
+ "us16807000", JobStatus.COMPLETED, false,
+ "d61e6f2d-12fa-4cc2-91df-7c244011d6fc", "WayneHolland", "WATKINS",
+ "NFT1", "NFTJSSSS-NFT1",
+ "bae71557c5bb4d5aac6743a4e5f1d054", "AIN Web Tool-15-D-testalexandria",
+ "hvf6", null,
+ "TYLER SILVIA", null,
+ "f8791436-8d55-4fde-b4d5-72dd2cf13cfb", "mCaNkinstancename",
+ "6b528779-44a3-4472-bdff-9cd15ec93450", "action-data", "1.0",
+ jobId, null, ServiceAction.DELETE, false)
+ );
+ }
+
+ private ImmutableList<JobAuditStatus> vidAuditStatusesInProgress(String jobId) {
+ return ImmutableList.of(
+ vidAuditStatus(jobId, "PENDING", false),
+ vidAuditStatus(jobId, "IN_PROGRESS", false)
+ );
+ }
+
+ private ImmutableList<JobAuditStatus> vidAuditStatusesCompleted(String jobId) {
+ return ImmutableList.of(
+ vidAuditStatus(jobId, "PENDING", false),
+ vidAuditStatus(jobId, "IN_PROGRESS", false),
+ vidAuditStatus(jobId, "COMPLETED", true)
+ );
+ }
+
+ private ImmutableList<JobAuditStatus> vidAuditStatuses(String jobId, JobStatus jobStatus) {
+ switch(jobStatus) {
+ case COMPLETED:
+ return vidAuditStatusesCompleted(jobId);
+ case COMPLETED_WITH_ERRORS:
+ return vidAuditStatusesCompletedWithErrors(jobId);
+ case FAILED:
+ return vidAuditStatusesFailed(jobId);
+ case IN_PROGRESS:
+ return vidAuditStatusesInProgress(jobId);
+ }
+
+ return null;
+ }
+
+ private ImmutableList<JobAuditStatus> msoAuditStatuses(String jobId , String lastStatus, String lastAdditionalInfo) {
+ final List<JobAuditStatus> auditMsoStatuses = getAuditStatuses(jobId, SourceStatus.MSO.name());
+ final UUID actualRequestId = auditMsoStatuses.get(0).getRequestId();
+ return ImmutableList.of(
+ msoAuditStatus(jobId, "REQUESTED", null, actualRequestId),
+ msoAuditStatus(jobId, lastStatus, lastAdditionalInfo, actualRequestId)
+ );
+ }
+
+ private JobAuditStatus msoAuditStatus(String jobId, String jobStatus, String additionalInfo, UUID requestId) {
+ return new JobAuditStatus(UUID.fromString(jobId), jobStatus, SourceStatus.MSO, requestId, additionalInfo, false);
+ }
+
+ private void assertServiceInfoSpecific3(String jobId, JobStatus jobStatus, String serviceInstanceName) {
+ assertExpectedStatusAndServiceInfo(jobStatus, jobId, true, new ServiceInfo(
+ "us16807000", jobStatus, false,
+ "aaa1", "aaa1", "yyy1",
+ "YYY1", "UUUAIAAI-YYY1",
+ "1178612d2b394be4834ad77f567c0af2", "AIN Web Tool-15-D-SSPtestcustome",
+ "hvf6", null,
+ "TYLER SILVIA", null,
+ null, serviceInstanceName,
+ "6e59c5de-f052-46fa-aa7e-2fca9d674c44", "ComplexService", "1.0",
+ jobId, null, ServiceAction.INSTANTIATE, false)
+ );
+ }
+
+ private List<BasePreset> getGroupMembersPresets(List<PresetMSOAddOrRemoveOneInstanceGroupMember> deleteMembersPreset, List<PresetMSOOrchestrationRequestGet> inProgressPresets) {
+ final ImmutableList.Builder<BasePreset> basePresetBuilder = new ImmutableList.Builder<>();
+ basePresetBuilder
+ .add(new PresetGetSessionSlotCheckIntervalGet())
+ .add(new PresetAAIGetSubscribersGet())
+ .addAll(deleteMembersPreset)
+ .addAll(inProgressPresets);
+ return basePresetBuilder.build();
+ }
+
+
+ enum Scenario {
+ PARALLEL, COMPLETED, NAME_TAKEN, DUPLICATE_NAME, IN_PROGRESS, MSO_FAIL
+ }
+
+ class OneServiceActor {
+ private final boolean isRelevant;
+ private final String requestId;
+ private final String msoInfo;
+ private final Map<PresetMSOServiceInstanceGen2WithNames.Keys, String> serviceNames;
+ private final int suffix;
+ private final String expectedMsoLastStatus;
+ private final JobStatus jobStatus;
+ private final Function<String, List<JobAuditStatus>> jobAuditStatusesProvider;
+ private String jobId;
+ private int startedHoursAgo = 1;
+ private List<BasePreset> morePresets = ImmutableList.of();
+
+ private OneServiceActor(boolean isRelevant, String msoLastStatus, String msoInfo, Map<PresetMSOServiceInstanceGen2WithNames.Keys, String> serviceNames, int suffix, JobStatus jobStatus, Function<String, List<JobAuditStatus>> jobAuditStatusesProvider) {
+ this.isRelevant = isRelevant;
+ this.requestId = UUID.randomUUID().toString();
+ this.msoInfo = msoInfo;
+ this.serviceNames = serviceNames;
+ this.suffix = suffix;
+ this.expectedMsoLastStatus = msoLastStatus;
+ this.jobStatus = jobStatus;
+ this.jobAuditStatusesProvider = jobAuditStatusesProvider;
+ }
+
+ private OneServiceActor(boolean isRelevant, String msoLastStatus, String msoInfo, Map<PresetMSOServiceInstanceGen2WithNames.Keys, String> serviceNames, int suffix, JobStatus jobStatus, Function<String, List<JobAuditStatus>> jobAuditStatusesProvider, int startedHoursAgo) {
+ this(isRelevant, msoLastStatus, msoInfo, serviceNames, suffix, jobStatus, jobAuditStatusesProvider);
+ this.startedHoursAgo = startedHoursAgo;
+ }
+
+ private OneServiceActor(boolean isRelevant, String msoLastStatus, String msoInfo, Map<PresetMSOServiceInstanceGen2WithNames.Keys, String> serviceNames, int suffix, JobStatus jobStatus, Function<String, List<JobAuditStatus>> jobAuditStatusesProvider, List<BasePreset> morePresets) {
+ this(isRelevant, msoLastStatus, msoInfo, serviceNames, suffix, jobStatus, jobAuditStatusesProvider);
+ this.morePresets = morePresets;
+ }
+
+ public List<BasePreset> getPresets() {
+ // if not relevant -> return empty list
+ return isRelevant ?
+ ImmutableList.<BasePreset>builder().add(
+ new PresetMSOCreateServiceInstanceGen2WithNamesAlacarteService(serviceNames, suffix, requestId),
+ new PresetMSOOrchestrationRequestGet(expectedMsoLastStatus, requestId, msoInfo, startedHoursAgo)
+ ).addAll(morePresets).build()
+ : ImmutableList.of();
+ }
+
+ private void createInstances() {
+ // call VID with 1 request, keep the job id
+ if (!isRelevant) return;
+ final List<String> jobIds = createBulkOfInstances(false, 1, serviceNames, CREATE_BULK_OF_ALACARTE_REQUEST);
+ assertThat(jobIds, hasSize(1));
+ jobId = jobIds.get(0);
+ }
+
+ private void assertServiceInfo() {
+ if (!isRelevant) return;
+ assertThat(jobId, is(not(nullValue())));
+ assertServiceInfoSpecific1(jobId, jobStatus, serviceNames.get(SERVICE_NAME));
+ }
+
+ private void assertAuditStatuses2() {
+ if (!isRelevant) return;
+ assertThat(jobId, is(not(nullValue())));
+ assertAuditStatuses(jobId, jobAuditStatusesProvider.apply(jobId), msoAuditStatuses(jobId, expectedMsoLastStatus, msoInfo));
+ }
+ }
+
+}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java
index a5b72c261..5c4d8a876 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/AsyncInstantiationApiTest.java
@@ -1,27 +1,22 @@
package org.onap.vid.api;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
import net.bytebuddy.utility.RandomString;
import net.javacrumbs.jsonunit.JsonAssert;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.CoreMatchers;
-import org.hamcrest.Description;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAISearchNodeQueryEmptyResult;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
import org.onap.simulator.presetGenerator.presets.mso.*;
import org.onap.vid.model.asyncInstantiation.JobAuditStatus;
import org.onap.vid.model.asyncInstantiation.ServiceInfo;
-import org.onap.vid.model.mso.MsoResponseWrapper2;
-import org.springframework.core.ParameterizedTypeReference;
+import org.onap.sdc.ci.tests.datatypes.UserCredentials;
import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.RestTemplate;
+import org.springframework.web.client.HttpServerErrorException;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -32,76 +27,33 @@ import vid.automation.test.model.JobStatus;
import vid.automation.test.services.SimulatorApi;
import java.util.*;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
+import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.IntStream;
import java.util.stream.Stream;
-import static java.lang.Boolean.FALSE;
-import static java.lang.Boolean.TRUE;
import static java.util.stream.Collectors.*;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasProperty;
import static org.hamcrest.Matchers.hasSize;
import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys;
-import static org.testng.Assert.assertNotNull;
+import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertTrue;
+import static vid.automation.test.infra.Features.FLAG_1906_INSTANTIATION_API_USER_VALIDATION;
+import static vid.automation.test.utils.ExtendedHamcrestMatcher.hasItemsFromCollection;
@FeatureTogglingTest({Features.FLAG_ASYNC_JOBS, Features.FLAG_ASYNC_INSTANTIATION})
-public class AsyncInstantiationApiTest extends BaseMsoApiTest {
+public class AsyncInstantiationApiTest extends AsyncInstantiationBase {
+ private static final Logger logger = LogManager.getLogger(AsyncInstantiationApiTest.class);
- private static final String CREATE_BULK_OF_MACRO_REQUEST = "asyncInstantiation/vidRequestCreateBulkOfMacro.json";
-
- @DataProvider
- public static Object[][] trueAndFalse() {
- return new Object[][]{{TRUE},{FALSE}};
- }
-
- private String getCreateBulkUri() {
- return uri.toASCIIString() + "/asyncInstantiation/bulk";
- }
-
- private String getHideServiceUri(String jobId) {
- return uri.toASCIIString() + "/asyncInstantiation/hide/"+jobId;
- }
-
- private String getServiceInfoUrl() {
- return uri.toASCIIString() + "/asyncInstantiation";
- }
-
- private String getJobAuditUrl() {
- return uri.toASCIIString() + "/asyncInstantiation/auditStatus/{JOB_ID}?source={SOURCE}";
- }
-
- private String getDeleteServiceUrl(String uuid) {
- return uri.toASCIIString() + "/asyncInstantiation/job/" + uuid;
- }
-
- public static class JobIdAndStatusMatcher extends BaseMatcher<ServiceInfo> {
- private String expectedJobId;
-
- public JobIdAndStatusMatcher(String expectedJobId) {
- this.expectedJobId = expectedJobId;
- }
-
- @Override
- public boolean matches(Object item) {
- if (!(item instanceof ServiceInfo)) {
- return false;
- }
- ServiceInfo serviceInfo = (ServiceInfo) item;
- return expectedJobId.equals(serviceInfo.jobId);
- }
-
- @Override
- public void describeTo(Description description) {
- description.appendText("failed to find job with uuid ")
- .appendValue(expectedJobId);
- }
- }
+ private static final String MSO_BASE_ERROR =
+ "Received error from SDN-C: java.lang.IllegalArgumentException: All keys must be specified for class org."+
+ "opendaylight.yang.gen.v1.org.onap.sdnc.northbound.generic.resource.rev170824.vf.module.assignments.vf."+
+ "module.assignments.vms.VmKey. Missing key is getVmType. Supplied key is VmKey [].";
+ private static final String MSO_ERROR = MSO_BASE_ERROR + StringUtils.repeat(" and a lot of sentences for long message", 60);
+ private static final String INSTANCE_GROUP_ID_LABEL = "instanceGroupId";
+ private static final String INSTANCE_GROUP_LABEL = "instanceGroup";
@Test
public void createBulkOfCreateInstances(){
@@ -111,40 +63,6 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
createBulkOfInstancesAndAssert(presets, false, bulkSize, JobStatus.COMPLETED, names);
}
- private Map<Keys,String> generateNames() {
- return Stream.of(Keys.values()).collect(
- Collectors.toMap(x->x, x -> UUID.randomUUID().toString().replace("-","")));
- }
-
- private ImmutableList<BasePreset> addPresetsForCreateBulkOfCreateInstances(int bulkSize, Map<Keys, String> names){
- ImmutableList<BasePreset> msoBulkPresets = IntStream.rangeClosed(1,bulkSize).
- mapToObj(i-> new PresetMSOCreateServiceInstanceGen2WithNames(names, i))
- .collect(ImmutableList.toImmutableList());
- ImmutableList<BasePreset> presets = new ImmutableList.Builder<BasePreset>()
- .add(new PresetGetSessionSlotCheckIntervalGet())
- .add(new PresetAAIGetSubscribersGet())
- .add(new PresetAAISearchNodeQueryEmptyResult())
- .addAll(msoBulkPresets)
- .add(new PresetMSOOrchestrationRequestGet())
- .build();
- return presets;
-
- }
-
- private ResponseEntity<List<JobAuditStatus>> auditStatusCall(String url) {
- return restTemplate.exchange(
- url,
- org.springframework.http.HttpMethod.GET,
- null,
- new ParameterizedTypeReference<List<JobAuditStatus>>() {});
- }
-
- @DataProvider
- public static Object[][] auditSources() {
- return new Object[][]{{JobAuditStatus.SourceStatus.VID},{JobAuditStatus.SourceStatus.MSO}};
- }
-
-
@Test(dataProvider = "auditSources")
public void getAuditStatus_nonExistingJobId_returnsEmptyList(JobAuditStatus.SourceStatus source){
List<JobAuditStatus> audits = getAuditStatuses(UUID.randomUUID().toString(), source.name());
@@ -170,13 +88,8 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
for(String jobId: jobIds) {
List<JobAuditStatus> actualVidAudits = getAuditStatuses(jobId, JobAuditStatus.SourceStatus.VID.name());
List<JobAuditStatus> expectedVidAudits = Stream.of(JobStatus.PENDING, JobStatus.IN_PROGRESS, JobStatus.COMPLETED)
- .map(status->new JobAuditStatus(UUID.fromString(jobId),
- status.name(),
- JobAuditStatus.SourceStatus.VID,
- null,
- null,
- status.equals(JobStatus.COMPLETED))).collect(toList());
- assertThat(actualVidAudits, is(expectedVidAudits));
+ .map(status-> vidAuditStatus(jobId, status.name(), status.equals(JobStatus.COMPLETED))).collect(toList());
+ assertThat(actualVidAudits, hasItemsFromCollection(expectedVidAudits));
List<JobAuditStatus> actualMsoAudits = getAuditStatuses(jobId, JobAuditStatus.SourceStatus.MSO.name());
List<JobAuditStatus> expectedMsoAudits = Stream.of("REQUESTED", "COMPLETE")
@@ -190,29 +103,6 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
}
}
- protected List<String> createBulkAndWaitForBeCompleted(int bulkSize){
- Map<Keys, String> names = generateNames();
- ImmutableList<BasePreset> presets = addPresetsForCreateBulkOfCreateInstances(bulkSize, names);
- final List<String> jobIds = createBulkOfInstances(presets, false, bulkSize, names);
- Assert.assertEquals(jobIds.size(),bulkSize);
-
- assertTrue(String.format("Not all services with ids: %s are in state completed after 30 sec",
- jobIds.stream().collect(joining(","))),
-
- Wait.waitFor(y-> serviceListCall().getBody().stream()
- .filter(si -> jobIds.contains(si.jobId))
- .filter(si -> si.jobStatus==JobStatus.COMPLETED)
- .count() == bulkSize,
- null, 30, 1 ));
- return jobIds;
- }
-
- private List<JobAuditStatus> getAuditStatuses(String jobUUID, String source){
- String url = getJobAuditUrl().replace("{JOB_ID}",jobUUID).replace("{SOURCE}", source);
- ResponseEntity<List<JobAuditStatus>> statusesResponse = auditStatusCall(url);
- assertThat(statusesResponse.getStatusCode(), CoreMatchers.equalTo(HttpStatus.OK));
- return statusesResponse.getBody();
- }
@Test(expectedExceptions = HttpClientErrorException.class)
public void addBulkAndDeleteInProgress_deletionIsRejected(){
@@ -245,52 +135,6 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
assertThat("deleted job shall not be present in StatusInfo response", statusesNow, is(statusesBefore));
}
- private Map<String, JobStatus> addBulkAllPendingButOneInProgress(){
- return addBulkAllPendingButOneInProgress(3);
- }
-
- private Map<String, JobStatus> addBulkAllPendingButOneInProgress(int bulkSize){
- Map<Keys, String> names = generateNames();
- ImmutableList<BasePreset> msoBulkPresets = IntStream.rangeClosed(1,bulkSize)
- .mapToObj(i-> new PresetMSOCreateServiceInstanceGen2WithNames(names, i))
- .collect(ImmutableList.toImmutableList());
- ImmutableList<BasePreset> presets = new ImmutableList.Builder<BasePreset>()
- .add(new PresetGetSessionSlotCheckIntervalGet())
- .add(new PresetAAISearchNodeQueryEmptyResult())
- .add(new PresetAAIGetSubscribersGet())
- .addAll(msoBulkPresets)
- .add(new PresetMSOOrchestrationRequestGet("IN_PROGRESS"))
- .build();
- final List<String> jobIds = createBulkOfInstances(presets, false, bulkSize, names);
-
- // wait for single IN_PROGRESS, so statuses will stop from changing
- Wait.waitFor(foo -> serviceListCall().getBody().stream()
- .filter(si -> jobIds.contains(si.jobId))
- .anyMatch(si -> si.jobStatus.equals(JobStatus.IN_PROGRESS)),
- null, 20, 1);
-
- final Map<String, JobStatus> statusMapBefore = serviceListCall().getBody().stream()
- .filter(si -> jobIds.contains(si.jobId))
- .collect(toMap(si -> si.jobId, si -> si.jobStatus));
-
- assertThat(jobIds, hasSize(bulkSize));
-
-
- return statusMapBefore;
- }
-
- private String deleteOneJobHavingTheStatus(Map<String, JobStatus> jobIdToStatus, JobStatus jobStatus) {
- final String jobToDelete = jobIdToStatus.entrySet().stream()
- .filter(entry -> entry.getValue().equals(jobStatus))
- .map(Map.Entry::getKey)
- .findFirst().orElseThrow(() -> new AssertionError("no job in " + jobStatus + " state: " + jobIdToStatus));
-
-
- restTemplate.delete(getDeleteServiceUrl(jobToDelete));
-
- return jobToDelete;
- }
-
@Test(invocationCount = 3)
public void createBulkOfCreateInstancesWithSinglePreset_firstOneInProgressOtherArePending(){
final int bulkSize = 3;
@@ -306,7 +150,6 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
// PENDING: The other two jobs - named with _002 and _003 - are the still pending
assertThat(jobIds, hasSize(bulkSize));
assertThat(statuses.get(JobStatus.IN_PROGRESS), hasSize(1));
- assertThat(statuses.get(JobStatus.IN_PROGRESS), everyItem(hasProperty("serviceInstanceName", endsWith("_001"))));
assertThat(statuses.get(JobStatus.PENDING), hasSize(bulkSize - 1));
}
@@ -320,18 +163,16 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
//if there is a preset for create, service shall failed during in_progress (upon get status)
//it there is no preset for create, service shall failed during pending (upon create request)
List<BasePreset> msoBulkPresets = isPresetForCreate ?
- IntStream.rangeClosed(1,bulkSize)
- .mapToObj(i-> new PresetMSOCreateServiceInstanceGen2WithNames(names, i))
- .collect(ImmutableList.toImmutableList()) :
+ generateMsoCreateBulkPresets(bulkSize, names) :
new LinkedList<>();
ImmutableList<BasePreset> presets = new ImmutableList.Builder<BasePreset>()
.add(new PresetGetSessionSlotCheckIntervalGet())
.add(new PresetAAIGetSubscribersGet())
- .add(new PresetAAISearchNodeQueryEmptyResult())
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN3_TO_ATT_SABABA)
.addAll(msoBulkPresets)
.add(new PresetMSOOrchestrationRequestGet("FAILED"))
.build();
- List<String> jobIds = createBulkOfInstances(presets, false, bulkSize, names);
+ List<String> jobIds = createBulkOfMacroInstances(presets, false, bulkSize, names);
Assert.assertEquals(jobIds.size(),bulkSize);
boolean result = Wait.waitFor(x->{
List<ServiceInfo> serviceInfoList = serviceListCall().getBody();
@@ -346,13 +187,13 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
public void createBulkOfAssignInstances(){
Map<Keys, String> names = generateNames();
final int bulkSize = 2;
- ImmutableList<BasePreset> msoBulkPresets = IntStream.rangeClosed(1,bulkSize)
+ ImmutableList<BasePreset> msoBulkPresets = IntStream.rangeClosed(0, bulkSize-1)
.mapToObj(i-> new PresetMSOAssignServiceInstanceGen2WithNames(names, i))
.collect(ImmutableList.toImmutableList());
ImmutableList<BasePreset> presets = new ImmutableList.Builder<BasePreset>()
.add(new PresetGetSessionSlotCheckIntervalGet())
.add(new PresetAAIGetSubscribersGet())
- .add(new PresetAAISearchNodeQueryEmptyResult())
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN3_TO_ATT_SABABA)
.addAll(msoBulkPresets)
.add(new PresetMSOOrchestrationRequestGet())
.build();
@@ -364,13 +205,12 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
ImmutableList<BasePreset> presets = ImmutableList.of(
new PresetGetSessionSlotCheckIntervalGet(),
new PresetAAIGetSubscribersGet(),
- new PresetAAISearchNodeQueryEmptyResult(),
new PresetMSOServiceInstanceGen2ErrorResponse(406));
List<String> jobIds = createBulkOfInstancesAndAssert(presets, true,1, JobStatus.FAILED, generateNames());
String jobId = jobIds.get(0);
List<JobAuditStatus> actualMsoAudits = getAuditStatuses(jobId, JobAuditStatus.SourceStatus.MSO.name());
- JobAuditStatus expectedMsoAudit = new JobAuditStatus(UUID.fromString(jobId),"FAILED",JobAuditStatus.SourceStatus.MSO,
+ JobAuditStatus expectedMsoAudit = new JobAuditStatus(UUID.fromString(jobId), "FAILED", JobAuditStatus.SourceStatus.MSO,
null,
"Http Code:406, \"messageId\":\"SVC0002\",\"text\":\"JSON Object Mapping Request\"" ,
false);
@@ -378,6 +218,24 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
}
@Test
+ public void whenGetLongErrorMessageFromMso_ThenAuditFirst2000Chars() {
+ Map<Keys, String> names = generateNames();
+ ImmutableList<BasePreset> presets = ImmutableList.of(
+ new PresetGetSessionSlotCheckIntervalGet(),
+ new PresetAAIGetSubscribersGet(),
+ new PresetMSOCreateServiceInstanceGen2WithNames(names, 0),
+ new PresetMSOOrchestrationRequestGet("FAILED", PresetMSOOrchestrationRequestGet.DEFAULT_REQUEST_ID, MSO_ERROR));
+
+ List<String> jobIds = createBulkOfInstancesAndAssert(presets, false, 1, JobStatus.FAILED, names);
+ String jobId = jobIds.get(0);
+ List<JobAuditStatus> actualMsoAudits = getAuditStatuses(jobId, JobAuditStatus.SourceStatus.MSO.name());
+ Optional<JobAuditStatus> jobAuditStatus = actualMsoAudits.stream().filter(x -> x.getJobStatus().equals("FAILED")).findFirst();
+ assertTrue(jobAuditStatus.isPresent());
+ assertThat(jobAuditStatus.get().getAdditionalInfo(), startsWith(MSO_BASE_ERROR));
+ assertThat(jobAuditStatus.get().getAdditionalInfo().length(), is(2000));
+ }
+
+ @Test
public void whenHideCompletedService_thenServiceNotReturnInServiceList(){
List<String> services = createBulkAndWaitForBeCompleted(2);
hideService(services.get(0));
@@ -386,116 +244,14 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
assertThat(serviceInfoList, not(hasItem(services.get(0))));
}
- private MsoResponseWrapper2 hideService(String jobId) {
- MsoResponseWrapper2 responseWrapper2 = callMsoForResponseWrapper(org.springframework.http.HttpMethod.POST, getHideServiceUri(jobId), "");
- return responseWrapper2;
- }
-
- private List<String> createBulkOfInstancesAndAssert(ImmutableList<BasePreset> presets, boolean isPause, int bulkSize, JobStatus finalState, Map<Keys, String> names){
- List<String> jobIds = createBulkOfInstances(presets, isPause, bulkSize, names);
- Assert.assertEquals(jobIds.size(),bulkSize);
- for(String jobId: jobIds) {
- ServiceInfo expectedServiceInfo = new ServiceInfo("vid1", JobStatus.IN_PROGRESS, isPause, "someID",
- "someName", "myProject", "NFT1", "NFTJSSSS-NFT1", "greatTenant", "greatTenant", "mtn3", null,
- "mySubType", "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", null, names.get(Keys.SERVICE_NAME),
- "300adb1e-9b0c-4d52-bfb5-fa5393c4eabb", "AIM_TRANSPORT_00004", "1.0", jobId, null);
- JobInfoChecker jobInfoChecker = new JobInfoChecker(
- restTemplate, ImmutableSet.of(JobStatus.PENDING, JobStatus.IN_PROGRESS, finalState), jobId, expectedServiceInfo);
- boolean result = jobInfoChecker.test(null);
- assertTrue("service info of jobId: " + jobId + " was in status: " + jobInfoChecker.lastStatus, result);
-
- jobInfoChecker.setExpectedJobStatus(ImmutableSet.of(finalState));
- if (ImmutableList.of(JobStatus.COMPLETED, JobStatus.PAUSE).contains(finalState)) {
- expectedServiceInfo.serviceInstanceId = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
- }
- result = Wait.waitFor(jobInfoChecker, null, 20, 1);
- assertTrue("service info of jobId: " + jobId + " was in status: " + jobInfoChecker.lastStatus, result);
- }
-
- return jobIds;
- }
-
- private List<String> createBulkOfInstances(ImmutableList<BasePreset> presets, boolean isPause, int bulkSize, Map<Keys, String> names){
-
- SimulatorApi.registerExpectationFromPresets(presets, SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
-
- String requestBody = TestUtils.convertRequest(objectMapper, CREATE_BULK_OF_MACRO_REQUEST);
- requestBody = requestBody.replace("\"IS_PAUSE_VALUE\"", String.valueOf(isPause)).replace("\"BULK_SIZE\"", String.valueOf(bulkSize));
- for (Map.Entry<Keys, String> e : names.entrySet()) {
- requestBody = requestBody.replace(e.getKey().name(), e.getValue());
- }
- MsoResponseWrapper2 responseWrapper2 = callMsoForResponseWrapper(org.springframework.http.HttpMethod.POST, getCreateBulkUri(), requestBody);
- assertNotNull(responseWrapper2);
- return (List<String>)responseWrapper2.getEntity();
- }
-
- public class JobInfoChecker<Integer> implements Predicate<Integer> {
-
- private final RestTemplate restTemplate;
- private Set<JobStatus> expectedJobStatus;
- private ServiceInfo expectedServiceInfo;
- private final String jobId;
- private JobStatus lastStatus;
-
- public JobInfoChecker(RestTemplate restTemplate, Set<JobStatus> expectedJobStatus, String jobId, ServiceInfo expectedServiceInfo) {
- this.restTemplate = restTemplate;
- this.expectedJobStatus = expectedJobStatus;
- this.jobId = jobId;
- this.expectedServiceInfo = expectedServiceInfo;
- }
-
- public void setExpectedJobStatus(Set<JobStatus> expectedJobStatus) {
- this.expectedJobStatus = expectedJobStatus;
- }
-
- @Override
- public boolean test(Integer integer) {
- ResponseEntity<List<ServiceInfo>> serviceListResponse = serviceListCall();
- assertThat(serviceListResponse.getStatusCode(), CoreMatchers.equalTo(HttpStatus.OK));
- assertThat(serviceListResponse.getBody(), hasItem(new JobIdAndStatusMatcher(jobId)));
- ServiceInfo serviceInfoFromDB = serviceListResponse.getBody().stream()
- .filter(serviceInfo -> serviceInfo.jobId.equals(jobId))
- .findFirst().orElse(null);
- Assert.assertNotNull(serviceInfoFromDB);
- Assert.assertEquals(serviceInfoDataReflected(serviceInfoFromDB), serviceInfoDataReflected(expectedServiceInfo));
- assertTrue("actual service instance doesn't contain template service name:" + expectedServiceInfo.serviceInstanceName,
- serviceInfoFromDB.serviceInstanceName.contains(expectedServiceInfo.serviceInstanceName));
- if (serviceInfoFromDB.jobStatus==JobStatus.IN_PROGRESS || serviceInfoFromDB.jobStatus==JobStatus.COMPLETED) {
- assertTrue("actual service instance doesn't contain template service name and trailing numbers:" + expectedServiceInfo.serviceInstanceName,
- serviceInfoFromDB.serviceInstanceName.contains(expectedServiceInfo.serviceInstanceName+"_00"));
- }
-
- if (expectedServiceInfo.serviceInstanceId != null) {
- assertThat(serviceInfoFromDB.serviceInstanceId, is(expectedServiceInfo.serviceInstanceId));
- }
- lastStatus = serviceInfoFromDB.jobStatus;
- return expectedJobStatus.contains(serviceInfoFromDB.jobStatus);
- }
- }
-
- private ResponseEntity<List<ServiceInfo>> serviceListCall() {
- return restTemplate.exchange(
- getServiceInfoUrl(),
- org.springframework.http.HttpMethod.GET,
- null,
- new ParameterizedTypeReference<List<ServiceInfo>>() {});
- }
-
- //serialize fields except of fields we cannot know ahead of time
- private static String serviceInfoDataReflected(ServiceInfo service1) {
- return new ReflectionToStringBuilder(service1, ToStringStyle.SHORT_PREFIX_STYLE)
- .setExcludeFieldNames("jobStatus", "templateId", "statusModifiedDate", "createdBulkDate", "serviceInstanceId", "serviceInstanceName")
- .toString();
- }
-
@Test
public void errorResponseInGetStatusFromMso_getAuditStatusFromMso_errorMsgExistInAdditionalInfo(){
Map<Keys, String> names = generateNames();
ImmutableList<BasePreset> presets = new ImmutableList.Builder<BasePreset>()
.add(new PresetGetSessionSlotCheckIntervalGet())
.add(new PresetAAIGetSubscribersGet())
- .add(new PresetAAISearchNodeQueryEmptyResult())
- .add(new PresetMSOAssignServiceInstanceGen2WithNames(names, 1))
+ .add(PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN3_TO_ATT_SABABA)
+ .add(new PresetMSOAssignServiceInstanceGen2WithNames(names, 0))
.add(new PresetMSOOrchestrationRequestGetErrorResponse(406))
.build();
@@ -516,4 +272,97 @@ public class AsyncInstantiationApiTest extends BaseMsoApiTest {
}
+ @Test
+ public void inProgressJobMoreThan24HoursIsFailedInVidAudit(){
+ addBulkPendingWithCustomList(Collections.singletonList(new PresetMSOOrchestrationRequestGet("IN_PROGRESS",24)));
+
+ AtomicReference<ServiceInfo> inProgressJob = new AtomicReference<>();
+ boolean isJobFound = Wait.waitFor(x->{
+ List<ServiceInfo> serviceInfoList = serviceListCall().getBody();
+ inProgressJob.set(serviceInfoList.stream().
+ filter(serviceInfo -> serviceInfo.serviceInstanceId.equals(PresetMSOOrchestrationRequestGet.DEFAULT_SERVICE_INSTANCE_ID) && serviceInfo.jobStatus.equals(JobStatus.FAILED))
+ .findFirst()
+ .orElse(null));
+ return inProgressJob.get() != null;
+ }, null, 15, 1);
+
+ org.junit.Assert.assertTrue("Job with DEFAULT_SERVICE_INSTANCE_ID and status FAILED should present", isJobFound);
+
+ verifyAuditStatuses(inProgressJob.get().jobId, Arrays.asList(JobStatus.PENDING.name(), JobStatus.IN_PROGRESS.name(),JobStatus.FAILED.name()), JobAuditStatus.SourceStatus.VID);
+ verifyAuditStatuses(inProgressJob.get().jobId, Arrays.asList("REQUESTED", "IN_PROGRESS"), JobAuditStatus.SourceStatus.MSO);
+ }
+
+ @Test
+ public void inProgressJobLessThan24HoursIsStillInProgressInVidAudit(){
+ addBulkPendingWithCustomList(Collections.singletonList(new PresetMSOOrchestrationRequestGet("IN_PROGRESS",23)));
+
+ AtomicReference<ServiceInfo> inProgressJob = new AtomicReference<>();
+ boolean isJobFound = Wait.waitFor(x->{
+ List<ServiceInfo> serviceInfoList = serviceListCall().getBody();
+ inProgressJob.set(serviceInfoList.stream().filter(serviceInfo -> serviceInfo.serviceInstanceId.equals(PresetMSOOrchestrationRequestGet.DEFAULT_SERVICE_INSTANCE_ID))
+ .findFirst()
+ .orElse(null));
+ return inProgressJob.get() != null;
+ }, null, 15, 1);
+
+ org.junit.Assert.assertTrue("Job with DEFAULT_SERVICE_INSTANCE_ID should present", isJobFound);
+ org.junit.Assert.assertEquals("Tested job status is not as expected", JobStatus.IN_PROGRESS, inProgressJob.get().getJobStatus());
+
+ verifyAuditStatuses(inProgressJob.get().jobId, Arrays.asList(JobStatus.PENDING.name(), JobStatus.IN_PROGRESS.name()), JobAuditStatus.SourceStatus.VID);
+ verifyAuditStatuses(inProgressJob.get().jobId, Arrays.asList("REQUESTED", "IN_PROGRESS"), JobAuditStatus.SourceStatus.MSO);
+ }
+
+ @Test
+ public void verifyAuditStatusOfInstanceGroupId(){
+ SimulatorApi.registerExpectationFromPreset(new PresetMSOOrchestrationRequestsManyInstanceStatusesGet(INSTANCE_GROUP_ID_LABEL, INSTANCE_GROUP_LABEL), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
+ final List<JobAuditStatus> expectedAuditStatusList = getAuditStatusesForInstance("VNFGROUP", "df305d54-75b4-431b-adb2-eb6b9e5460df");
+ verifyInstanceAuditStatuses(Arrays.asList(
+ new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , INSTANCE_GROUP_LABEL+" instance creation", null, INSTANCE_GROUP_LABEL),
+ new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("28502bd2-3aff-4a03-9f2b-5a0d1cb1ca24") , INSTANCE_GROUP_LABEL+" instance creation", null, INSTANCE_GROUP_LABEL),
+ new JobAuditStatus("groupTestName", "IN_PROGRESS", UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , INSTANCE_GROUP_LABEL+" instance deletion", null, INSTANCE_GROUP_LABEL),
+ new JobAuditStatus("groupTestName", "COMPLETE",UUID.fromString("f711f0ff-24b6-4d7f-9314-4b4eae15f48c") , INSTANCE_GROUP_LABEL+" instance deletion", null, INSTANCE_GROUP_LABEL)),
+ expectedAuditStatusList);
+ }
+
+ @Test(expectedExceptions = HttpClientErrorException.class)
+ public void verifyAuditStatusOfInstanceGroupId_notExistingVidType(){
+ try {
+ getAuditStatusesForInstance("KUKU", "df305d54-75b4-431b-adb2-eb6b9e5460df");
+ } catch (HttpClientErrorException e){ //to verify the properiatary statusCode field
+ assertThat("Code is not as expected", HttpStatus.BAD_REQUEST.equals(e.getStatusCode()));
+ throw e;
+ }
+ }
+
+ @Test(expectedExceptions = HttpServerErrorException.class)
+ public void verifyAuditStatusOfInstanceGroupId_notExistingMsoInstanceId(){
+ try {
+ getAuditStatusesForInstance("VNFGROUP", "df305d54-75b4-431b-adb2-eb6b9e5460aa");
+ } catch (HttpServerErrorException e){ //to verify the properiatary statusCode field
+ assertThat("Code is not as expected", HttpStatus.INTERNAL_SERVER_ERROR.equals(e.getStatusCode()));
+ throw e;
+ }
+ }
+
+ @DataProvider
+ public static Object[][] macroAndALaCarteBulk(){
+ return new Object[][]{{CREATE_BULK_OF_MACRO_REQUEST}, {CREATE_BULK_OF_ALACARTE_REQUEST_WITH_VNF}};
+ }
+
+ @Test(dataProvider = "macroAndALaCarteBulk", expectedExceptions = HttpClientErrorException.class)
+ @FeatureTogglingTest(FLAG_1906_INSTANTIATION_API_USER_VALIDATION)
+ public void verifyCreateBulkOfInstancesUserPermissionValidation(String requestDetailsFileName) {
+ login(new UserCredentials("mo57174000", "mo57174000", null, null, null));
+ try {
+ createBulkOfInstances(false, 1, Collections.EMPTY_MAP, requestDetailsFileName);
+ } catch (HttpClientErrorException e){
+ assertEquals("Code is not as expected", HttpStatus.FORBIDDEN.value(), e.getStatusCode().value());
+ throw e;
+ }
+ finally {
+ login();
+ }
+
+ }
+
}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java b/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java
index 69a6f66cc..4ac38a0e7 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/BaseApiAaiTest.java
@@ -15,9 +15,9 @@ import java.net.URI;
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.junit.Assert.assertThat;
import static vid.automation.test.services.SimulatorApi.registerExpectation;
/**
diff --git a/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java
deleted file mode 100644
index e7c6045a4..000000000
--- a/vid-automation/src/test/java/org/onap/vid/api/BaseApiTest.java
+++ /dev/null
@@ -1,203 +0,0 @@
-package org.onap.vid.api;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.google.common.primitives.Ints;
-import org.apache.commons.io.IOUtils;
-import org.apache.log4j.LogManager;
-import org.apache.log4j.Logger;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.glassfish.jersey.client.ClientProperties;
-import org.glassfish.jersey.uri.internal.JerseyUriBuilder;
-import org.openecomp.sdc.ci.tests.datatypes.UserCredentials;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.MediaType;
-import org.springframework.http.client.ClientHttpRequestInterceptor;
-import org.springframework.http.client.ClientHttpResponse;
-import org.springframework.web.client.DefaultResponseErrorHandler;
-import org.springframework.web.client.RestTemplate;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import vid.automation.test.infra.FeaturesTogglingConfiguration;
-import vid.automation.test.services.UsersService;
-import vid.automation.test.utils.CookieAndJsonHttpHeadersInterceptor;
-
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.net.URL;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-
-import static java.util.Collections.singletonList;
-import static org.apache.commons.text.StringEscapeUtils.unescapeJson;
-import static org.hamcrest.CoreMatchers.everyItem;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.greaterThan;
-
-public class BaseApiTest {
- protected static final Logger LOGGER = LogManager.getLogger(BaseApiTest.class);
-
- @SuppressWarnings("WeakerAccess")
- protected URI uri;
- @SuppressWarnings("WeakerAccess")
- protected ObjectMapper objectMapper = new ObjectMapper();
- @SuppressWarnings("WeakerAccess")
- protected Client client;
- protected Random random;
- protected final RestTemplate restTemplate = new RestTemplate();
-
- protected final UsersService usersService = new UsersService();
- protected final RestTemplate restTemplateErrorAgnostic = new RestTemplate();
-
- @BeforeClass
- public void init() {
- uri = getUri();
- objectMapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
- client = ClientBuilder.newClient();
- client.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
- random = new Random(System.currentTimeMillis());
- FeaturesTogglingConfiguration.initializeFeatureManager();
- }
-
- private URI getUri() {
- String host = System.getProperty("VID_HOST", "127.0.0.1");
- Integer port = Integer.valueOf(System.getProperty("VID_PORT", "8080"));
- return new JerseyUriBuilder().host(host).port(port).scheme("http").path("vid").build();
- }
-
- public void login() {
- UserCredentials userCredentials = getUserCredentials();
- final List<ClientHttpRequestInterceptor> interceptors = singletonList(new CookieAndJsonHttpHeadersInterceptor(getUri(), userCredentials));
- restTemplate.setInterceptors(interceptors);
-
- restTemplateErrorAgnostic.setInterceptors(interceptors);
- restTemplateErrorAgnostic.setErrorHandler(new DefaultResponseErrorHandler() {
- @Override
- public boolean hasError(ClientHttpResponse response) {
- return false;
- }
- });
- }
-
-
- static class DB_CONFIG {
- static String url = String.format("jdbc:mariadb://%s:%d/vid_portal",
- System.getProperty("DB_HOST", System.getProperty("VID_HOST", "127.0.0.1")),
- Integer.valueOf(System.getProperty("DB_PORT", "3306"))
- );
- static String username = "euser";
- static String password = "euser";
-
- static final int userId = 2222;
- static final String loginId = "vid1";
- static final int roleId = 2222221;
- static final int logRoleId = 2222222;
- }
-
-
- @BeforeClass
- protected void createNewTestUser() {
-
- deleteNewTestUser();
-
- LOGGER.debug("Connecting database...");
-
- try (Connection connection = DriverManager.getConnection(DB_CONFIG.url, DB_CONFIG.username, DB_CONFIG.password)) {
-
- LOGGER.debug("Database connected!");
- //create new user with specific role
- Statement stmt = connection.createStatement();
- stmt.addBatch("INSERT INTO `fn_user` (`USER_ID`, `ORG_USER_ID`, `LOGIN_ID`, `LOGIN_PWD`) VALUES (" + DB_CONFIG.userId + ", 'Porfirio Gerhardt', '" + DB_CONFIG.loginId + "', '" + DB_CONFIG.loginId + "')");
- stmt.addBatch("INSERT INTO `fn_role` (`ROLE_ID`, `ROLE_NAME`, `ACTIVE_YN`, `PRIORITY`) VALUES (" + DB_CONFIG.roleId + ", 'PACKET CORE___vFlowLogic', 'Y', 5)");
- stmt.addBatch("INSERT INTO `fn_role` (`ROLE_ID`, `ROLE_NAME`, `ACTIVE_YN`, `PRIORITY`) VALUES (" + DB_CONFIG.logRoleId + ", 'READ___LOGS___PERMITTED', 'Y', 5)");
- stmt.addBatch("INSERT INTO `fn_user_role` (`USER_ID`, `ROLE_ID`, `PRIORITY`, `APP_ID`) VALUES (" + DB_CONFIG.userId + ", " + DB_CONFIG.roleId + ", NULL, 1)");
- stmt.addBatch("INSERT INTO `fn_user_role` (`USER_ID`, `ROLE_ID`, `PRIORITY`, `APP_ID`) VALUES (" + DB_CONFIG.userId + ", " + DB_CONFIG.logRoleId + ", NULL, 1)");
-
-
- int[] executeBatch = stmt.executeBatch();
- assertThat(Ints.asList(executeBatch), everyItem(greaterThan(0)));
-
- } catch (SQLException e) {
- throw new IllegalStateException("Cannot connect the database!", e);
- }
-
- }
-
- @AfterClass
- protected void deleteNewTestUser() {
- LOGGER.debug("Connecting database...");
-
- try (Connection connection = DriverManager.getConnection(DB_CONFIG.url, DB_CONFIG.username, DB_CONFIG.password)) {
- LOGGER.debug("Database connected!");
- Statement stmt = connection.createStatement();
- stmt.addBatch("DELETE FROM `fn_user_role` WHERE `USER_ID` = " + DB_CONFIG.userId);
- stmt.addBatch("DELETE FROM `fn_user` WHERE `USER_ID` = " + DB_CONFIG.userId);
- stmt.addBatch("DELETE FROM `fn_role` WHERE `ROLE_ID` = " + DB_CONFIG.roleId);
- stmt.addBatch("DELETE FROM `fn_role` WHERE `ROLE_ID` = " + DB_CONFIG.logRoleId);
-
-
- int[] executeBatch = stmt.executeBatch();
-
- } catch (SQLException e) {
- throw new IllegalStateException("Cannot connect the database!", e);
- }
- }
-
- protected UserCredentials getUserCredentials() {
- final Properties configProp = new Properties();
- try {
- InputStream input = ClassLoader.getSystemResourceAsStream("test_config.properties");
- configProp.load(input);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- HttpHeaders loginRequestHeaders = new HttpHeaders();
- loginRequestHeaders.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
- String loginId = configProp.getProperty("test.loginId", "i'm illegal");
- String loginPassword = configProp.getProperty("test.loginPassword", "i'm illegal");
- return new UserCredentials(loginId, loginPassword, null, null, null);
- }
-
-
-
-
- protected String getCleanJsonString(String jsonString) {
- // remove leading/trailing double-quotes and unescape
- String res = unescapeJson(jsonString.replaceAll("^\"|\"$", ""));
- LOGGER.debug("getCleanJsonString: " + jsonString + " ==> " + res);
- return res;
- }
-
- protected String getCleanJsonString(Object object) throws JsonProcessingException {
- if (object instanceof String) {
- return getCleanJsonString((String) object);
- } else {
- return new com.fasterxml.jackson.databind.ObjectMapper().writeValueAsString(object);
- }
- }
-
- protected String buildUri(String path) {
- return uri + "/" + path;
- }
-
- public static String getResourceAsString(String resourcePath) {
- // load expected result
- final URL resource = BaseApiTest.class.getClassLoader().getResource(resourcePath);
- if (resource == null) throw new RuntimeException("resource file not found: " + resourcePath);
- try {
- return IOUtils.toString(resource, "UTF-8");
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java
deleted file mode 100644
index 1495f1852..000000000
--- a/vid-automation/src/test/java/org/onap/vid/api/BaseMsoApiTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.onap.vid.api;
-
-import com.google.common.collect.ImmutableMap;
-import org.json.JSONException;
-import org.onap.vid.model.mso.MsoResponseWrapper2;
-import org.skyscreamer.jsonassert.JSONAssert;
-import org.skyscreamer.jsonassert.JSONCompareMode;
-import org.springframework.http.HttpMethod;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.HttpServerErrorException;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.DataProvider;
-import vid.automation.test.services.SimulatorApi;
-import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
-
-import java.io.IOException;
-import java.lang.reflect.Method;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-
-public class BaseMsoApiTest extends BaseApiTest {
-
- @BeforeClass
- public void login() {
- super.login();
- }
-
- protected void callMsoWithSimulatedErrorResponse(String expectationJsonFileName, ImmutableMap<String, Object> replacementsForJson, String targetUri, String basicRequestBody, int expectedErrorCode, String expectedResult, HttpMethod method) throws IOException {
- SimulatorApi.registerExpectation(expectationJsonFileName, replacementsForJson, RegistrationStrategy.CLEAR_THEN_SET);
- try {
- MsoResponseWrapper2 responseWrapper = callMsoForResponseWrapper(method, targetUri, basicRequestBody);
-
- assertThat("Wrong propagated status from MSO", responseWrapper.getStatus(), is(expectedErrorCode));
- assertThat("Wrong propagated body from MSO", getCleanJsonString(responseWrapper.getEntity()), is(expectedResult));
- }catch(HttpClientErrorException | HttpServerErrorException e) {
- assertThat("Wrong propagated status from MSO", e.getStatusCode().value(), is(expectedErrorCode));
- }
- }
-
-
- protected void callMsoWithFineRequest(String expectationJsonFileName, ImmutableMap<String, Object> replacementsForJson, String targetUri, String requestBody, int expectedStatusCode, String expectedResult, HttpMethod method) throws IOException {
- SimulatorApi.registerExpectation(expectationJsonFileName, replacementsForJson, RegistrationStrategy.CLEAR_THEN_SET);
-
- MsoResponseWrapper2 responseWrapper = callMsoForResponseWrapper(method, targetUri, requestBody);
-
- assertThat("Wrong propagated status from MSO", responseWrapper.getStatus(), is(expectedStatusCode));
- try {
- JSONAssert.assertEquals("Wrong propagated body from MSO", expectedResult, getCleanJsonString(responseWrapper.getEntity()), JSONCompareMode.NON_EXTENSIBLE);
- } catch (JSONException e) {
- throw new RuntimeException(e);
- }
- }
-
- protected MsoResponseWrapper2 callMsoForResponseWrapper(HttpMethod method, String uri, String body) {
- MsoResponseWrapper2 responseWrapper;
- switch (method) {
- case POST:
- responseWrapper = restTemplate.postForObject(uri, body, MsoResponseWrapper2.class);
- break;
- case GET:
- default:
- responseWrapper = restTemplate.getForObject(uri, MsoResponseWrapper2.class);
- break;
- }
-
- System.out.println("response: " + responseWrapper);
-
- return responseWrapper;
- }
-
- @DataProvider
- public static Object[][] errorCodes(Method test) {
- return new Object[][]{
- {500},{505}, {400}, {401}, {404}, {405}
- };
- }
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/CategoryParametersApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/CategoryParametersApiTest.java
index 54df0e83e..c04d2ff0d 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/CategoryParametersApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/CategoryParametersApiTest.java
@@ -17,6 +17,7 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.IOException;
import java.util.List;
+import java.util.Random;
import java.util.UUID;
import java.util.stream.Collectors;
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
index 2ad68d75d..999b66cee 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ChangeManagementApiTest.java
@@ -3,35 +3,27 @@ package org.onap.vid.api;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
-import org.onap.vid.model.mso.ChangeManagementRequest;
-import org.onap.vid.model.mso.ChangeManagementRequestDetails;
-import org.onap.vid.model.mso.CloudConfiguration;
-import org.onap.vid.model.mso.MsoExceptionResponse;
-import org.onap.vid.model.mso.MsoResponseWrapper2;
-import org.onap.vid.model.mso.RelatedInstance;
-import org.onap.vid.model.mso.RelatedInstanceList;
-import org.onap.vid.model.mso.RequestInfo;
-import org.onap.vid.model.mso.RequestParameters;
-import org.onap.vid.model.workflow.GetVnfWorkflowRelationRequest;
-import org.onap.vid.model.workflow.GetWorkflowsResponse;
-import org.onap.vid.model.workflow.VnfDetails;
-import org.onap.vid.model.workflow.VnfDetailsWithWorkflows;
-import org.onap.vid.model.workflow.VnfWorkflowRelationAllResponse;
-import org.onap.vid.model.workflow.VnfWorkflowRelationRequest;
-import org.onap.vid.model.workflow.VnfWorkflowRelationResponse;
-import org.onap.vid.model.workflow.WorkflowsDetail;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoChangeManagementBase;
+import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoVnfInPlaceSoftwareUpdate;
+import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoVnfReplace;
+import org.onap.simulator.presetGenerator.presets.mso.changeManagement.PresetMsoVnfUpdate;
+import org.onap.simulator.presetGenerator.presets.aaf.*;
import org.onap.vid.model.mso.*;
import org.onap.vid.model.workflow.*;
import org.springframework.http.HttpStatus;
import org.springframework.util.StopWatch;
import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import vid.automation.test.services.SimulatorApi;
import vid.automation.test.services.SimulatorApi.RegistrationStrategy;
+import vid.automation.test.utils.ReadFile;
import javax.ws.rs.HttpMethod;
import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
@@ -51,6 +43,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.onap.vid.api.TestUtils.getNestedPropertyInMap;
+import static org.testng.AssertJUnit.assertEquals;
//This is integration test that require running tomcat
@@ -139,6 +132,30 @@ public class ChangeManagementApiTest extends BaseApiTest {
};
}
+ @DataProvider
+ public static Object[][] credentialsFilterTestData(Method test) {
+ return new Object[][]{
+ {AAFGetBasicAuthPreset.VALID_AUTH_VALUE, 200},
+// {null, 401}, // No auth header TODO: Uncomment when the bug in epsdk will be fixed. Currently If there is no auth header then no credentials validation.
+ {"xyz", 401}, //undecodable value
+ {"YUBiLmM6ZGVm", 401} //decodable value but not that expected by cadi filter (simulator)
+
+ };
+ }
+
+ @BeforeClass
+ public static void commonSimulatorRegistration() {
+ SimulatorApi.registerExpectationFromPreset(
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC,
+ RegistrationStrategy.CLEAR_THEN_SET);
+ SimulatorApi.registerExpectationFromPreset(
+ new AAFGetUrlServicePreset(),
+ RegistrationStrategy.APPEND);
+ SimulatorApi.registerExpectationFromPreset(
+ new AAFGetBasicAuthPreset(),
+ RegistrationStrategy.APPEND);
+ }
+
// IN_PLACE_SOFTWARE_UPDATE
@Test
public void testInPlaceSoftwareUpdateHappyPath() throws IOException {
@@ -199,6 +216,12 @@ public class ChangeManagementApiTest extends BaseApiTest {
"mso_in_place_software_update_ok.json",
ImmutableMap.of("SERVICE_INSTANCE_ID", vnfIds.serviceInstanceId, "VNF_INSTANCE_ID", vnfIds.vnfInstanceId),
RegistrationStrategy.APPEND);
+ SimulatorApi.registerExpectationFromPreset(
+ new AAFGetUrlServicePreset(),
+ RegistrationStrategy.APPEND);
+ SimulatorApi.registerExpectationFromPreset(
+ new AAFGetBasicAuthPreset(),
+ RegistrationStrategy.APPEND);
return null;
}))
.collect(Collectors.toList());
@@ -216,9 +239,8 @@ public class ChangeManagementApiTest extends BaseApiTest {
stopWatch.start("init requests");
List<ChangeManagementRequest> requestsList = vnfList.stream().map(vnfIds -> this.createChangeManagementRequest(vnfIds, ChangeManagementRequest.VNF_IN_PLACE_SOFTWARE_UPDATE)).collect(Collectors.toList());
- WebTarget webTarget = client.target(uri).
- path(CHANGE_MANAGEMENT+WORKFLOW).resolveTemplate("vnfname","VidVnf");
- List<Callable<Response>> callables = requestsList.stream().map(request->((Callable<Response>) () -> webTarget.request(MediaType.APPLICATION_JSON_TYPE).header("Authorization", "Basic 123==").post(Entity.json(request)))).collect(Collectors.toList());
+ WebTarget webTarget = buildWebTarget("VidVnf");
+ List<Callable<Response>> callables = requestsList.stream().map(request->((Callable<Response>) () -> webTarget.request(MediaType.APPLICATION_JSON_TYPE).header("Authorization", "Basic " + AAFGetBasicAuthPreset.VALID_AUTH_VALUE).post(Entity.json(request)))).collect(Collectors.toList());
stopWatch.stop();
stopWatch.start("invoke calling to vid");
@@ -286,16 +308,54 @@ public class ChangeManagementApiTest extends BaseApiTest {
testChangeManagementGoodPayload(payload, "mso_config_update_ok.json", ChangeManagementRequest.CONFIG_UPDATE);
}
- @Test
- public void testClientCredentialsFilter_expect401()
+ @Test(dataProvider = "credentialsFilterTestData")
+ public void testCadiCredentialsFilter(String authValue, int expectedStatusCode)
{
VnfIds vnfIds = new VnfIds();
ChangeManagementRequest changeManagementRequest = createBasicChangeManagementRequest(vnfIds);
changeManagementRequest.setRequestType(ChangeManagementRequest.REPLACE);
- WebTarget webTarget = client.target(uri).
- path(CHANGE_MANAGEMENT + WORKFLOW).resolveTemplate("vnfname", vnfIds.vnfName);
+ WebTarget webTarget = buildWebTarget(vnfIds.vnfName);
Entity entity = Entity.json(changeManagementRequest);
- Assert.assertEquals(401, webTarget.request(MediaType.APPLICATION_JSON_TYPE).post(entity).getStatus());
+ Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON_TYPE);
+ if (authValue != null) {
+ invocationBuilder.header("Authorization", "Basic " + authValue);
+ }
+ Response response = invocationBuilder.post(entity);
+ String body = response.readEntity(String.class);
+ Assert.assertEquals(response.getStatus(), expectedStatusCode, "Full response: " + body);
+ }
+
+ @DataProvider
+ public static Object[][] requestFromSchedulerDataProvider(Method test) {
+ return new Object[][]{
+ {
+ "e9181708-f105-4dfd-9a36-0e089faa72ba",
+ new PresetMsoVnfReplace("254583ad-b38c-498b-bdbd-b8de5e07541b", "e9181708-f105-4dfd-9a36-0e089faa72ba"),
+ "changeManagement/vnfReplaceRequest.json"
+ },
+ {
+ "c929b7ec-cc9d-11e8-a8d5-f2801f1b9fd1",
+ new PresetMsoVnfUpdate("d0c59d4a-cc9d-11e8-a8d5-f2801f1b9fd1","c929b7ec-cc9d-11e8-a8d5-f2801f1b9fd1"),
+ "changeManagement/vnfUpdateRequest.json"
+ },
+ {
+ "e5403738-da34-4090-8864-ba9cf1bcdd88",
+ new PresetMsoVnfInPlaceSoftwareUpdate("12709275-787c-4be7-8c9c-fce64ab7ca8c","e5403738-da34-4090-8864-ba9cf1bcdd88"),
+ "changeManagement/vnfInPlaceSoftwareUpdate.json"
+ }
+ };
+ }
+
+ @Test(dataProvider = "requestFromSchedulerDataProvider")
+ public void whenGetFromSchedulerRequest_sendAsExpectedToMso(String vnfInstanceId, PresetMsoChangeManagementBase preset, String requestPath) {
+ SimulatorApi.registerExpectationFromPreset(
+ preset,
+ RegistrationStrategy.APPEND);
+ String schedulerRequest = ReadFile.loadResourceAsString(requestPath);
+ Response response = callChangeManagement("VidVnf", Entity.json(schedulerRequest));
+ MsoResponseWrapper2 body = response.readEntity(MsoResponseWrapper2.class);
+ assertEquals(202, body.getStatus());
+ assertEquals(vnfInstanceId, getNestedPropertyInMap(body.getEntity(), "requestReferences/instanceId"));
}
@@ -308,7 +368,7 @@ public class ChangeManagementApiTest extends BaseApiTest {
private void assertForHappyPath(VnfIds vnfIds, MsoResponseWrapper2 body, String requestType) {
Assert.assertEquals(body.getStatus(), 202, requestType + " failed with wrong http status");
Assert.assertEquals(
- TestUtils.getNestedPropertyInMap(body.getEntity(), "requestReferences/instanceId"),
+ getNestedPropertyInMap(body.getEntity(), "requestReferences/instanceId"),
vnfIds.serviceInstanceId,
String.format("Failed to find instanceId: %s in " + requestType + " response. Actual body:%s",
vnfIds.serviceInstanceId, body.getEntity()));
@@ -317,18 +377,25 @@ public class ChangeManagementApiTest extends BaseApiTest {
private <T> T callChangeManagementUpdate(VnfIds vnfIds, String expectationPath, Class<T> responseClass, String requestType) {
SimulatorApi.registerExpectation(
expectationPath,
- ImmutableMap.of("SERVICE_INSTANCE_ID", vnfIds.serviceInstanceId, "VNF_INSTANCE_ID", vnfIds.vnfInstanceId), RegistrationStrategy.CLEAR_THEN_SET);
+ ImmutableMap.of("SERVICE_INSTANCE_ID", vnfIds.serviceInstanceId, "VNF_INSTANCE_ID", vnfIds.vnfInstanceId), RegistrationStrategy.APPEND);
ChangeManagementRequest changeManagementRequest = createChangeManagementRequest(vnfIds, requestType);
Response response = callChangeManagementUpdate(vnfIds, changeManagementRequest);
return response.readEntity(responseClass);
}
private Response callChangeManagementUpdate(VnfIds vnfIds, ChangeManagementRequest changeManagementRequest) {
- WebTarget webTarget = client.target(uri).
- path(CHANGE_MANAGEMENT + WORKFLOW).resolveTemplate("vnfname", vnfIds.vnfName);
Entity entity = Entity.json(changeManagementRequest);
- Response response = webTarget.request(MediaType.APPLICATION_JSON_TYPE).header("Authorization", "Basic 123==").post(entity);
- return response;
+ return callChangeManagement(vnfIds.vnfName, entity);
+ }
+
+ private Response callChangeManagement(String vnfName, Entity entity) {
+ WebTarget webTarget = buildWebTarget(vnfName);
+ return webTarget.request(MediaType.APPLICATION_JSON_TYPE).header("Authorization", "Basic " + AAFGetBasicAuthPreset.VALID_AUTH_VALUE).post(entity);
+ }
+
+ private WebTarget buildWebTarget(String vnfName) {
+ return client.target(uri).
+ path(CHANGE_MANAGEMENT + WORKFLOW).resolveTemplate("vnfname", vnfName);
}
private void testChangeManagement409Error(String expectationPath, String requestType) throws IOException {
@@ -336,13 +403,13 @@ public class ChangeManagementApiTest extends BaseApiTest {
MsoResponseWrapper2 body = callChangeManagementUpdate(vnfIds, expectationPath, MsoResponseWrapper2.class, requestType);
Assert.assertEquals(body.getStatus(), 409, requestType + " failed with wrong http status");
Assert.assertEquals(
- TestUtils.getNestedPropertyInMap(body.getEntity(), "serviceException/messageId"),
+ getNestedPropertyInMap(body.getEntity(), "serviceException/messageId"),
"SVC2000",
String.format("Failed to find messageId: %s in " + requestType + " response. Actual body:%s",
"SVC2000", body.getEntity()));
- assertThat(TestUtils.getNestedPropertyInMap(body.getEntity(), "serviceException/text"), containsString(vnfIds.vnfInstanceId));
+ assertThat(getNestedPropertyInMap(body.getEntity(), "serviceException/text"), containsString(vnfIds.vnfInstanceId));
}
private void testChangeManagement404Error(String expectationPath, String requestType) throws IOException {
@@ -398,7 +465,7 @@ public class ChangeManagementApiTest extends BaseApiTest {
VnfIds vnfIds = new VnfIds();
SimulatorApi.registerExpectation(
expectationFileName,
- ImmutableMap.of("SERVICE_INSTANCE_ID", vnfIds.serviceInstanceId, "VNF_INSTANCE_ID", vnfIds.vnfInstanceId), RegistrationStrategy.CLEAR_THEN_SET);
+ ImmutableMap.of("SERVICE_INSTANCE_ID", vnfIds.serviceInstanceId, "VNF_INSTANCE_ID", vnfIds.vnfInstanceId), RegistrationStrategy.APPEND);
ChangeManagementRequest changeManagementRequest = createChangeManagementRequest(vnfIds, requestType);
changeManagementRequest.getRequestDetails().get(0).getRequestParameters().getAdditionalProperties().put("payload",payload);
Response response = callChangeManagementUpdate(vnfIds, changeManagementRequest);
diff --git a/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java
index e5df2d3b9..222b0f5fb 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/OperationalEnvironmentControllerApiTest.java
@@ -22,8 +22,8 @@ import java.util.LinkedList;
import java.util.stream.Collectors;
import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.METHOD_NOT_ALLOWED;
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
index 931f0004a..e38617b39 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ProbeApiTest.java
@@ -1,12 +1,31 @@
package org.onap.vid.api;
+import static org.hamcrest.CoreMatchers.anyOf;
+import static org.hamcrest.CoreMatchers.both;
+import static org.hamcrest.CoreMatchers.endsWith;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.startsWith;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+
+import com.google.common.collect.ImmutableList;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
-import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGetInvalidResponse;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsManyStatusesGet;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOOrchestrationRequestsManyStatusesInvalidResponseGet;
+import org.onap.simulator.presetGenerator.presets.scheduler.PresetGetSchedulerChangeManagementInvalidResponse;
+import org.onap.simulator.presetGenerator.presets.scheduler.PresetGetSchedulerChangeManagements;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGetEmptyResult;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGetInvalidResponse;
import org.onap.vid.model.probe.ExternalComponentStatus;
import org.onap.vid.model.probe.HttpRequestMetadata;
import org.springframework.core.ParameterizedTypeReference;
@@ -17,14 +36,13 @@ import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import vid.automation.test.services.SimulatorApi;
-import java.lang.reflect.Method;
-import java.util.List;
-import java.util.Optional;
+public class ProbeApiTest extends BaseApiTest {
-import static org.hamcrest.CoreMatchers.*;
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+ private static final String MSO_QUERY_PARAMS = "filter=requestExecutionDate:EQUALS:01-01-2100";
+ private static final String AAI_QUERY_PARMAS = "business/customers?subscriber-type=INFRA&depth=0";
+ private static final String SDC_PATH_PARAMS = "46401eec-35bd-4e96-ad0d-0356ff6b8c8d/toscaModel";
+ private static final String SCHEDULER_PATH = "http://localhost:1080/scheduler/v1/ChangeManagement/schedules/scheduleDetails/";
-public class ProbeApiTest extends BaseApiTest {
@BeforeClass
public void login() {
@@ -35,70 +53,183 @@ public class ProbeApiTest extends BaseApiTest {
public static Object[][] probePresetAndResponse(Method test) {
return new Object[][]{
{
- new PresetAAIGetSubscribersGet(),
- new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,
- true,
- new HttpRequestMetadata(HttpMethod.GET,
- 200,
- "business/customers?subscriber-type=INFRA&depth=0",
- "{\"customer\":[{\"global-customer-id\":\"MSO_1610_ST\",\"subscriber-name\":\"MSO_1610_ST\",\"subscriber-type\":\"INFRA\",\"resource-version\":\"1494001902987\"},{\"global-customer-id\":\"21014aa2-526b-11e6-beb8-9e71128cae77\",\"subscriber-name\":\"PACKET CORE\",\"subscriber-type\":\"INFRA\",\"resource-version\":\"1494001776295\"},{\"global-customer-id\":\"DHV1707-TestSubscriber-2\",\"subscriber-name\":\"ICORE CORE\",\"subscriber-type\":\"INFRA\",\"resource-version\":\"1498751754450\"},{\"global-customer-id\":\"DHV1707-TestSubscriber-1\",\"subscriber",
- "OK"
+ "all good",
+ ImmutableList.of(
+ new PresetAAIGetSubscribersGet(),
+ new PresetMSOOrchestrationRequestsManyStatusesGet(),
+ new PresetSDCGetServiceToscaModelGet("46401eec-35bd-4e96-ad0d-0356ff6b8c8d", "serviceCreationTest.zip"),
+ new PresetGetSchedulerChangeManagements()
+ ),
+ ImmutableList.of(new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,
+ true,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ AAI_QUERY_PARMAS,
+ "{\"customer\":[{\"global-customer-id\":\"CAR_2020_ER\",\"subscriber-name\":\"CAR_2020_ER\",\"subscriber-type\":\"INFRA\",\"resource-version\":\"1494001902987\",\"relationship-list\":null},{\"global-customer-id\":\"21014aa2-526b-11e6-beb8-9e71128cae77\",\"subscriber-name\":\"JULIO ERICKSON\",\"subscriber-type\":\"INFRA\",\"resource-version\":\"1494001776295\",\"relationship-list\":null},{\"global-customer-id\":\"DHV1707-TestSubscriber-2\",\"subscriber-name\":\"DALE BRIDGES\",\"subscriber-type\":\"INFRA\",\"resource-version\":\"1498751754450\",\"relationsh",
+ "OK"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.MSO,
+ true,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ MSO_QUERY_PARAMS,
+ "{ " +
+ " \"requestList\": [{ " +
+ " \"request\": { " +
+ " \"requestId\": \"rq1234d1-5a33-55df-13ab-12abad84e333\", " +
+ " \"startTime\": \"Thu, 04 Jun 2009 02:51:59 GMT\", " +
+ " \"instanceReferences\": { " +
+ " \"serviceInstanceId\": \"bc305d54-75b4-431b-adb2-eb6b9e546014\" " +
+ " }, " +
+ " \"requestScope\": \"vnf\", " +
+ " \"requestType\": \"updateInstance\", " +
+ " \"requestDetails\": { " +
+ " \"modelInfo\": { " +
+ " \"modelType\": \"service\", " +
+ " \"modelInvariantId\": \"sn5256d1-5a33-55df-13ab-12abad84e764\", " +
+ " \"modelVersionId\": \"ab6478e4-ea33-3346-ac12-ab1",
+ "OK"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.SDC,
+ true,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ SDC_PATH_PARAMS,
+ "",
+ "OK"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.SCHEDULER,
+ true,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ SCHEDULER_PATH,
+ StringUtils.substring(new PresetGetSchedulerChangeManagements().getResponseBody().toString(), 0, 500),
+ "OK"
)
- )
+ ))
},
{
- new PresetAAIGetSubscribersGetInvalidResponse(200),
- new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,
+ "invalid json",
+ ImmutableList.of(
+ new PresetAAIGetSubscribersGetInvalidResponse(200),
+ new PresetMSOOrchestrationRequestsManyStatusesInvalidResponseGet(200),
+ new PresetSDCGetServiceToscaModelGetEmptyResult("46401eec-35bd-4e96-ad0d-0356ff6b8c8d"),
+ new PresetGetSchedulerChangeManagementInvalidResponse(200)
+ ),
+ ImmutableList.of(new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,
+ false,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ AAI_QUERY_PARMAS,
+ "this payload is an invalid json",
+ "com.fasterxml.jackson.core.JsonParseException"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.MSO,
+ false,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ MSO_QUERY_PARAMS,
+ "this payload is an invalid json",
+ "com.fasterxml.jackson.core.JsonParseException"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.SDC,
false,
new HttpRequestMetadata(HttpMethod.GET,
200,
- "business/customers?subscriber-type=INFRA&depth=0",
+ SDC_PATH_PARAMS,
+ "",
+ "error reading model 46401eec-35bd-4e96-ad0d-0356ff6b8c8d from SDC"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.SCHEDULER,
+ false,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 200,
+ SCHEDULER_PATH,
"this payload is an invalid json",
- "org.codehaus.jackson.JsonParseException"
+ "javax.ws.rs.ProcessingException"
)
- )
+ ))
},
{
- new PresetAAIGetSubscribersGetInvalidResponse(500),
- new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,
+ "bad http code",
+ ImmutableList.of(
+ new PresetAAIGetSubscribersGetInvalidResponse(500),
+ new PresetMSOOrchestrationRequestsManyStatusesInvalidResponseGet(406),
+ new PresetSDCGetServiceToscaModelGetInvalidResponse("46401eec-35bd-4e96-ad0d-0356ff6b8c8d", 404),
+ new PresetGetSchedulerChangeManagementInvalidResponse(400)
+ ),
+ ImmutableList.of(new ExternalComponentStatus(ExternalComponentStatus.Component.AAI,
false,
new HttpRequestMetadata(HttpMethod.GET,
500,
- "business/customers?subscriber-type=INFRA&depth=0",
+ AAI_QUERY_PARMAS,
"this payload is an invalid json",
"No subscriber received"
)
- )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.MSO,
+ false,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 406,
+ MSO_QUERY_PARAMS,
+ "this payload is an invalid json",
+ "org.apache.http.HttpException: Get with status=406 (200 or 202 expected), url= http"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.SDC,
+ false,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 404,
+ SDC_PATH_PARAMS,
+ "simulated error description from sdc",
+ "model 46401eec-35bd-4e96-ad0d-0356ff6b8c8d not found in SDC" +
+ " (consider updating vid probe configuration 'probe.sdc.model.uuid')"
+ )
+ ), new ExternalComponentStatus(ExternalComponentStatus.Component.SCHEDULER,
+ false,
+ new HttpRequestMetadata(HttpMethod.GET,
+ 400,
+ SCHEDULER_PATH,
+ "this payload is an invalid json",
+ "org.apache.http.HttpException: Get with status = 400, url = " + SCHEDULER_PATH
+ )
+ ))
}
};
}
@Test(dataProvider = "probePresetAndResponse")
- public void probeRequest_returnsResponseAsExpected(BasePreset preset, ExternalComponentStatus expectedStatus ){
- SimulatorApi.registerExpectationFromPreset(preset, CLEAR_THEN_SET);
+ public void probeRequest_returnsResponseAsExpected(String desc, Collection<BasePreset> presets, Collection<ExternalComponentStatus> expectedStatuses) {
+ SimulatorApi.registerExpectationFromPresets(presets, CLEAR_THEN_SET);
ResponseEntity<List<ExternalComponentStatus>> response = restTemplate.exchange(
uri + "/probe",
org.springframework.http.HttpMethod.GET,
null,
- new ParameterizedTypeReference<List<ExternalComponentStatus>>() {});
+ new ParameterizedTypeReference<List<ExternalComponentStatus>>() {
+ });
List<ExternalComponentStatus> probeResults = response.getBody();
- Assert.assertEquals(probeResults.size(),1);
- assertAaiGetAllSubscribersAsExpected(probeResults,expectedStatus);
-
+ Assert.assertEquals(4, probeResults.size());
+ assertResultAsExpected(ExternalComponentStatus.Component.AAI, probeResults, expectedStatuses);
+ assertResultAsExpected(ExternalComponentStatus.Component.SDC, probeResults, expectedStatuses);
+ assertResultAsExpected(ExternalComponentStatus.Component.MSO, probeResults, expectedStatuses);
+ assertResultAsExpected(ExternalComponentStatus.Component.SCHEDULER, probeResults, expectedStatuses);
}
- private void assertAaiGetAllSubscribersAsExpected(List<ExternalComponentStatus> probeResults,ExternalComponentStatus expectedStatus){
- Optional<ExternalComponentStatus> aaiGetAllSubscribersResult = probeResults.stream().filter(x -> x.getComponent()== ExternalComponentStatus.Component.AAI).findFirst();
- Assert.assertTrue(aaiGetAllSubscribersResult.isPresent());
- ExternalComponentStatus aaiGetAllSubscribersStatus = aaiGetAllSubscribersResult.get();
- Assert.assertEquals(aaiGetAllSubscribersStatus.isAvailable(),expectedStatus.isAvailable());
+ private void assertResultAsExpected(ExternalComponentStatus.Component component, List<ExternalComponentStatus> probeResults, Collection<ExternalComponentStatus> expectedStatuses) {
+ ExternalComponentStatus expectedStatus = expectedStatuses.stream().filter(x -> x.getComponent() == component)
+ .findFirst().orElseThrow(() -> new AssertionError("Missing setup for " + component + " expected result"));
+ ExternalComponentStatus componentStatus = probeResults.stream().filter(x -> x.getComponent() == component)
+ .findFirst().orElseThrow(() -> new AssertionError(component.name()+" result not found in response"));
+
+ Assert.assertThat("wrong metadata for " + component, requestMetadataReflected(componentStatus.getMetadata()),
+ is(requestMetadataReflected(expectedStatus.getMetadata())));
- MatcherAssert.assertThat(requestMetadataReflected(aaiGetAllSubscribersStatus.getMetadata()),is(requestMetadataReflected(expectedStatus.getMetadata())));
- MatcherAssert.assertThat(aaiGetAllSubscribersStatus.getMetadata().getUrl(), both(endsWith(expectedStatus.getMetadata().getUrl())).and(startsWith("http")));
+ Assert.assertThat("wrong url for " + component, componentStatus.getMetadata().getUrl(),
+ both(endsWith(expectedStatus.getMetadata().getUrl())).and(startsWith("http")));
- MatcherAssert.assertThat(aaiGetAllSubscribersStatus.getMetadata().getDescription(),
+ Assert.assertThat("wrong description for " + component, componentStatus.getMetadata().getDescription(),
anyOf(equalTo(expectedStatus.getMetadata().getDescription()), startsWith(expectedStatus.getMetadata().getDescription())));
+
+ Assert.assertThat("wrong status for " + component, componentStatus.isAvailable(), is(expectedStatus.isAvailable()));
}
//serialize fields except of fields we cannot know ahead of time
diff --git a/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java
index 2b78cdb91..9d7a08120 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/SampleApiTest.java
@@ -11,8 +11,9 @@ import vid.automation.test.services.SimulatorApi;
import java.io.IOException;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static java.util.Collections.singletonList;
import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
public class SampleApiTest extends BaseApiTest {
diff --git a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
index 0441da1d2..7735d59af 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/SdcApiTest.java
@@ -1,5 +1,16 @@
package org.onap.vid.api;
+import static net.javacrumbs.jsonunit.JsonMatchers.jsonStringEquals;
+import static org.hamcrest.MatcherAssert.assertThat;
+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;
+import static vid.automation.test.utils.ReadFile.loadResourceAsString;
+
import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.collect.ImmutableList;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
@@ -11,22 +22,9 @@ 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/";
@@ -35,17 +33,17 @@ public class SdcApiTest extends BaseApiTest {
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 A_LA_CARTE_INSTANTIATION_TYPE_EXPECTED_RESPONSE = "sdcApiTest/aLaCarteInstantiationTypeResponse.json";
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 MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE = "sdcApiTest/macroInstantiationTypeResponse.json";
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 EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE = "sdcApiTest/emptyInstantiationTypeResponse.json";
private static final String BOTH_INSTANTIATION_TYPE_FILE_PATH = "csar15782222_instantiationTypeBoth_invariantUUIDAlacarte.zip";
@@ -53,13 +51,15 @@ public class SdcApiTest extends BaseApiTest {
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}";
+ private static final String MIN_MAX_INITIAL_FILE_PATH_OLD_CSAR = "service-VflorenceRvpmsFeAic3011217Svc-csar.csar.zip";
+
+ private static final String GROUPING_SERVICE_ROLE_FILE_PATH = "csar15782222_instantiationTypeAlacarte_VnfGrouping.zip";
+ private static final String GROUPING_SERVICE_ROLE_UUID = "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc";
+ private static final String GROUPING_SERVICE_ROLE_INVARIANT_UUID = "7ee41ce4-4827-44b0-a48e-2707a59905d2";
+ private static final String GROUPING_SERVICE_ROLE_EXPECTED_RESPONSE = "VnfGroup/groupingServiceRoleResponse.json";
@BeforeClass
public void login() {
@@ -74,20 +74,22 @@ public class SdcApiTest extends BaseApiTest {
}
@Test
- public void getServiceModelALaCarteInstantiation() throws IOException, URISyntaxException {
+ public void getServiceModelALaCarteInstantiation() {
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)));
+ String aLaCarteInstantiationTypeExpectedResponse = loadResourceAsString(A_LA_CARTE_INSTANTIATION_TYPE_EXPECTED_RESPONSE);
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(turnOffInstantiationUI(aLaCarteInstantiationTypeExpectedResponse))));
}
@Test
- public void getServiceModelMacroInstantiation() throws IOException, URISyntaxException {
+ public void getServiceModelMacroInstantiation() {
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)));
+ String macroInstantiationTypeExpectedResponse = loadResourceAsString(MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE);
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(turnOffInstantiationUI(macroInstantiationTypeExpectedResponse))));
}
@@ -96,8 +98,8 @@ public class SdcApiTest extends BaseApiTest {
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)));
-
+ String emptyInstantiationTypeExpectedResponse = loadResourceAsString(EMPTY_INSTANTIATION_TYPE_EXPECTED_RESPONSE);
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(turnOffInstantiationUI(emptyInstantiationTypeExpectedResponse))));
}
@Test
@@ -105,7 +107,8 @@ public class SdcApiTest extends BaseApiTest {
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)));
+ String macroInstantiationTypeExpectedResponse = loadResourceAsString(MACRO_INSTANTIATION_TYPE_EXPECTED_RESPONSE);
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(turnOffInstantiationUI(macroInstantiationTypeExpectedResponse))));
}
@Test
@@ -113,7 +116,8 @@ public class SdcApiTest extends BaseApiTest {
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)));
+ String minMaxInitialExpectedResponse = loadResourceAsString("sdcApiTest/minMaxInitialExpectedResponse.json");
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(turnOffInstantiationUI(minMaxInitialExpectedResponse))));
}
@Test
@@ -121,7 +125,18 @@ public class SdcApiTest extends BaseApiTest {
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)));
+ String minMaxInitialExpectedResponseOldCsar = loadResourceAsString("sdcApiTest/minMaxInitialExpectedResponseOldCsar.json");
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(minMaxInitialExpectedResponseOldCsar)));
+ }
+
+ @Test
+ @FeatureTogglingTest(Features.FLAG_1902_VNF_GROUPING)
+ public void getServiceModelWithServiceRoleGrouping(){
+ registerToSimulatorWithPresets(GROUPING_SERVICE_ROLE_UUID, GROUPING_SERVICE_ROLE_INVARIANT_UUID, GROUPING_SERVICE_ROLE_FILE_PATH);
+ ResponseEntity<String> response = restTemplate.getForEntity(buildUri(SDC_GET_SERVICE_MODEL + GROUPING_SERVICE_ROLE_UUID), String.class);
+ Assert.assertEquals(response.getStatusCode(), HttpStatus.OK);
+ String groupingServiceRoleExpectedResponse = loadResourceAsString(GROUPING_SERVICE_ROLE_EXPECTED_RESPONSE);
+ assertThat("The response is in the format of JSON", response.getBody(), is(jsonStringEquals(groupingServiceRoleExpectedResponse)));
}
private void registerToSimulatorWithPresets(String uuid, String invariantUuid, String pathPath){
@@ -131,6 +146,15 @@ public class SdcApiTest extends BaseApiTest {
registerExpectationFromPresets(presets, CLEAR_THEN_SET);
}
+ private String turnOffInstantiationUI(String expectedJson) {
+ if (!Features.FLAG_5G_IN_NEW_INSTANTIATION_UI.isActive()) {
+ // replaces the instantiationUI field-value with "legacy", whatever it was
+ return expectedJson.replaceFirst("(\"instantiationUI\": *\")[^\"]*(\",)", "$1legacy$2");
+ } else {
+ return expectedJson;
+ }
+ }
+
@Test
public void withModelFromE2eWithToscaParserButNewFlow_requestModels_expectVnfRelatedVfModulesNotNull() {
@@ -139,8 +163,8 @@ public class SdcApiTest extends BaseApiTest {
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);
+ registerExpectation("get_sdc_catalog_services_VflorenceRvpmsFeAic3011217Svc.json", CLEAR_THEN_SET);
+ registerExpectation("create_new_instance/aai_get_full_subscribers.json", APPEND);
final JsonNode response = restTemplate.getForObject(uri + "/rest/models/services/" + "245562de-3984-49ef-a708-6c9d7cfcabd1", JsonNode.class);
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java
index ce290c89f..40ce80ba6 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/ServiceInstanceMsoApiTest.java
@@ -1,16 +1,21 @@
package org.onap.vid.api;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.net.URISyntaxException;
import org.apache.commons.text.StringEscapeUtils;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOActivateFabricConfiguration;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSOActivateFabricConfigurationErrorResponse;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeactivateAndCloudDelete;
+import org.onap.simulator.presetGenerator.presets.mso.PresetMSODeactivateAndCloudDeleteErrorResponse;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
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;
-
public class ServiceInstanceMsoApiTest extends BaseMsoApiTest{
//Urls
@@ -18,11 +23,15 @@ public class ServiceInstanceMsoApiTest extends BaseMsoApiTest{
public static final String MSO_DEACTIVATE_SERVICE_INSTANCE = "mso/mso_deactivate_service_instance/f36f5734-e9df-4fbf-9f35-61be13f028a1";
public static final String MSO_DELETE_SERVICE_INSTANCE = "mso/mso_delete_svc_instance/f36f5734-e9df-4fbf-9f35-61be13f028a1?serviceStatus=active";
public static final String MSO_UNASSIGN_SERVICE_INSTANCE = "mso/mso_delete_svc_instance/f36f5734-e9df-4fbf-9f35-61be13f028a1?serviceStatus=created";
+ public static final String MSO_ACTIVATE_FABRIC_CONFIGURATION = "mso/mso_activate_fabric_configuration/f36f5734-e9df-4fbf-9f35-61be13f028a1";
+ public static final String MSO_DEACTIVATE_AND_CLOUD_DELETE = "mso/mso_vfmodule_soft_delete/f36f5734-e9df-4fbf-9f35-61be13f028a1/vnfId/vfModuleId";
//Request Details
private static final String ACTIVATE_SERVICE_REQUEST_DETAILS = "registration_to_simulator/body_jsons/mso_request_activate_service_instance.json";
private static final String DEACTIVATE_SERVICE_REQUEST_DETAILS = "registration_to_simulator/body_jsons/mso_request_deactivate_service_instance.json";
private static final String DELETE_AND_UNASSIGN_SERVICE_REQUEST_DETAILS = "registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json";
+ private static final String ACTIVATE_FABRIC_CONFIGURATION_REQUEST_DETAILS = "registration_to_simulator/body_jsons/mso_request_activate_fabric_configuration.json";
+ private static final String DEACTIVATE_AND_CLOUD_DELETE_DATA = "registration_to_simulator/body_jsons/mso_request_deactivate_and_cloud_delete.json";
//Jsons
private static final String ACTIVATE_OK_JSON = "activate_service_instance.json";
@@ -35,7 +44,8 @@ public class ServiceInstanceMsoApiTest extends BaseMsoApiTest{
//Expected Responses
private static final String EXPECTED_SUCCESS_MSO_RESPONSE = "{\"requestReferences\": {\"instanceId\": \"f36f5734-e9df-4fbf-9f35-61be13f028a1\", \"requestId\": \"b6dc9806-b094-42f7-9386-a48de8218ce8\"}}";
- private static final String EXPECTED_ERROR_MSO_RESPONSE = "{\"error\":\"222\",\"message\":\"error message\"}";
+ private static final String EXPECTED_ERROR_MSO_RESPONSE = "{\"message\":\"error message\",\"error\":\"222\"}";
+
@Test
public void testActivateServiceInstanceSucceed() throws Exception {
@@ -118,4 +128,37 @@ public class ServiceInstanceMsoApiTest extends BaseMsoApiTest{
buildUri(MSO_DEACTIVATE_SERVICE_INSTANCE), requestBody, errorCode, EXPECTED_ERROR_MSO_RESPONSE, HttpMethod.POST);
}
+
+ @Test
+ public void testActivateFabricConfigurationSucceed() throws Exception {
+ String requestBody = TestUtils.convertRequest(objectMapper, ACTIVATE_FABRIC_CONFIGURATION_REQUEST_DETAILS);
+ callMsoWithFineRequest(new PresetMSOActivateFabricConfiguration("f36f5734-e9df-4fbf-9f35-61be13f028a1", "b6dc9806-b094-42f7-9386-a48de8218ce8"), buildUri(MSO_ACTIVATE_FABRIC_CONFIGURATION), requestBody,
+ HttpStatus.ACCEPTED.value(), EXPECTED_SUCCESS_MSO_RESPONSE, HttpMethod.POST);
+ }
+
+ @Test(dataProvider = "errorCodes")
+ public void testActivateFabricConfigurationFailed(int errorCode) throws IOException, URISyntaxException {
+ String requestBody = TestUtils.convertRequest(objectMapper, ACTIVATE_FABRIC_CONFIGURATION_REQUEST_DETAILS);
+ callMsoWithSimulatedErrorResponse(new PresetMSOActivateFabricConfigurationErrorResponse("f36f5734-e9df-4fbf-9f35-61be13f028a1", errorCode),
+ buildUri(MSO_ACTIVATE_FABRIC_CONFIGURATION), requestBody, errorCode, EXPECTED_ERROR_MSO_RESPONSE, HttpMethod.POST);
+ }
+
+ @Test
+ public void testDeactivateAndCloudDeleteSucceed() throws Exception {
+ String requestBody = TestUtils.convertRequest(objectMapper, DEACTIVATE_AND_CLOUD_DELETE_DATA);
+ callMsoWithFineRequest(ImmutableList.of(
+ new PresetMSODeactivateAndCloudDelete("f36f5734-e9df-4fbf-9f35-61be13f028a1", "vnfId", "vfModuleId", "b6dc9806-b094-42f7-9386-a48de8218ce8", "irma-aic"),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC),
+ buildUri(MSO_DEACTIVATE_AND_CLOUD_DELETE), requestBody,
+ HttpStatus.ACCEPTED.value(), EXPECTED_SUCCESS_MSO_RESPONSE, HttpMethod.POST);
+ }
+
+ @Test(dataProvider = "errorCodes")
+ public void testDeactivateAndCloudDeleteFailed(int errorCode) throws IOException, URISyntaxException {
+ String requestBody = TestUtils.convertRequest(objectMapper, DEACTIVATE_AND_CLOUD_DELETE_DATA);
+ callMsoWithSimulatedErrorResponse(ImmutableList.of(
+ new PresetMSODeactivateAndCloudDeleteErrorResponse("f36f5734-e9df-4fbf-9f35-61be13f028a1", "vnfId", "vfModuleId", errorCode, "irma-aic"),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC),
+ buildUri(MSO_DEACTIVATE_AND_CLOUD_DELETE), requestBody, errorCode, EXPECTED_ERROR_MSO_RESPONSE, HttpMethod.POST);
+ }
}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ServicePermissionsApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ServicePermissionsApiTest.java
new file mode 100644
index 000000000..385ec9b0d
--- /dev/null
+++ b/vid-automation/src/test/java/org/onap/vid/api/ServicePermissionsApiTest.java
@@ -0,0 +1,63 @@
+package org.onap.vid.api;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import org.onap.sdc.ci.tests.datatypes.UserCredentials;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import vid.automation.test.Constants;
+import vid.automation.test.model.User;
+import vid.automation.test.services.SimulatorApi;
+
+public class ServicePermissionsApiTest extends BaseApiTest {
+
+ private final String emanuelSubscriberId = "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb";
+ private final String uspVoiceSubscriberId = "e433710f-9217-458d-a79d-1c7aff376d89";
+
+ @BeforeClass
+ public void setAaiSubscribers() {
+ SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
+ }
+
+ @Test
+ public void servicePermissions_loginWithPermissions_1IsPermitted1NotPermitted() {
+ login(userCredentials(Constants.Users.EMANUEL_vWINIFRED));
+ assertPermissions(emanuelSubscriberId, "vRichardson", true);
+ assertPermissions(emanuelSubscriberId, "someNonexistent", false);
+ }
+
+ @Test
+ public void servicePermissions_loginPermissionsWithTenant_IsPermittedRegardlessOfTenant() {
+ login(userCredentials("Emanuel_with_tenant"));
+ assertPermissions(emanuelSubscriberId, "vWINIFRED", true);
+ }
+
+ @Test
+ public void servicePermissions_loginWithNoPermissionsAtAll_nothingIsPermitted() {
+ login(userCredentials(Constants.Users.READONLY));
+ assertPermissions(emanuelSubscriberId, "vRichardson", false);
+ assertPermissions(emanuelSubscriberId, "someNonexistent", false);
+ }
+
+ @Test
+ public void servicePermissions_serviceTypeWithSpace_isPermitted() {
+ login(userCredentials(Constants.Users.SILVIA_ROBBINS_TYLER_SILVIA));
+ assertPermissions(uspVoiceSubscriberId, "TYLER SILVIA", true);
+ }
+
+ private UserCredentials userCredentials(String userName) {
+ User user = usersService.getUser(userName);
+ return new UserCredentials(user.credentials.userId, user.credentials.password, userName, "", "");
+ }
+
+ private void assertPermissions(final String subscriberId, final String serviceType, boolean isEditPermitted) {
+ final Map response = restTemplate.getForObject(uri + "/roles/service_permissions?subscriberId=" + subscriberId + "&serviceType=" + serviceType, Map.class);
+ assertThat(response, is(ImmutableMap.of(
+ "isEditPermitted", isEditPermitted
+ )));
+ }
+}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java
new file mode 100644
index 000000000..52aa2e388
--- /dev/null
+++ b/vid-automation/src/test/java/org/onap/vid/api/ServiceTreeApiTest.java
@@ -0,0 +1,370 @@
+package org.onap.vid.api;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMultimap;
+import com.google.common.collect.Multimap;
+import org.onap.simulator.presetGenerator.presets.aai.*;
+import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceMetadataGet;
+import org.onap.simulator.presetGenerator.presets.sdc.PresetSDCGetServiceToscaModelGet;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import vid.automation.test.services.SimulatorApi;
+
+import java.util.UUID;
+
+import static org.apache.commons.text.StringEscapeUtils.escapeJson;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.*;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET;
+
+public class ServiceTreeApiTest extends BaseApiTest {
+
+ private static final String API_URL = "/aai_get_service_instance_topology/{subscriberId}/{serviceType}/{serviceInstanceId}";
+
+ @BeforeClass
+ public void login() {
+ super.login();
+ }
+
+ @Test
+ public void serviceWithNoChildren_requestDoesSomething() {
+ final PresetAAIStandardQueryGet serviceInstance =
+ PresetAAIStandardQueryGet.ofServiceInstance("service-instance-id", "7a6ee536-f052-46fa-aa7e-2fca9d674c44", "service-instance-model-invariant-id", "global-customer-id", "service-instance-type", ImmutableMultimap.of());
+
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ serviceInstance,
+ new PresetAAIModelsByInvariantIdGet(ImmutableList.of("service-instance-model-invariant-id")),
+ new PresetSDCGetServiceMetadataGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "service-instance-model-invariant-id", "csar15782222_instantiationTypeMacroWithNetwork.zip"),
+ new PresetSDCGetServiceToscaModelGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "csar15782222_instantiationTypeMacroWithNetwork.zip")
+ ), CLEAR_THEN_SET);
+ final String response = restTemplate.getForObject(buildUri(API_URL), String.class, "global-customer-id", "service-instance-type", "service-instance-id");
+
+ assertJsonEquals(response, "" +
+ "{" +
+ " \"instanceName\": \"" + escapeJson(serviceInstance.getInstanceName()) + "\"," +
+ " \"action\": \"None\"," +
+ " \"instanceId\": \"service-instance-id\"," +
+ " \"orchStatus\": \"GARBAGE DATA\"," +
+ " \"globalSubscriberId\": \"global-customer-id\"," +
+ " \"subscriptionServiceType\": \"service-instance-type\"," +
+ " \"owningEntityId\": null," +
+ " \"owningEntityName\": null," +
+ " \"productFamilyId\": null," +
+ " \"lcpCloudRegionId\": null," +
+ " \"tenantId\": null," +
+ " \"tenantName\": null," +
+ " \"aicZoneId\": null," +
+ " \"aicZoneName\": null," +
+ " \"projectName\": null," +
+ " \"rollbackOnFailure\": null," +
+ " \"modelInfo\": {" +
+ " \"modelInvariantId\": \"service-instance-model-invariant-id\"," +
+ " \"modelVersionId\": \"7a6ee536-f052-46fa-aa7e-2fca9d674c44\"," +
+ " \"modelName\": \"vf_vEPDG\"," +
+ " \"modelType\": \"service\"," +
+ " \"modelVersion\": \"2.0\"" +
+ " }," +
+ " \"vnfs\": {}," +
+ " \"networks\": {}," +
+ " \"vnfGroups\": {}," +
+ " \"validationCounter\": 0," +
+ " \"existingVNFCounterMap\": {}," +
+ " \"existingNetworksCounterMap\": {}," +
+ " \"existingVnfGroupCounterMap\": {}," +
+ " \"isALaCarte\": false" +
+ "}");
+ }
+
+ @Test
+ public void searchGroupMembers_expected4vnfs() {
+ PresetAAIStandardQueryGet instanceGroup1 = PresetAAIStandardQueryGet.ofInstanceGroup("L3-NETWORK", "SUB_INTERFACE", ImmutableMultimap.of());
+ PresetAAIStandardQueryGet instanceGroup2 = PresetAAIStandardQueryGet.ofInstanceGroup("LOAD-GROUP", "SERVICE-ACCESS", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet vnfPreset1 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "7a6ee536-f052-46fa-aa7e-2fca9d674c44", "",
+ ImmutableMultimap.of("instance-group", instanceGroup1.getReqPath()));
+
+ PresetAAIStandardQueryGet vnfPreset2 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "eb5f56bf-5855-4e61-bd00-3e19a953bf02",
+ "\"in-maint\": true,", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet vnfPreset3 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "",
+ ImmutableMultimap.of("instance-group", instanceGroup1.getReqPath()));
+
+ PresetAAIStandardQueryGet vnfPreset4 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "b7f2e8fb-ac71-4ea0-a801-06ef1479ea84",
+ "\"in-maint\": true,", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet vnfPreset5 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "b7f2e8fb-ac71-4ea0-a801-06ef1479ea84",
+ "\"in-maint\": true,", ImmutableMultimap.of("instance-group", instanceGroup2.getReqPath()));
+
+ Multimap<String, String> serviceInstance1 = ImmutableMultimap.<String, String>builder()
+ .putAll("generic-vnf", vnfPreset1.getReqPath())
+ .putAll("generic-vnf", vnfPreset3.getReqPath())
+ .build();
+
+ Multimap<String, String> serviceInstance2 = ImmutableMultimap.<String, String>builder()
+ .putAll("generic-vnf", vnfPreset2.getReqPath())
+ .putAll("generic-vnf", vnfPreset4.getReqPath())
+ .putAll("generic-vnf", vnfPreset5.getReqPath())
+ .build();
+
+ PresetAAIGetServiceInstancesByInvariantId serviceInstancesList = new PresetAAIGetServiceInstancesByInvariantId(
+ "global-customer-id", "service-instance-type", "24632e6b-584b-4f45-80d4-fefd75fd9f14",
+ ImmutableMap.of("service-instance-id1", serviceInstance1,
+ "service-instance-id2", serviceInstance2));
+
+
+ SimulatorApi.registerExpectationFromPresets(
+ ImmutableList.of(serviceInstancesList,
+ vnfPreset1, instanceGroup1,
+ vnfPreset2,
+ vnfPreset3,
+ vnfPreset4,
+ vnfPreset5, instanceGroup2, //this vnf should be filtered out
+ new PresetAAIModelsByInvariantIdGet(ImmutableList.of("vnf-instance-model-invariant-id")),
+ new PresetAAIGetCloudRegionFromVnf(vnfPreset1.getInstanceId()),
+ new PresetAAIGetCloudRegionFromVnf(vnfPreset2.getInstanceId()),
+ new PresetAAIGetCloudRegionFromVnf(vnfPreset3.getInstanceId()),
+ new PresetAAIGetCloudRegionFromVnf(vnfPreset4.getInstanceId())
+ ), CLEAR_THEN_SET);
+
+ String api_url = "aai_search_group_members?subscriberId={subscriberId}&serviceType={serviceType}&serviceInvariantId={serviceInvariantId}" +
+ "&groupType={groupType}&groupRole={groupRole}";
+
+ final String response = restTemplate.getForObject(buildUri(api_url), String.class, "global-customer-id", "service-instance-type", "24632e6b-584b-4f45-80d4-fefd75fd9f14", "LOAD-GROUP", "SERVICE-ACCESS");
+
+ LOGGER.info(response);
+
+ String expected = TestUtils.convertRequest(objectMapper, "VnfGroup/searchMembersResponse.json");
+ expected = expected
+ .replace("VNF1_INSTANCE_NAME", vnfPreset1.getInstanceName())
+ .replace("VNF1_INSTANCE_ID", vnfPreset1.getInstanceId())
+ .replace("VNF1_INSTANCE_TYPE", vnfPreset1.getInstanceType())
+ .replace("VNF2_INSTANCE_NAME", vnfPreset2.getInstanceName())
+ .replace("VNF2_INSTANCE_ID", vnfPreset2.getInstanceId())
+ .replace("VNF2_INSTANCE_TYPE", vnfPreset2.getInstanceType())
+ .replace("VNF3_INSTANCE_NAME", vnfPreset3.getInstanceName())
+ .replace("VNF3_INSTANCE_ID", vnfPreset3.getInstanceId())
+ .replace("VNF3_INSTANCE_TYPE", vnfPreset3.getInstanceType())
+ .replace("VNF4_INSTANCE_NAME", vnfPreset4.getInstanceName())
+ .replace("VNF4_INSTANCE_ID", vnfPreset4.getInstanceId())
+ .replace("VNF4_INSTANCE_TYPE", vnfPreset4.getInstanceType());
+
+ assertJsonEquals(response, expected);
+ }
+
+ @Test
+ public void searchGroupMembers_expectedNoResult() {
+ PresetAAIGetServiceInstancesByInvariantId serviceInstancesList = new PresetAAIGetServiceInstancesByInvariantId(
+ "global-customer-id", "service-instance-type", "24632e6b-584b-4f45-80d4-fefd75fd9f14",
+ ImmutableMap.of("service-instance-id1", ImmutableMultimap.of(),
+ "service-instance-id2", ImmutableMultimap.of()));
+
+
+ SimulatorApi.registerExpectationFromPreset(serviceInstancesList, CLEAR_THEN_SET);
+
+ String api_url = "aai_search_group_members?subscriberId={subscriberId}&serviceType={serviceType}&serviceInvariantId={serviceInvariantId}" +
+ "&groupType={groupType}&groupRole={groupRole}";
+
+ final String response = restTemplate.getForObject(buildUri(api_url), String.class, "global-customer-id", "service-instance-type", "24632e6b-584b-4f45-80d4-fefd75fd9f14", "LOAD-GROUP", "SERVICE-ACCESS");
+
+ assertJsonEquals(response, "[]");
+ }
+
+ @Test
+ public void serviceWithMultiplePlys_responseIsReasonable() {
+
+ PresetAAIStandardQueryGet l3NetworkPreset1 =
+ PresetAAIStandardQueryGet.ofL3Network("CONTRAIL30_BASIC", "Assigned",
+ ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet vlanTag1 = PresetAAIStandardQueryGet.ofVlanTag(44);
+
+ PresetAAIStandardQueryGet l3NetworkPreset2 =
+
+ PresetAAIStandardQueryGet.ofL3Network("CONTRAIL30_BASIC", "Created",
+ ImmutableMultimap.of("vlan-tag", vlanTag1.getReqPath()));
+
+ PresetAAIStandardQueryGet l3NetworkPreset3 =
+ PresetAAIStandardQueryGet.ofL3Network("CONTRAIL30_BASIC", "Assigned", "nvtprov", "ddc3f20c-08b5-40fd-af72-c6d14636b986","94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet l3NetworkPreset4 =
+ PresetAAIStandardQueryGet.ofL3Network("CONTRAIL30_HIMELGUARD", "Created", "preprov", "ddc3f20c-08b5-40fd-af72-c6d14636b986","94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet volumeGroup1 =
+ PresetAAIStandardQueryGet.ofVolumeGroup("vSON_test", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet instanceGroup1 = PresetAAIStandardQueryGet.ofInstanceGroup("L3-NETWORK", "Ruby Figueroa", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet collection1 =
+ PresetAAIStandardQueryGet.ofCollectionResource("Assigned",
+ ImmutableMultimap.of("instance-group", instanceGroup1.getReqPath()));
+
+ PresetAAIStandardQueryGet vnfPreset1 =
+ PresetAAIStandardQueryGet.ofVnf(randUuid(),
+ ImmutableMultimap.of("l3-network", l3NetworkPreset1.getReqPath(), "l3-network", l3NetworkPreset2.getReqPath()));
+
+ PresetAAIStandardQueryGet vnfPreset2 =
+ PresetAAIStandardQueryGet.ofVnf(randUuid(), "d6557200-ecf2-4641-8094-5393ae3aae60","91415b44-753d-494c-926a-456a9172bbb9",
+ "\"in-maint\": true,", ImmutableMultimap.of("volume-group", volumeGroup1.getReqPath()));
+
+ PresetAAIGetVfModulesByVnf vfModules2 = new PresetAAIGetVfModulesByVnf(vnfPreset2.getInstanceId());
+
+ final PresetAAIStandardQueryGet serviceInstance =
+ PresetAAIStandardQueryGet.ofServiceInstance("service-instance-id", "6e59c5de-f052-46fa-aa7e-2fca9d674c44", "d27e42cf-087e-4d31-88ac-6c4b7585f800", "global-customer-id", "service-instance-type",
+ ImmutableMultimap.<String, String>builder()
+ .putAll("l3-network", l3NetworkPreset3.getReqPath(), l3NetworkPreset4.getReqPath())
+ .putAll("collection", collection1.getReqPath())
+ .putAll("generic-vnf", vnfPreset1.getReqPath(), vnfPreset2.getReqPath())
+ .build()
+ );
+
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ serviceInstance,
+ l3NetworkPreset3, l3NetworkPreset4, vnfPreset1, vnfPreset2, collection1,
+ volumeGroup1, l3NetworkPreset1, l3NetworkPreset2, instanceGroup1,
+ vlanTag1, vfModules2,
+ new PresetAAIModelsByInvariantIdGet(ImmutableList.of("d27e42cf-087e-4d31-88ac-6c4b7585f800")),
+ new PresetGetSessionSlotCheckIntervalGet(),
+ new PresetAAIGetSubscribersGet(),
+ new PresetSDCGetServiceMetadataGet("6e59c5de-f052-46fa-aa7e-2fca9d674c44", "d27e42cf-087e-4d31-88ac-6c4b7585f800", "csar15782222_instantiationTypeMacroWithNetwork.zip"),
+ new PresetSDCGetServiceToscaModelGet("6e59c5de-f052-46fa-aa7e-2fca9d674c44", "csar15782222_instantiationTypeMacroWithNetwork.zip")
+ ), CLEAR_THEN_SET);
+
+ String expected = TestUtils.convertRequest(objectMapper, "aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceInstance.json");
+ expected = expected
+ .replace("SERVICE_INSTANCE_NAME", serviceInstance.getInstanceName())
+ .replace("VNF1_INSTANCE_NAME", vnfPreset1.getInstanceName())
+ .replace("VNF1_INSTANCE_ID", vnfPreset1.getInstanceId())
+ .replace("VNF1_INSTANCE_TYPE", vnfPreset1.getInstanceType())
+ .replace("VNF2_INSTANCE_NAME", vnfPreset2.getInstanceName())
+ .replace("VNF2_INSTANCE_ID", vnfPreset2.getInstanceId())
+ .replace("VNF2_INSTANCE_TYPE", vnfPreset2.getInstanceType())
+ .replace("NETWORK1_INSTANCE_NAME", l3NetworkPreset1.getInstanceName())
+ .replace("NETWORK1_INSTANCE_ID", l3NetworkPreset1.getInstanceId())
+ .replace("NETWORK2_INSTANCE_NAME", l3NetworkPreset2.getInstanceName())
+ .replace("NETWORK2_INSTANCE_ID", l3NetworkPreset2.getInstanceId())
+ .replace("NETWORK3_INSTANCE_NAME", l3NetworkPreset3.getInstanceName())
+ .replace("NETWORK3_INSTANCE_ID", l3NetworkPreset3.getInstanceId())
+ .replace("NETWORK4_INSTANCE_NAME", l3NetworkPreset4.getInstanceName())
+ .replace("NETWORK4_INSTANCE_ID", l3NetworkPreset4.getInstanceId());
+
+ String response = restTemplate.getForObject(buildUri(API_URL), String.class, "global-customer-id", "service-instance-type", "service-instance-id");
+
+ assertJsonEquals(response, expected);
+ }
+
+ @Test
+ public void serviceWithVnfGotError_exceptionIsThrown() {
+
+ PresetAAIStandardQueryGet vnfPreset =
+ PresetAAIStandardQueryGet.ofVnf(randUuid(),
+ ImmutableMultimap.of("l3-network", "/aai/v../I'm a wrong path"));
+
+ final PresetAAIStandardQueryGet serviceInstance =
+ PresetAAIStandardQueryGet.ofServiceInstance("service-instance-id", "7a6ee536-f052-46fa-aa7e-2fca9d674c44", "service-instance-model-invariant-id", "global-customer-id", "service-instance-type",
+ ImmutableMultimap.<String, String>builder()
+ .putAll("generic-vnf", vnfPreset.getReqPath())
+ .build()
+ );
+
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ serviceInstance,
+ vnfPreset,
+ new PresetAAIModelsByInvariantIdGet(ImmutableList.of("service-instance-model-invariant-id")),
+ new PresetSDCGetServiceMetadataGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "service-instance-model-invariant-id", "csar15782222_instantiationTypeMacroWithNetwork.zip"),
+ new PresetSDCGetServiceToscaModelGet("7a6ee536-f052-46fa-aa7e-2fca9d674c44", "csar15782222_instantiationTypeMacroWithNetwork.zip"),
+ new PresetGetSessionSlotCheckIntervalGet(),
+ new PresetAAIGetSubscribersGet()
+ ), CLEAR_THEN_SET);
+
+ final ResponseEntity<String> response = restTemplateErrorAgnostic.getForEntity(buildUri(API_URL), String.class, "global-customer-id", "service-instance-type", "service-instance-id");
+ assertThat(response.getBody(),containsString("AAI node fetching failed"));
+ assertThat(response.getStatusCode(), is(HttpStatus.INTERNAL_SERVER_ERROR));
+ }
+
+ @Test
+ public void serviceWithTwoVnfGroupsAndRelatedVnfs() {
+ PresetAAIStandardQueryGet relatedVnf1 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet relatedVnf2 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "", ImmutableMultimap.of());
+
+ PresetAAIStandardQueryGet relatedVnf3 =
+ PresetAAIStandardQueryGet.ofRelatedVnf(randUuid(), "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "", ImmutableMultimap.of());
+
+ final PresetAAIStandardQueryGet vnfGroup1 =
+ PresetAAIStandardQueryGet.ofInstanceGroup("vnfGroup-type", "Teresa Bradley",
+ ImmutableMultimap.<String, String>builder()
+ .putAll("generic-vnf", relatedVnf1.getReqPath(), relatedVnf2.getReqPath(), relatedVnf3.getReqPath())
+ .build()
+ );
+
+ final PresetAAIStandardQueryGet vnfGroup2 =
+ PresetAAIStandardQueryGet.ofInstanceGroup("vnfGroup-type", "Stanley Mccarthy", ImmutableMultimap.of());
+
+ final PresetAAIStandardQueryGet serviceInstance =
+ PresetAAIStandardQueryGet.ofServiceInstance("service-instance-id", "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "7ee41ce4-4827-44b0-a48e-2707a59905d2", "global-customer-id", "service-instance-type",
+ ImmutableMultimap.<String, String>builder()
+ .putAll("instance-group", vnfGroup1.getReqPath(),vnfGroup2.getReqPath())
+ .build()
+ );
+
+ SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
+ serviceInstance,
+ vnfGroup1,vnfGroup2, relatedVnf1, relatedVnf2, relatedVnf3,
+ new PresetAAIModelsByInvariantIdGet(ImmutableList.of("7ee41ce4-4827-44b0-a48e-2707a59905d2", "vnf-instance-model-invariant-id")),
+ new PresetGetSessionSlotCheckIntervalGet(),
+ new PresetAAIGetSubscribersGet(),
+ new PresetSDCGetServiceMetadataGet("4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "7ee41ce4-4827-44b0-a48e-2707a59905d2", "service-vnf-grouping-csar.zip"),
+ new PresetSDCGetServiceToscaModelGet("4117a0b6-e234-467d-b5b9-fe2f68c8b0fc", "service-vnf-grouping-csar.zip")
+ ), CLEAR_THEN_SET);
+
+ String expected = TestUtils.convertRequest(objectMapper, "VnfGroup/serviceWithVnfGroupsChildren_serviceInstance.json");
+ expected = expected
+ .replace("SERVICE_INSTANCE_NAME", serviceInstance.getInstanceName())
+ .replace("VNF_GROUP1_INSTANCE_ID", vnfGroup1.getInstanceId())
+ .replace("VNF_GROUP1_INSTANCE_NAME", vnfGroup1.getInstanceName())
+ .replace("VNF_GROUP1_INSTANCE_TYPE", vnfGroup1.getInstanceType())
+ .replace("VNF_GROUP1_INSTANCE_ROLE", vnfGroup1.getInstanceRole())
+
+ .replace("RELATED_VNF1_INSTANCE_ID", relatedVnf1.getInstanceId())
+ .replace("RELATED_VNF1_INSTANCE_NAME", relatedVnf1.getInstanceName())
+ .replace("RELATED_VNF1_INSTANCE_TYPE", relatedVnf1.getInstanceType())
+
+ .replace("RELATED_VNF2_INSTANCE_ID", relatedVnf2.getInstanceId())
+ .replace("RELATED_VNF2_INSTANCE_NAME", relatedVnf2.getInstanceName())
+ .replace("RELATED_VNF2_INSTANCE_TYPE", relatedVnf2.getInstanceType())
+
+ .replace("RELATED_VNF3_INSTANCE_ID", relatedVnf3.getInstanceId())
+ .replace("RELATED_VNF3_INSTANCE_NAME", relatedVnf3.getInstanceName())
+ .replace("RELATED_VNF3_INSTANCE_TYPE", relatedVnf3.getInstanceType())
+
+ .replace("VNF_GROUP2_INSTANCE_ID", vnfGroup2.getInstanceId())
+ .replace("VNF_GROUP2_INSTANCE_NAME", vnfGroup2.getInstanceName())
+ .replace("VNF_GROUP2_INSTANCE_TYPE", vnfGroup2.getInstanceType())
+ .replace("VNF_GROUP2_INSTANCE_ROLE", vnfGroup2.getInstanceRole());
+
+ final String response = restTemplate.getForObject(buildUri(API_URL), String.class, "global-customer-id", "service-instance-type", "service-instance-id");
+
+ assertJsonEquals(response, expected);
+ }
+
+ private String randUuid() {
+ return UUID.randomUUID().toString();
+ }
+}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/TestUtils.java b/vid-automation/src/test/java/org/onap/vid/api/TestUtils.java
deleted file mode 100644
index 76c122c48..000000000
--- a/vid-automation/src/test/java/org/onap/vid/api/TestUtils.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.onap.vid.api;
-
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.core.io.support.ResourcePatternResolver;
-import org.springframework.http.HttpStatus;
-
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import java.util.Scanner;
-
-/**
- * Created by Oren on 6/7/17.
- */
-public class TestUtils {
-
- protected static ObjectMapper objectMapper = new ObjectMapper();
-
- public static void assertStatusOK(Object request, WebTarget webTarget, Response response) throws IOException {
- assertHttpStatus(request, webTarget, response, HttpStatus.OK);
- }
-
- public static void assertHttpStatus(Object request, WebTarget webTarget, Response response, HttpStatus exceptedHttpStatus) throws IOException {
- objectMapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
-
- org.testng.Assert.assertEquals(response.getStatus(), exceptedHttpStatus.value(),
- String.format("Failed post URI: %s with request %s. Got Status:%d and body: %s",
- webTarget.getUri(),
- objectMapper.writeValueAsString(request),
- response.getStatus(),
- objectMapper.writeValueAsString(response.getEntity())));
- }
-
- public static String convertRequest(ObjectMapper objectMapper, String msoRequestDetailsFileName) {
-
- ClassLoader cl = pProbeMsoApiTest.class.getClassLoader();
- ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(cl);
- Resource[] resources;
- try {
- resources = resolver.getResources(msoRequestDetailsFileName);
- String content;
- File file = resources[0].getFile();
- content = new Scanner(file).useDelimiter("\\Z").next();
- objectMapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true);
- return objectMapper.writeValueAsString(objectMapper.readValue(content, Object.class));
- }
- catch (IOException e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- }
-
- public static String getNestedPropertyInMap(Object item, String path) {
- return getNestedPropertyInMap(item, path, String.class, "/");
- }
-
- public static <T> T getNestedPropertyInMap(Object item, String path, Class<T> valueType) {
- return getNestedPropertyInMap(item, path, valueType, "/");
- }
-
- /*
- Use this method to extract item from Map that represent Json hierarchy (Map<String,Map>)
- */
- public static <T> T getNestedPropertyInMap(Object item, String path, Class<T> valueType, String delimeter) {
- String[] pathes = path.split(delimeter);
- return valueType.cast(getNestedPropertyInMap(item,pathes,0));
- }
-
- private static Object getNestedPropertyInMap(Object item, String[] pathes, int index) {
- if (index==pathes.length) {
- return item;
- }
- return getNestedPropertyInMap(((Map<String,Object>)item).get(pathes[index]), pathes, ++index);
- }
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java
new file mode 100644
index 000000000..4dc799193
--- /dev/null
+++ b/vid-automation/src/test/java/org/onap/vid/api/VersionControllerApiTest.java
@@ -0,0 +1,26 @@
+package org.onap.vid.api;
+
+import org.junit.Assert;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+import org.testng.annotations.Test;
+
+import java.util.HashMap;
+
+public class VersionControllerApiTest extends BaseApiTest {
+
+ @Test
+ public void probeRequest_returnsResponseAsExpected() {
+ // without log-in
+ ResponseEntity<HashMap<String, String>> response = new RestTemplate().exchange(
+ uri + "/version",
+ org.springframework.http.HttpMethod.GET,
+ null,
+ new ParameterizedTypeReference<HashMap<String, String>>() {
+ });
+ HashMap<String,String> versionResults = response.getBody();
+ Assert.assertNotNull(versionResults.get("features"));
+ Assert.assertNotNull(versionResults.get("build"));
+ }
+}
diff --git a/vid-automation/src/test/java/org/onap/vid/api/VidConfigurationApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/VidConfigurationApiTest.java
index 38ce8613d..ec479d900 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/VidConfigurationApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/VidConfigurationApiTest.java
@@ -4,6 +4,7 @@ import org.springframework.http.ResponseEntity;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+import static java.util.Collections.singletonList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
diff --git a/vid-automation/src/test/java/org/onap/vid/api/pProbeAaiApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/pProbeAaiApiTest.java
index 1765645af..db10fdc57 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/pProbeAaiApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/pProbeAaiApiTest.java
@@ -1,6 +1,13 @@
package org.onap.vid.api;
+import static vid.automation.test.services.SimulatorApi.RegistrationStrategy;
+import static vid.automation.test.services.SimulatorApi.registerExpectation;
+
import com.google.common.collect.ImmutableMap;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
import org.apache.commons.text.StringEscapeUtils;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
@@ -9,14 +16,6 @@ import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-
-import static vid.automation.test.services.SimulatorApi.RegistrationStrategy;
-import static vid.automation.test.services.SimulatorApi.registerExpectation;
-
public class pProbeAaiApiTest extends BaseApiAaiTest {
@@ -36,7 +35,7 @@ public class pProbeAaiApiTest extends BaseApiAaiTest {
//URIs
private static final String GET_SERVICE_INSTANCE_PNFS = "aai_get_service_instance_pnfs/31739f3e-526b-11e6-beb8-9e71128cae77/AIM Transport/f36f5734-e9df-4fbf-9f35-61be13f028a1";
private static final String GET_SPECIFIC_PNF_URI = "aai_get_pnfs/pnf/DEAAI78";
- private static final String GET_PNF_BY_REGION = "aai_get_pnf_instances/e433710f-9217-458d-a79d-1c7aff376d89/VIRTUAL USP/8a84e59b-45fe-4851-8ff1-34225a0b32c3/83b458fd-5dd3-419b-a9e3-7335814a0911/AAIAIC25/Cisco/Nexus 3048-TP";
+ private static final String GET_PNF_BY_REGION = "aai_get_pnf_instances/e433710f-9217-458d-a79d-1c7aff376d89/TYLER SILVIA/8a84e59b-45fe-4851-8ff1-34225a0b32c3/83b458fd-5dd3-419b-a9e3-7335814a0911/JANET25/Cisco/Nexus 3048-TP";
@@ -109,7 +108,7 @@ public class pProbeAaiApiTest extends BaseApiAaiTest {
@Test
public void testGetPnfDataByRegion() throws Exception {
- String expected = "{\"results\":[{\"id\":\"901128280\",\"url\":\"/aai/v12/network/pnfs/pnf/AS-pnf2-10219--as988q\",\"properties\":{\"pnfName\":\"AS-pnf2-10219--as988q\",\"equipType\":\"Switch\",\"equipVendor\":\"Cisco\",\"equipModel\":\"Nexus3048-TP\",\"inMaint\":false,\"resourceVersion\":\"1508776538192\"},\"nodeType\":\"pnf\",\"relatedTo\":[{\"id\":\"532488360\",\"url\":\"/aai/v12/business/customers/customer/customer-10219-as988q/service-subscriptions/service-subscription/serviceSub2-test-10219-as988q/service-instances/service-instance/serviceIns2-test-10219-as988q\",\"nodeType\":\"service-instance\",\"relationshipLabel\":\"uses\"},{\"id\":\"860164248\",\"url\":\"/aai/v12/cloud-infrastructure/complexes/complex/complex-10219--as988q\",\"nodeType\":\"complex\",\"relationshipLabel\":\"locatedIn\"}]}],\"additionalProperties\":{}}";
+ String expected = "{\"results\":[{\"id\":\"901128280\",\"url\":\"/aai/v12/network/pnfs/pnf/AS-pnf2-10219--as988q\",\"properties\":{\"pnfName\":\"AS-pnf2-10219--as988q\",\"equipType\":\"Switch\",\"equipVendor\":\"Cisco\",\"equipModel\":\"Nexus3048-TP\",\"inMaint\":false,\"resourceVersion\":\"1508776538192\"},\"nodeType\":\"pnf\",\"relatedTo\":[{\"id\":\"532488360\",\"url\":\"/aai/v12/business/customers/customer/customer-10219-as988q/service-subscriptions/service-subscription/serviceSub2-test-10219-as988q/service-instances/service-instance/serviceIns2-test-10219-as988q\",\"node-type\":\"service-instance\",\"relationship-label\":\"uses\"},{\"id\":\"860164248\",\"url\":\"/aai/v12/cloud-infrastructure/complexes/complex/complex-10219--as988q\",\"node-type\":\"complex\",\"relationship-label\":\"locatedIn\"}]}]}";
callAaiWithSimulatedErrorResponse(GET_PNF_BY_REGION_RESPONSE,
ImmutableMap.of(),
buildUri(GET_PNF_BY_REGION), "",200,expected, HttpMethod.GET);
@@ -136,7 +135,7 @@ public class pProbeAaiApiTest extends BaseApiAaiTest {
@Test
public void testGetPnfDataByRegionNoResults() throws IOException, URISyntaxException {
final String registratedResult = "{\"results\":[]}";
- final String expectedResult ="{\"results\":[],\"additionalProperties\":{}}";
+ final String expectedResult ="{\"results\":[]}";
final int expectedResponseCode = 200;
callAaiWithSimulatedErrorResponse(GET_PNF_BY_REGION_RESPONSE_EMPTY,
ImmutableMap.of("500", Integer.toString(expectedResponseCode),"\"ERROR_PAYLOAD\"", StringEscapeUtils.escapeJson(registratedResult)),
diff --git a/vid-automation/src/test/java/org/onap/vid/api/pProbeMsoApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/pProbeMsoApiTest.java
index c082ef95a..534dc6934 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/pProbeMsoApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/pProbeMsoApiTest.java
@@ -1,7 +1,11 @@
package org.onap.vid.api;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.text.StringEscapeUtils;
+import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetCloudOwnersByCloudRegionId;
+import org.onap.simulator.presetGenerator.presets.mso.configuration.PresetMSOActOnConfiguration;
+import org.onap.simulator.presetGenerator.presets.mso.configuration.PresetMSOCreateConfiguration;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.testng.annotations.Test;
@@ -15,7 +19,7 @@ public class pProbeMsoApiTest extends BaseMsoApiTest{
private static final String MSO_REMOVE_RELATIONSHIP = "/mso/mso_remove_relationship/f36f5734-e9df-4fbf-9f35-61be13f028a1";
private static final String MSO_ADD_RELATIONSHIP = "/mso/mso_add_relationship/f36f5734-e9df-4fbf-9f35-61be13f028a1";
public static final String MSO_CREATE_CONFIGURATION = "mso/mso_create_configuration_instance/f36f5734-e9df-4fbf-9f35-61be13f028a1/configurations/";
- public static final String MSO_ACTIVATE_CONFIGURATION = "mso/mso_activate_configuration/f36f5734-e9df-4fbf-9f35-61be13f028a1/configurations/a53c9ca8-8986-44da-9e5e-9e4179e6c78a";
+ public static final String MSO_ACTIVATE_CONFIGURATION = "mso/mso_activate_configuration/c187e9fe-40c3-4862-b73e-84ff056205f6/configurations/9533-config-LB1113";
@@ -24,15 +28,12 @@ public class pProbeMsoApiTest extends BaseMsoApiTest{
//Request Details
private static final String CREATE_CONFIGURATION_REQUEST_DETAILS = "registration_to_simulator/body_jsons/mso_request_create_configuration.json";
-
+ private static final String ACTIVATE_CONFIGURATION_REQUEST_DETAILS = "registration_to_simulator/body_jsons/mso_request_activate_configuration.json";
//Jsons
private static final String DISSOCIATE_OK_JSON = "dissociate_pnf_from_service_instance.json";
private static final String DISSOCIATE_FAILED_JSON = "dissociate_pnf_from_service_instance_error.json";
private static final String ASSOCIATE_OK_JSON = "mso_add_relationships.json";
private static final String ASSOCIATE_FAILED_JSON = "mso_add_relationships_error.json";
- private static final String CREATE_CONFIGURATION_OK_JSON = "mso_create_configurations.json";
- private static final String CREATE_CONFIGURATION_FAILED_JSON = "mso_create_configurations_error.json";
- private static final String ACTIVATE_CONFIGURATION_OK_JSON = "mso_activate_configurations.json";
//Expected Responses
private static final String EXPECTED_SUCCESS_MSO_RESPONSE = "{\"requestReferences\": {\"instanceId\": \"f36f5734-e9df-4fbf-9f35-61be13f028a1\", \"requestId\": \"b6dc9806-b094-42f7-9386-a48de8218ce8\"}}";
@@ -73,25 +74,31 @@ public class pProbeMsoApiTest extends BaseMsoApiTest{
@Test
public void testCreateConfigurationSucceed() throws Exception {
String requestBody = TestUtils.convertRequest(objectMapper, CREATE_CONFIGURATION_REQUEST_DETAILS);
- callMsoWithFineRequest(CREATE_CONFIGURATION_OK_JSON, ImmutableMap.of(), buildUri(MSO_CREATE_CONFIGURATION),
- requestBody, HttpStatus.ACCEPTED.value(),EXPECTED_SUCCESS_MSO_RESPONSE , HttpMethod.POST);
+ callMsoWithFineRequest(ImmutableList.of(
+ new PresetMSOCreateConfiguration("f36f5734-e9df-4fbf-9f35-61be13f028a1"),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_AAIAIC25_TO_ATT_AIC
+ ),
+ buildUri(MSO_CREATE_CONFIGURATION), requestBody,
+ HttpStatus.ACCEPTED.value(), EXPECTED_SUCCESS_MSO_RESPONSE, HttpMethod.POST);
}
@Test
public void testActivateConfigurationSucceed() throws Exception {
- String requestBody = "" +
- "{" +
- " \"val\": \"dummy payload\"" +
- "}";
- callMsoWithFineRequest(ACTIVATE_CONFIGURATION_OK_JSON, ImmutableMap.of(), buildUri(MSO_ACTIVATE_CONFIGURATION),
- requestBody, HttpStatus.ACCEPTED.value(),EXPECTED_SUCCESS_MSO_RESPONSE , HttpMethod.POST);
+ String requestBody = TestUtils.convertRequest(objectMapper, ACTIVATE_CONFIGURATION_REQUEST_DETAILS);
+ callMsoWithFineRequest(ImmutableList.of(
+ new PresetMSOActOnConfiguration("activate", "b6dc9806-b094-42f7-9386-a48de8218ce8", "f36f5734-e9df-4fbf-9f35-61be13f028a1"),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MDT1_TO_ATT_NC
+ ),
+ buildUri(MSO_ACTIVATE_CONFIGURATION),
+ requestBody, HttpStatus.ACCEPTED.value(), EXPECTED_SUCCESS_MSO_RESPONSE, HttpMethod.POST);
}
@Test(dataProvider = "errorCodes")
public void testCreateConfigurationError(int errorCode) throws IOException, URISyntaxException {
String requestBody = TestUtils.convertRequest(objectMapper, CREATE_CONFIGURATION_REQUEST_DETAILS);
- callMsoWithSimulatedErrorResponse(CREATE_CONFIGURATION_FAILED_JSON,
- ImmutableMap.of("\"<ERROR_CODE>\"", Integer.toString(errorCode),"\"<ERROR_PAYLOAD>\"", StringEscapeUtils.escapeJson(EXPECTED_ERROR_MSO_RESPONSE)),
+ callMsoWithSimulatedErrorResponse(ImmutableList.of(
+ new PresetMSOCreateConfiguration("f36f5734-e9df-4fbf-9f35-61be13f028a1", errorCode, EXPECTED_ERROR_MSO_RESPONSE),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_AAIAIC25_TO_ATT_AIC),
buildUri(MSO_CREATE_CONFIGURATION), requestBody,errorCode,EXPECTED_ERROR_MSO_RESPONSE,HttpMethod.POST);
}
@@ -99,8 +106,9 @@ public class pProbeMsoApiTest extends BaseMsoApiTest{
@Test
public void testCreateConfigurationFail() throws Exception {
String requestBody = "498/*ht5ru7 mjhnb";
- callMsoWithSimulatedErrorResponse(CREATE_CONFIGURATION_FAILED_JSON,
- ImmutableMap.of("\"<ERROR_CODE>\"", 500),
+ callMsoWithSimulatedErrorResponse(ImmutableList.of(
+ new PresetMSOCreateConfiguration("f36f5734-e9df-4fbf-9f35-61be13f028a1", 500, EXPECTED_ERROR_MSO_RESPONSE),
+ PresetAAIGetCloudOwnersByCloudRegionId.PRESET_AAIAIC25_TO_ATT_AIC),
buildUri(MSO_CREATE_CONFIGURATION), requestBody,500,EXPECTED_ERROR_MSO_RESPONSE,HttpMethod.POST);
}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/JobAuditStatus.java b/vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/JobAuditStatus.java
deleted file mode 100644
index 7c1481562..000000000
--- a/vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/JobAuditStatus.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.onap.vid.model.asyncInstantiation;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
-import java.util.UUID;
-
-
-public class JobAuditStatus {
-
- public JobAuditStatus(){}
-
-
- public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source){
- this.jobId = jobId;
- this.jobStatus = jobStatus;
- this.source = source;
- this.isFinal = isFinal();
- }
-
- public JobAuditStatus(UUID jobId, String jobStatus, SourceStatus source, UUID requestId, String additionalInfo, Boolean isFinal) {
- this(jobId, jobStatus, source);
- this.requestId = requestId;
- this.additionalInfo = additionalInfo;
- this.isFinal = isFinal;
- }
-
-
-
- public enum SourceStatus {
- MSO,
- VID
- }
-
- private UUID jobId;
- private String jobStatus;
- private SourceStatus source;
- private UUID requestId;
- private String additionalInfo;
-
-
-
- private Boolean isFinal;
-
- public String getJobStatus() {
- return jobStatus;
- }
-
- public UUID getJobId() {
- return jobId;
- }
-
- public SourceStatus getSource() {
- return source;
- }
-
- public String getAdditionalInfo() {
- return additionalInfo;
- }
-
- public UUID getRequestId() {
- return requestId;
- }
-
-
-
- public Boolean isFinal(){
- return isFinal;
- }
-
- public void setFinal(Boolean aFinal) {
- isFinal = aFinal;
- }
-
- @Override
- public String toString() {
- return "JobAuditStatus{" +
- "jobId=" + jobId +
- ", jobStatus='" + jobStatus + '\'' +
- ", source=" + source +
- ", requestId=" + requestId +
- ", additionalInfo='" + additionalInfo + '\'' +
- ", isFinal=" + isFinal +
- '}';
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
-
- if (o == null || getClass() != o.getClass()) return false;
-
- JobAuditStatus that = (JobAuditStatus) o;
-
- return new EqualsBuilder()
- .append(jobId, that.jobId)
- .append(jobStatus, that.jobStatus)
- .append(source, that.source)
- .append(requestId, that.requestId)
- .append(additionalInfo, that.additionalInfo)
- .append(isFinal, that.isFinal)
- .isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder(17, 37)
- .append(jobId)
- .append(jobStatus)
- .append(source)
- .append(requestId)
- .append(additionalInfo)
- .append(isFinal)
- .toHashCode();
- }
-
-
-
-
-
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/ServiceInfo.java b/vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/ServiceInfo.java
deleted file mode 100644
index 371aaf81e..000000000
--- a/vid-automation/src/test/java/org/onap/vid/model/asyncInstantiation/ServiceInfo.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.onap.vid.model.asyncInstantiation;
-
-
-import vid.automation.test.model.JobStatus;
-
-import java.util.Date;
-
-public class ServiceInfo {
-
- public String jobId;
- public String templateId;
- public String userId;
- public JobStatus jobStatus;
- public Date statusModifiedDate;
- public boolean hidden;
- public boolean pause;
- public String owningEntityId;
- public String owningEntityName;
- public String project;
- public String aicZoneId;
- public String aicZoneName;
- public String tenantId;
- public String tenantName;
- public String regionId;
- public String regionName;
- public String serviceType;
- public String subscriberName;
- public String serviceInstanceId;
- public String serviceInstanceName;
- public String serviceModelId;
- public String serviceModelName;
- public String serviceModelVersion;
- public Date createdBulkDate;
-
- public ServiceInfo(){
-
- }
-
- public ServiceInfo(String userId, JobStatus jobStatus, boolean pause, String owningEntityId, String owningEntityName, String project, String aicZoneId, String aicZoneName, String tenantId, String tenantName, String regionId, String regionName, String serviceType, String subscriberName, String serviceInstanceId, String serviceInstanceName, String serviceModelId, String serviceModelName, String serviceModelVersion, String jobId, String templateId) {
- this.userId = userId;
- this.jobStatus = jobStatus;
- this.pause = pause;
- this.owningEntityId = owningEntityId;
- this.owningEntityName = owningEntityName;
- this.project = project;
- this.aicZoneId = aicZoneId;
- this.aicZoneName = aicZoneName;
- this.tenantId = tenantId;
- this.tenantName = tenantName;
- this.regionId = regionId;
- this.regionName = regionName;
- this.serviceType = serviceType;
- this.subscriberName = subscriberName;
- this.serviceInstanceId = serviceInstanceId;
- this.serviceInstanceName = serviceInstanceName;
- this.serviceModelId = serviceModelId;
- this.serviceModelName = serviceModelName;
- this.serviceModelVersion = serviceModelVersion;
- this.jobId = jobId;
- this.templateId = templateId;
- }
-
- public JobStatus getJobStatus() {
- return jobStatus;
- }
-
- public String getServiceInstanceName() {
- return serviceInstanceName;
- }
-
- public String getJobId() {
- return jobId;
- }
-
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java b/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java
index 91dd3ff27..00372c043 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java
@@ -14,9 +14,9 @@ import java.util.Map;
public class ChangeManagementRequest {
public static class MsoChangeManagementRequest {
- public final static String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate";
+ public static final String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate";
public static final String REPLACE = "replace";
- public final static String CONFIG_UPDATE = "applyUpdatedConfig";
+ public static final String CONFIG_UPDATE = "applyUpdatedConfig";
}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java
deleted file mode 100644
index 29fa931d5..000000000
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.onap.vid.model.mso;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-@JsonPropertyOrder({
- "status",
- "entity"
-})
-
-/*
-This is a brother of MsoResponseWrapper. I (Ittay) think it's better.
-It is generic, immutable, and has some knowledge about RestObject.
-The serialized "entity" field may be either String or nested object.
- */
-public class MsoResponseWrapper2<T> implements MsoResponseWrapperInterface {
-
- final static ObjectMapper objectMapper = new ObjectMapper();
-
- private final int status;
- private final T entity;
- private final String raw;
-
- public MsoResponseWrapper2(RestObject<T> msoResponse) {
- this.status = msoResponse.getStatusCode();
- this.entity = msoResponse.get();
- this.raw = msoResponse.getRaw();
- }
-
- public MsoResponseWrapper2(
- @JsonProperty(value = "status", required = true) int status,
- @JsonProperty(value = "entity", required = true) T entity) {
- this.status = status;
- this.entity = entity;
- this.raw = null;
- }
-
- public int getStatus() {
- return status;
- }
-
- @Override
- @org.codehaus.jackson.annotate.JsonIgnore
- @com.fasterxml.jackson.annotation.JsonIgnore
- public String getResponse() {
- try {
- return objectMapper.writeValueAsString(this);
- } catch (JsonProcessingException e) {
- return getEntity() != null ? getEntity().toString() : null;
- }
- }
-
- @JsonProperty
- public Object getEntity() {
- return entity != null ? entity : raw;
- }
-
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java
deleted file mode 100644
index eb305d2df..000000000
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.onap.vid.model.mso;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public interface MsoResponseWrapperInterface {
- @JsonProperty("entity")
- Object getEntity();
-
- @JsonProperty("status")
- int getStatus();
-
- @org.codehaus.jackson.annotate.JsonIgnore
- @com.fasterxml.jackson.annotation.JsonIgnore
- String getResponse();
-}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java
index 59e0e2f37..c51a91f65 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java
@@ -1,7 +1,6 @@
package org.onap.vid.model.mso;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class OperationalEnvironment {
@@ -29,7 +28,6 @@ public class OperationalEnvironment {
this.relationshipList = relationshipList;
}
- @JsonProperty("operational-environment-id")
public String getOperationalEnvironmentId() {
return operationalEnvironmentId;
}
@@ -38,7 +36,6 @@ public class OperationalEnvironment {
this.operationalEnvironmentId = operationalEnvironmentId;
}
- @JsonProperty("operational-environment-name")
public String getOperationalEnvironmentName() {
return operationalEnvironmentName;
}
@@ -47,7 +44,6 @@ public class OperationalEnvironment {
this.operationalEnvironmentName = operationalEnvironmentName;
}
- @JsonProperty("operational-environment-type")
public String getOperationalEnvironmentType() {
return operationalEnvironmentType;
}
@@ -56,7 +52,6 @@ public class OperationalEnvironment {
this.operationalEnvironmentType = operationalEnvironmentType;
}
- @JsonProperty("operational-environment-status")
public String getOperationalEnvironmentStatus() {
return operationalEnvironmentStatus;
}
@@ -65,7 +60,6 @@ public class OperationalEnvironment {
this.operationalEnvironmentStatus = operationalEnvironmentStatus;
}
- @JsonProperty("tenant-context")
public String getTenantContext() {
return tenantContext;
}
@@ -74,7 +68,6 @@ public class OperationalEnvironment {
this.tenantContext = tenantContext;
}
- @JsonProperty("workload-context")
public String getWorkloadContext() {
return workloadContext;
}
@@ -83,7 +76,6 @@ public class OperationalEnvironment {
this.workloadContext = workloadContext;
}
- @JsonProperty("resource-version")
public String getResourceVersion() {
return resourceVersion;
}
@@ -92,7 +84,6 @@ public class OperationalEnvironment {
this.resourceVersion = resourceVersion;
}
- @JsonProperty("relationship-list")
public RelationshipList getRelationshipList() {
return relationshipList;
}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java
index 1ff84d3a3..c063b9971 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java
@@ -1,19 +1,16 @@
package org.onap.vid.model.mso;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true)
public class OperationalEnvironmentList {
- @JsonProperty("operational-environment")
public List<OperationalEnvironment> getOperationalEnvironment() {
return operationalEnvironment;
}
- @JsonProperty("operational-environment")
public void setOperationalEnvironment(List<OperationalEnvironment> operationalEnvironment) {
this.operationalEnvironment = operationalEnvironment;
}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java
index 60fff94ab..e16c9db34 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java
@@ -1,8 +1,6 @@
package org.onap.vid.model.mso;
-import org.codehaus.jackson.annotate.JsonProperty;
-
public class RelatedToProperty {
public String getPropertyKey() {
@@ -25,11 +23,9 @@ public class RelatedToProperty {
}
- @JsonProperty("property-key")
public String propertyKey;
- @JsonProperty("property-value")
public String propertyValue;
}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java b/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java
index a8f0f22de..b83cd626d 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java
@@ -1,22 +1,16 @@
package org.onap.vid.model.mso;
-import org.codehaus.jackson.annotate.JsonProperty;
-
import java.util.List;
public class Relationship {
- @JsonProperty("related-to")
public String relatedTo;
- @JsonProperty("related-link")
public String relatedLink;
- @JsonProperty("relationship-data")
public List<RelationshipData> relationshipData;
- @JsonProperty("related-to-property")
public List<RelatedToProperty> relatedToProperty;
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java
index 1e6ad2a19..aa81be72d 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java
@@ -1,30 +1,22 @@
package org.onap.vid.model.mso;
-import org.codehaus.jackson.annotate.JsonProperty;
-
public class RelationshipData {
- @JsonProperty("relationship-key")
public String getRelationshipKey() {
return relationshipKey;
}
- @JsonProperty("relationship-key")
public void setRelationshipKey(String relationshipKey) {
this.relationshipKey = relationshipKey;
}
- @JsonProperty("relationship-value")
public String getRelationshipValue() {
return relationshipValue;
}
- @JsonProperty("relationship-value")
public void setRelationshipValue(String relationshipValue) {
this.relationshipValue = relationshipValue;
}
- @JsonProperty("relationship-key")
public String relationshipKey;
- @JsonProperty("relationship-value")
public String relationshipValue;
}
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java
index 56a077d5a..599a2b2bc 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java
@@ -1,23 +1,18 @@
package org.onap.vid.model.mso;
-import org.codehaus.jackson.annotate.JsonProperty;
-
import java.util.List;
public class RelationshipList {
- @JsonProperty("relationship")
public List<Relationship> getRelationship() {
return relationship;
}
- @JsonProperty("relationship")
public void setRelationship(List<Relationship> relationship) {
this.relationship = relationship;
}
- @JsonProperty("relationship")
public List<Relationship> relationship;
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java
index d25acbd21..a1e476914 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java
@@ -6,7 +6,6 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import javax.annotation.Generated;
import java.util.HashMap;
import java.util.Map;
@@ -16,7 +15,6 @@ import java.util.Map;
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"billingAccountNumber",
"callbackUrl",
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java
index d3574d7b5..9706f0d5d 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java
@@ -6,14 +6,12 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import javax.annotation.Generated;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"subscriptionServiceType",
"userParams"
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java
deleted file mode 100644
index b91ea410a..000000000
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * VID
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.vid.model.mso;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.MoreObjects;
-
-import javax.ws.rs.core.Response;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-
-/**
- * The Class RestObject.
- *
- * @param <T> the generic type
- */
-public class RestObject<T> {
-
- final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
-
- final static ObjectMapper objectMapper = new ObjectMapper();
-
- /**
- * Generic version of the RestObject class.
- *
- */
- // T stands for "Type"
- private T t;
-
- // The string source of t, if available
- private String rawT;
-
- /** The status code. */
- private int statusCode= 0;
-
- public RestObject() {
- }
-
- public RestObject(Response cres, Class<?> tClass) {
-
- String rawEntity = null;
- try {
- cres.bufferEntity();
- rawEntity = cres.readEntity(String.class);
- T t = (T) objectMapper.readValue(rawEntity, tClass);
- this.set(t);
- }
- catch ( Exception e ) {
- try {
- this.setRaw(rawEntity);
- } catch (Exception e2) {
- }
- }
-
- int status = cres.getStatus();
- this.setStatusCode (status);
- }
-
-
- /**
- * Sets the.
- *
- * @param t the t
- */
- public void set(T t) { this.t = t; }
-
- /**
- * Gets the.
- *
- * @return the t
- */
- public T get() { return t; }
-
- /**
- * Sets the status code.
- *
- * @param v the new status code
- */
- public void setStatusCode(int v) { this.statusCode = v; }
-
- /**
- * Gets the status code.
- *
- * @return the status code
- */
- public int getStatusCode() { return this.statusCode; }
-
- public String getRaw() {
- return rawT;
- }
-
- public void setRaw(String rawT) {
- this.rawT = rawT;
- }
-
- @Override
- public String toString() {
- return MoreObjects.toStringHelper(this)
- .add("t", t)
- .add("rawT", rawT)
- .add("statusCode", statusCode)
- .toString();
- }
-}
-
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java b/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java
index 67cded838..80976f37d 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java
@@ -6,7 +6,6 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import javax.annotation.Generated;
import java.util.HashMap;
import java.util.Map;
@@ -16,7 +15,6 @@ import java.util.Map;
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"globalSubscriberId",
"subscriberCommonSiteId",
diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java b/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java
index 384e45631..0459b5a28 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java
@@ -6,12 +6,10 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import javax.annotation.Generated;
import java.util.HashMap;
import java.util.Map;
@JsonInclude(JsonInclude.Include.NON_NULL)
-@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"name",
"value"
diff --git a/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java b/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java
index b247613d6..759f2e08c 100644
--- a/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java
+++ b/vid-automation/src/test/java/org/onap/vid/model/probe/ExternalComponentStatus.java
@@ -1,7 +1,7 @@
package org.onap.vid.model.probe;
public class ExternalComponentStatus {
- public enum Component {AAI, MSO, SCHEDULER}
+ public enum Component {AAI, MSO, SDC, SCHEDULER}
private Component component;
private boolean available;
private HttpRequestMetadata metadata;
diff --git a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
index fd8f48279..7ca29f854 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java
@@ -1,7 +1,17 @@
package org.onap.vid.more;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.greaterThanOrEqualTo;
+import static org.junit.Assert.assertThat;
+
import com.fasterxml.jackson.databind.JsonNode;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
import org.onap.vid.api.BaseApiTest;
import org.springframework.web.client.RestTemplate;
@@ -9,20 +19,12 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import vid.automation.test.services.SimulatorApi;
-import java.net.URI;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.greaterThan;
-import static org.hamcrest.Matchers.greaterThanOrEqualTo;
-
public class LoggerFormatTest extends BaseApiTest {
- // See: https://wiki.web.att.com/display/KSAT/REST-based+Log+Checker
- private final static String logChecker = "http://eelflogcheck.it.att.com:31820/validate";
+ // See: https://www.openecomp.org/KSAT/REST-based+Log+Checker
+ private final static String logChecker = "http://eelf.onap.org:31820/validate";
+ private final Logger logger = LogManager.getLogger(LoggerFormatTest.class);
@BeforeClass
public void login() {
@@ -56,9 +58,9 @@ public class LoggerFormatTest extends BaseApiTest {
private void validateLogsFormat(String logName, String logType) {
String logLines = getLogLines(logName);
+ logger.info("logLines are: "+logLines);
JsonNode response = getCheckerResults(logType, logLines);
-
- System.out.println(response);
+ logger.info("Response is:" + response.toString());
double fieldscore = response.path("summary").path("score").path("fieldscore").asDouble();
double overall = response.path("summary").path("score").path("overallscore").asDouble();
diff --git a/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java b/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java
index 560538737..0a0045d4d 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/RequestIdFilterInstalled.java
@@ -4,23 +4,22 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
+import org.junit.Assert;
+import org.onap.simulator.presetGenerator.presets.aaf.AAFGetBasicAuthPreset;
+import org.onap.simulator.presetGenerator.presets.aaf.AAFGetUrlServicePreset;
import org.onap.vid.api.BaseApiTest;
import org.onap.vid.api.OperationalEnvironmentControllerApiTest;
import org.onap.vid.api.ServiceInstanceMsoApiTest;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import vid.automation.test.services.SimulatorApi;
+import java.util.List;
import java.util.UUID;
import static org.hamcrest.CoreMatchers.*;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.containsInAnyOrder;
-import static org.hamcrest.Matchers.nullValue;
import static org.onap.vid.api.CategoryParametersApiTest.GET_CATEGORY_PARAMETER_PROPERTIES;
import static org.onap.vid.api.pProbeMsoApiTest.MSO_CREATE_CONFIGURATION;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
@@ -49,7 +48,7 @@ public class RequestIdFilterInstalled extends BaseApiTest {
}
@Test
- public void frontendApi_doGET_RequestIdReceived() {
+ public void frontendApi_doGET_RequestIdReceived() throws InterruptedException {
final Pair<HttpEntity, String> responseAndUuid = makeRequest(
HttpMethod.GET,
@@ -62,7 +61,7 @@ public class RequestIdFilterInstalled extends BaseApiTest {
}
@Test
- public void frontendApi_doPOST_RequestIdReceived() {
+ public void frontendApi_doPOST_RequestIdReceived() throws InterruptedException {
final Pair<HttpEntity, String> responseAndUuid = makeRequest(
HttpMethod.POST,
@@ -87,14 +86,13 @@ public class RequestIdFilterInstalled extends BaseApiTest {
@Test(groups = { "worksOnlyWithLocalhostVID" })
- public void mopOwningEntityApi_doGET_RequestIdReceived() {
+ public void mopOwningEntityApi_doGET_RequestIdReceived() throws InterruptedException {
final Pair<HttpEntity, String> responseAndUuid = makeRequest(
HttpMethod.GET,
"/" + GET_CATEGORY_PARAMETER_PROPERTIES + "?familyName=PARAMETER_STANDARDIZATION",
null
);
-
assertThatUuidInResponseAndUuidIsInARecentLog(responseAndUuid);
/*
@@ -110,12 +108,18 @@ public class RequestIdFilterInstalled extends BaseApiTest {
}
@Test
- public void schedulerApi_doPOST_RequestIdReceived() {
+ public void schedulerApi_doPOST_RequestIdReceived() throws InterruptedException {
final String anyInstanceId = "any instance id";
SimulatorApi.registerExpectation(
"mso_in_place_software_update_ok.json",
ImmutableMap.of("SERVICE_INSTANCE_ID", anyInstanceId, "VNF_INSTANCE_ID", anyInstanceId), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET);
+ SimulatorApi.registerExpectationFromPreset(
+ new AAFGetUrlServicePreset(),
+ SimulatorApi.RegistrationStrategy.APPEND);
+ SimulatorApi.registerExpectationFromPreset(
+ new AAFGetBasicAuthPreset(),
+ SimulatorApi.RegistrationStrategy.APPEND);
final Pair<HttpEntity, String> responseAndUuid = makeRequest(
HttpMethod.POST,
"/change-management/workflow/" + anyInstanceId,
@@ -126,7 +130,7 @@ public class RequestIdFilterInstalled extends BaseApiTest {
}
@Test
- public void healthcheck_doGET_RequestIdReceived(){
+ public void healthcheck_doGET_RequestIdReceived() {
final Pair<HttpEntity, String> responseAndUuid = makeRequest(
HttpMethod.GET, "/healthCheck", null
);
@@ -142,14 +146,16 @@ public class RequestIdFilterInstalled extends BaseApiTest {
// THIS TEST IS NOT JUST NICE TO HAVE, it also lets us know
// that the request/response ran through our "promise request
// id" filter, which is great!
- assertThat(response, not(nullValue()));
- assertThat(response.getHeaders().get(ECOMP_REQUEST_ID_ECHO), containsInAnyOrder(uuid));
+ Assert.assertNotNull(response);
+ List<String> ecompRequestIdHeaderValues = response.getHeaders().get(ECOMP_REQUEST_ID_ECHO);
+ Assert.assertNotNull(ecompRequestIdHeaderValues);
+ Assert.assertTrue(ecompRequestIdHeaderValues.contains(uuid));
}
private void assertThatTermIsInARecentLog(String uuid) {
final ImmutableList<String> logLines = ImmutableList.of(
- LoggerFormatTest.getLogLines("audit", 5, 0, restTemplate, uri),
- LoggerFormatTest.getLogLines("error", 5, 0, restTemplate, uri)
+ LoggerFormatTest.getLogLines("audit", 20, 0, restTemplate, uri),
+ LoggerFormatTest.getLogLines("error", 20, 0, restTemplate, uri)
);
// Assert that audit *OR* error has the uuid
@@ -164,13 +170,13 @@ public class RequestIdFilterInstalled extends BaseApiTest {
final String uuid = UUID.randomUUID().toString();
final HttpHeaders headers = new HttpHeaders();
headers.add(ECOMP_REQUEST_ID, uuid);
- headers.add(AUTHORIZATION, "Basic 123==");
+ headers.add(AUTHORIZATION, "Basic " + AAFGetBasicAuthPreset.VALID_AUTH_VALUE);
+ headers.setContentType(MediaType.APPLICATION_JSON);
- SimulatorApi.clearExpectations();
if (!StringUtils.isEmpty(expectationFilename)) {
SimulatorApi.registerExpectation(expectationFilename, APPEND);
}
- SimulatorApi.registerExpectation("aai_get_full_subscribers.json", APPEND);
+ SimulatorApi.registerExpectation("create_new_instance/aai_get_full_subscribers.json", APPEND);
SimulatorApi.registerExpectation("ecompportal_getSessionSlotCheckInterval.json", APPEND);
HttpEntity entity = new HttpEntity<>(body, headers);
diff --git a/vid-automation/src/test/java/org/onap/vid/more/SimulatorLoaderTest.java b/vid-automation/src/test/java/org/onap/vid/more/SimulatorLoaderTest.java
index bc550ae19..eff73cf70 100644
--- a/vid-automation/src/test/java/org/onap/vid/more/SimulatorLoaderTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/more/SimulatorLoaderTest.java
@@ -1,13 +1,7 @@
package org.onap.vid.more;
import org.onap.simulator.presetGenerator.presets.BasePresets.BasePreset;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIBadBodyForGetServicesGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetNetworkZones;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetPNFByRegionErrorPut;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetServicesGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIGetSubscribersGet;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAISearchNodeQueryEmptyResult;
-import org.onap.simulator.presetGenerator.presets.aai.PresetAAIServiceDesignAndCreationPut;
+import org.onap.simulator.presetGenerator.presets.aai.*;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetSessionSlotCheckIntervalGet;
import org.onap.simulator.presetGenerator.presets.ecompportal_att.PresetGetUserGet;
import org.onap.simulator.presetGenerator.presets.mso.PresetActivateServiceInstancePost;
@@ -34,6 +28,7 @@ import java.util.List;
import java.util.Map;
import static org.testng.Assert.assertEquals;
+import static vid.automation.test.infra.ModelInfo.aLaCarteServiceCreationTest;
import static vid.automation.test.services.SimulatorApi.registerExpectationFromPreset;
import static vid.automation.test.services.SimulatorApi.registerExpectationFromPresets;
@@ -43,8 +38,9 @@ public class SimulatorLoaderTest extends BaseApiTest {
protected Invocation.Builder createSimulatorRequestBuilder(BasePreset preset) {
WebTarget webTarget = client.target(SimulatorApi.getSimulationUri() + preset.getReqPath());
webTarget = addQueryParamsToWebTarget(preset, webTarget);
- return webTarget.request()
+ Invocation.Builder builder = webTarget.request()
.accept("application/json");
+ return addHeadersToBuilder(preset, builder);
}
private WebTarget addQueryParamsToWebTarget(BasePreset preset, WebTarget webTarget) {
@@ -56,11 +52,16 @@ public class SimulatorLoaderTest extends BaseApiTest {
return webTarget;
}
+ private Invocation.Builder addHeadersToBuilder(BasePreset preset, Invocation.Builder builder) {
+ preset.getRequestHeaders().forEach((key,value)->builder.header(key,value));
+ return builder;
+ }
+
@DataProvider
public static Object[][] presetClassesWithPutPost(Method test) {
return new Object[][]{
{new PresetAAIGetPNFByRegionErrorPut()},
- {new PresetAAIServiceDesignAndCreationPut("a","b")},
+ {new PresetAAIServiceDesignAndCreationPut()},
{new PresetDeactivateServiceInstancePost()},
{new PresetActivateServiceInstancePost()},
{new PresetMSOCreateServiceInstancePost()}
@@ -87,11 +88,10 @@ public class SimulatorLoaderTest extends BaseApiTest {
{new PresetGetSessionSlotCheckIntervalGet()},
{new PresetGetUserGet()},
{new PresetAAIGetServicesGet()},
- {new PresetSDCGetServiceMetadataGet("a" , "b", "serviceCreationTest.zip")},
- {new PresetSDCGetServiceToscaModelGet( "a", "serviceCreationTest.zip")},
+ {new PresetSDCGetServiceMetadataGet(aLaCarteServiceCreationTest)},
+ {new PresetSDCGetServiceToscaModelGet( aLaCarteServiceCreationTest)},
{new PresetMSOOrchestrationRequestGet()},
{new PresetAAIGetNetworkZones()},
- {new PresetAAISearchNodeQueryEmptyResult()},
{new PresetAAIBadBodyForGetServicesGet("not a json")},
};
}
diff --git a/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json b/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json
new file mode 100644
index 000000000..08534ce49
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/ServiceWithVnfGroupsDeleteRequest.json
@@ -0,0 +1,40 @@
+{
+ "isDirty":true,
+ "vnfs": {},
+ "instanceParams": [],
+ "validationCounter": 0,
+ "existingNames": {
+ "wowservicewithvnfgroping": ""
+ },
+ "existingVNFCounterMap": {},
+ "existingVnfGroupCounterMap": {},
+ "existingNetworksCounterMap": {},
+ "networks": {},
+ "vnfGroups": {},
+ "bulkSize": 1,
+ "instanceName": "wowServiceWithVnfGroping",
+ "instanceId": "f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+ "orchStatus": "ACTIVE",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "owningEntityId": null,
+ "owningEntityName": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "projectName": null,
+ "rollbackOnFailure": false,
+ "isALaCarte": true,
+ "modelInfo": {
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName": "Grouping Service for Test",
+ "modelType": "service",
+ "modelVersion": "1.0"
+ },
+ "testApi": "VNF_API",
+ "action": "Delete"
+}
diff --git a/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json b/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json
new file mode 100644
index 000000000..f1bbf1712
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/VnfGroupCreate1Delete1None1Request.json
@@ -0,0 +1,204 @@
+{
+ "action": "None",
+ "isDirty": true,
+ "vnfs": {},
+ "instanceParams": [],
+ "validationCounter": 0,
+ "existingNames": {
+ "service_instance_name": "",
+ "vnf_group3_instance_name": ""
+ },
+ "existingVNFCounterMap": {},
+ "existingVnfGroupCounterMap": {
+ "daeb6568-cef8-417f-9075-ed259ce59f48": 3
+ },
+ "existingNetworksCounterMap": {},
+ "networks": {},
+ "vnfGroups": {
+ "VNF_GROUP1_INSTANCE_ID": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "VNF_GROUP1_INSTANCE_ID",
+ "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None_Delete",
+ "instanceId": "VNF_GROUP1_INSTANCE_ID",
+ "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "vnfs":{
+ "RELATED_VNF1_INSTANCE_ID":{
+ "action":"None_Delete",
+ "instanceName":"RELATED_VNF1_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF1_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "modelType":"vnf",
+ "modelName":"vf_vEPDG",
+ "modelVersion":"2.0"
+ },
+ "instanceType":"RELATED_VNF1_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF1_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ },
+ "RELATED_VNF2_INSTANCE_ID":{
+ "action":"None_Delete",
+ "instanceName":"RELATED_VNF2_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF2_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType":"vnf"
+ },
+ "instanceType":"RELATED_VNF2_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF2_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ },
+ "RELATED_VNF3_INSTANCE_ID":{
+ "action":"None_Delete",
+ "instanceName":"RELATED_VNF3_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF3_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType":"vnf"
+ },
+ "instanceType":"RELATED_VNF3_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF3_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ }
+ }
+ },
+ "VNF_GROUP2_INSTANCE_ID": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "VNF_GROUP2_INSTANCE_ID",
+ "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None",
+ "instanceId": "VNF_GROUP2_INSTANCE_ID",
+ "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "tenantId": null,
+ "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "vnfs": {}
+ },
+ "groupingservicefortest..ResourceInstanceGroup..0": {
+ "action": "Create",
+ "inMaint": false,
+ "rollbackOnFailure": "true",
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "isMissingData": false,
+ "trackById": "ag5aav86u4j",
+ "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceName": "VNF_GROUP3_INSTANCE_NAME",
+ "modelInfo": {
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelVersion": "1",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelUniqueId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "instanceParams": [{}
+ ],
+ "vnfs":{}
+ }
+ },
+ "bulkSize": 1,
+ "instanceName": "SERVICE_INSTANCE_NAME",
+
+ "instanceId": "service-instance-id",
+ "orchStatus": "GARBAGE DATA",
+ "globalSubscriberId": "global-customer-id",
+ "subscriptionServiceType": "service-instance-type",
+ "owningEntityId": null,
+ "owningEntityName": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "projectName": null,
+ "rollbackOnFailure": false,
+ "isALaCarte": true,
+ "modelInfo": {
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName": "Grouping Service for Test",
+ "modelType": "service",
+ "modelVersion": "1.0"
+ },
+
+ "testApi": "VNF_API"
+}
diff --git a/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json b/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json
new file mode 100644
index 000000000..f43a1dd12
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/deleteServiceWith2VnfGroupsRequest_AndThreeGroupMembers.json
@@ -0,0 +1,178 @@
+{
+ "existingVNFCounterMap": {},
+ "existingVnfGroupCounterMap": {
+ "daeb6568-cef8-417f-9075-ed259ce59f48": 2
+ },
+ "existingNetworksCounterMap": {},
+ "vnfs": {},
+ "vnfGroups": {
+ "VNF_GROUP1_INSTANCE_ID": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "VNF_GROUP1_INSTANCE_ID",
+ "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None_Delete",
+ "instanceId": "VNF_GROUP1_INSTANCE_ID",
+ "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "vnfs": {
+ "RELATED_VNF1_INSTANCE_ID": {
+ "action": "None_Delete",
+ "instanceName": "RELATED_VNF1_INSTANCE_NAME",
+ "instanceId": "RELATED_VNF1_INSTANCE_ID",
+ "orchStatus": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelVersionId": "7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "modelType": "vnf",
+ "modelName": "vf_vEPDG",
+ "modelVersion": "2.0"
+ },
+ "instanceType": "RELATED_VNF1_INSTANCE_TYPE",
+ "provStatus": null,
+ "inMaint": false,
+ "uuid": "7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "originalName": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "trackById": "RELATED_VNF1_INSTANCE_ID",
+ "serviceInstanceId": null,
+ "serviceInstanceName": null,
+ "tenantName": null
+ },
+ "RELATED_VNF2_INSTANCE_ID": {
+ "action": "None_Delete",
+ "instanceName": "RELATED_VNF2_INSTANCE_NAME",
+ "instanceId": "RELATED_VNF2_INSTANCE_ID",
+ "orchStatus": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType": "vnf"
+ },
+ "instanceType": "RELATED_VNF2_INSTANCE_TYPE",
+ "provStatus": null,
+ "inMaint": false,
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "trackById": "RELATED_VNF2_INSTANCE_ID",
+ "serviceInstanceId": null,
+ "serviceInstanceName": null,
+ "tenantName": null
+ },
+ "RELATED_VNF3_INSTANCE_ID": {
+ "action": "None_Delete",
+ "instanceName": "RELATED_VNF3_INSTANCE_NAME",
+ "instanceId": "RELATED_VNF3_INSTANCE_ID",
+ "orchStatus": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType": "vnf"
+ },
+ "instanceType": "RELATED_VNF3_INSTANCE_TYPE",
+ "provStatus": null,
+ "inMaint": false,
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "trackById": "RELATED_VNF3_INSTANCE_ID",
+ "serviceInstanceId": null,
+ "serviceInstanceName": null,
+ "tenantName": null
+ }
+ }
+ },
+ "VNF_GROUP2_INSTANCE_ID": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "VNF_GROUP2_INSTANCE_ID",
+ "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None_Delete",
+ "instanceId": "VNF_GROUP2_INSTANCE_ID",
+ "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "tenantId": null,
+ "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "vnfs": {}
+ }
+ },
+ "instanceParams": [],
+ "globalSubscriberId": "global-customer-id",
+ "subscriptionServiceType": "service-instance-type",
+ "projectName": null,
+ "owningEntityId": null,
+ "bulkSize": 1,
+ "modelInfo": {
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName": "Grouping Service for Test",
+ "modelType": "service",
+ "modelVersion": "1.0"
+ },
+ "existingNames": {
+ "service_instance_name": ""
+ },
+ "instanceName": "SERVICE_INSTANCE_NAME",
+ "owningEntityName": null,
+ "rollbackOnFailure": false,
+ "testApi": "VNF_API",
+ "isALaCarte": true,
+ "action": "Delete",
+ "isDirty": true,
+ "instanceId": "service-instance-id",
+ "orchStatus": "GARBAGE DATA",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "networks": {},
+ "validationCounter": 0
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/VnfGroup/groupingServiceRoleResponse.json b/vid-automation/src/test/resources/VnfGroup/groupingServiceRoleResponse.json
new file mode 100644
index 000000000..f83799308
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/groupingServiceRoleResponse.json
@@ -0,0 +1,139 @@
+{
+ "service": {
+ "vidNotions": {
+ "instantiationUI": "serviceWithVnfGrouping",
+ "modelCategory": "other",
+ "viewEditUI": "serviceWithVnfGrouping"
+ },
+ "uuid": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "invariantUuid": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "name": "Grouping Service for Test",
+ "version": "1.0",
+ "toscaModelURL": null,
+ "category": "Network L4+",
+ "serviceType": "INFRASTRUCTURE",
+ "serviceRole": "GROUPING",
+ "description": "xxx",
+ "serviceEcompNaming": "true",
+ "instantiationType": "A-La-Carte",
+ "inputs": {}
+ },
+ "vnfs": {},
+ "networks": {},
+ "collectionResource": {},
+ "configurations": {},
+ "fabricConfigurations": {},
+ "serviceProxies": {
+ "vDOROTHEA_svc_vprs_proxy 0": {
+ "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
+ "invariantUuid": "f4baae0c-b3a5-4ca1-a777-afbffe7010bc",
+ "description": "A Proxy for Service vDOROTHEA_Svc_vPRS",
+ "name": "vDOROTHEA_Svc_vPRS Service Proxy",
+ "version": "1.0",
+ "customizationUuid": "bdb63d23-e132-4ce7-af2c-a493b4cafac9",
+ "inputs": {},
+ "commands": {},
+ "properties": {
+ "ecomp_generated_naming": "false"
+ },
+ "type": "Service Proxy",
+ "sourceModelUuid": "da7827a2-366d-4be6-8c68-a69153c61274",
+ "sourceModelInvariant": "24632e6b-584b-4f45-80d4-fefd75fd9f14",
+ "sourceModelName": "vDOROTHEA_Svc_vPRS"
+ },
+ "tsbc0001vm001_svc_proxy 0": {
+ "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
+ "invariantUuid": "f4baae0c-b3a5-4ca1-a777-afbffe7010bc",
+ "description": "A Proxy for Service tsbc0001vm001_Svc",
+ "name": "tsbc0001vm001_Svc Service Proxy",
+ "version": "1.0",
+ "customizationUuid": "3d814462-30fb-4c62-b997-9aa360d27ead",
+ "inputs": {},
+ "commands": {},
+ "properties": {
+ "ecomp_generated_naming": "false"
+ },
+ "type": "Service Proxy",
+ "sourceModelUuid": "28aeb8f6-5620-4148-8bfb-a5fb406f0309",
+ "sourceModelInvariant": "c989ab9a-33c7-46ec-b521-1b2daef5f047",
+ "sourceModelName": "tsbc0001vm001_Svc"
+ }
+ },
+ "vfModules": {},
+ "volumeGroups": {},
+ "pnfs": {},
+ "vnfGroups": {
+ "groupingservicefortest..ResourceInstanceGroup..0": {
+ "type": "VnfGroup",
+ "invariantUuid": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "version": "1",
+ "name": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "properties": {
+ "contained_resource_type": "VF",
+ "role": "SERVICE-ACCESS",
+ "function": "DATA",
+ "description": "DDD0",
+ "type": "LOAD-GROUP",
+ "ecomp_generated_naming": "true",
+ "quantity": 4
+ },
+ "members": {
+ "vDOROTHEA_svc_vprs_proxy 0": {
+ "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
+ "invariantUuid": "f4baae0c-b3a5-4ca1-a777-afbffe7010bc",
+ "description": "A Proxy for Service vDOROTHEA_Svc_vPRS",
+ "name": "vDOROTHEA_Svc_vPRS Service Proxy",
+ "version": "1.0",
+ "customizationUuid": "bdb63d23-e132-4ce7-af2c-a493b4cafac9",
+ "inputs": {},
+ "commands": {},
+ "properties": {
+ "ecomp_generated_naming": "false"
+ },
+ "type": "Service Proxy",
+ "sourceModelUuid": "da7827a2-366d-4be6-8c68-a69153c61274",
+ "sourceModelInvariant": "24632e6b-584b-4f45-80d4-fefd75fd9f14",
+ "sourceModelName": "vDOROTHEA_Svc_vPRS"
+ }
+ }
+ },
+ "groupingservicefortest..ResourceInstanceGroup..1": {
+ "type": "VnfGroup",
+ "invariantUuid": "a704112d-dbc6-4e56-8d4e-aec57e95ef9a",
+ "uuid": "c2b300e6-45de-4e5e-abda-3032bee2de56",
+ "version": "1",
+ "name": "groupingservicefortest..ResourceInstanceGroup..1",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..1",
+ "properties": {
+ "contained_resource_type": "VF",
+ "role": "SERVICE-ACCESS",
+ "function": "SIGNALING",
+ "description": "DDD1",
+ "type": "LOAD-GROUP",
+ "ecomp_generated_naming": "true",
+ "quantity": 3
+ },
+ "members": {
+ "tsbc0001vm001_svc_proxy 0": {
+ "uuid": "65fadfa8-a0d9-443f-95ad-836cd044e26c",
+ "invariantUuid": "f4baae0c-b3a5-4ca1-a777-afbffe7010bc",
+ "description": "A Proxy for Service tsbc0001vm001_Svc",
+ "name": "tsbc0001vm001_Svc Service Proxy",
+ "version": "1.0",
+ "customizationUuid": "3d814462-30fb-4c62-b997-9aa360d27ead",
+ "inputs": {},
+ "commands": {},
+ "properties": {
+ "ecomp_generated_naming": "false"
+ },
+ "type": "Service Proxy",
+ "sourceModelUuid": "28aeb8f6-5620-4148-8bfb-a5fb406f0309",
+ "sourceModelInvariant": "c989ab9a-33c7-46ec-b521-1b2daef5f047",
+ "sourceModelName": "tsbc0001vm001_Svc"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json b/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json
new file mode 100644
index 000000000..734c13306
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/payloadTemplate1VnfGroupWith3MembersRequest.json
@@ -0,0 +1,178 @@
+{
+ "action": "None",
+ "isDirty": true,
+ "vnfs": {},
+ "instanceParams": [],
+ "validationCounter": 0,
+ "existingNames": {
+ "service_instance_name": ""
+ },
+ "existingVNFCounterMap": {},
+ "existingVnfGroupCounterMap": {
+ "daeb6568-cef8-417f-9075-ed259ce59f48": 2
+ },
+ "existingNetworksCounterMap": {},
+ "networks": {},
+ "vnfGroups": {
+ "VNF_GROUP1_INSTANCE_ID": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "VNF_GROUP1_INSTANCE_ID",
+ "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "VNF_GROUP1_ACTION",
+ "instanceId": "VNF_GROUP1_INSTANCE_ID",
+ "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "vnfs": {
+ "RELATED_VNF1_INSTANCE_ID":{
+ "action":"RELATED_VNF1_ACTION",
+ "instanceName":"RELATED_VNF1_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF1_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "modelType":"vnf",
+ "modelName":"vf_vEPDG",
+ "modelVersion":"2.0"
+ },
+ "instanceType":"RELATED_VNF1_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF1_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ },
+ "RELATED_VNF2_INSTANCE_ID":{
+ "action":"RELATED_VNF2_ACTION",
+ "instanceName":"RELATED_VNF2_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF2_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType":"vnf"
+ },
+ "instanceType":"RELATED_VNF2_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF2_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ },
+ "RELATED_VNF3_INSTANCE_ID":{
+ "action":"None",
+ "instanceName":"RELATED_VNF3_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF3_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType":"vnf"
+ },
+ "instanceType":"RELATED_VNF3_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF3_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ }
+ }
+ },
+ "VNF_GROUP2_INSTANCE_ID": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "VNF_GROUP2_INSTANCE_ID",
+ "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None",
+ "instanceId": "VNF_GROUP2_INSTANCE_ID",
+ "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "tenantId": null,
+ "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "vnfs": {}
+ }
+ },
+ "bulkSize": 1,
+ "instanceName": "SERVICE_INSTANCE_NAME",
+ "instanceId": "service-instance-id",
+ "orchStatus": "GARBAGE DATA",
+ "globalSubscriberId": "global-customer-id",
+ "subscriptionServiceType": "service-instance-type",
+ "owningEntityId": null,
+ "owningEntityName": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "projectName": null,
+ "rollbackOnFailure": false,
+ "isALaCarte": true,
+ "modelInfo": {
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName": "Grouping Service for Test",
+ "modelType": "service",
+ "modelVersion": "1.0"
+ },
+ "testApi": "VNF_API"
+}
diff --git a/vid-automation/src/test/resources/VnfGroup/searchMembersResponse.json b/vid-automation/src/test/resources/VnfGroup/searchMembersResponse.json
new file mode 100644
index 000000000..e48e41c57
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/searchMembersResponse.json
@@ -0,0 +1,114 @@
+[
+ {
+ "action":"None",
+ "instanceName":"VNF1_INSTANCE_NAME",
+ "instanceId":"VNF1_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":"hvf23b",
+ "tenantId":"3e9a20a3e89e45f884e09df0cc2d2d2a",
+ "tenantName":"APPC-24595-T-IST-02C",
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "modelVersion":"2.0",
+ "modelName":"vf_vEPDG",
+ "modelType":"vnf"
+ },
+ "instanceType":"VNF1_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"VNF1_INSTANCE_ID",
+ "serviceInstanceId":"service-instance-id1",
+ "serviceInstanceName":"service-instance-name"
+ },
+ {
+ "action":"None",
+ "instanceName":"VNF2_INSTANCE_NAME",
+ "instanceId":"VNF2_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":"hvf23b",
+ "tenantId":"3e9a20a3e89e45f884e09df0cc2d2d2a",
+ "tenantName":"APPC-24595-T-IST-02C",
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"eb5f56bf-5855-4e61-bd00-3e19a953bf02",
+ "modelVersion":"1.0",
+ "modelName":"vf_vEPDG",
+ "modelType":"vnf"
+ },
+ "instanceType":"VNF2_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":true,
+ "uuid":"eb5f56bf-5855-4e61-bd00-3e19a953bf02",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"VNF2_INSTANCE_ID",
+ "serviceInstanceId":"service-instance-id2",
+ "serviceInstanceName":"service-instance-name"
+ },
+ {
+ "action":"None",
+ "instanceName":"VNF3_INSTANCE_NAME",
+ "instanceId":"VNF3_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":"hvf23b",
+ "tenantId":"3e9a20a3e89e45f884e09df0cc2d2d2a",
+ "tenantName":"APPC-24595-T-IST-02C",
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelVersion":"1.0",
+ "modelName":"Grouping Service for Test",
+ "modelType":"vnf"
+ },
+ "instanceType":"VNF3_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"VNF3_INSTANCE_ID",
+ "serviceInstanceId":"service-instance-id1",
+ "serviceInstanceName":"service-instance-name"
+ },
+ {
+ "action":"None",
+ "instanceName":"VNF4_INSTANCE_NAME",
+ "instanceId":"VNF4_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":"hvf23b",
+ "tenantId":"3e9a20a3e89e45f884e09df0cc2d2d2a",
+ "tenantName":"APPC-24595-T-IST-02C",
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"b7f2e8fb-ac71-4ea0-a801-06ef1479ea84",
+ "modelVersion":"4.0",
+ "modelName":"vf_vEPDG",
+ "modelType":"vnf"
+ },
+ "instanceType":"VNF4_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":true,
+ "uuid":"b7f2e8fb-ac71-4ea0-a801-06ef1479ea84",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"VNF4_INSTANCE_ID",
+ "serviceInstanceId":"service-instance-id2",
+ "serviceInstanceName":"service-instance-name"
+ }
+] \ No newline at end of file
diff --git a/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroping_serviceInstance.json b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroping_serviceInstance.json
new file mode 100644
index 000000000..be4bfe428
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroping_serviceInstance.json
@@ -0,0 +1,30 @@
+{
+ "instanceName":"wowServiceWithVnfGroping",
+ "instanceId":"f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+ "orchStatus":"ACTIVE",
+ "globalSubscriberId":"e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType":"TYLER SILVIA",
+ "owningEntityId":null,
+ "owningEntityName":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "tenantName":null,
+ "aicZoneId":null,
+ "aicZoneName":null,
+ "projectName":null,
+ "rollbackOnFailure":null,
+ "isALaCarte":true,
+ "modelInfo":{
+ "modelInvariantId":"7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName":"Grouping Service for Test",
+ "modelType":"service",
+ "modelVersion":"1.0"
+ },
+ "vnfs":{},
+ "networks":{},
+ "validationCounter":0,
+ "existingVNFCounterMap":{},
+ "existingNetworksCounterMap":{}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json
new file mode 100644
index 000000000..0f4bc3fa3
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupCreateRequest.json
@@ -0,0 +1,65 @@
+{
+ "existingVNFCounterMap": {
+ },
+ "existingVnfGroupCounterMap": {
+ "c2b300e6-45de-4e5e-abda-3032bee2de56": 1
+ },
+ "existingNetworksCounterMap": {
+ },
+ "vnfs":{},
+ "vnfGroups": {
+ "groupingservicefortest..ResourceInstanceGroup..1": {
+ "action": "Create",
+ "inMaint": false,
+ "rollbackOnFailure": "true",
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..1",
+ "isMissingData": false,
+ "trackById": "tv2mmg4erg",
+ "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..1",
+ "instanceName": "ABC",
+ "instanceParams": [
+ {
+ }
+ ],
+ "modelInfo": {
+ "modelInvariantId": "a704112d-dbc6-4e56-8d4e-aec57e95ef9a",
+ "modelVersionId": "c2b300e6-45de-4e5e-abda-3032bee2de56",
+ "modelName": "groupingservicefortest..ResourceInstanceGroup..1",
+ "modelVersion": "1",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..1",
+ "modelUniqueId" : "c2b300e6-45de-4e5e-abda-3032bee2de56",
+ "uuid": "c2b300e6-45de-4e5e-abda-3032bee2de56"
+ },
+ "uuid": "c2b300e6-45de-4e5e-abda-3032bee2de56",
+ "vnfs":{}
+ }
+ },
+ "instanceParams": [
+ {
+ "2017488_PASQUALEvpe0_ASN": "AV_vPE"
+ }
+ ],
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "projectName": "WATKINS",
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "bulkSize": 1,
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName": "Grouping Service for Test",
+ "modelVersion": "1.0"
+ },
+ "existingNames": {
+ "abc": ""
+ },
+ "instanceName": "Grouping_Service_Instance",
+ "subscriberName": "SILVIA ROBBINS",
+ "owningEntityName": "WayneHolland",
+ "rollbackOnFailure": true,
+ "testApi": "VNF_API",
+ "isALaCarte": true,
+ "isDirty":true,
+ "action": "Create"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupsChildren_serviceInstance.json b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupsChildren_serviceInstance.json
new file mode 100644
index 000000000..42af8a789
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/serviceWithVnfGroupsChildren_serviceInstance.json
@@ -0,0 +1,171 @@
+{
+ "instanceName":"SERVICE_INSTANCE_NAME",
+ "action": "None",
+ "instanceId":"service-instance-id",
+ "orchStatus":"GARBAGE DATA",
+ "globalSubscriberId":"global-customer-id",
+ "subscriptionServiceType":"service-instance-type",
+ "owningEntityId":null,
+ "owningEntityName":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "tenantName":null,
+ "aicZoneId":null,
+ "aicZoneName":null,
+ "projectName":null,
+ "rollbackOnFailure":null,
+ "isALaCarte":true,
+ "modelInfo":{
+ "modelInvariantId":"7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName":"Grouping Service for Test",
+ "modelType":"service",
+ "modelVersion":"1.0"
+ },
+ "vnfs":{},
+ "networks":{},
+ "vnfGroups":{
+ "VNF_GROUP1_INSTANCE_ID":{
+ "originalName":"groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById":"VNF_GROUP1_INSTANCE_ID",
+ "instanceName":"VNF_GROUP1_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None",
+ "instanceId":"VNF_GROUP1_INSTANCE_ID",
+ "instanceType":"VNF_GROUP1_INSTANCE_TYPE",
+ "orchStatus":null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "inMaint":false,
+ "modelInfo":{
+ "modelType":"instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId":"4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceGroupRole":"VNF_GROUP1_INSTANCE_ROLE",
+ "instanceGroupFunction":"vTSBC Customer Landing Network Collection",
+ "vnfs":{
+ "RELATED_VNF1_INSTANCE_ID":{
+ "action":"None",
+ "instanceName":"RELATED_VNF1_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF1_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "modelType":"vnf",
+ "modelName":"vf_vEPDG",
+ "modelVersion":"2.0"
+ },
+ "instanceType":"RELATED_VNF1_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF1_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ },
+ "RELATED_VNF2_INSTANCE_ID":{
+ "action":"None",
+ "instanceName":"RELATED_VNF2_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF2_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType":"vnf"
+ },
+ "instanceType":"RELATED_VNF2_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF2_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ },
+ "RELATED_VNF3_INSTANCE_ID":{
+ "action":"None",
+ "instanceName":"RELATED_VNF3_INSTANCE_NAME",
+ "instanceId":"RELATED_VNF3_INSTANCE_ID",
+ "orchStatus":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "modelInfo":{
+ "modelInvariantId":"vnf-instance-model-invariant-id",
+ "modelVersionId":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelType":"vnf"
+ },
+ "instanceType":"RELATED_VNF3_INSTANCE_TYPE",
+ "provStatus":null,
+ "inMaint":false,
+ "uuid":"d6557200-ecf2-4641-8094-5393ae3aae60",
+ "originalName":null,
+ "legacyRegion":null,
+ "lineOfBusiness":null,
+ "platformName":null,
+ "trackById":"RELATED_VNF3_INSTANCE_ID",
+ "serviceInstanceId":null,
+ "serviceInstanceName":null,
+ "tenantName":null
+ }
+ }
+ },
+ "VNF_GROUP2_INSTANCE_ID":{
+ "originalName":"groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById":"VNF_GROUP2_INSTANCE_ID",
+ "instanceName":"VNF_GROUP2_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None",
+ "instanceId":"VNF_GROUP2_INSTANCE_ID",
+ "instanceType":"VNF_GROUP2_INSTANCE_TYPE",
+ "orchStatus":null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "inMaint":false,
+ "modelInfo":{
+ "modelType":"instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId":"4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "tenantId": null,
+ "instanceGroupRole":"VNF_GROUP2_INSTANCE_ROLE",
+ "instanceGroupFunction":"vTSBC Customer Landing Network Collection",
+ "vnfs": {}
+ }
+ },
+ "validationCounter":0,
+ "existingVNFCounterMap":{},
+ "existingVnfGroupCounterMap":{
+ "daeb6568-cef8-417f-9075-ed259ce59f48": 2
+ },
+ "existingNetworksCounterMap":{}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json b/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json
new file mode 100644
index 000000000..2e0f85ee4
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/vnfGroupCreate1VnfGroupAndDelete2VnfGroupsRequest.json
@@ -0,0 +1,123 @@
+{
+ "action": "None",
+ "isDirty": true,
+ "vnfs": {},
+ "instanceParams": [],
+ "validationCounter": 0,
+ "existingNames": {
+ "service_instance_name": "",
+ "vnf_group3_instance_name": ""
+ },
+ "existingVNFCounterMap": {},
+ "existingVnfGroupCounterMap": {
+ "daeb6568-cef8-417f-9075-ed259ce59f48": 3
+ },
+ "existingNetworksCounterMap": {},
+ "networks": {},
+ "vnfGroups": {
+ "groupingservicefortest..ResourceInstanceGroup..0:001": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "groupingservicefortest..ResourceInstanceGroup..0:001",
+ "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "rollbackOnFailure": "false",
+ "action": "None_Delete",
+ "instanceId": "VNF_GROUP1_INSTANCE_ID",
+ "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection"
+ },
+ "groupingservicefortest..ResourceInstanceGroup..0:002": {
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "trackById": "groupingservicefortest..ResourceInstanceGroup..0:002",
+ "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "action": "None_Delete",
+ "instanceId": "VNF_GROUP2_INSTANCE_ID",
+ "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+ "orchStatus": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "tenantId": null,
+ "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection"
+ },
+ "groupingservicefortest..ResourceInstanceGroup..0": {
+ "action": "Create",
+ "inMaint": false,
+ "rollbackOnFailure": "true",
+
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "isMissingData": false,
+ "trackById": "ag5aav86u4j",
+ "vnfGroupStoreKey": "groupingservicefortest..ResourceInstanceGroup..0",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "instanceName": "VNF_GROUP3_INSTANCE_NAME",
+
+
+ "modelInfo": {
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "modelName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelVersion": "1",
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "instanceParams": [{}
+ ]
+ }
+ },
+ "bulkSize": 1,
+ "instanceName": "SERVICE_INSTANCE_NAME",
+
+ "instanceId": "service-instance-id",
+ "orchStatus": "GARBAGE DATA",
+ "globalSubscriberId": "global-customer-id",
+ "subscriptionServiceType": "service-instance-type",
+ "owningEntityId": null,
+ "owningEntityName": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "projectName": null,
+ "rollbackOnFailure": false,
+ "isALaCarte": true,
+ "modelInfo": {
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc",
+ "modelName": "Grouping Service for Test",
+ "modelType": "service",
+ "modelVersion": "1.0"
+ },
+
+ "testApi": "VNF_API"
+}
diff --git a/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json b/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json
new file mode 100644
index 000000000..da9727e89
--- /dev/null
+++ b/vid-automation/src/test/resources/VnfGroup/vnfGroupWithExistingAndNewVnfMembers.json
@@ -0,0 +1,209 @@
+{
+ "action": "None",
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "bulkSize": 1,
+ "existingNames": {
+ "service_instance_name": ""
+ },
+ "existingNetworksCounterMap": {},
+ "existingVNFCounterMap": {},
+ "existingVnfGroupCounterMap": {
+ "daeb6568-cef8-417f-9075-ed259ce59f48": 2,
+ "c2b300e6-45de-4e5e-abda-3032bee2de56": 0
+ },
+ "globalSubscriberId": "global-customer-id",
+ "instanceId": "service-instance-id",
+ "instanceName": "SERVICE_INSTANCE_NAME",
+ "instanceParams": [],
+ "isALaCarte": true,
+ "isDirty": true,
+ "lcpCloudRegionId": null,
+ "modelInfo": {
+ "modelInvariantId": "7ee41ce4-4827-44b0-a48e-2707a59905d2",
+ "modelName": "Grouping Service for Test",
+ "modelType": "service",
+ "modelVersion": "1.0",
+ "modelVersionId": "4117a0b6-e234-467d-b5b9-fe2f68c8b0fc"
+ },
+ "networks": {},
+ "orchStatus": "GARBAGE DATA",
+ "owningEntityId": null,
+ "owningEntityName": null,
+ "productFamilyId": null,
+ "projectName": null,
+ "rollbackOnFailure": false,
+ "subscriptionServiceType": "service-instance-type",
+ "tenantId": null,
+ "tenantName": null,
+ "testApi": "VNF_API",
+ "validationCounter": 0,
+ "vnfGroups": {
+ "VNF_GROUP1_INSTANCE_ID": {
+ "action": "None",
+ "inMaint": false,
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "instanceGroupRole": "VNF_GROUP1_INSTANCE_ROLE",
+ "instanceId": "VNF_GROUP1_INSTANCE_ID",
+ "instanceName": "VNF_GROUP1_INSTANCE_NAME",
+ "instanceType": "VNF_GROUP1_INSTANCE_TYPE",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "modelInfo": {
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelType": "instanceGroup",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "orchStatus": null,
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "trackById": "VNF_GROUP1_INSTANCE_ID",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "vnfs": {
+ "RELATED_VNF1_INSTANCE_ID": {
+ "action": "None",
+ "inMaint": false,
+ "instanceId": "RELATED_VNF1_INSTANCE_ID",
+ "instanceName": "RELATED_VNF1_INSTANCE_NAME",
+ "instanceType": "RELATED_VNF1_INSTANCE_TYPE",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelName": "vf_vEPDG",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "7a6ee536-f052-46fa-aa7e-2fca9d674c44"
+ },
+ "orchStatus": null,
+ "originalName": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "serviceInstanceId": null,
+ "serviceInstanceName": null,
+ "tenantId": null,
+ "tenantName": null,
+ "trackById": "RELATED_VNF1_INSTANCE_ID",
+ "uuid": "7a6ee536-f052-46fa-aa7e-2fca9d674c44"
+ },
+ "RELATED_VNF2_INSTANCE_ID": {
+ "action": "None",
+ "inMaint": false,
+ "instanceId": "RELATED_VNF2_INSTANCE_ID",
+ "instanceName": "RELATED_VNF2_INSTANCE_NAME",
+ "instanceType": "RELATED_VNF2_INSTANCE_TYPE",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelType": "vnf",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60"
+ },
+ "orchStatus": null,
+ "originalName": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "serviceInstanceId": null,
+ "serviceInstanceName": null,
+ "tenantId": null,
+ "tenantName": null,
+ "trackById": "RELATED_VNF2_INSTANCE_ID",
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60"
+ },
+ "RELATED_VNF3_INSTANCE_ID": {
+ "action": "None",
+ "inMaint": false,
+ "instanceId": "RELATED_VNF3_INSTANCE_ID",
+ "instanceName": "RELATED_VNF3_INSTANCE_NAME",
+ "instanceType": "RELATED_VNF3_INSTANCE_TYPE",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelType": "vnf",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60"
+ },
+ "orchStatus": null,
+ "originalName": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "serviceInstanceId": null,
+ "serviceInstanceName": null,
+ "tenantId": null,
+ "tenantName": null,
+ "trackById": "RELATED_VNF3_INSTANCE_ID",
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60"
+ },
+ "VNF1_INSTANCE_ID": {
+ "action": "Create",
+ "inMaint": false,
+ "instanceId": "VNF1_INSTANCE_ID",
+ "instanceName": "VNF1_INSTANCE_NAME",
+ "instanceType": "VNF1_INSTANCE_TYPE",
+ "isSelected": true,
+ "lcpCloudRegionId": "hvf23b",
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelName": "vf_vEPDG",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "7a6ee536-f052-46fa-aa7e-2fca9d674c44"
+ },
+ "orchStatus": null,
+ "originalName": null,
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "serviceInstanceId": "service-instance-id1",
+ "serviceInstanceName": "service-instance-name",
+ "tenantId": "3e9a20a3e89e45f884e09df0cc2d2d2a",
+ "tenantName": "APPC-24595-T-IST-02C",
+ "trackById": "VNF1_INSTANCE_ID",
+ "uuid": "7a6ee536-f052-46fa-aa7e-2fca9d674c44",
+ "vnfStoreKey": "VNF1_INSTANCE_ID"
+ }
+ }
+ },
+ "VNF_GROUP2_INSTANCE_ID": {
+ "action": "None",
+ "inMaint": false,
+ "instanceGroupFunction": "vTSBC Customer Landing Network Collection",
+ "instanceGroupRole": "VNF_GROUP2_INSTANCE_ROLE",
+ "instanceId": "VNF_GROUP2_INSTANCE_ID",
+ "instanceName": "VNF_GROUP2_INSTANCE_NAME",
+ "instanceType": "VNF_GROUP2_INSTANCE_TYPE",
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "lineOfBusiness": null,
+ "modelInfo": {
+ "modelCustomizationName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "modelInvariantId": "4bb2e27e-ddab-4790-9c6d-1f731bc14a45",
+ "modelType": "instanceGroup",
+ "modelVersionId": "daeb6568-cef8-417f-9075-ed259ce59f48"
+ },
+ "orchStatus": null,
+ "originalName": "groupingservicefortest..ResourceInstanceGroup..0",
+ "platformName": null,
+ "productFamilyId": null,
+ "provStatus": null,
+ "tenantId": null,
+ "trackById": "VNF_GROUP2_INSTANCE_ID",
+ "uuid": "daeb6568-cef8-417f-9075-ed259ce59f48",
+ "vnfs": {}
+ }
+ },
+ "vnfs": {}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarte.json b/vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarte.json
new file mode 100644
index 000000000..450e43863
--- /dev/null
+++ b/vid-automation/src/test/resources/a-la-carte/auditInfoMSOALaCarte.json
@@ -0,0 +1,18 @@
+[
+ {
+ "instanceName": "instance name 1",
+ "instanceType" : "service",
+ "jobStatus": "COMPLETE",
+ "requestId": "405652f4-ceb3-4a75-9474-8aea71480a77",
+ "additionalInfo": "Service Instance was created successfully.",
+ "final": "false"
+ },
+ {
+ "instanceName": "instance name 2",
+ "instanceType" : "service",
+ "jobStatus": "COMPLETE",
+ "requestId": "688d40cd-6bfd-4a4b-95f4-5e4ffa6d6fc5",
+ "additionalInfo": "Vnf has been created successfully.",
+ "final": "false"
+ }
+]
diff --git a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json
new file mode 100644
index 000000000..47643d21e
--- /dev/null
+++ b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte-no-testapi.json
@@ -0,0 +1,194 @@
+{
+ "action":"Create",
+ "isDirty":false,
+ "validationCounter":0,
+ "existingVNFCounterMap": {},
+ "existingNetworksCounterMap": {},
+ "vnfs": {
+ "2017-488_PASQUALE-vPE 0": {
+ "action": "Create",
+ "rollbackOnFailure": "true",
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "instanceName": "mimazepubi",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "624eb554b0d147c19ff8885341760481",
+ "rollbackOnFailure": "false",
+ "sdncPreLoad": false,
+ "instanceParams": [{}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelUniqueId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "isMissingData": false
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "instanceName": "puwesovabe",
+ "volumeGroupName": "puwesovabe_vol",
+ "lcpCloudRegionId": "JANET25",
+ "legacyRegion": "my region",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "rollbackOnFailure": "true",
+ "sdncPreLoad": true,
+ "instanceParams": [{
+ "PASQUALEvpe0_bandwidth": "10",
+ "2017488_PASQUALEvpe0_vnf_instance_name": "mtnj309me6",
+ "2017488_PASQUALEvpe0_vnf_config_template_version": "17.2",
+ "2017488_PASQUALEvpe0_AIC_CLLI": "ATLMY8GA",
+ "PASQUALEvpe0_bandwidth_units": "Gbps"
+ }
+ ],
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelUniqueId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "isMissingData": false
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2": {
+ "instanceName": "bnmgtrx",
+ "volumeGroupName": "",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "624eb554b0d147c19ff8885341760481",
+ "rollbackOnFailure": "false",
+ "sdncPreLoad": false,
+ "instanceParams": [{}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
+ "modelVersionId": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2",
+ "modelVersion": "6",
+ "modelCustomizationId": "3cd946bb-50e0-40d8-96d3-c9023520b557",
+ "modelUniqueId": "3cd946bb-50e0-40d8-96d3-c9023520b557",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2",
+ "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a"
+ },
+ "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a",
+ "isMissingData": false
+ }
+ }
+ },
+ "isMissingData": false,
+ "originalName": "2017-488_PASQUALE-vPE 0",
+ "vnfStoreKey": "2017-488_PASQUALE-vPE 0",
+ "trackById": "s0z58emiprq",
+ "instanceName": "2017-488_PASQUALE-vPE",
+ "inMaint":false,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "lcpCloudRegionId": "JANET25",
+ "legacyRegion": "just another region",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "platformName": "xxx1",
+ "lineOfBusiness": "zzz1",
+ "instanceParams": [
+ {}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelUniqueId" : "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ }
+ },
+ "networks": {
+ "ExtVL 0": {
+ "action": "Create",
+ "rollbackOnFailure": "true",
+ "isMissingData": false,
+ "originalName": "ExtVL 0",
+ "networkStoreKey": "ExtVL 0",
+ "trackById": "s0z58emiprq",
+ "instanceName": "ExtVL",
+ "inMaint":false,
+ "legacyRegion": "lcpRegionText",
+ "productFamilyId": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "platformName": "xxx1",
+ "lineOfBusiness": "zzz1",
+ "instanceParams": [
+ {}
+ ],
+ "modelInfo": {
+ "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelCustomizationName": "ExtVL 0",
+ "modelInvariantId": "379f816b-a7aa-422f-be30-17114ff50b7c",
+ "modelUniqueId" : "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelName": "ExtVL",
+ "modelVersion": "37.0",
+ "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ },
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ }
+ },
+ "vnfGroups":{
+ },
+ "optionalGroupMembersMap": {},
+ "existingVnfGroupCounterMap": {},
+ "instanceParams": [
+ {}
+ ],
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "projectName": "WATKINS",
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "owningEntityName": "WayneHolland",
+ "bulkSize": 1,
+ "modelInfo": {
+ "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+ "modelUniqueId": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+ "modelName": "action-data",
+ "modelVersion": "1.0",
+ "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"
+ },
+ "isEcompGeneratedNaming": true,
+ "existingNames": {
+ "serviceinstancename": ""
+ },
+ "instanceName": "serviceInstanceName",
+ "rollbackOnFailure": "true",
+ "isALaCarte": true,
+ "name": "action-data",
+ "version": "1.0",
+ "description": "",
+ "category": "",
+ "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+ "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "serviceType": "",
+ "serviceRole": "",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "tenantName": null,
+ "aicZoneId": "JAG1",
+ "aicZoneName": null,
+ "lcpCloudRegionId": "JANET25",
+ "productFamilyId": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
+ "isMultiStepDesign": false
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json
new file mode 100644
index 000000000..7fcc9b1eb
--- /dev/null
+++ b/vid-automation/src/test/resources/a-la-carte/redux-a-la-carte.json
@@ -0,0 +1,195 @@
+{
+ "action":"Create",
+ "isDirty":false,
+ "validationCounter":0,
+ "existingVNFCounterMap": {},
+ "existingNetworksCounterMap": {},
+ "vnfs": {
+ "2017-488_PASQUALE-vPE 0": {
+ "action": "Create",
+ "rollbackOnFailure": "true",
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "instanceName": "mimazepubi",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "624eb554b0d147c19ff8885341760481",
+ "rollbackOnFailure": "false",
+ "sdncPreLoad": false,
+ "instanceParams": [{}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelUniqueId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "isMissingData": false
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "instanceName": "puwesovabe",
+ "volumeGroupName": "puwesovabe_vol",
+ "lcpCloudRegionId": "JANET25",
+ "legacyRegion": "my region",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "rollbackOnFailure": "true",
+ "sdncPreLoad": true,
+ "instanceParams": [{
+ "PASQUALEvpe0_bandwidth": "10",
+ "2017488_PASQUALEvpe0_vnf_instance_name": "mtnj309me6",
+ "2017488_PASQUALEvpe0_vnf_config_template_version": "17.2",
+ "2017488_PASQUALEvpe0_AIC_CLLI": "ATLMY8GA",
+ "PASQUALEvpe0_bandwidth_units": "Gbps"
+ }
+ ],
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelUniqueId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "isMissingData": false
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2": {
+ "instanceName": "bnmgtrx",
+ "volumeGroupName": "",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "624eb554b0d147c19ff8885341760481",
+ "rollbackOnFailure": "false",
+ "sdncPreLoad": false,
+ "instanceParams": [{}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "eff8cc59-53a1-4101-aed7-8cf24ecf8339",
+ "modelVersionId": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2",
+ "modelVersion": "6",
+ "modelCustomizationId": "3cd946bb-50e0-40d8-96d3-c9023520b557",
+ "modelUniqueId": "3cd946bb-50e0-40d8-96d3-c9023520b557",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vPFE_BV..module-2",
+ "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a"
+ },
+ "uuid": "0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a",
+ "isMissingData": false
+ }
+ }
+ },
+ "isMissingData": false,
+ "originalName": "2017-488_PASQUALE-vPE 0",
+ "vnfStoreKey": "2017-488_PASQUALE-vPE 0",
+ "trackById": "s0z58emiprq",
+ "instanceName": "2017-488_PASQUALE-vPE",
+ "inMaint":false,
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "lcpCloudRegionId": "JANET25",
+ "legacyRegion": "just another region",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "platformName": "xxx1",
+ "lineOfBusiness": "zzz1",
+ "instanceParams": [
+ {}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelUniqueId" : "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ }
+ },
+ "networks": {
+ "ExtVL 0": {
+ "action": "Create",
+ "rollbackOnFailure": "true",
+ "isMissingData": false,
+ "originalName": "ExtVL 0",
+ "networkStoreKey": "ExtVL 0",
+ "trackById": "s0z58emiprq",
+ "instanceName": "ExtVL",
+ "inMaint":false,
+ "legacyRegion": "lcpRegionText",
+ "productFamilyId": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "platformName": "xxx1",
+ "lineOfBusiness": "zzz1",
+ "instanceParams": [
+ {}
+ ],
+ "modelInfo": {
+ "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelCustomizationName": "ExtVL 0",
+ "modelInvariantId": "379f816b-a7aa-422f-be30-17114ff50b7c",
+ "modelUniqueId" : "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelName": "ExtVL",
+ "modelVersion": "37.0",
+ "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ },
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ }
+ },
+ "vnfGroups":{
+ },
+ "optionalGroupMembersMap": {},
+ "existingVnfGroupCounterMap": {},
+ "instanceParams": [
+ {}
+ ],
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "projectName": "WATKINS",
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "owningEntityName": "WayneHolland",
+ "bulkSize": 1,
+ "modelInfo": {
+ "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+ "modelUniqueId": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+ "modelName": "action-data",
+ "modelVersion": "1.0",
+ "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd"
+ },
+ "isEcompGeneratedNaming": true,
+ "existingNames": {
+ "serviceinstancename": ""
+ },
+ "instanceName": "serviceInstanceName",
+ "rollbackOnFailure": "true",
+ "isALaCarte": true,
+ "name": "action-data",
+ "version": "1.0",
+ "description": "",
+ "category": "",
+ "uuid": "2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd",
+ "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "serviceType": "",
+ "serviceRole": "",
+ "testApi": "GR_API",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "tenantName": null,
+ "aicZoneId": "JAG1",
+ "aicZoneName": null,
+ "lcpCloudRegionId": "JANET25",
+ "productFamilyId": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
+ "isMultiStepDesign": false
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/a-la-carte/redux-multiple-vnf-network.json b/vid-automation/src/test/resources/a-la-carte/redux-multiple-vnf-network.json
new file mode 100644
index 000000000..de2fca2ba
--- /dev/null
+++ b/vid-automation/src/test/resources/a-la-carte/redux-multiple-vnf-network.json
@@ -0,0 +1,118 @@
+{
+ "vnfs": {
+ "VF_vGeraldine 0": {
+ "originalName": "VF_vGeraldine 0",
+ "rollbackOnFailure": "true",
+ "instanceName": "VFvGeraldine00001",
+ "isMissingData": false,
+ "modelName": "VF_vGeraldine 0",
+ "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "lineOfBusiness": "zzz1",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelName": "VF_vGeraldine",
+ "modelVersion": "2.0",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelCustomizationName": "VF_vGeraldine 0"
+ },
+ "legacyRegion": null
+ },
+ "VF_vGeraldine 0:0001": {
+ "originalName": "VF_vGeraldine 0",
+ "instanceName": "VFvGeraldine00001_001",
+ "rollbackOnFailure": "true",
+ "isMissingData": false,
+ "modelName": "VF_vGeraldine 0",
+ "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "trackById": "e4wwvf531y8",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelUniqueId" : "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelName": "VF_vGeraldine",
+ "modelVersion": "2.0",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60"
+ },
+ "legacyRegion": null,
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "instanceParams": [
+ {}
+ ]
+ }
+ },
+ "networks": {
+ "ExtVL 0": {
+ "action": "Create",
+ "rollbackOnFailure": "true",
+ "isMissingData": false,
+ "originalName": "ExtVL 0",
+ "networkStoreKey": "ExtVL 0",
+ "trackById": "8gdsx5jxxj8",
+ "inMaint":false,
+ "instanceName": "ExtVL",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
+ "platformName": "xxx1",
+ "lineOfBusiness": "zzz1",
+ "instanceParams": [
+ {}
+ ],
+ "modelInfo": {
+ "modelInvariantId": "379f816b-a7aa-422f-be30-17114ff50b7c",
+ "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelUniqueId" : "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelName": "ExtVL",
+ "modelVersion": "37.0",
+ "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelCustomizationName": "ExtVL 0",
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ },
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ }
+ },
+ "validationCounter": 0,
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "lcpCloudRegionId": "hvf6",
+ "testApi": "GR_API",
+ "tenantId": "1178612d2b394be4834ad77f567c0af2",
+ "aicZoneId": "YYY1",
+ "projectName": "yyy1",
+ "owningEntityId": "aaa1",
+ "owningEntityName": "aaa1",
+ "rollbackOnFailure": "true",
+ "isALaCarte": true,
+ "isEcompGeneratedNaming": false,
+ "bulkSize": 1,
+ "modelInfo": {
+ "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
+ "modelName": "ComplexService",
+ "modelVersion": "1.0"
+ },
+ "instanceName": "serviceInstanceName",
+ "existingNames": {
+ "serviceinstancename": "",
+ "vfvgeraldine00001": "",
+ "vfvgeraldine00001_001": ""
+ },
+ "existingVNFCounterMap": {
+ "d6557200-ecf2-4641-8094-5393ae3aae60": 1,
+ "undefined": 1
+ },
+ "existingNetworksCounterMap": {},
+ "tenantName": "AIN Web Tool-15-D-SSPtestcustome",
+ "aicZoneName": "UUUAIAAI-YYY1"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceInstance.json b/vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceInstance.json
new file mode 100644
index 000000000..a95573558
--- /dev/null
+++ b/vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceInstance.json
@@ -0,0 +1,274 @@
+{
+ "instanceName":"SERVICE_INSTANCE_NAME",
+ "action": "None",
+ "instanceId":"service-instance-id",
+ "orchStatus":"GARBAGE DATA",
+ "globalSubscriberId":"global-customer-id",
+ "subscriptionServiceType":"service-instance-type",
+ "owningEntityId":null,
+ "owningEntityName":null,
+ "productFamilyId":null,
+ "lcpCloudRegionId":null,
+ "tenantId":null,
+ "tenantName":null,
+ "aicZoneId":null,
+ "aicZoneName":null,
+ "projectName":null,
+ "rollbackOnFailure":null,
+ "isALaCarte":false,
+ "modelInfo":{
+ "modelInvariantId":"d27e42cf-087e-4d31-88ac-6c4b7585f800",
+ "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
+ "modelName":"vf_vEPDG",
+ "modelType":"service",
+ "modelVersion":"5.0"
+ },
+ "vnfs": {
+ "VNF1_INSTANCE_ID": {
+ "originalName": null,
+ "trackById": "VNF1_INSTANCE_ID",
+ "instanceName": "VNF1_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "VNF1_INSTANCE_ID",
+ "instanceType": "VNF1_INSTANCE_TYPE",
+ "orchStatus": null,
+ "provStatus": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelVersionId": "vnf-instance-model-version-id",
+ "modelCustomizationId": "vnf-instance-model-customization-id",
+ "modelType": "vnf"
+ },
+ "uuid": "vnf-instance-model-version-id",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "vfModules": {},
+ "networks": {
+ "NETWORK1_INSTANCE_ID": {
+ "originalName": null,
+ "trackById": "NETWORK1_INSTANCE_ID",
+ "instanceName": "NETWORK1_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "NETWORK1_INSTANCE_ID",
+ "instanceType": "CONTRAIL30_BASIC",
+ "orchStatus": "Assigned",
+ "provStatus": "prov",
+ "inMaint": false,
+ "modelInfo": {
+ "modelInvariantId": "network-instance-model-invariant-id",
+ "modelVersionId": "network-instance-model-version-id",
+ "modelCustomizationId": "network-instance-model-customization-id",
+ "modelType": "network"
+ },
+ "uuid": "network-instance-model-version-id",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null
+ },
+ "NETWORK2_INSTANCE_ID": {
+ "originalName": null,
+ "trackById": "NETWORK2_INSTANCE_ID",
+ "instanceName": "NETWORK2_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "NETWORK2_INSTANCE_ID",
+ "instanceType": "CONTRAIL30_BASIC",
+ "orchStatus": "Created",
+ "provStatus": "prov",
+ "inMaint": false,
+ "modelInfo": {
+ "modelInvariantId": "network-instance-model-invariant-id",
+ "modelVersionId": "network-instance-model-version-id",
+ "modelCustomizationId": "network-instance-model-customization-id",
+ "modelType": "network"
+ },
+ "uuid": "network-instance-model-version-id",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null
+ }
+ }
+ },
+ "VNF2_INSTANCE_ID": {
+ "originalName": "VF_vGeraldine 0",
+ "trackById": "VNF2_INSTANCE_ID",
+ "instanceName": "VNF2_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "VNF2_INSTANCE_ID",
+ "instanceType": "VNF2_INSTANCE_TYPE",
+ "orchStatus": null,
+ "provStatus": null,
+ "inMaint": true,
+ "modelInfo": {
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "modelInvariantId": "vnf-instance-model-invariant-id",
+ "modelVersionId": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "modelCustomizationId": "91415b44-753d-494c-926a-456a9172bbb9",
+ "modelType": "vnf"
+ },
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "vfModules": {
+ "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
+ "2c1ca484-cbc2-408b-ab86-25a2c15ce280": {
+ "originalName": "VfVgeraldine..vflorence_vlc..module-1",
+ "trackById": "2c1ca484-cbc2-408b-ab86-25a2c15ce280",
+ "instanceName": "ss820f_0918_db",
+ "action": "None",
+ "instanceId": "2c1ca484-cbc2-408b-ab86-25a2c15ce280",
+ "instanceType": null,
+ "orchStatus": "deleted",
+ "provStatus": null,
+ "inMaint": true,
+ "modelInfo": {
+ "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
+ "modelCustomizationId": "55b1be94-671a-403e-a26c-667e9c47d091",
+ "modelInvariantId": "09edc9ef-85d0-4b26-80de-1f569d49e750",
+ "modelVersionId": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
+ "modelType": "vfModule"
+ },
+ "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "isBase": false,
+ "volumeGroupName": null
+ }
+ },
+ "dc229cd8-c132-4455-8517-5c1787c18b14": {
+ "3ef042c4-259f-45e0-9aba-0989bd8d1cc5": {
+ "originalName": null,
+ "trackById": "3ef042c4-259f-45e0-9aba-0989bd8d1cc5",
+ "instanceName": "ss820f_0918_base",
+ "action": "None",
+ "instanceId": "3ef042c4-259f-45e0-9aba-0989bd8d1cc5",
+ "instanceType": null,
+ "orchStatus": "Assigned",
+ "provStatus": null,
+ "inMaint": false,
+ "modelInfo": {
+ "modelCustomizationId": "8ad8670b-0541-4499-8101-275bbd0e8b6a",
+ "modelInvariantId": "1e463c9c-404d-4056-ba56-28fd102608de",
+ "modelVersionId": "dc229cd8-c132-4455-8517-5c1787c18b14",
+ "modelType": "vfModule"
+ },
+ "uuid": "dc229cd8-c132-4455-8517-5c1787c18b14",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null,
+ "isBase": true,
+ "volumeGroupName": null
+ }
+ }
+ },
+ "networks": {}
+ }
+ },
+ "networks": {
+ "NETWORK3_INSTANCE_ID": {
+ "originalName": "ExtVL 0",
+ "trackById": "NETWORK3_INSTANCE_ID",
+ "instanceName": "NETWORK3_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "NETWORK3_INSTANCE_ID",
+ "instanceType": "CONTRAIL30_BASIC",
+ "orchStatus": "Assigned",
+ "provStatus": "nvtprov",
+ "inMaint": false,
+ "modelInfo": {
+ "modelCustomizationName": "ExtVL 0",
+ "modelInvariantId": "network-instance-model-invariant-id",
+ "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelType": "network"
+ },
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null
+ },
+ "NETWORK4_INSTANCE_ID": {
+ "originalName": "ExtVL 0",
+ "trackById": "NETWORK4_INSTANCE_ID",
+ "instanceName": "NETWORK4_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "NETWORK4_INSTANCE_ID",
+ "instanceType": "CONTRAIL30_HIMELGUARD",
+ "orchStatus": "Created",
+ "provStatus": "preprov",
+ "inMaint": false,
+ "modelInfo": {
+ "modelCustomizationName": "ExtVL 0",
+ "modelInvariantId": "network-instance-model-invariant-id",
+ "modelCustomizationId": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelVersionId": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelType": "network"
+ },
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "legacyRegion": null,
+ "tenantId": null,
+ "lineOfBusiness": null,
+ "platformName": null
+ }
+ },
+ "instanceName": "SERVICE_INSTANCE_NAME",
+ "action": "None",
+ "instanceId": "service-instance-id",
+ "orchStatus": "GARBAGE DATA",
+ "globalSubscriberId": "global-customer-id",
+ "subscriptionServiceType": "service-instance-type",
+ "owningEntityId": null,
+ "owningEntityName": null,
+ "productFamilyId": null,
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "projectName": null,
+ "rollbackOnFailure": null,
+ "isALaCarte": false,
+ "modelInfo": {
+ "modelInvariantId": "d27e42cf-087e-4d31-88ac-6c4b7585f800",
+ "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
+ "modelName": "vf_vEPDG",
+ "modelType": "service",
+ "modelVersion": "5.0"
+ },
+ "validationCounter": 0,
+ "vnfGroups": {},
+ "existingVNFCounterMap": {
+ "91415b44-753d-494c-926a-456a9172bbb9": 1,
+ "vnf-instance-model-customization-id": 1
+ },
+ "existingNetworksCounterMap": {
+ "94fdd893-4a36-4d70-b16a-ec29c54c184f": 2
+ },
+ "existingVnfGroupCounterMap": {}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceModel.json b/vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceModel.json
new file mode 100644
index 000000000..0fbf83070
--- /dev/null
+++ b/vid-automation/src/test/resources/aaiGetInstanceTopology/ServiceTreeWithMultipleChildren_serviceModel.json
@@ -0,0 +1,392 @@
+{
+ "service": {
+ "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
+ "invariantUuid": "d27e42cf-087e-4d31-88ac-6c4b7585f800",
+ "name": "ComplexService",
+ "version": "1.0",
+ "toscaModelURL": null,
+ "category": "Emanuel",
+ "serviceType": "",
+ "serviceRole": "",
+ "description": "ComplexService",
+ "serviceEcompNaming": "true",
+ "instantiationType": "Macro",
+ "inputs": {},
+ "vidNotions": {
+ "instantiationUI": "legacy",
+ "modelCategory": "other",
+ "viewEditUI": "legacy"
+ }
+ },
+ "vnfs": {
+ "VF_vGeraldine 0": {
+ "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
+ "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
+ "description": "VSP_vGeraldine",
+ "name": "VF_vGeraldine",
+ "version": "2.0",
+ "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
+ "inputs": {},
+ "commands": {},
+ "properties": {
+ "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-ipv6-egress_src_start_port": "0",
+ "sctp-a-ipv6-egress_rule_application": "any",
+ "Internal2_allow_transit": "true",
+ "sctp-b-IPv6_ethertype": "IPv6",
+ "sctp-a-egress_rule_application": "any",
+ "sctp-b-ingress_action": "pass",
+ "sctp-b-ingress_rule_protocol": "icmp",
+ "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-ipv6-ingress-src_start_port": "0.0",
+ "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
+ "fsb_volume_size_0": "320.0",
+ "sctp-b-egress_src_addresses": "local",
+ "sctp-a-ipv6-ingress_ethertype": "IPv4",
+ "sctp-a-ipv6-ingress-dst_start_port": "0",
+ "sctp-b-ipv6-ingress_rule_application": "any",
+ "domain_name": "default-domain",
+ "sctp-a-ingress_rule_protocol": "icmp",
+ "sctp-b-egress-src_start_port": "0.0",
+ "sctp-a-egress_src_addresses": "local",
+ "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
+ "sctp-a-egress-src_start_port": "0.0",
+ "sctp-a-ingress_ethertype": "IPv4",
+ "sctp-b-ipv6-ingress-dst_end_port": "65535",
+ "sctp-b-dst_subnet_prefix_v6": "::",
+ "nf_naming": "{ecomp_generated_naming=true}",
+ "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
+ "sctp-b-egress-dst_start_port": "0.0",
+ "ncb_flavor_name": "nv.c20r64d1",
+ "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-egress_dst_subnet_prefix_len": "0.0",
+ "Internal2_net_cidr": "10.0.0.10",
+ "sctp-a-ingress-dst_start_port": "0.0",
+ "sctp-a-egress-dst_start_port": "0.0",
+ "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
+ "sctp-a-egress_ethertype": "IPv4",
+ "vlc_st_service_mode": "in-network-nat",
+ "sctp-a-ipv6-egress_ethertype": "IPv4",
+ "sctp-a-egress-src_end_port": "65535.0",
+ "sctp-b-ipv6-egress_rule_application": "any",
+ "sctp-b-egress_action": "pass",
+ "sctp-a-ingress-src_subnet_prefix_len": "0.0",
+ "sctp-b-ipv6-ingress-src_end_port": "65535.0",
+ "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
+ "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
+ "sctp-a-ipv6-ingress-src_start_port": "0.0",
+ "sctp-b-ipv6-egress_ethertype": "IPv4",
+ "Internal1_net_cidr": "10.0.0.10",
+ "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
+ "fsb_flavor_name": "nv.c20r64d1",
+ "sctp_rule_protocol": "132",
+ "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
+ "sctp-a-ipv6-ingress_rule_application": "any",
+ "ecomp_generated_naming": "true",
+ "sctp-a-IPv6_ethertype": "IPv6",
+ "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
+ "vlc_st_virtualization_type": "virtual-machine",
+ "sctp-b-ingress-dst_start_port": "0.0",
+ "sctp-b-ingress-dst_end_port": "65535.0",
+ "sctp-a-ipv6-ingress-src_end_port": "65535.0",
+ "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
+ "sctp-b-ingress_rule_application": "any",
+ "int2_sec_group_name": "int2-sec-group",
+ "vlc_flavor_name": "nd.c16r64d1",
+ "sctp-b-ipv6-egress_src_addresses": "local",
+ "vlc_st_interface_type_int1": "other1",
+ "sctp-b-egress-src_end_port": "65535.0",
+ "sctp-a-ipv6-egress-dst_start_port": "0",
+ "vlc_st_interface_type_int2": "other2",
+ "sctp-a-ipv6-egress_rule_protocol": "any",
+ "Internal2_shared": "false",
+ "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
+ "Internal2_rpf": "disable",
+ "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-ipv6-egress_src_end_port": "65535",
+ "sctp-a-ipv6-egress_src_addresses": "local",
+ "sctp-a-ingress-dst_end_port": "65535.0",
+ "sctp-a-ipv6-egress_src_end_port": "65535",
+ "Internal1_forwarding_mode": "l2",
+ "Internal2_dhcp": "false",
+ "sctp-a-dst_subnet_prefix_v6": "::",
+ "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
+ "vlc_st_interface_type_gtp": "other0",
+ "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-src_subnet_prefix_v6": "::",
+ "sctp-a-egress_dst_subnet_prefix_len": "0.0",
+ "int1_sec_group_name": "int1-sec-group",
+ "Internal1_dhcp": "false",
+ "sctp-a-ipv6-egress_dst_end_port": "65535",
+ "Internal2_forwarding_mode": "l2",
+ "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
+ "Internal1_net_cidr_len": "17",
+ "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
+ "sctp-b-ingress-src_subnet_prefix_len": "0.0",
+ "sctp-a-ingress_dst_addresses": "local",
+ "sctp-a-egress_action": "pass",
+ "fsb_volume_type_0": "SF-Default-SSD",
+ "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
+ "vlc_st_interface_type_sctp_a": "left",
+ "vlc_st_interface_type_sctp_b": "right",
+ "sctp-a-src_subnet_prefix_v6": "::",
+ "vlc_st_version": "2",
+ "sctp-b-egress_ethertype": "IPv4",
+ "sctp-a-ingress_rule_application": "any",
+ "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
+ "instance_ip_family_v6": "v6",
+ "sctp-a-ipv6-egress_src_start_port": "0",
+ "sctp-b-ingress-src_start_port": "0.0",
+ "sctp-b-ingress_dst_addresses": "local",
+ "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
+ "vlc_st_interface_type_oam": "management",
+ "multi_stage_design": "false",
+ "oam_sec_group_name": "oam-sec-group",
+ "Internal2_net_gateway": "10.0.0.10",
+ "sctp-a-ipv6-ingress-dst_end_port": "65535",
+ "sctp-b-ipv6-egress-dst_start_port": "0",
+ "Internal1_net_gateway": "10.0.0.10",
+ "sctp-b-ipv6-egress_rule_protocol": "any",
+ "gtp_sec_group_name": "gtp-sec-group",
+ "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
+ "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
+ "sctp-a-ipv6-ingress_dst_addresses": "local",
+ "sctp-a-egress_rule_protocol": "icmp",
+ "sctp-b-ipv6-egress_action": "pass",
+ "sctp-a-ipv6-egress_action": "pass",
+ "Internal1_shared": "false",
+ "sctp-b-ipv6-ingress_rule_protocol": "any",
+ "Internal2_net_cidr_len": "17",
+ "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
+ "sctp-a-ingress-src_end_port": "65535.0",
+ "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
+ "sctp-a-egress-dst_end_port": "65535.0",
+ "sctp-a-ingress_action": "pass",
+ "sctp-b-egress_rule_protocol": "icmp",
+ "sctp-b-ipv6-ingress_action": "pass",
+ "vlc_st_service_type": "firewall",
+ "sctp-b-ipv6-egress_dst_end_port": "65535",
+ "sctp-b-ipv6-ingress-dst_start_port": "0",
+ "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
+ "vlc_st_availability_zone": "true",
+ "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
+ "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
+ "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
+ "Internal1_allow_transit": "true",
+ "gpb_flavor_name": "nv.c20r64d1",
+ "availability_zone_max_count": "1",
+ "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
+ "sctp-b-ipv6-ingress_dst_addresses": "local",
+ "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
+ "sctp-b-ipv6-ingress_ethertype": "IPv4",
+ "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
+ "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
+ "sctp-a-ipv6-ingress_action": "pass",
+ "Internal1_rpf": "disable",
+ "sctp-b-ingress_ethertype": "IPv4",
+ "sctp-b-egress_rule_application": "any",
+ "sctp-b-ingress-src_end_port": "65535.0",
+ "sctp-a-ipv6-ingress_rule_protocol": "any",
+ "sctp-a-ingress-src_start_port": "0.0",
+ "sctp-b-egress-dst_end_port": "65535.0"
+ },
+ "type": "VF",
+ "modelCustomizationName": "VF_vGeraldine 0",
+ "vfModules": {
+ "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
+ "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
+ "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
+ "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
+ "description": null,
+ "name": "VfVgeraldine..vflorence_vlc..module-1",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "vflorence_vlc",
+ "baseModule": false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
+ "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
+ "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
+ "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
+ "description": null,
+ "name": "VfVgeraldine..vflorence_gpb..module-2",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "vflorence_gpb",
+ "baseModule": false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
+ "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
+ "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
+ "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
+ "description": null,
+ "name": "VfVgeraldine..base_vflorence..module-0",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "base_vflorence",
+ "baseModule": true
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
+ "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
+ "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
+ "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
+ "description": null,
+ "name": "VfVgeraldine..base_vflorence..module-0",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "base_vflorence",
+ "baseModule": true
+ },
+ "inputs": {}
+ }
+ },
+ "vfcInstanceGroups": {}
+ }
+ },
+ "networks": {
+ "ExtVL 0": {
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
+ "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
+ "name": "ExtVL",
+ "version": "37.0",
+ "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "inputs": {},
+ "commands": {},
+ "properties": {
+ "network_role" : "network role 1, network role 2",
+ "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}}",
+ "exVL_naming": "{ecomp_generated_naming=true}",
+ "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
+ "network_homing": "{ecomp_selected_instance_node_target=false}"
+ },
+ "type": "VL",
+ "modelCustomizationName": "ExtVL 0"
+ }
+ },
+ "collectionResource": {},
+ "configurations": {
+ "Port Mirroring Configuration By Policy 0": {
+ "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
+ "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
+ "description": "A port mirroring configuration by policy object",
+ "name": "Port Mirroring Configuration By Policy",
+ "version": "27.0",
+ "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
+ "inputs": {},
+ "commands": {},
+ "properties": {},
+ "type": "Configuration",
+ "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
+ "sourceNodes": [],
+ "collectorNodes": null,
+ "configurationByPolicy": false
+ }
+ },
+ "fabricConfigurations": {},
+ "serviceProxies": {},
+ "vfModules": {
+ "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
+ "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
+ "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
+ "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
+ "description": null,
+ "name": "VfVgeraldine..vflorence_vlc..module-1",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "vflorence_vlc",
+ "baseModule": false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
+ "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
+ "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
+ "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
+ "description": null,
+ "name": "VfVgeraldine..vflorence_gpb..module-2",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "vflorence_gpb",
+ "baseModule": false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
+ "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
+ "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
+ "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
+ "description": null,
+ "name": "VfVgeraldine..base_vflorence..module-0",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "base_vflorence",
+ "baseModule": true
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
+ "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
+ "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
+ "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
+ "description": null,
+ "name": "VfVgeraldine..base_vflorence..module-0",
+ "version": "2",
+ "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "base_vflorence",
+ "baseModule": true
+ },
+ "inputs": {}
+ }
+ },
+ "pnfs": {}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json b/vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json
new file mode 100644
index 000000000..b2ba2c7e9
--- /dev/null
+++ b/vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json
@@ -0,0 +1,263 @@
+{
+ "networks": {
+ "ExtVL 0": {
+ "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
+ "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
+ "name": "ExtVL",
+ "version": "37.0",
+ "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "inputs": {},
+ "commands": {},
+ "modelInfo": {
+ "modelVersionId": "12345-5858-6565",
+ "modelName": "modelForNetwork"
+ },
+ "properties": {
+ "min_instances": 1,
+ "max_instances": 10,
+ "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}}",
+ "exVL_naming": "{ecomp_generated_naming=true}",
+ "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
+ "network_homing": "{ecomp_selected_instance_node_target=false}"
+ },
+ "type": "VL",
+ "instanceName" : "NetInstance",
+ "modelCustomizationName": "ExtVL 0",
+ "isFailed": true
+ }
+ },
+ "vnfs": {
+ "2017-388_PASQUALE-vPE 0": {
+ "vfModules": {},
+ "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "modelName": "2017-388_PASQUALE-vPE",
+ "modelVersion": "4.0",
+ "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
+ "modelCustomizationName": "2017-388_PASQUALE-vPE 0",
+ "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
+ },
+ "instanceName": "2017388_PASQUALEvPEmCaNkinstanceName",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-488_PASQUALE-vPE 0": {
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+ "instanceName": "VFinstancenameZERO",
+ "action": "None",
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "provStatus": "Prov Status",
+ "orchStatus": "Active",
+ "inMaint": true,
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86"
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1fshmc": {
+ "instanceName": "VFinstancename",
+ "action": "None",
+ "volumeGroupName": "VFinstancename_vol_abc",
+ "orchStatus": "Create",
+ "provStatus": "Prov Status",
+ "inMaint": false,
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ }
+ }
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "orchStatus": "Created",
+ "inMaint": false,
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-488_PASQUALE-vPE 0:0001": {
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+ "instanceName": "VFinstancenameZERO_001",
+ "action": "None",
+ "provStatus": "Prov Status",
+ "inMaint": true,
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1fshmc": {
+ "instanceName": "VFinstancename_001",
+ "action": "None",
+ "volumeGroupName": "VFinstancename_vol_abc_001",
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ }
+ }
+ },
+
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename_001",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-488_PASQUALE-vPE 0:0002": {
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+ "instanceName": "VFinstancenameZERO_002",
+ "action": "None",
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1fshmc": {
+ "instanceName": "VFinstancename_002",
+ "action": "None",
+ "volumeGroupName": "VFinstancename_vol_abc_002",
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ }
+ }
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename_002",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ }
+ },
+ "validationCounter": 0,
+ "existingVNFCounterMap": {
+ "afacccf6-397d-45d6-b5ae-94c39734b168": 1,
+ "69e09f68-8b63-4cc9-b9ff-860960b5db09": 3
+ },
+ "existingNetworksCounterMap": {},
+ "instanceName": "mCaNkinstancename",
+ "action": "None",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "aicZoneId": "NFT1",
+ "projectName": "WATKINS",
+ "rollbackOnFailure": "true",
+ "aicZoneName": "NFTJSSSS-NFT1",
+ "owningEntityName": "WayneHolland",
+ "tenantName": "AIN Web Tool-15-D-testalexandria",
+ "modelInfo": {
+ "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+ "modelName": "action-data",
+ "modelVersion": "1.0",
+ "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450"
+ },
+ "isALaCarte": false,
+ "orchStatus": "Active",
+ "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
new file mode 100644
index 000000000..ccf095294
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/ServiceTreeForRetry_serviceInstance.json
@@ -0,0 +1,62 @@
+{
+ "modelInfo": {
+ "modelInvariantId": "0367689e-d41e-483f-b200-eab17e4a7f8d",
+ "modelVersionId": "e3c34d88-a216-4f1d-a782-9af9f9588705",
+ "modelName": "gayawabawe",
+ "modelType": "service",
+ "modelVersion": "5.1"
+ },
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "Lucine Sarika",
+ "projectName": "zasaki",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriberName": "SILVIA ROBBINS",
+ "productFamilyId": "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
+ "instanceName": "SERVICE_NAME",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "lcpCloudRegionId": "a93f8383-707e-43fa-8191-a6e69a1aab17",
+ "tenantId": "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
+ "tenantName": "Hedvika Wendelin",
+ "aicZoneId": "de738e5f-3704-4a14-b98f-3bf86ac0c0a0",
+ "aicZoneName": "voloyakane-senamo",
+ "vnfs": {
+ "vSAMP12 1": {
+ "modelInfo": {
+ "modelCustomizationName": "vSAMP12 1",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe042c22-ba82-43c6-b2f6-8f1fc4164091",
+ "modelName": "vSAMP12",
+ "modelType": "vnf",
+ "modelVersion": "1.0"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceName": "SERVICE_NAME_vnf",
+ "action": "Create",
+ "platformName": "vnf_platformName",
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e",
+ "instanceParams": [],
+ "rollbackOnFailure": false,
+ "instanceId": null,
+ "vfModules": {},
+ "trackById": "TRACK_BY_ID",
+ "isFailed": true,
+ "statusMessage":"Vnf failed.",
+ "lineOfBusiness": "vnf_lineOfBusinessName"
+ }
+ },
+ "networks": {},
+ "vnfGroups": {},
+ "instanceParams": [],
+ "pause": false,
+ "bulkSize": 1,
+ "rollbackOnFailure": false,
+ "isALaCarte": true,
+ "testApi": "VNF_API",
+ "instanceId": "INSTANCE_ID",
+ "action": "None",
+ "trackById": "TRACK_BY_ID",
+ "isFailed": false,
+ "statusMessage": null
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
new file mode 100644
index 000000000..d1c40594b
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/ServiceWithFailedServiceInstance.json
@@ -0,0 +1,67 @@
+{
+ "action": "Create",
+ "aicZoneId": "de738e5f-3704-4a14-b98f-3bf86ac0c0a0",
+ "aicZoneName": "voloyakane-senamo",
+ "bulkSize": 1,
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "instanceId": null,
+ "instanceName": "INSTANCE_NAME",
+ "instanceParams": [
+ ],
+ "isALaCarte": true,
+ "isFailed": true,
+ "lcpCloudRegionId": "a93f8383-707e-43fa-8191-a6e69a1aab17",
+ "modelInfo": {
+ "modelInvariantId": "0367689e-d41e-483f-b200-eab17e4a7f8d",
+ "modelName": "gayawabawe",
+ "modelType": "service",
+ "modelVersion": "5.1",
+ "modelVersionId": "e3c34d88-a216-4f1d-a782-9af9f9588705"
+ },
+ "networks": {
+ },
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "Lucine Sarika",
+ "pause": false,
+ "productFamilyId": "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
+ "projectName": "zasaki",
+ "rollbackOnFailure": false,
+ "statusMessage": "The service instantiation is failed.",
+ "subscriberName": "SILVIA ROBBINS",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "tenantId": "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
+ "tenantName": "Hedvika Wendelin",
+ "testApi": "VNF_API",
+ "trackById": "TRACK_BY_ID",
+ "vnfGroups": {
+ },
+ "vnfs": {
+ "vSAMP12 1": {
+ "action": "Create",
+ "instanceId": null,
+ "instanceName": "VNF_NAME",
+ "instanceParams": [
+ ],
+ "isFailed": false,
+ "lcpCloudRegionId": "mdt1",
+ "lineOfBusiness": "vnf_lineOfBusinessName",
+ "modelInfo": {
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
+ "modelCustomizationName": "vSAMP12 1",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelName": "vSAMP12",
+ "modelType": "vnf",
+ "modelVersion": "1.0",
+ "modelVersionId": "fe042c22-ba82-43c6-b2f6-8f1fc4164091"
+ },
+ "platformName": "vnf_platformName",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "rollbackOnFailure": false,
+ "statusMessage": null,
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e",
+ "trackById": "TRACK_BY_ID",
+ "vfModules": {
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/asyncInstantiation/auditModalFailedServiceInstance.json b/vid-automation/src/test/resources/asyncInstantiation/auditModalFailedServiceInstance.json
new file mode 100644
index 000000000..c5593ea1a
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/auditModalFailedServiceInstance.json
@@ -0,0 +1,12 @@
+{
+ "id":null,
+ "jobId":null,
+ "instanceName":"1INSTANCE_NAME",
+ "instanceType":null,
+ "jobStatus":"FAILED",
+ "source":null,
+ "requestId":"e5f93320-cce6-424d-adc6-259a4ee8b342",
+ "additionalInfo":"The service instantiation is failed. Please check vconfiiiiiiiguratttttion again.",
+ "final":false,
+ "createdDate":1549198388000
+}
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json
new file mode 100644
index 000000000..71ba53661
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarte.json
@@ -0,0 +1,26 @@
+{
+ "modelInfo": {
+ "modelInvariantId": "0367689e-d41e-483f-b200-eab17e4a7f8d",
+ "modelVersionId": "e3c34d88-a216-4f1d-a782-9af9f9588705",
+ "modelName": "gayawabawe",
+ "modelVersion": "5.1"
+ },
+ "owningEntityId" : "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "Lucine Sarika",
+ "projectName" : "zasaki",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriberName": "SILVIA ROBBINS",
+ "productFamilyId" : "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
+ "instanceName" : "SERVICE_NAME",
+ "subscriptionServiceType" : "TYLER SILVIA",
+ "aicZoneId" : "de738e5f-3704-4a14-b98f-3bf86ac0c0a0",
+ "aicZoneName" : "voloyakane-senamo",
+ "lcpCloudRegionId" : "a93f8383-707e-43fa-8191-a6e69a1aab17",
+ "lcpCloudRegionName" : "Cyrus Graciano",
+ "tenantId" : "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
+ "tenantName" : "Hedvika Wendelin",
+ "bulkSize": "1",
+ "testApi": "VNF_API",
+ "isALaCarte": true
+}
+
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json
new file mode 100644
index 000000000..430675256
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateALaCarteWithVnfGroup.json
@@ -0,0 +1,44 @@
+{
+ "modelInfo": {
+ "modelInvariantId": "0367689e-d41e-483f-b200-eab17e4a7f8d",
+ "modelVersionId": "e3c34d88-a216-4f1d-a782-9af9f9588705",
+ "modelName": "gayawabawe",
+ "modelVersion": "5.1"
+ },
+ "vnfGroups":
+ {
+ "MSOTEST103a":{
+ "modelInfo": {
+ "modelType": "instanceGroup",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe042c22-ba82-43c6-b2f6-8f1fc4164091",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP12 1",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "instanceName": "VNF_GROUP_NAME",
+ "isUserProvidedNaming": true,
+ "rollbackOnFailure": false
+ }
+ },
+ "owningEntityId" : "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "Lucine Sarika",
+ "projectName" : "zasaki",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriberName": "SILVIA ROBBINS",
+ "productFamilyId" : "ddf9cc0f-6331-4d35-bed0-a37f2d5e9cb3",
+ "instanceName" : "SERVICE_NAME",
+ "isUserProvidedNaming":"true",
+ "subscriptionServiceType" : "TYLER SILVIA",
+ "aicZoneId" : "de738e5f-3704-4a14-b98f-3bf86ac0c0a0",
+ "aicZoneName" : "voloyakane-senamo",
+ "lcpCloudRegionId" : "a93f8383-707e-43fa-8191-a6e69a1aab17",
+ "lcpCloudRegionName" : "Cyrus Graciano",
+ "tenantId" : "c85f0e80-0636-44a4-8cb2-4ec00d056e79",
+ "tenantName" : "Hedvika Wendelin",
+ "bulkSize": "1",
+ "testApi": "VNF_API",
+ "isALaCarte": true
+}
+
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateBulkOfMacro.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateBulkOfMacro.json
index 0ceaeeb3e..22bc229c0 100644
--- a/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateBulkOfMacro.json
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestCreateBulkOfMacro.json
@@ -12,9 +12,8 @@
"subscriberName": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"productFamilyId" : "myProductFamilyId",
"instanceName" : "SERVICE_NAME",
- "isUserProvidedNaming":"true",
"subscriptionServiceType" : "mySubType",
- "lcpCloudRegionId" : "mtn3",
+ "lcpCloudRegionId" : "hvf3",
"tenantId" : "greatTenant",
"tenantName" : "greatTenant",
"aicZoneId" : "NFT1",
@@ -32,7 +31,6 @@
},
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"instanceName": "VNF_NAME",
- "isUserProvidedNaming":"true",
"platformName": "platformName",
"lineOfBusinessName": "lineOfBusinessName",
"lcpCloudRegionId": "mdt1",
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json
new file mode 100644
index 000000000..eeda4e59a
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Network.json
@@ -0,0 +1,117 @@
+{
+ "action":"None",
+ "isDirty":true,
+ "vnfs":{
+
+ },
+ "instanceParams":[
+ {
+ "2017488_PASQUALEvpe0_ASN":"AV_vPE"
+ }
+ ],
+ "validationCounter":0,
+ "existingNames":{
+ "123":"",
+ "instancename":"",
+ "yoav":""
+ },
+ "existingVNFCounterMap":{
+
+ },
+ "existingVnfGroupCounterMap":{
+
+ },
+ "existingNetworksCounterMap":{
+ "94fdd893-4a36-4d70-b16a-ec29c54c184f":1
+ },
+ "networks":{
+ "ExtVL 0":{
+ "rollbackOnFailure":"false",
+ "productFamilyId":"36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
+ "lcpCloudRegionId":"hvf6",
+ "tenantId":"229bcdc6eaeb4ca59d55221141d01f8e",
+ "lineOfBusiness":"zzz1",
+ "platformName":"platform",
+ "originalName":"ExtVL 0",
+ "modelInfo":{
+ "modelInvariantId":"379f816b-a7aa-422f-be30-17114ff50b7c",
+ "modelVersionId":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelName":"ExtVL",
+ "modelVersion":"37.0",
+ "modelType":"network",
+ "modelCustomizationId":"94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelCustomizationName":"ExtVL 0"
+ },
+ "instanceName":"ExtVL 0",
+ "instanceId":"NETWORK_INSTANCE_ID",
+ "action":"None_Delete"
+ },
+ "ExtVL 0_1":{
+ "action":"Create",
+ "inMaint":false,
+ "rollbackOnFailure":"true",
+ "originalName":"ExtVL 0",
+ "isMissingData":false,
+ "trackById":"r21vcx0szoc",
+ "networkStoreKey":"ExtVL 0_1",
+ "instanceName":"ExtVL",
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "lcpCloudRegionId":"hvf6",
+ "tenantId":"229bcdc6eaeb4ca59d55221141d01f8e",
+ "platformName":"xxx1",
+ "lineOfBusiness":"zzz1",
+ "instanceParams":[
+ {
+
+ }
+ ],
+ "modelInfo":{
+ "modelInvariantId":"379f816b-a7aa-422f-be30-17114ff50b7c",
+ "modelVersionId":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelName":"ExtVL",
+ "modelVersion":"37.0",
+ "modelCustomizationId":"94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelCustomizationName":"ExtVL 0",
+ "uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelUniqueId":"94fdd893-4a36-4d70-b16a-ec29c54c184f"
+ },
+ "uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986"
+ }
+ },
+ "vnfGroups":{
+
+ },
+ "bulkSize":1,
+ "instanceName":"InstanceName",
+ "globalSubscriberId":"e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType":"TYLER SILVIA",
+ "owningEntityId":"d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "productFamilyId":"17cc1042-527b-11e6-beb8-9e71128cae77",
+ "lcpCloudRegionId":"JANET25",
+ "tenantId":"092eb9e8e4b7412e8787dd091bc58e86",
+ "aicZoneId":"JAG1",
+ "projectName":"WATKINS",
+ "rollbackOnFailure":true,
+ "aicZoneName":"YUDFJULP-JAG1",
+ "owningEntityName":"WayneHolland",
+ "testApi":"GR_API",
+ "tenantName":"USP-SIP-IC-24335-T-01",
+ "modelInfo":{
+ "modelInvariantId":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId":"6b528779-44a3-4472-bdff-9cd15ec93450",
+ "modelName":"action-data",
+ "modelVersion":"1.0",
+ "uuid":"6b528779-44a3-4472-bdff-9cd15ec93450"
+ },
+ "isALaCarte":true,
+ "name":"action-data",
+ "version":"1.0",
+ "description":"",
+ "category":"",
+ "uuid":"6b528779-44a3-4472-bdff-9cd15ec93450",
+ "invariantUuid":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "serviceType":"",
+ "serviceRole":"",
+ "isMultiStepDesign":false,
+ "instanceId":"f8791436-8d55-4fde-b4d5-72dd2cf13cfb"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json
new file mode 100644
index 000000000..3ee4a2b20
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json
@@ -0,0 +1,286 @@
+{
+ "action": "None",
+ "isDirty": true,
+ "vnfs": {
+ "2017-388_PASQUALE-vPE 0": {
+ "vfModules": {},
+ "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "modelName": "2017-388_PASQUALE-vPE",
+ "modelVersion": "4.0",
+ "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
+ "modelCustomizationName": "2017-388_PASQUALE-vPE 0",
+ "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
+ },
+ "instanceName": "2017388_PASQUALEvPEmCaNkinstanceName",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-488_PASQUALE-vPE 0": {
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+ "instanceId": "VF_MODULE_BASE_INSTANCE_ID",
+ "instanceName": "VFinstancenameZERO",
+ "action": "None_Delete",
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "provStatus": "Prov Status",
+ "orchStatus": "Active",
+ "inMaint": true,
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86"
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1fshmc": {
+ "instanceId": "VF_MODULE_INSTANCE_ID",
+ "instanceName": "VFinstancename",
+ "action": "None_Delete",
+ "volumeGroupName": "VFinstancename_vol_abc",
+ "orchStatus": "Create",
+ "provStatus": "Prov Status",
+ "inMaint": false,
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ }
+ }
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "orchStatus": "Created",
+ "inMaint": false,
+ "instanceId": "VNF_INSTANCE_ID",
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename",
+ "action": "None_Delete",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-488_PASQUALE-vPE 0:0001": {
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+ "instanceName": "VFinstancenameZERO_001",
+ "action": "None",
+ "provStatus": "Prov Status",
+ "inMaint": true,
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1fshmc": {
+ "instanceName": "VFinstancename_001",
+ "action": "None",
+ "volumeGroupName": "VFinstancename_vol_abc_001",
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ }
+ }
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename_001",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-488_PASQUALE-vPE 0:0002": {
+ "vfModules": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0uvfot": {
+ "instanceName": "VFinstancenameZERO_002",
+ "action": "None",
+ "modelInfo": {
+ "modelInvariantId": "b34833bb-6aa9-4ad6-a831-70b06367a091",
+ "modelVersionId": "f8360508-3f17-4414-a2ed-6bc71161e8db",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "modelVersion": "5",
+ "modelCustomizationId": "a55961b2-2065-4ab0-a5b7-2fcee1c227e3",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_base_vPE_BV..module-0",
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ },
+ "uuid": "f8360508-3f17-4414-a2ed-6bc71161e8db"
+ }
+ },
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1": {
+ "2017488_PASQUALEvpe0..2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1fshmc": {
+ "instanceName": "VFinstancename_002",
+ "action": "None",
+ "volumeGroupName": "VFinstancename_vol_abc_002",
+ "modelInfo": {
+ "modelInvariantId": "7253ff5c-97f0-4b8b-937c-77aeb4d79aa1",
+ "modelVersionId": "25284168-24bb-4698-8cb4-3f509146eca5",
+ "modelName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "modelVersion": "6",
+ "modelCustomizationId": "f7e7c365-60cf-49a9-9ebf-a1aa11b9d401",
+ "modelCustomizationName": "2017488PASQUALEVpe..PASQUALE_vRE_BV..module-1",
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ },
+ "uuid": "25284168-24bb-4698-8cb4-3f509146eca5"
+ }
+ }
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename_002",
+ "action": "None",
+ "legacyRegion": "some legacy region"
+ },
+ "2017-388_PASQUALE-vPE 0_1": {
+ "action": "Create",
+ "inMaint": false,
+ "rollbackOnFailure": "true",
+ "originalName": "2017-388_PASQUALE-vPE 0",
+ "isMissingData": false,
+ "trackById": "wk10c4hh1oj",
+ "vfModules": {},
+ "vnfStoreKey": "2017-388_PASQUALE-vPE 0_1",
+ "instanceName": "2017388_PASQUALEvPEmCaNkinstanceName",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
+ "platformName": "xxx1",
+ "lineOfBusiness": "zzz1",
+ "instanceParams": [
+ {
+ "vnf_config_template_version": "17.2",
+ "bandwidth_units": "Gbps",
+ "bandwidth": "10",
+ "AIC_CLLI": "ATLMY8GA",
+ "ASN": "AV_vPE",
+ "vnf_instance_name": "mtnj309me6"
+ }
+ ],
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "modelName": "2017-388_PASQUALE-vPE",
+ "modelVersion": "4.0",
+ "modelCustomizationId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c",
+ "modelCustomizationName": "2017-388_PASQUALE-vPE 0",
+ "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "modelUniqueId": "b3c76f73-eeb5-4fb6-9d31-72a889f1811c"
+ },
+ "uuid": "afacccf6-397d-45d6-b5ae-94c39734b168"
+ }
+ },
+ "instanceParams": [],
+ "validationCounter": 0,
+ "existingNames": {
+ "mcankinstancename": ""
+ },
+ "existingVNFCounterMap": {
+ "afacccf6-397d-45d6-b5ae-94c39734b168": 1,
+ "69e09f68-8b63-4cc9-b9ff-860960b5db09": 3,
+ "b3c76f73-eeb5-4fb6-9d31-72a889f1811c": 1
+ },
+ "existingVnfGroupCounterMap": {},
+ "existingNetworksCounterMap": {},
+ "networks": {},
+ "vnfGroups": {},
+ "bulkSize": 1,
+ "instanceId": "f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+ "instanceName": "mCaNkinstancename",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "aicZoneId": "NFT1",
+ "projectName": "WATKINS",
+ "rollbackOnFailure": true,
+ "aicZoneName": "NFTJSSSS-NFT1",
+ "owningEntityName": "WayneHolland",
+ "tenantName": "AIN Web Tool-15-D-testalexandria",
+ "modelInfo": {
+ "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+ "modelName": "action-data",
+ "modelVersion": "1.0",
+ "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450"
+ },
+ "isALaCarte": true,
+ "orchStatus": "Active",
+ "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+ "testApi": "VNF_API"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithNetwork.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithNetwork.json
new file mode 100644
index 000000000..171568b89
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithNetwork.json
@@ -0,0 +1,86 @@
+{
+ "action":"None_Delete",
+ "isDirty":true,
+ "vnfs":{
+
+ },
+ "instanceParams":[
+ {
+ "2017488_PASQUALEvpe0_ASN":"AV_vPE"
+ }
+ ],
+ "validationCounter":0,
+ "existingNames":{
+ "123":"",
+ "instancename":"",
+ "yoav":""
+ },
+ "existingVNFCounterMap":{
+
+ },
+ "existingVnfGroupCounterMap":{
+
+ },
+ "existingNetworksCounterMap":{
+ "94fdd893-4a36-4d70-b16a-ec29c54c184f":1
+ },
+ "networks":{
+ "ExtVL 0":{
+ "rollbackOnFailure":"false",
+ "productFamilyId":"36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
+ "lcpCloudRegionId":"hvf6",
+ "tenantId":"229bcdc6eaeb4ca59d55221141d01f8e",
+ "lineOfBusiness":"zzz1",
+ "platformName":"platform",
+ "originalName":"ExtVL 0",
+ "modelInfo":{
+ "modelInvariantId":"379f816b-a7aa-422f-be30-17114ff50b7c",
+ "modelVersionId":"ddc3f20c-08b5-40fd-af72-c6d14636b986",
+ "modelName":"ExtVL",
+ "modelVersion":"37.0",
+ "modelType":"network",
+ "modelCustomizationId":"94fdd893-4a36-4d70-b16a-ec29c54c184f",
+ "modelCustomizationName":"ExtVL 0"
+ },
+ "instanceName":"ExtVL 0",
+ "instanceId":"NETWORK_INSTANCE_ID",
+ "action":"None_Delete"
+ }
+ },
+ "vnfGroups":{
+
+ },
+ "bulkSize":1,
+ "instanceName":"InstanceName",
+ "globalSubscriberId":"e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType":"TYLER SILVIA",
+ "owningEntityId":"d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "productFamilyId":"17cc1042-527b-11e6-beb8-9e71128cae77",
+ "lcpCloudRegionId":"JANET25",
+ "tenantId":"092eb9e8e4b7412e8787dd091bc58e86",
+ "aicZoneId":"JAG1",
+ "projectName":"WATKINS",
+ "rollbackOnFailure":true,
+ "aicZoneName":"YUDFJULP-JAG1",
+ "owningEntityName":"WayneHolland",
+ "testApi":"GR_API",
+ "tenantName":"USP-SIP-IC-24335-T-01",
+ "modelInfo":{
+ "modelInvariantId":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId":"6b528779-44a3-4472-bdff-9cd15ec93450",
+ "modelName":"action-data",
+ "modelVersion":"1.0",
+ "uuid":"6b528779-44a3-4472-bdff-9cd15ec93450"
+ },
+ "isALaCarte":true,
+ "name":"action-data",
+ "version":"1.0",
+ "description":"",
+ "category":"",
+ "uuid":"6b528779-44a3-4472-bdff-9cd15ec93450",
+ "invariantUuid":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "serviceType":"",
+ "serviceRole":"",
+ "isMultiStepDesign":false,
+ "instanceId":"f8791436-8d55-4fde-b4d5-72dd2cf13cfb"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json
new file mode 100644
index 000000000..695ce343b
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/vidRequestDeleteServiceWithVnf.json
@@ -0,0 +1,71 @@
+{
+ "action": "None_Delete",
+ "isDirty": true,
+ "vnfs": {
+ "2017-488_PASQUALE-vPE 0": {
+ "vfModules": {
+ },
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "JANET25",
+ "tenantId": "092eb9e8e4b7412e8787dd091bc58e86",
+ "lineOfBusiness": "ONAP",
+ "platformName": "platform",
+ "modelInfo": {
+ "modelInvariantId": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "modelVersionId": "69e09f68-8b63-4cc9-b9ff-860960b5db09",
+ "modelName": "2017-488_PASQUALE-vPE",
+ "modelVersion": "5.0",
+ "modelCustomizationId": "1da7b585-5e61-4993-b95e-8e6606c81e45",
+ "modelCustomizationName": "2017-488_PASQUALE-vPE 0",
+ "uuid": "69e09f68-8b63-4cc9-b9ff-860960b5db09"
+ },
+ "orchStatus": "Created",
+ "inMaint": false,
+ "instanceId": "VNF_INSTANCE_ID",
+ "instanceName": "2017488_PASQUALEvPEVNFinstancename",
+ "action": "None_Delete",
+ "legacyRegion": "some legacy region"
+ }
+ },
+ "instanceParams": [],
+ "validationCounter": 0,
+ "existingNames": {
+ "mcankinstancename": ""
+ },
+ "existingVNFCounterMap": {
+ "afacccf6-397d-45d6-b5ae-94c39734b168": 1,
+ "69e09f68-8b63-4cc9-b9ff-860960b5db09": 3,
+ "b3c76f73-eeb5-4fb6-9d31-72a889f1811c": 1
+ },
+ "existingVnfGroupCounterMap": {},
+ "existingNetworksCounterMap": {},
+ "networks": {},
+ "vnfGroups": {},
+ "bulkSize": 1,
+ "instanceId": "f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+ "instanceName": "mCaNkinstancename",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "aicZoneId": "NFT1",
+ "projectName": "WATKINS",
+ "rollbackOnFailure": true,
+ "aicZoneName": "NFTJSSSS-NFT1",
+ "owningEntityName": "WayneHolland",
+ "tenantName": "AIN Web Tool-15-D-testalexandria",
+ "modelInfo": {
+ "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "modelVersionId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+ "modelName": "action-data",
+ "modelVersion": "1.0",
+ "uuid": "6b528779-44a3-4472-bdff-9cd15ec93450"
+ },
+ "isALaCarte": true,
+ "orchStatus": "Active",
+ "modelInavariantId": "6b528779-44a3-4472-bdff-9cd15ec93450",
+ "testApi": "VNF_API"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/changeManagement/reduced_vnf_data_by_globalid_and_service_type.json b/vid-automation/src/test/resources/changeManagement/reduced_vnf_data_by_globalid_and_service_type.json
new file mode 100644
index 000000000..20831bec8
--- /dev/null
+++ b/vid-automation/src/test/resources/changeManagement/reduced_vnf_data_by_globalid_and_service_type.json
@@ -0,0 +1,539 @@
+{
+ "results": [
+ {
+ "id": "3400916992",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/66b13cb4-b575-449f-aa45-ffbfe005c7b1",
+ "properties": {
+ "service-instance-id": "66b13cb4-b575-449f-aa45-ffbfe005c7b1",
+ "service-instance-name": "CHARLOTTE_preload_1710_0914",
+ "model-invariant-id": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "model-version-id": "1525f534-99a2-408f-b847-ff636997d352",
+ "resource-version": "1505856078810",
+ "orchestration-status": "Active"
+ },
+ "related-to": [
+ {
+ "id": "10207440",
+ "node-type": "service-subscription",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic"
+ },
+ {
+ "id": "3481829392",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/0c465dd3-4151-4da9-92a2-541bb3174cec"
+ }
+ ]
+ },
+ {
+ "id": "3771572432",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/f195837b-ef28-42c3-8dea-47ad37eaed95",
+ "properties": {
+ "service-instance-id": "f195837b-ef28-42c3-8dea-47ad37eaed95",
+ "service-instance-name": "CHARLOTTE_preload_1710_0914_0920",
+ "model-invariant-id": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "model-version-id": "3915de55-a904-4cc6-8fc3-86f8bc316616",
+ "resource-version": "1505964829466",
+ "orchestration-status": "Active"
+ },
+ "related-to": [
+ {
+ "id": "10207440",
+ "node-type": "service-subscription",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic"
+ },
+ {
+ "id": "3484520464",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1"
+ }
+ ]
+ },
+ {
+ "id": "3775807704",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/9ad4ac55-a5e0-4b49-95c0-b2d846abf700",
+ "properties": {
+ "service-instance-id": "9ad4ac55-a5e0-4b49-95c0-b2d846abf700",
+ "service-instance-name": "CHARLOTTE_preload_1710_0914_100417",
+ "model-invariant-id": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "model-version-id": "3915de55-a904-4cc6-8fc3-86f8bc316616",
+ "resource-version": "1507144734087",
+ "orchestration-status": "Active"
+ },
+ "related-to": [
+ {
+ "id": "10207440",
+ "node-type": "service-subscription",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic"
+ },
+ {
+ "id": "3783459064",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/54626a59-ec0d-4fa9-b0c2-08d008688165"
+ }
+ ]
+ },
+ {
+ "id": "4178862184",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/599c7247-b083-447c-b6b1-0cdd5170dfd2",
+ "properties": {
+ "service-instance-id": "599c7247-b083-447c-b6b1-0cdd5170dfd2",
+ "service-instance-name": "CHARLOTTE_preload_1710_0914_1010",
+ "model-invariant-id": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "model-version-id": "3915de55-a904-4cc6-8fc3-86f8bc316616",
+ "resource-version": "1507664240411",
+ "orchestration-status": "Active"
+ },
+ "related-to": [
+ {
+ "id": "10207440",
+ "node-type": "service-subscription",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic"
+ },
+ {
+ "id": "3892133896",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/d74503d8-abab-49c6-ba48-a6211eee9b7a"
+ }
+ ]
+ },
+ {
+ "id": "3008335920",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/97315a05-e6f3-4c47-ae7e-d850c327aa08",
+ "properties": {
+ "service-instance-id": "97315a05-e6f3-4c47-ae7e-d850c327aa08",
+ "service-instance-name": "CHARLOTTE_preload_1710_0914_0927",
+ "model-invariant-id": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
+ "model-version-id": "3915de55-a904-4cc6-8fc3-86f8bc316616",
+ "resource-version": "1506527653053",
+ "orchestration-status": "Active"
+ },
+ "related-to": [
+ {
+ "id": "10207440",
+ "node-type": "service-subscription",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic"
+ },
+ {
+ "id": "3418898432",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/8e5e3ba1-3fe6-4d86-966e-f9f03dab4855"
+ }
+ ]
+ },
+ {
+ "id": "3481829392",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/0c465dd3-4151-4da9-92a2-541bb3174cec",
+ "properties": {
+ "vnf-id": "0c465dd3-4151-4da9-92a2-541bb3174cec",
+ "vnf-name": "Eoghan Fausto",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1505856137206",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "model-customization-id": "b54689f8-45c5-4be2-9e91-f033e028feec",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vWheeler",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3285635208",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/0c465dd3-4151-4da9-92a2-541bb3174cec/vf-modules/vf-module/d49713bf-1bff-4eab-bed1-a8f1bb83aa98"
+ },
+ {
+ "id": "3441209432",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/0c465dd3-4151-4da9-92a2-541bb3174cec/vf-modules/vf-module/b8397fec-cf13-40b3-be8f-7d0912506419"
+ },
+ {
+ "id": "3687522312",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/0c465dd3-4151-4da9-92a2-541bb3174cec/vf-modules/vf-module/fd098a52-09be-4c48-a9e9-a565d1b39db3"
+ },
+ {
+ "id": "3400916992",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/66b13cb4-b575-449f-aa45-ffbfe005c7b1"
+ },
+ {
+ "id": "3477385312",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/8627b971-1032-420f-a044-6802f0ab6976"
+ }
+ ]
+ },
+ {
+ "id": "3484520464",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1",
+ "properties": {
+ "vnf-id": "c2d2d389-fa00-4fb4-a269-e46d495719e1",
+ "vnf-name": "Odell Romana",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1505964996823",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "76e908e0-5201-44d2-a3e2-9e6128d05820",
+ "model-customization-id": "c00e8fc8-af39-4da8-8c78-a7efc2fe5994",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vMobileDNS",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3447107680",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/c4711b5c-742e-4d03-8146-bff763f69fbd"
+ },
+ {
+ "id": "3448307712",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/0ba3fcdd-0536-4ac7-a9ec-8d8622db7fb2"
+ },
+ {
+ "id": "3692179528",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/6bb843eb-ef84-43b1-83b4-3154a7f9928c"
+ },
+ {
+ "id": "3771588816",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/a4c008c6-cac0-4e3f-928f-90fa37dc8c4b"
+ },
+ {
+ "id": "3904077944",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/eecb619c-a173-4ead-bf48-d4d09cbbdd5e"
+ },
+ {
+ "id": "4027855088",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/1e29424e-2dca-45ac-b1df-59a8f74d0bc1"
+ },
+ {
+ "id": "4390871192",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/b185220a-7f63-4b29-867d-1452813a4f09"
+ },
+ {
+ "id": "4450529432",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/c2d2d389-fa00-4fb4-a269-e46d495719e1/vf-modules/vf-module/7a0c4b98-b3cc-490c-bbab-e2d7f169f2d7"
+ },
+ {
+ "id": "3771572432",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/f195837b-ef28-42c3-8dea-47ad37eaed95"
+ }
+ ]
+ },
+ {
+ "id": "3783459064",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/54626a59-ec0d-4fa9-b0c2-08d008688165",
+ "properties": {
+ "vnf-id": "54626a59-ec0d-4fa9-b0c2-08d008688165",
+ "vnf-name": "Dominika Fionnbharr",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1507144948937",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "76e908e0-5201-44d2-a3e2-9e6128d05820",
+ "model-customization-id": "c00e8fc8-af39-4da8-8c78-a7efc2fe5994",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vMobileDNS",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3775807704",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/9ad4ac55-a5e0-4b49-95c0-b2d846abf700"
+ }
+ ]
+ },
+ {
+ "id": "3892133896",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/d74503d8-abab-49c6-ba48-a6211eee9b7a",
+ "properties": {
+ "vnf-id": "d74503d8-abab-49c6-ba48-a6211eee9b7a",
+ "vnf-name": "CHARLOTTE_PreloadTest_VNF",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1507664288548",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "76e908e0-5201-44d2-a3e2-9e6128d05820",
+ "model-customization-id": "c00e8fc8-af39-4da8-8c78-a7efc2fe5994",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vMobileDNS",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "4178862184",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/599c7247-b083-447c-b6b1-0cdd5170dfd2"
+ }
+ ]
+ },
+ {
+ "id": "1507690314",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/385548e2-3f31-4900-9437-317d0346e49a",
+ "properties": {
+ "vnf-id": "385548e2-3f31-4900-9437-317d0346e49a",
+ "vnf-name": "Senga Gabrielle",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "7788675952902",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "b217c612-7fcf-484c-861b-df0a5c4b5bcb",
+ "model-customization-id": "ce15d245-763c-4079-ac82-fe93007adb69",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vMobileDNS",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3664617648",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/8e5e3ba1-3fe6-4d86-966e-f9f03dab4855/vf-modules/vf-module/788cde64-c288-4971-8e8c-77973c5009dc"
+ },
+ {
+ "id": "3008335920",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/97315a05-e6f3-4c47-ae7e-d850c327aa08"
+ },
+ {
+ "id": "3477385312",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/8627b971-1032-420f-a044-6802f0ab6976"
+ }
+ ]
+ },
+ {
+ "id": "5278880615",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/0465e048-92a4-4a7f-bfe7-de39b32de4bd",
+ "properties": {
+ "vnf-id": "0465e048-92a4-4a7f-bfe7-de39b32de4bd",
+ "vnf-name": "Constantius Raghu",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "7788675952902",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "afacccf6-397d-45d6-b5ae-94c39734b168",
+ "model-customization-id": "ce15d245-763c-4079-ac82-fe93007adb69",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vWheeler",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3664617648",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/8e5e3ba1-3fe6-4d86-966e-f9f03dab4855/vf-modules/vf-module/788cde64-c288-4971-8e8c-77973c5009dc"
+ },
+ {
+ "id": "3008335920",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/97315a05-e6f3-4c47-ae7e-d850c327aa08"
+ },
+ {
+ "id": "3477385312",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/8627b971-1032-420f-a044-6802f0ab6976"
+ }
+ ]
+ },
+ {
+ "id": "3418898432",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/8e5e3ba1-3fe6-4d86-966e-f9f03dab4855",
+ "properties": {
+ "vnf-id": "8e5e3ba1-3fe6-4d86-966e-f9f03dab4855",
+ "vnf-name": "zolson3amdns02test2",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1507132024933",
+ "model-invariant-id": "72e465fe-71b1-4e7b-b5ed-9496118ff7a8",
+ "model-version-id": "76e908e0-5201-44d2-a3e2-9e6128d05820",
+ "model-customization-id": "c00e8fc8-af39-4da8-8c78-a7efc2fe5994",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vMobileDNS",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3664617648",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/8e5e3ba1-3fe6-4d86-966e-f9f03dab4855/vf-modules/vf-module/788cde64-c288-4971-8e8c-77973c5009dc"
+ },
+ {
+ "id": "3008335920",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/97315a05-e6f3-4c47-ae7e-d850c327aa08"
+ },
+ {
+ "id": "3477385312",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/8627b971-1032-420f-a044-6802f0ab6976"
+ },
+ {
+ "id": "3647635704",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/b30b17e9-10d0-4475-b558-7d18ae0aade0"
+ },
+ {
+ "id": "3664621744",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e/vservers/vserver/d3b293ba-85de-440e-904b-9dad160fbdce"
+ },
+ {
+ "id": "3975352504",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e/vservers/vserver/495a9a72-c9f6-41ed-93eb-065ebc2bfb1f"
+ },
+ {
+ "id": "4059455552",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e/vservers/vserver/b4b9f419-3ed4-4bd8-bb2e-32b0a98e80b7"
+ },
+ {
+ "id": "4098130088",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e/vservers/vserver/94c79f43-e76d-461e-b8df-8af2acb08e1e"
+ },
+ {
+ "id": "4401291416",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e/vservers/vserver/99cad3c6-1301-49c4-ad67-ae3c955de5f1"
+ },
+ {
+ "id": "4458950808",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/mdt1/tenants/tenant/88a6ca3ee0394ade9403f075db23167e/vservers/vserver/047354dc-0244-4241-b24a-7d7b00413b82"
+ }
+ ]
+ },
+ {
+ "id": "1024648346",
+ "node-type": "generic-vnf",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/a58bf551-a79c-42d1-83b4-ed9288036245",
+ "properties": {
+ "vnf-id": "a58bf551-a79c-42d1-83b4-ed9288036245",
+ "vnf-name": "Harrison Kris",
+ "vnf-type": "CHARLOTTE preload 1710 0914/CHARLOTTE preload 1710 0914 0",
+ "service-id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Created",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "4679861552759",
+ "model-invariant-id": "00beb8f9-6d39-452f-816d-c709b9cbb87d",
+ "model-version-id": "0903e1c0-8e03-4936-b5c2-260653b96413",
+ "model-customization-id": "14e8057d-b22a-405c-84aa-90b82bfd6e46",
+ "nf-type": "DNS",
+ "nf-function": "Mobile DNS",
+ "nf-role": "vMobileDNS",
+ "nf-naming-code": "null"
+ },
+ "related-to": [
+ {
+ "id": "3664617648",
+ "node-type": "vf-module",
+ "url": "https://aai.onap:8443/aai/v10/network/generic-vnfs/generic-vnf/8e5e3ba1-3fe6-4d86-966e-f9f03dab4855/vf-modules/vf-module/788cde64-c288-4971-8e8c-77973c5009dc"
+ },
+ {
+ "id": "3008335920",
+ "node-type": "service-instance",
+ "url": "https://aai.onap:8443/aai/v10/business/customers/customer/a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb/service-subscriptions/service-subscription/vFlowLogic/service-instances/service-instance/97315a05-e6f3-4c47-ae7e-d850c327aa08"
+ },
+ {
+ "id": "3477385312",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/8627b971-1032-420f-a044-6802f0ab6976"
+ },
+ {
+ "id": "3647635704",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/b30b17e9-10d0-4475-b558-7d18ae0aade0"
+ },
+ {
+ "id": "3664621744",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/d3b293ba-85de-440e-904b-9dad160fbdce"
+ },
+ {
+ "id": "3975352504",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/495a9a72-c9f6-41ed-93eb-065ebc2bfb1f"
+ },
+ {
+ "id": "4059455552",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/b4b9f419-3ed4-4bd8-bb2e-32b0a98e80b7"
+ },
+ {
+ "id": "4098130088",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/94c79f43-e76d-461e-b8df-8af2acb08e1e"
+ },
+ {
+ "id": "4401291416",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/99cad3c6-1301-49c4-ad67-ae3c955de5f1"
+ },
+ {
+ "id": "4458950808",
+ "node-type": "vserver",
+ "url": "https://aai.onap:8443/aai/v10/cloud-infrastructure/cloud-regions/cloud-region/irma-aic/olson3/tenants/tenant/eecd15e8e7ee46c3bbc2096f0924f4c4/vservers/vserver/047354dc-0244-4241-b24a-7d7b00413b82"
+ }
+ ]
+ }
+ ]
+ } \ No newline at end of file
diff --git a/vid-automation/src/test/resources/changeManagement/vnfInPlaceSoftwareUpdate.json b/vid-automation/src/test/resources/changeManagement/vnfInPlaceSoftwareUpdate.json
new file mode 100644
index 000000000..76d368b6e
--- /dev/null
+++ b/vid-automation/src/test/resources/changeManagement/vnfInPlaceSoftwareUpdate.json
@@ -0,0 +1,26 @@
+{
+ "requestDetails": [{
+
+ "vnfName": "VidVnf",
+ "vnfInstanceId": "e5403738-da34-4090-8864-ba9cf1bcdd88",
+
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "az2016"
+ },
+ "requestParameters": {
+ "payload": "{\"existing_software_version\": \"3.1\", \"new_software_version\": \"3.2\", \"operations_timeout\": \"3600\"}"
+ },
+
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "12709275-787c-4be7-8c9c-fce64ab7ca8c"
+ }
+ }]
+ }],
+ "requestType" : "vnf in place software update"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/changeManagement/vnfReplaceRequest.json b/vid-automation/src/test/resources/changeManagement/vnfReplaceRequest.json
new file mode 100644
index 000000000..9fd971aad
--- /dev/null
+++ b/vid-automation/src/test/resources/changeManagement/vnfReplaceRequest.json
@@ -0,0 +1,40 @@
+{
+ "requestDetails": [{
+
+ "vnfName": "VidVnf",
+ "vnfInstanceId": "e9181708-f105-4dfd-9a36-0e089faa72ba",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "254583ad-b38c-498b-bdbd-b8de5e07541b",
+ "modelName": "vSAMP12",
+ "modelVersion": "2.0",
+ "modelCustomizationName": "vSAMP12 1",
+ "modelCustomizationId": "c539433a-84a6-4082-a12e-5c9b00c3b960"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "az2016"
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "254583ad-b38c-498b-bdbd-b8de5e07541b",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "9ebb1521-2e74-47a4-aac7-e71a79f73a79",
+ "modelName": "fakeModelName",
+ "modelVersion": "2.0"
+ }
+ }
+ }],
+ "requestParameters": {
+ "rebuildVolumeGroups": false
+ }
+ }],
+ "requestType" : "replace"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/changeManagement/vnfUpdateRequest.json b/vid-automation/src/test/resources/changeManagement/vnfUpdateRequest.json
new file mode 100644
index 000000000..e57b39b13
--- /dev/null
+++ b/vid-automation/src/test/resources/changeManagement/vnfUpdateRequest.json
@@ -0,0 +1,45 @@
+{
+ "requestDetails": [{
+
+ "vnfName": "VidVnf",
+ "vnfInstanceId": "c929b7ec-cc9d-11e8-a8d5-f2801f1b9fd1",
+
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "254583ad-b38c-498b-bdbd-b8de5e07541b",
+ "modelName": "vSAMP12",
+ "modelVersion": "2.0",
+ "modelCustomizationName": "vSAMP12 1",
+ "modelCustomizationId": "c539433a-84a6-4082-a12e-5c9b00c3b960"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "az2016"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "d0c59d4a-cc9d-11e8-a8d5-f2801f1b9fd1",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "9ebb1521-2e74-47a4-aac7-e71a79f73a79",
+ "modelName": "fakeModelName",
+ "modelVersion": "2.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true
+ }
+
+ }],
+ "requestType" : "update"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/aai_get_full_subscribers.json b/vid-automation/src/test/resources/registration_to_simulator/aai_get_full_subscribers.json
deleted file mode 100644
index 23009f8db..000000000
--- a/vid-automation/src/test/resources/registration_to_simulator/aai_get_full_subscribers.json
+++ /dev/null
@@ -1,107 +0,0 @@
-{
- "simulatorRequest": {
- "method": "GET",
- "path": "/aai/v../business/customers",
- "queryParams": {
- "subscriber-type": "INFRA",
- "depth": 0
- }
- } ,
- "simulatorResponse": {
- "responseCode": 200,
- "body": {
- "customer":[
- {
- "global-customer-id":"MSO_1610_ST",
- "subscriber-name":"MSO_1610_ST",
- "subscriber-type":"INFRA",
- "resource-version":"1494001902987"
- },
- {
- "global-customer-id":"21014aa2-526b-11e6-beb8-9e71128cae77",
- "subscriber-name":"PACKET CORE",
- "subscriber-type":"INFRA",
- "resource-version":"1494001776295"
- },
- {
- "global-customer-id":"DHV1707-TestSubscriber-2",
- "subscriber-name":"ICORE CORE",
- "subscriber-type":"INFRA",
- "resource-version":"1498751754450"
- },
- {
- "global-customer-id":"DHV1707-TestSubscriber-1",
- "subscriber-name":"PACKET1 CORE",
- "subscriber-type":"INFRA",
- "resource-version":"1498595633607"
- },
- {
- "global-customer-id":"jimmy-example",
- "subscriber-name":"JimmyExampleCust-20161102",
- "subscriber-type":"INFRA",
- "resource-version":"1494001970063"
- },
- {
- "global-customer-id":"jimmy-example2",
- "subscriber-name":"JimmyExampleCust-20161103",
- "subscriber-type":"INFRA",
- "resource-version":"1494001970225"
- },
- {
- "global-customer-id":"DHV1802-TestSub-PWT-102",
- "subscriber-name":"DHV1802-TestSub-PWT-102",
- "subscriber-type":"INFRA",
- "resource-version":"1508852495058"
- },
- {
- "global-customer-id":"DHV1802-TestSub-PWT-101",
- "subscriber-name":"DHV1802-TestSub-PWT-101",
- "subscriber-type":"INFRA",
- "resource-version":"1508179953733"
- },
- {
- "global-customer-id":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "subscriber-name":"Mobility",
- "subscriber-type":"INFRA",
- "resource-version":"1494001894192"
- },
- {
- "global-customer-id":"DHV1802-Subscriber-4",
- "subscriber-name":"DHV1802-Subscriber-5",
- "subscriber-type":"INFRA",
- "resource-version":"1509134064531"
- },
- {
- "global-customer-id":"DHV1802-TestSub-PWT-103",
- "subscriber-name":"DHV1802-TestSub-PWT-103",
- "subscriber-type":"INFRA",
- "resource-version":"1509045503736"
- },
- {
- "global-customer-id":"DHV1802-Subscriber-2",
- "subscriber-name":"DHV1802-Subscriber-2",
- "subscriber-type":"INFRA",
- "resource-version":"1509122065439"
- },
- {
- "global-customer-id":"e433710f-9217-458d-a79d-1c7aff376d89",
- "subscriber-name":"USP VOICE",
- "subscriber-type":"INFRA",
- "resource-version":"1494001938080"
- },
- {
- "global-customer-id":"DHV1802-Subscriber-3",
- "subscriber-name":"DHV1802-Subscriber-3",
- "subscriber-type":"INFRA",
- "resource-version":"1509122759407"
- },
- {
- "global-customer-id":"31739f3e-526b-11e6-beb8-9e71128cae77",
- "subscriber-name":"FIREWALL/MISC",
- "subscriber-type":"INFRA",
- "resource-version":"1494001772223"
- }
- ]
- }
- }
-} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region.json b/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region.json
index da18285bc..74b8637aa 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region.json
@@ -7,7 +7,7 @@
},
"body": {
"start": "/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances?model-version-id=8a84e59b-45fe-4851-8ff1-34225a0b32c3&model-invariant-id=83b458fd-5dd3-419b-a9e3-7335814a0911",
- "query": "query/pnf-fromModel-byRegion?cloudRegionId=AAIAIC25&equipVendor=Cisco&equipModel=Nexus%203048-TP"
+ "query": "query/pnf-fromModel-byRegion?cloudRegionId=JANET25&equipVendor=Cisco&equipModel=Nexus%203048-TP"
}
} ,
"simulatorResponse": {
diff --git a/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region_error.json b/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region_error.json
index 5dc4e77eb..386c982c0 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region_error.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/aai_get_pnf_by_region_error.json
@@ -7,7 +7,7 @@
},
"body": {
"start": "/business/customers/customer/e433710f-9217-458d-a79d-1c7aff376d89/service-subscriptions/service-subscription/VIRTUAL%20USP/service-instances?model-version-id=8a84e59b-45fe-4851-8ff1-34225a0b32c3&model-invariant-id=83b458fd-5dd3-419b-a9e3-7335814a0911",
- "query": "query/pnf-fromModel-byRegion?cloudRegionId=AAIAIC25&equipVendor=Cisco&equipModel=Nexus%203048-TP"
+ "query": "query/pnf-fromModel-byRegion?cloudRegionId=JANET25&equipVendor=Cisco&equipModel=Nexus%203048-TP"
}
} ,
"simulatorResponse": {
diff --git a/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf.json b/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf.json
index a0e9e88cc..a4a63574e 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "GET",
- "path": "/aai/v12/network/pnfs/pnf/DEAAI78"
+ "path": "/aai/v../network/pnfs/pnf/DEAAI78"
} ,
"simulatorResponse": {
"responseCode": 200,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf_error.json b/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf_error.json
index cc84a7588..ee88d71ea 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf_error.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/aai_get_specific_pnf_error.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "GET",
- "path": "/aai/v12/network/pnfs/pnf/DEAAI78"
+ "path": "/aai/v../network/pnfs/pnf/DEAAI78"
} ,
"simulatorResponse": {
"responseCode": 500,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations.json b/vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration.json
index de0c07bc8..d88343ae4 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration.json
@@ -1,8 +1,8 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/configurations"
- } ,
+ "path": "/mso/serviceInstantiation/v7/serviceInstances/f36f5734-e9df-4fbf-9f35-61be13f028a1/activateFabricConfiguration"
+ },
"simulatorResponse": {
"responseCode": 202,
"body": {
diff --git a/vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration_error.json b/vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration_error.json
new file mode 100644
index 000000000..90f380ea1
--- /dev/null
+++ b/vid-automation/src/test/resources/registration_to_simulator/activate_fabric_configuration_error.json
@@ -0,0 +1,10 @@
+{
+ "simulatorRequest": {
+ "method": "POST",
+ "path": "/mso/serviceInstantiation/v7/serviceInstances/f36f5734-e9df-4fbf-9f35-61be13f028a1/activateFabricConfiguration"
+ },
+ "simulatorResponse": {
+ "responseCode": 500,
+ "body": "ERROR_PAYLOAD"
+ }
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance.json b/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance.json
index 949a86afb..773bfd0dd 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/activate"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/activate"
},
"simulatorResponse": {
"responseCode": 202,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance_error.json b/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance_error.json
index 96322b7ae..73ff898a7 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance_error.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/activate_service_instance_error.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/activate"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/activate"
} ,
"simulatorResponse": {
"responseCode": 500,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_configuration.json b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_configuration.json
new file mode 100644
index 000000000..b0bf14b55
--- /dev/null
+++ b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_configuration.json
@@ -0,0 +1,34 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "model-invariant-id-9533",
+ "modelVersionId": "model-version-id-9533",
+ "modelCustomizationId": "08a181aa-72eb-435f-9593-e88a3ad0a86b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "us16807000"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c187e9fe-40c3-4862-b73e-84ff056205f6",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "b7d923c9-6175-41f1-91ba-4565c4953408",
+ "modelVersionId": "ee6d61be-4841-4f98-8f23-5de9da846ca7",
+ "modelName": "ServiceContainerMultiplepProbes",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_fabric_configuration.json b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_fabric_configuration.json
new file mode 100644
index 000000000..97bc6e46d
--- /dev/null
+++ b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_activate_fabric_configuration.json
@@ -0,0 +1,22 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "az2016"
+ },
+ "requestParameters": {
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_create_configuration.json b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_create_configuration.json
index e0942bae2..c726590eb 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_create_configuration.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_create_configuration.json
@@ -1,4 +1,3 @@
-
{
"requestDetails": {
"modelInfo": {
@@ -11,49 +10,46 @@
"modelCustomizationName": "Port Mirroring Configuration By Policy 1"
},
"cloudConfiguration": {
- "lcpCloudRegionId": "AAIAIC25"
+ "lcpCloudRegionId": "JANET25"
},
"requestInfo": {
- "instanceName":"test_sssdad",
+ "instanceName": "dummy_instance",
"source": "VID",
- "requestorId": "1"
+ "requestorId": "us16807000"
},
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c187e9fe-40c3-4862-b73e-84ff056205f6 ",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "b7d923c9-6175-41f1-91ba-4565c4953408",
- "modelVersionId": "ee6d61be-4841-4f98-8f23-5de9da846ca7",
- "modelName": "ServiceContainerMultiplepProbes",
- "modelVersion": "1.0"
- }
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "c187e9fe-40c3-4862-b73e-84ff056205f6",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "b7d923c9-6175-41f1-91ba-4565c4953408",
+ "modelVersionId": "ee6d61be-4841-4f98-8f23-5de9da846ca7",
+ "modelName": "ServiceContainerMultiplepProbes",
+ "modelVersion": "1.0"
}
- },
- {
- "relatedInstance": {
- "instanceId": "9be14a4f-7367-4cf9-96a1-f08f10f485a7",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "a7eac2b3-8444-40ee-92e3-b3359b32445c",
- "modelVersionId": "2a2ea15f-07c6-4b89-bfca-e8aba39a34d6",
- "modelName": "vmmeService2",
- "modelVersion": "1.0",
- "modelCustomizationId": "060be63d-5f9c-4fd0-8ef7-830d5e8eca17"
- }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "9be14a4f-7367-4cf9-96a1-f08f10f485a7",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "51f2c559-1aba-4fd4-bbf9-8cbbef85ff2a",
+ "modelVersionId": "cb05b259-9f26-4b33-b96c-13c2c202c091",
+ "modelName": "vf_vEPDG",
+ "modelVersion": "2.0",
+ "modelCustomizationId": "35aeaae9-74f7-4b6a-adda-65edb0110361"
}
- },
- {
- "relatedInstance": {
- "instanceId": "AS-pnf2-10219--as988q",
- "instanceDirection": "destination",
- "modelInfo": {
- "modelType": "pnf"
- }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceName": "AS-pnf2-10219--as988q",
+ "instanceDirection": "destination",
+ "modelInfo": {
+ "modelType": "pnf"
}
}
+ }
],
"requestParameters": {
"userParams": []
diff --git a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_deactivate_and_cloud_delete.json b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_deactivate_and_cloud_delete.json
new file mode 100644
index 000000000..ad588b68b
--- /dev/null
+++ b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_deactivate_and_cloud_delete.json
@@ -0,0 +1,5 @@
+{
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "bae71557c5bb4d5aac6743a4e5f1d054",
+ "userId": "us16807000"
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json
index 951eac1fb..3b0204aa7 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/body_jsons/mso_request_delete_or_unassign_service_instance.json
@@ -12,7 +12,7 @@
"requestorId": "16807000"
},
"requestParameters": {
- "testApi": "GR_API",
+ "testApi": "VNF_API",
"aLaCarte": false
}
}
diff --git a/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance.json b/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance.json
index d98dbfe64..ce27b5920 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/deactivate"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/deactivate"
} ,
"simulatorResponse": {
"responseCode": 202,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance_error.json b/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance_error.json
index 1a6aee73a..7e808b812 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance_error.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/deactivate_service_instance_error.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/deactivate"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/deactivate"
} ,
"simulatorResponse": {
"responseCode": 500,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance.json b/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance.json
index c5e3c6ee4..ef551184d 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/removeRelationships"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/removeRelationships"
} ,
"simulatorResponse": {
"responseCode": 202,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance_error.json b/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance_error.json
index d4b5f54fc..073fd359f 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance_error.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/dissociate_pnf_from_service_instance_error.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/removeRelationships"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/removeRelationships"
} ,
"simulatorResponse": {
"responseCode": 404,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/ecompportal_getSessionSlotCheckInterval.json b/vid-automation/src/test/resources/registration_to_simulator/ecompportal_getSessionSlotCheckInterval.json
index a43092ef9..a71270e72 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/ecompportal_getSessionSlotCheckInterval.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/ecompportal_getSessionSlotCheckInterval.json
@@ -2,7 +2,7 @@
{
"simulatorRequest": {
"method": "GET",
- "path": "/ecompportal_att/auxapi//getSessionSlotCheckInterval"
+ "path": "/ecompportal_att/auxapi//v3/getSessionSlotCheckInterval"
},
"simulatorResponse": {
"responseCode": 200,
@@ -22,6 +22,26 @@
{
"simulatorRequest": {
"method": "GET",
+ "path": "/ecompportal_att/auxapi/v3/getSessionSlotCheckInterval"
+ },
+ "simulatorResponse": {
+ "responseCode": 200,
+ "body": "300000"
+ }
+ },
+ {
+ "simulatorRequest": {
+ "method": "POST",
+ "path": "/ecompportal_att/auxapi/extendSessionTimeOuts"
+ },
+ "simulatorResponse": {
+ "responseCode": 200,
+ "body": "300000"
+ }
+ },
+ {
+ "simulatorRequest": {
+ "method": "GET",
"path": "/ecompportal_att/auxapi/context/get_user"
},
"simulatorResponse": {
diff --git a/vid-automation/src/test/resources/registration_to_simulator/get_logical_link.json b/vid-automation/src/test/resources/registration_to_simulator/get_logical_link.json
index 61ede56d1..50707ccb1 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/get_logical_link.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/get_logical_link.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "GET",
- "path": "/aai/v12/network/logical-links/logical-link/tesai371ve2:ae10|tesaaisdgraclz1a1:po100"
+ "path": "/aai/v14/network/logical-links/logical-link/tesai371ve2:ae10|tesaaisdgraclz1a1:po100"
} ,
"simulatorResponse": {
"responseCode": 200,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/get_logical_link_not_found.json b/vid-automation/src/test/resources/registration_to_simulator/get_logical_link_not_found.json
index abe4d2b5e..082a3bf4e 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/get_logical_link_not_found.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/get_logical_link_not_found.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "GET",
- "path": "/aai/v12/network/logical-links/logical-link/tesai371ve2:ae10|tesaaisdgraclz1a1:po100"
+ "path": "/aai/v../network/logical-links/logical-link/tesai371ve2:ae10|tesaaisdgraclz1a1:po100"
} ,
"simulatorResponse": {
"responseCode": 404,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/get_operational_environments_aai.json b/vid-automation/src/test/resources/registration_to_simulator/get_operational_environments_aai.json
index 955f356d9..596104b83 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/get_operational_environments_aai.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/get_operational_environments_aai.json
@@ -38,7 +38,7 @@
{
"operational-environment-id": "UUID of ECOMP Operational Environment",
"operational-environment-name": "ECOMP Env Name",
- "operational-environment-type": "ECOMP",
+ "operational-environment-type": "ONAP",
"operational-environment-status": "Activate",
"tenant-context": "ECOMP Test",
"workload-context": "ECOMP_Development",
diff --git a/vid-automation/src/test/resources/registration_to_simulator/get_sdc_catalog_services_VmmeRvpmsFeAic3011217Svc.json b/vid-automation/src/test/resources/registration_to_simulator/get_sdc_catalog_services_VflorenceRvpmsFeAic3011217Svc.json
index 1d7849a6c..7fca48f10 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/get_sdc_catalog_services_VmmeRvpmsFeAic3011217Svc.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/get_sdc_catalog_services_VflorenceRvpmsFeAic3011217Svc.json
@@ -6,7 +6,7 @@
},
"simulatorResponse": {
"responseCode": 200,
- "file": "service-VmmeRvpmsFeAic3011217Svc-csar.csar.zip"
+ "file": "service-VflorenceRvpmsFeAic3011217Svc-csar.csar.zip"
}
},
{
@@ -24,7 +24,7 @@
"invariantUUID": "124216d6-71d0-41c8-ac81-0c5acfee514a",
"name": "vMMEvProbe_FE_AIC3-11.2.1_VF",
"version": "1.0",
- "toscaModelURL": "./service-VmmeRvpmsFeAic3011217Svc-csar.csar.zip",
+ "toscaModelURL": "./service-VflorenceRvpmsFeAic3011217Svc-csar.csar.zip",
"category": "Application L4+",
"lifecycleState": "CERTIFIED",
"lastUpdaterUserId": "rg276b",
diff --git a/vid-automation/src/test/resources/registration_to_simulator/get_service_instance_not_found.json b/vid-automation/src/test/resources/registration_to_simulator/get_service_instance_not_found.json
index 235c642ec..a5ea4e230 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/get_service_instance_not_found.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/get_service_instance_not_found.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "GET",
- "path": "/aai/v12/business/customers/customer/31739f3e-526b-11e6-beb8-9e71128cae77/service-subscriptions/service-subscription/AIM+Transport/service-instances/service-instance/f36f5734-e9df-4fbf-9f35-61be13f028a1"
+ "path": "/aai/v../business/customers/customer/31739f3e-526b-11e6-beb8-9e71128cae77/service-subscriptions/service-subscription/AIM+Transport/service-instances/service-instance/f36f5734-e9df-4fbf-9f35-61be13f028a1"
} ,
"simulatorResponse": {
"responseCode": 404
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_activate_configurations.json b/vid-automation/src/test/resources/registration_to_simulator/mso_activate_configurations.json
deleted file mode 100644
index 19d70d90b..000000000
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_activate_configurations.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "simulatorRequest": {
- "method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/configurations/a53c9ca8-8986-44da-9e5e-9e4179e6c78a/activate",
- "body": {
- "val": "dummy payload"
- }
- } ,
- "simulatorResponse": {
- "responseCode": 202,
- "responseHeaders": {
- "Content-Type": "application/json"
- },
- "body": {
- "requestReferences": {
- "instanceId": "f36f5734-e9df-4fbf-9f35-61be13f028a1",
- "requestId": "b6dc9806-b094-42f7-9386-a48de8218ce8"
- }
- }
- }
-} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships.json b/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships.json
index 7b72f053a..c85b3cb63 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/addRelationships"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/addRelationships"
} ,
"simulatorResponse": {
"responseCode": 202,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships_error.json b/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships_error.json
index 126369df3..f8f6fbbbd 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships_error.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_add_relationships_error.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/addRelationships"
+ "path": "/mso/serviceInstances/v./f36f5734-e9df-4fbf-9f35-61be13f028a1/addRelationships"
} ,
"simulatorResponse": {
"responseCode": 500,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_404.json b/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_404.json
index 58d338726..c3fb0b009 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_404.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_404.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": ".*/serviceInstances/v6/SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/applyUpdatedConfig"
+ "path": ".*/serviceInstances/v./SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/applyUpdatedConfig"
} ,
"simulatorResponse": {
"responseCode": 404,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_409.json b/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_409.json
index f049d7662..27eb0dc98 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_409.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_error_409.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": ".*/serviceInstances/v6/SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/applyUpdatedConfig"
+ "path": ".*/serviceInstances/v./SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/applyUpdatedConfig"
} ,
"simulatorResponse": {
"responseCode": 409,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_ok.json b/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_ok.json
index 09addafe9..021d012f6 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_ok.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_config_update_ok.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": ".*/serviceInstances/v6/SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/applyUpdatedConfig"
+ "path": ".*/serviceInstances/v./SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/applyUpdatedConfig"
} ,
"simulatorResponse": {
"responseCode": 202,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations_error.json b/vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations_error.json
deleted file mode 100644
index 0752cd15f..000000000
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_create_configurations_error.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "simulatorRequest": {
- "method": "POST",
- "path": "/mso/serviceInstances/v6/f36f5734-e9df-4fbf-9f35-61be13f028a1/configurations"
- } ,
- "simulatorResponse": {
- "responseCode": "<ERROR_CODE>",
- "body": "<ERROR_PAYLOAD>"
- }
-} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_404.json b/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_404.json
index b5e3f1883..d48d2ae78 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_404.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_404.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": ".*/serviceInstances/v6/SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/inPlaceSoftwareUpdate"
+ "path": ".*/serviceInstances/v./SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/inPlaceSoftwareUpdate"
} ,
"simulatorResponse": {
"responseCode": 404,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_409.json b/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_409.json
index f3985ef32..fa429c9e9 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_409.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_error_409.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": ".*/serviceInstances/v6/SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/inPlaceSoftwareUpdate"
+ "path": ".*/serviceInstances/v./SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/inPlaceSoftwareUpdate"
} ,
"simulatorResponse": {
"responseCode": 409,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_ok.json b/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_ok.json
index ee0453393..4ce1936c4 100644
--- a/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_ok.json
+++ b/vid-automation/src/test/resources/registration_to_simulator/mso_in_place_software_update_ok.json
@@ -1,7 +1,7 @@
{
"simulatorRequest": {
"method": "POST",
- "path": ".*/serviceInstances/v6/SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/inPlaceSoftwareUpdate"
+ "path": ".*/serviceInstances/v./SERVICE_INSTANCE_ID/vnfs/VNF_INSTANCE_ID/inPlaceSoftwareUpdate"
} ,
"simulatorResponse": {
"responseCode": 202,
diff --git a/vid-automation/src/test/resources/registration_to_simulator/portal_remote_users.json b/vid-automation/src/test/resources/registration_to_simulator/portal_remote_users.json
new file mode 100644
index 000000000..3b3f878f7
--- /dev/null
+++ b/vid-automation/src/test/resources/registration_to_simulator/portal_remote_users.json
@@ -0,0 +1,18 @@
+{
+ "simulatorRequest": {
+ "method" : "GET",
+ "path" : "/ecompportal_att/auxapi//v3/user/1"
+ } ,
+ "simulatorResponse": {
+ "responseCode": 200,
+ "body": {
+ "firstName": "1",
+ "lastName": "1",
+ "orgId": 1,
+ "loginId": "1",
+ "loginPwd": "1",
+ "active": true,
+ "internal": true
+ }
+ }
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/sdcApiTest/aLaCarteInstantiationTypeResponse.json b/vid-automation/src/test/resources/sdcApiTest/aLaCarteInstantiationTypeResponse.json
new file mode 100644
index 000000000..ff4b6d1b6
--- /dev/null
+++ b/vid-automation/src/test/resources/sdcApiTest/aLaCarteInstantiationTypeResponse.json
@@ -0,0 +1,54 @@
+{
+ "service": {
+ "vidNotions": {
+ "instantiationUI": "legacy",
+ "modelCategory": "other",
+ "viewEditUI": "legacy"
+ },
+ "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}",
+ "ecomp_generated_naming": "false"
+ },
+ "type": "VL",
+ "modelCustomizationName": "MULTI_PROVIDER_PORT_GROUP 0"
+ }
+ },
+ "collectionResource": {},
+ "configurations": {},
+ "fabricConfigurations": {},
+ "serviceProxies": {},
+ "vfModules": {},
+ "volumeGroups": {},
+ "pnfs": {},
+ "vnfGroups": {}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/sdcApiTest/emptyInstantiationTypeResponse.json b/vid-automation/src/test/resources/sdcApiTest/emptyInstantiationTypeResponse.json
new file mode 100644
index 000000000..2136c84cb
--- /dev/null
+++ b/vid-automation/src/test/resources/sdcApiTest/emptyInstantiationTypeResponse.json
@@ -0,0 +1,54 @@
+{
+ "service": {
+ "vidNotions": {
+ "instantiationUI": "legacy",
+ "modelCategory": "other",
+ "viewEditUI": "legacy"
+ },
+ "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}",
+ "ecomp_generated_naming": "false"
+ },
+ "type": "VL",
+ "modelCustomizationName": "MULTI_PROVIDER_PORT_GROUP 0"
+ }
+ },
+ "collectionResource": {},
+ "configurations": {},
+ "fabricConfigurations": {},
+ "serviceProxies": {},
+ "vfModules": {},
+ "volumeGroups": {},
+ "pnfs": {},
+ "vnfGroups": {}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/sdcApiTest/macroInstantiationTypeResponse.json b/vid-automation/src/test/resources/sdcApiTest/macroInstantiationTypeResponse.json
new file mode 100644
index 000000000..07fd1d3a9
--- /dev/null
+++ b/vid-automation/src/test/resources/sdcApiTest/macroInstantiationTypeResponse.json
@@ -0,0 +1,54 @@
+{
+ "service": {
+ "vidNotions": {
+ "instantiationUI": "legacy",
+ "modelCategory": "other",
+ "viewEditUI": "legacy"
+ },
+ "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}",
+ "ecomp_generated_naming": "false"
+ },
+ "type": "VL",
+ "modelCustomizationName": "MULTI_PROVIDER_PORT_GROUP 0"
+ }
+ },
+ "collectionResource": {},
+ "configurations": {},
+ "fabricConfigurations": {},
+ "serviceProxies": {},
+ "vfModules": {},
+ "volumeGroups": {},
+ "pnfs": {},
+ "vnfGroups": {}
+} \ No newline at end of file
diff --git a/vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponse.json b/vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponse.json
new file mode 100644
index 000000000..785635cd6
--- /dev/null
+++ b/vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponse.json
@@ -0,0 +1,454 @@
+{
+ "service": {
+ "vidNotions": {
+ "instantiationUI": "legacy",
+ "modelCategory": "other",
+ "viewEditUI": "legacy"
+ },
+ "uuid": "43f13072-fe50-496b-b673-7af075d10143",
+ "invariantUuid": "35fb95d8-d1f0-4e46-99ac-e01b423e8e3f",
+ "name": "PASQUALE 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 : PASQUALE vPE Tenant OAM Network 1 SRIOV Network Service Name : vPE PASQUALE Provider Net 1",
+ "serviceEcompNaming": "true",
+ "instantiationType": "ClientConfig",
+ "inputs": {
+ "2017488PASQUALEvpe20_ASN": {
+ "type": "string",
+ "description": "AV/PE",
+ "entry_schema": null,
+ "inputProperties": null,
+ "constraints": [],
+ "required": true,
+ "default": "AV_vPE"
+ },
+ "2017488PASQUALEvpe20_bandwidth": {
+ "type": "string",
+ "description": "Requested VPE bandwidth",
+ "entry_schema": null,
+ "inputProperties": null,
+ "constraints": [],
+ "required": true,
+ "default": "10"
+ },
+ "2017488PASQUALEvpe20_bandwidth_units": {
+ "type": "string",
+ "description": "Units of bandwidth",
+ "entry_schema": null,
+ "inputProperties": null,
+ "constraints": [],
+ "required": true,
+ "default": "Gbps"
+ },
+ "2017488PASQUALEvpe20_AIC_CLLI": {
+ "type": "string",
+ "description": "AIC Site CLLI",
+ "entry_schema": null,
+ "inputProperties": null,
+ "constraints": [],
+ "required": true,
+ "default": "ATLMY8GA"
+ },
+ "2017488PASQUALEvpe20_vnf_config_template_version": {
+ "type": "string",
+ "description": "VPE Software Version",
+ "entry_schema": null,
+ "inputProperties": null,
+ "constraints": [],
+ "required": true,
+ "default": "17.2"
+ },
+ "2017488PASQUALEvpe20_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 PASQUALE vPE 2 0": {
+ "uuid": "079266b1-fcf5-44ae-bc04-cc3215b28737",
+ "invariantUuid": "e2dcd546-e647-4854-9ed9-e0a4d6880636",
+ "description": "Name PASQUALE vPE Description The Provider edge function for the PASQUALE 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 PASQUALE 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": "2017488PASQUALEvpe20_vnf_config_template_version"
+ },
+ "bandwidth_units": {
+ "displayName": "bandwidth_units",
+ "command": "get_input",
+ "inputName": "2017488PASQUALEvpe20_bandwidth_units"
+ },
+ "bandwidth": {
+ "displayName": "bandwidth",
+ "command": "get_input",
+ "inputName": "2017488PASQUALEvpe20_bandwidth"
+ },
+ "AIC_CLLI": {
+ "displayName": "AIC_CLLI",
+ "command": "get_input",
+ "inputName": "2017488PASQUALEvpe20_AIC_CLLI"
+ },
+ "ASN": {
+ "displayName": "ASN",
+ "command": "get_input",
+ "inputName": "2017488PASQUALEvpe20_ASN"
+ },
+ "vnf_instance_name": {
+ "displayName": "vnf_instance_name",
+ "command": "get_input",
+ "inputName": "2017488PASQUALEvpe20_vnf_instance_name"
+ }
+ },
+ "properties": {
+ "vmxvre_retype": "RE-VMX",
+ "vnf_config_template_version": "get_input:2017488PASQUALEvpe20_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": "10.0.0.10",
+ "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": "10.0.0.10",
+ "is_AVPN_service": "false",
+ "vmx_RSG_name": "vREXI-affinity",
+ "vmx_int_ctl_forwarding": "l2",
+ "vmxvre_oam_ip_0": "10.0.0.10",
+ "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": "10.0.0.10",
+ "ecomp_generated_naming": "true",
+ "AIC_CLLI": "get_input:2017488PASQUALEvpe20_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:2017488PASQUALEvpe20_bandwidth_units",
+ "vnf_id": "123",
+ "vmxvre_oam_prefix": "24",
+ "availability_zone_0": "mtpocfo-kvm-az01",
+ "ASN": "get_input:2017488PASQUALEvpe20_ASN",
+ "vmxvre_chassis_i2cid": "161",
+ "vmxvpfe_name_0": "vPFEXI",
+ "bandwidth": "get_input:2017488PASQUALEvpe20_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.0.0.10",
+ "vmxvre_volume_name_1": "vREXI_FAVolume",
+ "vmxvre_ore_present": "0",
+ "vmxvre_volume_name_0": "vREXI_FBVolume",
+ "vmxvre_type": "0",
+ "vnf_instance_name": "get_input:2017488PASQUALEvpe20_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 PASQUALE vPE 2 0",
+ "vfModules": {
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "properties": {
+ "minCountInstances": null,
+ "maxCountInstances": null,
+ "initialCount": null,
+ "vfModuleLabel": "PASQUALE_vPFE_BV",
+ "baseModule" : false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ },
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "PASQUALE_vRE_BV",
+ "baseModule" : false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ },
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_base_vPE_BV..module-0",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_base_vPE_BV..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "PASQUALE_base_vPE_BV",
+ "baseModule" : true
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ }
+ },
+ "volumeGroups": {
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "properties": {
+ "minCountInstances": null,
+ "maxCountInstances": null,
+ "initialCount": null,
+ "vfModuleLabel": "PASQUALE_vPFE_BV",
+ "baseModule" : false
+ },
+ "inputs": {}
+ },
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "PASQUALE_vRE_BV",
+ "baseModule" : false
+ },
+ "inputs": {}
+ }
+ },
+ "vfcInstanceGroups": {}
+ }
+ },
+ "networks": {},
+ "collectionResource": {},
+ "configurations": {},
+ "fabricConfigurations": {},
+ "serviceProxies": {},
+ "vfModules": {
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "properties": {
+ "minCountInstances": null,
+ "maxCountInstances": null,
+ "initialCount": null,
+ "vfModuleLabel": "PASQUALE_vPFE_BV",
+ "baseModule" : false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ },
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_base_vPE_BV..module-0",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_base_vPE_BV..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "PASQUALE_base_vPE_BV",
+ "baseModule" : true
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "PASQUALE_vRE_BV",
+ "baseModule" : false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vPFE_BV..module-2",
+ "properties": {
+ "minCountInstances": null,
+ "maxCountInstances": null,
+ "initialCount": null,
+ "vfModuleLabel": "PASQUALE_vPFE_BV",
+ "baseModule" : false
+ },
+ "inputs": {}
+ },
+ "2017488PASQUALEvpe20..2017488PASQUALEVpe2..PASQUALE_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": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "version": "1",
+ "modelCustomizationName": "2017488PASQUALEVpe2..PASQUALE_vRE_BV..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "PASQUALE_vRE_BV",
+ "baseModule" : false
+ },
+ "inputs": {}
+ }
+ },
+ "pnfs": {},
+ "vnfGroups": {}
+}
diff --git a/vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponseOldCsar.json b/vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponseOldCsar.json
new file mode 100644
index 000000000..4097fd936
--- /dev/null
+++ b/vid-automation/src/test/resources/sdcApiTest/minMaxInitialExpectedResponseOldCsar.json
@@ -0,0 +1,363 @@
+{
+ "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": "Emanuel",
+ "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": {
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Base_Module..module-0",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Base_Module..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": null,
+ "baseModule" : true
+ },
+ "inputs": null,
+ "volumeGroupAllowed": false
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ }
+ },
+ "vfcInstanceGroups": {}
+ }
+ },
+ "networks": {},
+ "collectionResource": null,
+ "configurations": null,
+ "fabricConfigurations": {},
+ "serviceProxies": null,
+ "vfModules": {
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Base_Module..module-0",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Base_Module..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": null,
+ "baseModule" : true
+ },
+ "inputs": null,
+ "volumeGroupAllowed": false
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null,
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vprobe_eph..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlbagent_aff..module-2",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_qrouter..module-4",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ },
+ "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..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": "VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "version": "1",
+ "modelCustomizationName": "vflorencevprobe_fe_aic31121_vf1..VflorencevprobeFeAic31121Vf..FE_Add_On_Module_vlb..module-3",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": null,
+ "baseModule" : false
+ },
+ "inputs": null
+ }
+ },
+ "pnfs": null,
+ "vnfGroups": null
+}
diff --git a/vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksToVlansByServiceInstance.json b/vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksToVlansByServiceInstance.json
new file mode 100644
index 000000000..1bbddc11c
--- /dev/null
+++ b/vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksToVlansByServiceInstance.json
@@ -0,0 +1,31 @@
+{
+ "serviceNetworks": [
+ {
+ "networkId": "7989a6d2-ba10-4a5d-8f15-4520bc833090",
+ "name": "DDDEEEFFF",
+ "nodeType": "Provider Network",
+ "nodeStatus": "Failed",
+ "vlans": [
+ {
+ "vlanIdOuter": "34612"
+ },
+ {
+ "vlanIdOuter": "8568012"
+ }
+ ]
+ },
+ {
+ "networkId": "e8e2332e-1f84-4237-bc97-3b5b842f52e4",
+ "name": "GGGHHHIII",
+ "nodeType": "Network",
+ "nodeStatus": "Assigned",
+ "vlans": [
+ {
+ "vlanIdOuter": "4"
+ }
+ ]
+ }
+ ],
+ "vnfNetworks": [
+ ]
+}
diff --git a/vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksWithVlansToVnfByServiceInstance.json b/vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksWithVlansToVnfByServiceInstance.json
new file mode 100644
index 000000000..952e36e3e
--- /dev/null
+++ b/vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksWithVlansToVnfByServiceInstance.json
@@ -0,0 +1,58 @@
+{
+ "serviceNetworks": [
+ ],
+ "vnfNetworks": [
+ {
+ "vnfId": "c015cc0f-0f37-4488-aabf-53795fd93cd3",
+ "networks": [
+ {
+ "networkId": "36517f3d-2bc2-48f5-aaf8-418520c54330",
+ "name": "AAAAABBBBCCCC",
+ "nodeType": "Provider Network",
+ "nodeStatus": "Assigned",
+ "vlans": [
+ {
+ "vlanIdOuter": "34123"
+ },
+ {
+ "vlanIdOuter": "65540"
+ }
+ ]
+ },
+ {
+ "networkId": "12347f3d-2bc2-48f5-aaf8-418520c54330",
+ "name": "DDDEEEE",
+ "nodeType": "Provider Network",
+ "nodeStatus": "Created",
+ "vlans": [
+ {
+ "vlanIdOuter": "12345"
+ },
+ {
+ "vlanIdOuter": "67890"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "vnfId": "c55da606-cf38-42c7-bc3c-be8e23b19299",
+ "networks": [
+ {
+ "networkId": "12aa7f3d-2bc2-48f5-aaf8-418520c54330",
+ "name": "XXXYYYZZZ",
+ "nodeType": "Network",
+ "nodeStatus": "Created",
+ "vlans": [
+ {
+ "vlanIdOuter": "417695"
+ },
+ {
+ "vlanIdOuter": "783243"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/vid-automation/src/test/resources/test_config.properties b/vid-automation/src/test/resources/test_config.properties
index db876b7df..01342158b 100644
--- a/vid-automation/src/test/resources/test_config.properties
+++ b/vid-automation/src/test/resources/test_config.properties
@@ -1,3 +1,2 @@
-test.loginId=vid1
-test.loginPassword=Kp8bJ4SXszM0WX
-
+test.loginId=us16807000
+test.loginPassword=us16807000 \ No newline at end of file
diff --git a/vid-automation/src/test/resources/viewEdit/aaiHomingDataResponse.json b/vid-automation/src/test/resources/viewEdit/aaiHomingDataResponse.json
new file mode 100644
index 000000000..5dfd2644b
--- /dev/null
+++ b/vid-automation/src/test/resources/viewEdit/aaiHomingDataResponse.json
@@ -0,0 +1,8 @@
+{
+ "cloudRegionID": "olson5b",
+ "cloudOwner": "irma-aic",
+ "tenantName": null,
+ "tenantID": "db1818f7f2e34862b378bfb2cc520f91",
+ "is-permitted": false,
+ "isPermitted": false
+} \ No newline at end of file