aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-07-30 15:56:09 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-07-31 11:09:25 -0400
commit5a6a6de6f1a26a1897e4917a0df613e25a24eb70 (patch)
tree59a968f27b4b603aacc9d5e7b51fb598aeec5321 /mso-api-handlers/mso-api-handler-infra/src/test
parentb6dc38501f3b746426b42d9de4cc883d894149e8 (diff)
Containerization feature of SO
Change-Id: I95381232eeefcd247a66a5cec370a8ce1c288e18 Issue-ID: SO-670 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java73
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/filters/RequestUriFilterTest.java57
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/recipe/CamundaClientErrorHandlerTest.java72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AllTestsTestSuite.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandlerTest.java)27
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java102
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionTest.java128
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeansTest.java)65
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java229
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedCatalogDbConfig.java102
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedRequestDbConfig.java102
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java55
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java118
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java467
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java389
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RequestActionMapTest.java)6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstanceBeansTest.java50
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java1407
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java123
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TestAppender.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ManualTasksTest.java)27
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java)6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java)6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java)6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java)6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java)6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/RequestDetailsTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/RequestDetailsTest.java)142
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/RequestInfoTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/RequestInfoTest.java)236
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskListTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskListTest.java)493
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskRequestReferenceTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskRequestReferenceTest.java)142
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskVariableValueTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskVariableValueTest.java)226
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskVariablesTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskVariablesTest.java)138
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TasksGetResponseTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TasksGetResponseTest.java)138
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TasksRequestTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TasksRequestTest.java)140
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/ValueTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/ValueTest.java)136
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/VariablesTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/VariablesTest.java)190
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java289
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java401
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java114
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequestTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/TenantIsolationRequestTest.java)55
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClientTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClientTest.java)30
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java)38
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/AsdcDmaapClientTest.java)13
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/SDCClientCallFailedTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/TasksHandlerTest.java)30
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/TenantIsolationExceptionTest.java45
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java147
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java)23
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java142
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelperTest.java194
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java238
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java640
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java130
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java146
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java160
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java (renamed from mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java)112
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java55
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeanTest.java59
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java1327
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandlerTest.java60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java624
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequestsTest.java248
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResultTest.java96
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java1168
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstancesTest.java134
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestDetailsTest.java74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestInfoTest.java120
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskListTest.java247
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskRequestReferenceTest.java72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariableValueTest.java114
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariablesTest.java71
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksGetResponseTest.java71
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksRequestTest.java72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/ValueTest.java69
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/VariablesTest.java97
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java209
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java333
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java93
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AsdcClientHelperTest.java209
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/AaiStubResponse.java57
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/MockTest.java64
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java249
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java670
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java106
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java91
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/CloudOrchestrationTest.java113
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ApplyUpdatedConfig.json11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/CompareModelRequest.json6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/DeleteRequest.json4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/Request.json81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/ScaleRequest.json18
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql15
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdPreload.json38
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdFormat.json43
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersion.json43
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/CloudConfiguration.json)76
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationConfig.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v2AutoBuildVfModulesTrue.json)81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationNetwork.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyInstanceName.json)81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationVnf.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v2AutoBuildVfModulesFalse.json)81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyCloudConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyCloudConfiguration.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyLcpCloudConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyLcpCloudConfiguration.json)81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyTenantId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyTenantId.json)81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateCloudConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateCloudConfiguration.json)74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateCloudRegionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateCloudRegionId.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateTenantId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateTenantId.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ConfigurationModelVersionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ConfigurationModelVersionId.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/InvalidModelInvariantId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/InvalidModelInvariantId.json)85
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomization.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelName.json)77
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationId.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationIdUsingPreload.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdUsingPreload.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionIdTest.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInfoNull.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInfoNull.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantId.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdConfiguration.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdConfigurationDelete.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdConfigurationDelete.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdService.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdService.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdVnf.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdVnf.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelNameVersionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelNameVersionId.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelTypeNull.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelTypeNull.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionId.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionIdCreate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionIdCreate.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionNetwork.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionNetwork.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionService.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionService.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionServiceCreate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdServiceCreate.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionVfModule.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionVfModule.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ServiceModelNameEmptyOnActivate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceModelNameEmptyOnActivate.json)74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ServiceModelNameEmptyOnDelete.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceModelNameEmptyOnDelete.json)74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ValidModelCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ValidModelCustomizationId.json)130
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ValidModelCustomizationIdService.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ValidModelCustomizationIdService.json)130
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VfModuleModelName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelName.json)74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationId.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationIdEmpty.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdEmpty.json)128
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationIdPreload.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdPreload.json)70
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationNameNull.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNameNull.json)74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationTest.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationTest.json)76
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v2ModelVersionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v2ModelVersionId.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v3UpdateNetworkBad.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3UpdateNetworkBad.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v4CreateVfModuleMissingModelCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModuleMissingModelCustomizationId.json)122
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v4CreateVfModuleNoCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModuleNoCustomizationId.json)122
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ActivateModelVersionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorBadData.json)68
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5CreateConfigurationModelCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateConfigurationBad.json)128
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5DeactivateModelInvariantId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorBadData.json)68
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ModelInvariantIdDisablePort.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ModelInvariantIdDisablePort.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ModelInvariantIdNetwork.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ModelInvariantIdNetwork.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/EmptyLineOfBusiness.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyLineOfBusiness.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/EmptyPlatformName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyPlatform.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/OptionalLineOfBusiness.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/LineOfBusiness.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/Platform.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/Platform.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/PlatformAndLineOfBusiness.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/PlatformTest.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformTest.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyOwningEntityId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyOwningEntityId.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyOwningEntityName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyOwningEntityName.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyProjectName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyProject.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/OptionalProject.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntity2.json)78
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/OwningEntity.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/OwningEntity.json)76
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ProjectAndOwningEntity.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntity.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ServiceAssignNoOE.json115
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/InvalidInstanceName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/InvalidInstanceName.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstances.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstances.json)64
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesId.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesIdFormat.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesIdFormat.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesInstanceId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesInstanceId.json)92
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelCustomizationId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelCustomizationId.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInfo.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInfo.json)76
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInvariantId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInvariantId.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInvariantIdFormat.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInvariantIdFormat.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelName.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelType.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelType.json)88
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelVersion.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelVersion.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelVersionId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelVersionId.json)90
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesNameFormat.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesNameFormat.json)92
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesServiceInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstance.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVfModule.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVfModule.json)64
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVnfInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVnfInstance.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVnfInstanceId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVnfInstanceId.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceNoRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceNoRelatedInstance.json)46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VfModuleRelatedInstancesService.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleRelatedInstancesService.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VfModuleRelatedInstancesVnf.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleRelatedInstancesVnf.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VnfRelatedInstancesService.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRelatedInstancesService.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VolumeGroupRelatedInstances.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VolumeGroupRelatedInstances.json)120
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v4RelatedInstancesNull.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3VolumeGroupBad.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5ActivateNoRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorNoRelatedInstance.json)40
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoDestinationRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoDestinationRelatedInstance.json)102
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoRelatedInstances.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoRelatedInstances.json)46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoSourceRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoSourceRelatedInstance.json)102
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5DeactivateNoRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorNoRelatedInstance.json)40
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5EnablePortNoConnectionPoint.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorNoConnectionPoint.json)62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5EnablePortNoRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorNoRelatedInstance.json)34
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v6AddRelationshipsInstanceName.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v6AddRelationshipsBadData.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v6VnfDeleteInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v6VnfDeleteInstance.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json56
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/EmptyRequestorId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyRequestorId.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/EmptySource.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySource.json)68
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/NetworkProductFamilyId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkProductFamilyId.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestInfo.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestInfo.json)70
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestInfoNull.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestInfoNull.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestorId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestorId.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyId.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyIdFlag.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyIdFlag.json)142
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyIdUpdate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyIdUpdate.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/VnfProductFamilyId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfProductFamilyId.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignCloudConfigVnf.json126
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignEmptyReqParameters.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/Network.json133
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkCloudConfig.json138
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelCustomizationId.json137
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelVersionId.json137
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/ProductFamilyId.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParameters.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParameters.json)76
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParametersALaCarteTrue.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteTrue.json)72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParametersNull.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersNull.json)40
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelCustomizationId.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelInfo.json120
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelVersionId.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatform.json127
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatformName.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsVnfModelInfo.json116
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelCustomizationId.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelVersionId.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModules.json75
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModulesModelInfo.json125
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelCustomizationId.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelVersionId.json128
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfRequestParameters.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRequestParameters.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/v2requestParametersALaCarteFalse.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v2requestParametersALaCarteFalse.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/v3DeleteServiceInstanceALaCarte.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstanceALaCarte.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/AssignEmptySubscriberInfo.json116
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptyGlobalSubscriberId.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyGlobalSubscriberId.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptySubscriberInfo.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySubscriberInfo.json)62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptySubscriptionServiceType.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySubscriptionServiceType.json)81
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/InstanceIdHashMap.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/Project.json)78
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/NetworkType.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkType.json)84
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceAssign.json130
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceInPlaceSoftwareUpdate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInPlaceSoftwareUpdate.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceUnassign.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/UserParams.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/UserParams.json)116
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VfModulesModelInfo.json120
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VnfActivate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfActivate.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteNetwork.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteNetwork.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteServiceInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstance.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteServiceInstanceALaCarte.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstanceBad.json)8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3UpdateNetwork.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3UpdateNetwork.json)4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3VnfCreate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v3VnfCreate.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v4CreateVfModule.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModule.json)124
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5ActivateConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorConfiguration.json)70
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5CreateConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateConfiguration.json)130
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5DeactivateConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorConfiguration.json)70
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5EnableConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorConfiguration.json)80
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5EnableService.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorService.json)82
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v6AddRelationships.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v6AddRelationships.json)2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v6CreateConfiguration.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/v6PortMirrorCreateConfiguration.json)132
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/AlaCarteRequest.json36
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/Request.json8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequestHandler/SampleGetResponse.json22
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Payload.json41
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness2.json43
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid.json43
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid2.json43
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid.json39
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid2.json40
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstanceId.json48
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesSetInstances.json48
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteNull.json36
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AddRelationships.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ApplyUpdatedConfig.json12
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ConvertRequestFail.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/PlatformAndLineOfBusiness.json)92
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdate.json)33
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnf.json62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnfV5.json22
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVolumeGroup.json60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate.json16
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate2.json16
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/LegacyMacroServiceInstance.json74
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/MacroServiceInstance.json129
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkModelName.json)86
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateAlternateInstanceName.json45
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiGrApi.json46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiIncorrect.json46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiVnfApi.json46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json45
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json15
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NoVnfResource.json49
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/RemoveRelationships.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnf.json62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfRecreate.json62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceAssign.json134
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstance.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrue.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrueNoRecipe.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivatePort.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceBadGateway.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivate.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivatePort.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDefault.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDelete.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDisablePort.json70
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDuplicates.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEmpty.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEnablePort.json66
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceMacro.json34
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceNoRecipe.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceParseFail.json65
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePortConfiguration.json65
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev7.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev8.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceStatusError.json31
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceRequestExpected.json72
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceUnassign.json21
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateNetwork.json45
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVolumeGroup.json60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInstance.json32
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInvalid.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRelatedInstancesInstanceDirection.json)111
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoMatchingModelUUID.json60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelCustomization.json61
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelType.json20
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleWithRelatedInstances.json54
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfCreateDefault.json47
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithServiceRelatedInstance.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleVnfInstance.json)94
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithServiceRelatedInstanceFail.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesInstanceDirection.json)91
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithVnfRelatedInstance.json62
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VolumeGroup.json60
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/userParams.txt37
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Source.json41
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ActivateOperationEnvironment.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ActivateOperationEnvironment.json)64
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ActivateOperationEnvironmentInvalid.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ActivateOperationEnvironmentInvalid.json)44
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/DeactivateOperationEnvironment.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/DeactivateOperationEnvironment.json)22
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/DeactivateOperationEnvironmentInvalid.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/DeactivateOperationEnvironmentInvalid.json)22
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ECOMPOperationEnvironmentCreate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/ECOMPOperationEnvironmentCreate.json)28
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/VNFOperationEnvironmentCreate.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VNFOperationEnvironmentCreate.json)46
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/VNFOperationEnvironmentCreateInvalid.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/VNFOperationEnvironmentCreateInvalid.json)28
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmpty.json38
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnDelete.json38
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnUpdate.json37
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdValid.json65
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationName.json39
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNotValid.json39
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNErrorResponse.json7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNResponse.json7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AsyncProcessResponse.json6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/BPMNResponse.json7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/ErrorBPEL.json1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskResponse.json48
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskVariablesResponse.json109
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/SuccessfulResponse.json4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponse.json7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid.json7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid2.json7
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/mockGetAAIOperEnvIdResponse.json18
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/operationalEnvironmentInvalid.json16
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/endpoints.json6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml124
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql291
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/logback-test.xml25
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/logging.properties2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/mso.apihandler-infra.properties37
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/org/onap/so/client/asdc/create-ecompoe/ecomp-openv-request.json (renamed from mso-api-handlers/mso-api-handler-infra/src/test/resources/org/openecomp/mso/client/asdc/create-ecompoe/ecomp-openv-request.json)0
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql993
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/v2VfModuleModelNameEmptyOnDelete.json38
366 files changed, 20586 insertions, 14684 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java
new file mode 100644
index 0000000000..8a45752949
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/common/ResponseBuilderTest.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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.so.apihandler.common;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ResponseBuilderTest extends BaseTest {
+
+ @Autowired
+ private ResponseBuilder builder;
+
+ @Test
+ public void testBuildResponseResponse () throws ApiException {
+
+ String requestId = null;
+ String apiVersion = "1";
+ String jsonResponse = "Successfully started the process";
+
+ Response response = builder.buildResponse(HttpStatus.SC_ACCEPTED, requestId, jsonResponse, apiVersion);
+
+ assertEquals(202, response.getStatus());
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+
+ }
+
+ @Test
+ public void testBuildResponseVersion () throws ApiException {
+
+ String requestId = "123456-67889";
+ String apiVersion = "v5";
+ String jsonResponse = "Successfully started the process";
+
+ Response response = builder.buildResponse(HttpStatus.SC_CREATED, requestId, jsonResponse, apiVersion);
+
+ assertEquals(201, response.getStatus());
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("5.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/filters/RequestUriFilterTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/filters/RequestUriFilterTest.java
new file mode 100644
index 0000000000..db3dcb5af5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/filters/RequestUriFilterTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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.so.apihandler.filters;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
+import java.net.URI;
+
+import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.core.UriInfo;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+
+
+
+public class RequestUriFilterTest extends BaseTest{
+
+ @Test
+ public void filterTest() throws IOException {
+ RequestUriFilter URIFilter = new RequestUriFilter();
+ URI baseURI = URI.create("http://localhost:58879/");
+ String requestURI = "onap/so/infra/serviceInstances/v5";
+
+ ContainerRequestContext mockContext = mock(ContainerRequestContext.class);
+ UriInfo mockInfo = mock(UriInfo.class);
+
+ when(mockContext.getUriInfo()).thenReturn(mockInfo);
+ when(mockInfo.getBaseUri()).thenReturn(baseURI);
+ when(mockInfo.getPath()).thenReturn(requestURI);
+
+
+ URIFilter.filter(mockContext);
+ assertEquals("http://localhost:58879/onap/so/infra/serviceInstantiation/v5/serviceInstances", URIFilter.getRequestUri());
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/recipe/CamundaClientErrorHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/recipe/CamundaClientErrorHandlerTest.java
new file mode 100644
index 0000000000..564121b7b5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandler/recipe/CamundaClientErrorHandlerTest.java
@@ -0,0 +1,72 @@
+/*
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 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.so.apihandler.recipe;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.http.client.ClientHttpResponse;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public class CamundaClientErrorHandlerTest {
+
+ private ClientHttpResponse clientHttpResponse;
+ private CamundaClientErrorHandler clientErrorHandler;
+
+ @Before
+ public void before() {
+ clientHttpResponse = Mockito.mock(ClientHttpResponse.class);
+ clientErrorHandler = new CamundaClientErrorHandler();
+ }
+
+ @Test
+ public void handleError_SERVER_ERROR_Test() throws IOException {
+ Mockito.when(clientHttpResponse.getStatusCode()).thenReturn(HttpStatus.INTERNAL_SERVER_ERROR);
+ Mockito.when(clientHttpResponse.getBody()).thenReturn(new ByteArrayInputStream("{}".getBytes()));
+ clientErrorHandler.handleError(clientHttpResponse);
+ boolean serverHasError = clientErrorHandler.hasError(clientHttpResponse);
+ assertEquals(true, serverHasError);
+ }
+
+ @Test
+ public void handleError_CLIENT_ERROR_Test() throws IOException {
+ Mockito.when(clientHttpResponse.getStatusCode()).thenReturn(HttpStatus.BAD_REQUEST);
+ Mockito.when(clientHttpResponse.getBody()).thenReturn(new ByteArrayInputStream("{}".getBytes()));
+ clientErrorHandler.handleError(clientHttpResponse);
+ boolean clientHasError = clientErrorHandler.hasError(clientHttpResponse);
+ assertEquals(true, clientHasError);
+ }
+
+ @Test
+ public void handleError_SUCCESS_Test() throws IOException {
+ Mockito.when(clientHttpResponse.getStatusCode()).thenReturn(HttpStatus.ACCEPTED);
+ Mockito.when(clientHttpResponse.getBody()).thenReturn(new ByteArrayInputStream("{}".getBytes()));
+ clientErrorHandler.handleError(clientHttpResponse);
+ boolean hasNoError = clientErrorHandler.hasError(clientHttpResponse);
+ assertEquals(false, hasNoError);
+ }
+
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AllTestsTestSuite.java
index c115b7c44b..68869b77d4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NodeHealthcheckHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/AllTestsTestSuite.java
@@ -2,14 +2,14 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 - 2018 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.
@@ -18,18 +18,15 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra;
+package org.onap.so.apihandlerinfra;
+import org.junit.runner.RunWith;
-import org.junit.Test;
+import com.googlecode.junittoolbox.SuiteClasses;
+import com.googlecode.junittoolbox.WildcardPatternSuite;
-public class NodeHealthcheckHandlerTest {
-
- // TODO: currently test case is done for coverage
- // later, it should be modified properly.
- NodeHealthcheckHandler test = new NodeHealthcheckHandler();
-
- @Test(expected = NullPointerException.class)
- public void nodeHealthcheckTest() throws Exception {
- test.nodeHealthcheck();
- }
+@RunWith(WildcardPatternSuite.class)
+@SuiteClasses("**/*Test.class")
+public class AllTestsTestSuite {
+ // the class remains empty,
+ // used only as a holder for the above annotations
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java
new file mode 100644
index 0000000000..95daf2e501
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.StringStartsWith.startsWith;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.anyObject;
+
+import java.io.IOException;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.exceptions.ApiExceptionMapper;
+import org.onap.so.apihandlerinfra.exceptions.BPMNFailureException;
+import org.onap.so.apihandlerinfra.exceptions.ClientConnectionException;
+import org.onap.so.apihandlerinfra.exceptions.DuplicateRequestException;
+import org.onap.so.apihandlerinfra.exceptions.ValidateException;
+import org.onap.so.apihandlerinfra.exceptions.VfModuleNotFoundException;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class ApiExceptionMapperTest extends BaseTest {
+
+ ApiExceptionMapper mapper = new ApiExceptionMapper();
+
+
+ @Test
+ public void testObjectMapperError() throws JsonProcessingException {
+ ObjectMapper mockedMapper = Mockito.mock(ObjectMapper.class);
+ Mockito.when(mockedMapper.writeValueAsString(anyObject())).thenThrow(JsonProcessingException.class);
+ ValidateException validateException = new ValidateException.Builder("Test", 0 , null).build();
+ ApiExceptionMapper mockedException = Mockito.spy(new ApiExceptionMapper());
+ Mockito.doReturn(mockedMapper).when(mockedException).createObjectMapper();
+ Response resp = mockedException.toResponse((ApiException) validateException);
+
+ /// assertEquals(resp.getStatus(), HttpStatus.SC_BAD_REQUEST);
+ assertThat(resp.getEntity().toString(),startsWith("Exception in buildServiceErrorResponse writing exceptionType to string"));
+ }
+
+ @Test
+ public void testValidateResponse(){
+ ValidateException validateException = new ValidateException.Builder("Test Message", HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER).build();
+ Response resp = mapper.toResponse((ApiException) validateException);
+
+ assertEquals(resp.getStatus(), HttpStatus.SC_BAD_REQUEST);
+ }
+
+ @Test
+ public void testBPMNFailureResponse(){
+ BPMNFailureException bpmnException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND, ErrorNumbers.SVC_BAD_PARAMETER).build();
+ Response resp = mapper.toResponse((ApiException) bpmnException);
+
+ assertEquals(resp.getStatus(), HttpStatus.SC_NOT_FOUND);
+ }
+ @Test
+ public void testClientConnectionResponse(){
+ ClientConnectionException clientConnectionException = new ClientConnectionException.Builder("test", HttpStatus.SC_INTERNAL_SERVER_ERROR,ErrorNumbers.SVC_BAD_PARAMETER).build();
+ Response resp = mapper.toResponse((ApiException) clientConnectionException);
+
+ assertEquals(resp.getStatus(), HttpStatus.SC_INTERNAL_SERVER_ERROR);
+ }
+ @Test
+ public void testVFModuleResponse() {
+ VfModuleNotFoundException vfModuleException = new VfModuleNotFoundException.Builder("Test Message", HttpStatus.SC_CONFLICT,ErrorNumbers.SVC_BAD_PARAMETER).build();
+ Response resp = mapper.toResponse((ApiException) vfModuleException);
+
+ assertEquals(resp.getStatus(), HttpStatus.SC_CONFLICT);
+ }
+ @Test
+ public void testDuplicateRequestResponse() throws IOException {
+ DuplicateRequestException duplicateRequestException = new DuplicateRequestException.Builder("Test1", "Test2","Test3","Test4", HttpStatus.SC_BAD_GATEWAY,ErrorNumbers.SVC_BAD_PARAMETER).build();
+ Response resp = mapper.toResponse((ApiException) duplicateRequestException);
+
+ assertEquals(resp.getStatus(), HttpStatus.SC_BAD_GATEWAY);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionTest.java
new file mode 100644
index 0000000000..4e3a930955
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionTest.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import org.apache.http.HttpStatus;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.exceptions.*;
+import org.onap.so.apihandlerinfra.logging.AlarmLoggerInfo;
+import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoAlarmLogger;
+import org.onap.so.logger.MsoLogger;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.startsWith;
+
+
+public class ApiExceptionTest extends BaseTest {
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Test
+ public void testRecipeNotFoundException() throws ApiException {
+ thrown.expect(RecipeNotFoundException.class);
+ thrown.expectMessage("Message rewritten");
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_NOT_FOUND)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ RecipeNotFoundException testException = new RecipeNotFoundException.Builder("Test Message", HttpStatus.SC_NOT_FOUND,ErrorNumbers.SVC_BAD_PARAMETER).message("Message rewritten").build();
+ throw testException;
+ }
+
+
+ @Test
+ public void testBPMNFailureException() throws ApiException {
+ List<String> testVariables = new LinkedList<>();
+ testVariables.add("hello");
+ thrown.expect(BPMNFailureException.class);
+ thrown.expectMessage(startsWith("Request Failed due to BPEL error with HTTP Status ="));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_NOT_FOUND)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ thrown.expect(hasProperty("variables",sameBeanAs(testVariables)));
+ BPMNFailureException testException = new BPMNFailureException.Builder("Test Message", HttpStatus.SC_NOT_FOUND,ErrorNumbers.SVC_BAD_PARAMETER).variables(testVariables).build();
+ throw testException;
+ }
+
+
+ @Test
+ public void testClientConnectionException() throws ApiException {
+ IOException ioException = new IOException();
+ thrown.expect(ClientConnectionException.class);
+ thrown.expectMessage("Client from test failed to connect");
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_NOT_FOUND)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_NOT_FOUND)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ thrown.expect(hasProperty("cause", sameBeanAs(ioException)));
+ ClientConnectionException testException = new ClientConnectionException.Builder("test", HttpStatus.SC_NOT_FOUND,ErrorNumbers.SVC_BAD_PARAMETER).cause(ioException).build();
+ throw testException;
+ }
+
+
+ @Test
+ public void testDuplicateRequestException() throws ApiException {
+ ErrorLoggerInfo testLog = new ErrorLoggerInfo.Builder(MessageEnum.APIH_DB_ATTRIBUTE_NOT_FOUND, MsoLogger.ErrorCode.DataError).errorSource(Constants.MSO_PROP_APIHANDLER_INFRA).build();
+ thrown.expect(DuplicateRequestException.class);
+ thrown.expectMessage(startsWith("Error: Locked instance"));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_NOT_FOUND)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ thrown.expect(hasProperty("errorLoggerInfo", sameBeanAs(testLog)));
+ DuplicateRequestException testException = new DuplicateRequestException.Builder("Test1", "Test2","Test3","Test4", HttpStatus.SC_NOT_FOUND,ErrorNumbers.SVC_BAD_PARAMETER).errorInfo(testLog).build();
+ throw testException;
+ }
+
+
+ @Test
+ public void testValidateException() throws ApiException {
+ AlarmLoggerInfo testLog = new AlarmLoggerInfo.Builder("MsoConfigurationError", MsoAlarmLogger.CRITICAL,
+ Messages.errors.get(ErrorNumbers.NO_COMMUNICATION_TO_SDNC_ADAPTER)).build();
+ thrown.expect(ValidateException.class);
+ thrown.expectMessage("Test Message");
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_NOT_FOUND)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR)));
+ thrown.expect(hasProperty("alarmLoggerInfo", sameBeanAs(testLog)));
+ ValidateException testException = new ValidateException.Builder("Test Message", HttpStatus.SC_NOT_FOUND,ErrorNumbers.SVC_BAD_PARAMETER).messageID(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR).alarmInfo(testLog).build();
+ throw testException;
+ }
+
+
+ @Test
+ public void testVfModuleNotFoundException() throws ApiException {
+ thrown.expect(VfModuleNotFoundException.class);
+ thrown.expectMessage("Test Message");
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_CONFLICT)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ VfModuleNotFoundException testException = new VfModuleNotFoundException.Builder("Test Message", HttpStatus.SC_NOT_FOUND,ErrorNumbers.SVC_BAD_PARAMETER).httpResponseCode(HttpStatus.SC_CONFLICT).build();
+ throw testException;
+ }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java
new file mode 100644
index 0000000000..d0426bf69f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java
@@ -0,0 +1,90 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.transaction.Transactional;
+
+import org.junit.After;
+import org.junit.runner.RunWith;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.logger.MsoLogger.Catalog;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.embedded.LocalServerPort;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpHeaders;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.jdbc.Sql;
+import org.springframework.test.context.jdbc.Sql.ExecutionPhase;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.tomakehurst.wiremock.client.WireMock;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = ApiHandlerApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+@ContextConfiguration
+@Transactional
+@Sql(executionPhase=ExecutionPhase.AFTER_TEST_METHOD,scripts="classpath:InfraActiveRequestsReset.sql")
+@AutoConfigureWireMock(port = 0)
+public abstract class BaseTest {
+
+ protected MsoLogger logger = MsoLogger.getMsoLogger(Catalog.GENERAL, BaseTest.class);
+ protected TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
+
+ protected HttpHeaders headers = new HttpHeaders();
+
+ @Autowired
+ protected Environment env;
+
+ @Autowired
+ protected InfraActiveRequestsRepository iar;
+
+ @LocalServerPort
+ private int port;
+
+ protected String readJsonFileAsString(String fileLocation) throws JsonParseException, JsonMappingException, IOException{
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode jsonNode = mapper.readTree(new File(fileLocation));
+ return jsonNode.asText();
+ }
+
+ protected String createURLWithPort(String uri) {
+ return "http://localhost:" + port + uri;
+ }
+
+ @After
+ public void tearDown(){
+ iar.deleteAll();
+ WireMock.reset();
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeansTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java
index 43f3b59e4d..68c5c918ba 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeansTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BeanMultiTest.java
@@ -1,3 +1,4 @@
+package org.onap.so.apihandlerinfra;
/*-
* ============LICENSE_START=======================================================
* ONAP - SO
@@ -7,9 +8,9 @@
* 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.
@@ -17,56 +18,46 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
-package org.openecomp.mso.apihandlerinfra;
-
+import org.junit.Before;
import org.junit.Test;
+import com.openpojo.reflection.PojoClass;
+import com.openpojo.reflection.PojoClassFilter;
+import com.openpojo.reflection.filters.FilterEnum;
import com.openpojo.validation.Validator;
import com.openpojo.validation.ValidatorBuilder;
import com.openpojo.validation.rule.impl.GetterMustExistRule;
import com.openpojo.validation.rule.impl.SetterMustExistRule;
import com.openpojo.validation.test.impl.GetterTester;
import com.openpojo.validation.test.impl.SetterTester;
-import com.openpojo.reflection.PojoClass;
-import com.openpojo.reflection.PojoClassFilter;
-import com.openpojo.reflection.filters.FilterEnum;
-import com.openpojo.reflection.filters.FilterNonConcrete;
-import com.openpojo.reflection.filters.FilterPackageInfo;
-import org.openecomp.mso.openpojo.rules.HasToStringRule;
-import org.openecomp.mso.openpojo.rules.ToStringTester;
-
-public class BeansTest {
+public class BeanMultiTest {
+ Validator validator;
+ PojoClassFilter enumFilter;
private PojoClassFilter filterTestClasses = new FilterTestClasses();
-
- private PojoClassFilter enumFilter = new FilterEnum();
-
+ @Before
+ public void setup(){
+ enumFilter = new FilterEnum();
+ validator = ValidatorBuilder.create()
+ .with(new SetterMustExistRule(),
+ new GetterMustExistRule())
+ .with(new SetterTester(),
+ new GetterTester())
+ .build();
+ }
@Test
- public void pojoStructure() {
- test("org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans");
- test("org.openecomp.mso.apihandlerinfra.tasksbeans");
- test("org.openecomp.mso.apihandlerinfra.vnfbeans");
+ public void validateBeansMsoApihandlerBeans() {
+ test("org.onap.so.apihandlerinfra.e2eserviceinstancebeans");
+ test("org.onap.so.apihandlerinfra.tasksbeans");
+ test("org.onap.so.apihandlerinfra.vnfbeans");
+ test("org.onap.so.apihandlerinfra.tenantisolationbeans");
}
- private void test(String pojoPackage) {
- Validator validator = ValidatorBuilder.create()
- .with(new GetterMustExistRule())
- .with(new SetterMustExistRule())
-
- .with(new SetterTester())
- .with(new GetterTester())
-
- .with(new SetterTester())
- .with(new GetterTester())
- .with(new ToStringTester())
-
- .build();
-
-
- validator.validate(pojoPackage, new FilterPackageInfo(), filterTestClasses,enumFilter,new FilterNonConcrete());
+ private void test(String packageName) {
+ validator.validate(packageName, enumFilter, filterTestClasses);
+
}
private static class FilterTestClasses implements PojoClassFilter {
public boolean include(PojoClass pojoClass) {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
new file mode 100644
index 0000000000..2baa54fdec
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
@@ -0,0 +1,229 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.serviceinstancebeans.RequestError;
+import org.onap.so.serviceinstancebeans.ServiceException;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.tomakehurst.wiremock.http.Fault;
+
+public class E2EServiceInstancesTest extends BaseTest {
+private ObjectMapper mapper = new ObjectMapper();
+
+ private final String e2eServInstancesUri = "/e2eServiceInstances/";
+
+ public String inputStream(String JsonInput)throws IOException{
+ JsonInput = "src/test/resources/E2EServiceInstancesTest" + JsonInput;
+ String input = new String(Files.readAllBytes(Paths.get(JsonInput)));
+ return input;
+ }
+ public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod){
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type",MediaType.APPLICATION_JSON);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(uriPath));
+ HttpEntity<String> request = new HttpEntity<String>(requestJson, headers);
+ ResponseEntity<String> response = restTemplate.exchange(builder.toUriString(),
+ reqMethod, request, String.class);
+
+ return response;
+ }
+ //Currently returning a 500 response
+ @Ignore
+ @Test
+ public void createE2EServiceInstanceNoRequestInfo() throws JsonParseException, JsonMappingException, IOException{
+ String uri = e2eServInstancesUri + "v5";
+ ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void updateE2EServiceInstanceJSONMappingError() throws JsonParseException, JsonMappingException, IOException{
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e";
+ ResponseEntity<String> response = sendRequest(inputStream("/CompareModelRequest.json"), uri, HttpMethod.PUT);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("Mapping of request to JSON object failed"));
+ }
+ @Test
+ public void updateE2EServiceInstanceNoRequestorId() throws JsonParseException, JsonMappingException, IOException{
+ RequestError expectedResponse = new RequestError();
+ ServiceException exception = new ServiceException();
+ exception.setMessageId("SVC0002");
+ exception.setText("Error parsing request. Error parsing request: No valid requestorId is specified");
+ expectedResponse.setServiceException(exception);
+
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e";
+ ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.PUT);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ }
+ @Test
+ public void deleteE2EServiceInstanceNoRecipe() throws JsonParseException, JsonMappingException, IOException{
+ RequestError expectedResponse = new RequestError();
+ ServiceException exception = new ServiceException();
+ exception.setMessageId("SVC1000");
+ exception.setText("No communication to catalog DB null");
+ expectedResponse.setServiceException(exception);
+
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e";
+ ResponseEntity<String> response = sendRequest(inputStream("/DeleteRequest.json"), uri, HttpMethod.DELETE);
+
+ assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ }
+ @Test
+ public void deleteE2EServiceInstanceNotValid() throws JsonParseException, JsonMappingException, IOException{
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e";
+ ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.DELETE);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("Mapping of request to JSON object failed"));
+ }
+ @Test
+ public void getE2EServiceInstanceNullOperationalStatus() throws JsonParseException, JsonMappingException, IOException{
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/operations/9b9f02c0-298b-458a-bc9c-be3692e4f35e";
+ ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.GET);
+
+ assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void scaleE2EServiceInstanceMappingError() throws JsonParseException, JsonMappingException, IOException{
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/scale";
+ ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("Mapping of request to JSON object failed"));
+ }
+ @Test
+ public void scaleE2EServiceInstance() throws JsonParseException, JsonMappingException, IOException{
+ RequestError expectedResponse = new RequestError();
+ ServiceException exception = new ServiceException();
+ exception.setMessageId("SVC1000");
+ exception.setText("No communication to catalog DB null");
+ expectedResponse.setServiceException(exception);
+
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/scale";
+ ResponseEntity<String> response = sendRequest(inputStream("/ScaleRequest.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ }
+ @Test
+ public void compareModelWithTargetVersionBadRequest() throws JsonParseException, JsonMappingException, IOException{
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/modeldifferences";
+ ResponseEntity<String> response = sendRequest(inputStream("/Request.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("Mapping of request to JSON object failed"));
+ }
+ @Test
+ public void compareModelWithTargetVersion() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/CompareModelofE2EServiceInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/SuccessfulResponse.json").withStatus(org.apache.http.HttpStatus.SC_ACCEPTED)));
+
+ String expectedResponse = "success";
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/modeldifferences";
+ ResponseEntity<String> response = sendRequest(inputStream("/CompareModelRequest.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ String actualResponse = response.getBody();
+ assertEquals(expectedResponse, actualResponse);
+ }
+ @Test
+ public void compareModelWithTargetVersionEmptyResponse() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/CompareModelofE2EServiceInstance"))
+ .willReturn(aResponse().withFault(Fault.EMPTY_RESPONSE)));
+
+ RequestError expectedResponse = new RequestError();
+ ServiceException exception = new ServiceException();
+ exception.setMessageId("SVC1000");
+ exception.setText("Failed calling bpmn localhost:" + env.getProperty("wiremock.server.port") + " failed to respond");
+ expectedResponse.setServiceException(exception);
+
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/modeldifferences";
+ ResponseEntity<String> response = sendRequest(inputStream("/CompareModelRequest.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_GATEWAY.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ }
+ @Test
+ public void compareModelWithTargetVersionBadBpelResponse() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/CompareModelofE2EServiceInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY)));
+
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/modeldifferences";
+ ResponseEntity<String> response = sendRequest(inputStream("/CompareModelRequest.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("Request Failed due to BPEL error with HTTP Status"));
+ }
+ @Test
+ public void compareModelWithTargetVersionNoBPELResponse() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/CompareModelofE2EServiceInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBody("{}").withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY)));
+
+ String uri = e2eServInstancesUri + "v5/9b9f02c0-298b-458a-bc9c-be3692e4f35e/modeldifferences";
+ ResponseEntity<String> response = sendRequest(inputStream("/CompareModelRequest.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("Request Failed due to BPEL error with HTTP Status"));
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedCatalogDbConfig.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedCatalogDbConfig.java
new file mode 100644
index 0000000000..f504d88008
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedCatalogDbConfig.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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.so.apihandlerinfra;
+import ch.vorburger.exec.ManagedProcessException;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+
+@Configuration
+@Profile({"test"})
+@EnableTransactionManagement
+@EnableJpaRepositories(
+ entityManagerFactoryRef = "entityManagerFactory",
+ basePackages = {"org.onap.so.db.catalog.data.repository"}
+ )
+public class EmbeddedCatalogDbConfig {
+
+ @Bean
+ MariaDB4jSpringService mariaDB4jSpringService() {
+ return new MariaDB4jSpringService();
+ }
+
+ @Primary
+ @Bean(name = "dataSource")
+ DataSource dataSource(MariaDB4jSpringService mariaDB4jSpringService,
+ @Value("${mariaDB4j.databaseName}") String databaseName,
+ @Value("${spring.datasource.username}") String datasourceUsername,
+ @Value("${spring.datasource.password}") String datasourcePassword,
+ @Value("${spring.datasource.driver-class-name}") String datasourceDriver) throws ManagedProcessException {
+ //Create our database with default root user and no password
+ mariaDB4jSpringService.getDB().createDB(databaseName);
+
+ DBConfigurationBuilder config = mariaDB4jSpringService.getConfiguration();
+
+ return DataSourceBuilder
+ .create()
+ .username(datasourceUsername)
+ .password(datasourcePassword)
+ .url(config.getURL(databaseName))
+ .driverClassName(datasourceDriver)
+ .build();
+ }
+
+
+ @Primary
+ @Bean(name = "entityManagerFactory")
+ public LocalContainerEntityManagerFactoryBean
+ entityManagerFactory(
+ EntityManagerFactoryBuilder builder,
+ @Qualifier("dataSource") DataSource dataSource
+ ) {
+ return builder
+ .dataSource(dataSource)
+ .packages("org.onap.so.db.catalog.beans")
+ .persistenceUnit("catalogDB")
+ .build();
+ }
+
+ @Primary
+ @Bean(name = "transactionManager")
+ public PlatformTransactionManager transactionManager(
+ @Qualifier("entityManagerFactory") EntityManagerFactory
+ entityManagerFactory
+ ) {
+ return new JpaTransactionManager(entityManagerFactory);
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedRequestDbConfig.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedRequestDbConfig.java
new file mode 100644
index 0000000000..d150fd773a
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/EmbeddedRequestDbConfig.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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.so.apihandlerinfra;
+import ch.vorburger.exec.ManagedProcessException;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+
+@Configuration
+@Profile({"test"})
+@EnableTransactionManagement
+@EnableJpaRepositories(
+ entityManagerFactoryRef = "requestEntityManagerFactory",transactionManagerRef = "requestTransactionManager",
+ basePackages = { "org.onap.so.db.request.data.repository" }
+ )
+public class EmbeddedRequestDbConfig {
+
+ @Bean
+ MariaDB4jSpringService mariaDB4jSpringService() {
+ return new MariaDB4jSpringService();
+ }
+
+
+ @Bean(name = "requestDataSource")
+ @ConfigurationProperties(prefix = "request.datasource")
+ DataSource dataSource(MariaDB4jSpringService mariaDB4jSpringService,
+ @Value("${mariaDB4j.databaseName2}") String databaseName,
+ @Value("${spring.datasource.username}") String datasourceUsername,
+ @Value("${spring.datasource.password}") String datasourcePassword,
+ @Value("${spring.datasource.driver-class-name}") String datasourceDriver) throws ManagedProcessException {
+ //Create our database with default root user and no password
+ mariaDB4jSpringService.getDB().createDB(databaseName);
+
+ DBConfigurationBuilder config = mariaDB4jSpringService.getConfiguration();
+
+ return DataSourceBuilder
+ .create()
+ .username(datasourceUsername)
+ .password(datasourcePassword)
+ .url(config.getURL(databaseName))
+ .driverClassName(datasourceDriver)
+ .build();
+ }
+
+
+ @Bean(name = "requestEntityManagerFactory")
+ public LocalContainerEntityManagerFactoryBean
+ entityManagerFactory(
+ EntityManagerFactoryBuilder builder,
+ @Qualifier("requestDataSource") DataSource dataSource
+ ) {
+ return builder
+ .dataSource(dataSource)
+ .packages("org.onap.so.db.request.beans")
+ .persistenceUnit("requestDB")
+ .build();
+ }
+
+
+ @Bean(name = "requestTransactionManager")
+ public PlatformTransactionManager transactionManager(
+ @Qualifier("requestEntityManagerFactory") EntityManagerFactory
+ entityManagerFactory
+ ) {
+ return new JpaTransactionManager(entityManagerFactory);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java
new file mode 100644
index 0000000000..e16f265a2e
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.json.JSONException;
+import org.junit.Test;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+
+
+public class HealthCheckHandlerTest extends BaseTest{
+
+ @Test
+ public void testHealthcheckGet() throws JSONException {
+
+ HttpEntity<String> entity = new HttpEntity<String>(null, headers);
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ createURLWithPort("/manage/health"),
+ HttpMethod.GET, entity, String.class);
+
+ assertEquals(Response.Status.OK.getStatusCode(),response.getStatusCode().value());
+ assertThat(response.getBody(), containsString("UP"));
+
+ }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java
new file mode 100644
index 0000000000..c9d83efced
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java
@@ -0,0 +1,118 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+import org.apache.log4j.MDC;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.tasksbeans.RequestDetails;
+import org.onap.so.apihandlerinfra.tasksbeans.RequestInfo;
+import org.onap.so.apihandlerinfra.tasksbeans.TaskRequestReference;
+import org.onap.so.apihandlerinfra.tasksbeans.TasksRequest;
+import org.onap.so.apihandlerinfra.tasksbeans.ValidResponses;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import ch.qos.logback.classic.spi.ILoggingEvent;
+
+
+public class ManualTasksTest extends BaseTest{
+
+ private final String basePath = "/tasks/v1/";
+
+
+
+ @Test
+ public void testCreateOpEnvObjectMapperError() throws IOException {
+ TestAppender.events.clear();
+ stubFor(post(urlPathEqualTo("/sobpmnengine/task/55/complete"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_OK)));
+
+ String taskId = "55";
+ TasksRequest taskReq = new TasksRequest();
+ RequestDetails reqDetail = new RequestDetails();
+ RequestInfo reqInfo = new RequestInfo();
+ reqInfo.setRequestorId("testId");
+ reqInfo.setSource("testSource");
+ reqInfo.setResponseValue(ValidResponses.skip);
+ reqDetail.setRequestInfo(reqInfo);
+ taskReq.setRequestDetails(reqDetail);
+
+ //expected response
+ TaskRequestReference expectedResponse = new TaskRequestReference();
+ expectedResponse.setTaskId(taskId);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ headers.set(MsoLogger.ECOMP_REQUEST_ID, "987654321");
+ headers.set(MsoLogger.CLIENT_ID, "VID");
+ HttpEntity<TasksRequest> entity = new HttpEntity<TasksRequest>(taskReq, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(basePath) + taskId + "/complete");
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ TaskRequestReference realResponse = mapper.readValue(response.getBody(), TaskRequestReference.class);
+
+
+ //then
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ ILoggingEvent logEvent = TestAppender.events.get(0);
+ Map<String,String> mdc = logEvent.getMDCPropertyMap();
+ assertEquals("987654321", mdc.get(MsoLogger.REQUEST_ID));
+ assertEquals("VID", mdc.get(MsoLogger.CLIENT_ID));
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("987654321", response.getHeaders().get("X-TransactionID").get(0));
+ MDC.remove(MsoLogger.CLIENT_ID);
+
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
new file mode 100644
index 0000000000..7feea9a456
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
@@ -0,0 +1,467 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.http.HttpStatus;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.exceptions.ValidationException;
+import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
+import org.springframework.test.context.junit4.rules.SpringClassRule;
+import org.springframework.test.context.junit4.rules.SpringMethodRule;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+
+@RunWith(JUnitParamsRunner.class)
+public class MsoRequestTest extends BaseTest {
+ private ObjectMapper mapper = new ObjectMapper();
+ private HashMap<String, String> instanceIdMapTest = new HashMap<String, String>();
+ private ServiceInstancesRequest sir;
+ private MsoRequest msoRequest;
+ private Action action;
+ private String version;
+ private int reqVersion;
+ private String originalRequestJSON;
+ private String requestJSON;
+ private boolean expected;
+ private String expectedException;
+
+ @ClassRule
+ public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule();
+
+ @Rule
+ public final SpringMethodRule springMethodRule = new SpringMethodRule();
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ public String inputStream(String JsonInput)throws IOException{
+ JsonInput = "src/test/resources/MsoRequestTest" + JsonInput;
+ String input = new String(Files.readAllBytes(Paths.get(JsonInput)));
+ return input;
+ }
+ //Tests for successful validation of incoming JSON requests through the parse method
+ @Test
+ @Parameters(method = "successParameters")
+ public void successTest(ServiceInstancesRequest sir, HashMap<String, String> instanceIdMapTest, Action action, int reqVersion) throws ValidationException, IOException{
+ this.sir = sir;
+ this.instanceIdMapTest = instanceIdMapTest;
+ this.action = action;
+ this.reqVersion = reqVersion;
+ this.version = "v" + reqVersion;
+ this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.instanceIdMapTest.put("vnfInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.instanceIdMapTest.put("vfModuleInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.instanceIdMapTest.put("volumeGroupInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.instanceIdMapTest.put("networkInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.instanceIdMapTest.put("configurationInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Parameters
+ private Collection<Object[]> successParameters() throws JsonParseException, JsonMappingException, IOException{
+ return Arrays.asList(new Object[][]{
+ {mapper.readValue(inputStream("/CloudConfiguration/EmptyCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "3"},
+ {mapper.readValue(inputStream("/ProjectAndOwningEntity/EmptyOwningEntityName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "5"},
+ {mapper.readValue(inputStream("/PlatformAndLineOfBusiness/OptionalLineOfBusiness.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "6"},
+ {mapper.readValue(inputStream("/ProjectAndOwningEntity/OptionalProject.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "6"},
+ {mapper.readValue(inputStream("/PlatformAndLineOfBusiness/PlatformTest.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "5"},
+ {mapper.readValue(inputStream("/RequestInfo/EmptyRequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "3"},
+ {mapper.readValue(inputStream("/RequestInfo/ServiceProductFamilyIdFlag.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "5"},
+ {mapper.readValue(inputStream("/RequestInfo/ServiceProductFamilyIdUpdate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "5"},
+ {mapper.readValue(inputStream("/ModelInfo/ModelCustomizationIdUsingPreload.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "5"},
+ {mapper.readValue(inputStream("/ModelInfo/ModelInvariantIdConfigurationDelete.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "3"},
+ {mapper.readValue(inputStream("/ModelInfo/ModelInvariantIdService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "4"},
+ {mapper.readValue(inputStream("/ModelInfo/ModelVersionNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "3"},
+ {mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationIdEmpty.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "5"},
+ {mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationNameNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "5"},
+ {mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationTest.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "5"},
+ {mapper.readValue(inputStream("/ModelInfo/ServiceModelNameEmptyOnActivate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "2"},
+ {mapper.readValue(inputStream("/ModelInfo/ServiceModelNameEmptyOnDelete.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "2"},
+ {mapper.readValue(inputStream("/ModelInfo/ValidModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "4"},
+ {mapper.readValue(inputStream("/ModelInfo/ValidModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "5"},
+ {mapper.readValue(inputStream("/ModelInfo/ValidModelCustomizationIdService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "5"},
+ {mapper.readValue(inputStream("/RelatedInstances/RelatedInstances.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "5"},
+ {mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "5"},
+ {mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesVfModule.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/ServiceInPlaceSoftwareUpdate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "6"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/ServiceInPlaceSoftwareUpdate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, "6"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v5EnableService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/VnfActivate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "6"},
+ {mapper.readValue(inputStream("/RequestParameters/VnfRequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "6"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v3DeleteNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "3"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v3UpdateNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "3"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v5CreateConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v6CreateConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "6"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v5EnableConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v5EnableConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v5ActivateConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "5"},
+ {mapper.readValue(inputStream("/RelatedInstances/v5ActivateNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v5DeactivateConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "5"},
+ {mapper.readValue(inputStream("/RelatedInstances/v5DeactivateNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/v6AddRelationships.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, "6"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/UserParams.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, "5"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/ServiceAssign.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, "7"},
+ {mapper.readValue(inputStream("/SuccessfulValidation/ServiceUnassign.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.unassignInstance, "7"}
+ });
+ }
+ @Test
+ @Parameters(method = "aLaCarteParameters")
+ public void aLaCarteFlagTest(boolean expected, ServiceInstancesRequest sir) throws JsonParseException, IOException, ValidationException{
+ this.expected = expected;
+ this.sir = sir;
+ this.msoRequest = new MsoRequest();
+ assertEquals(expected, msoRequest.getAlacarteFlag(sir));
+ }
+ @Parameters
+ private Collection<Object[]> aLaCarteParameters() throws IOException{
+ return Arrays.asList(new Object[][] {
+ {false, mapper.readValue(inputStream("/RequestParameters/RequestParametersNull.json"), ServiceInstancesRequest.class)},
+ {true, mapper.readValue(inputStream("/RequestParameters/RequestParametersALaCarteTrue.json"), ServiceInstancesRequest.class)}
+ });
+ }
+ //Tests various scenarios ensuring that requests containing missing or invalid information will throw a ValidationException
+ @Test
+ @Parameters(method = "validationParameters")
+ public void validationFailureTest(String expectedException, ServiceInstancesRequest sir, HashMap<String,String> instanceIdMapTest, Action action, int reqVersion) throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.expectedException = expectedException;
+ this.sir = sir;
+ this.instanceIdMapTest = instanceIdMapTest;
+ this.action = action;
+ this.reqVersion = reqVersion;
+ this.version = "v" + reqVersion;
+ this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ this.instanceIdMapTest.put("vnfInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage(expectedException);
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Parameters
+ private Collection<Object[]> validationParameters() throws IOException{
+ return Arrays.asList(new Object[][] {
+ //ValidationException for CloudConfiguration
+ {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/CloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 4},
+ {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/CloudConfigurationNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/CloudConfigurationVnf.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 5},
+ {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/CloudConfigurationConfig.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, 5},
+ {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/InPlaceSoftwareUpdateCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6},
+ {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateAndCloudDelete, 7},
+ {"No valid lcpCloudRegionId is specified", mapper.readValue(inputStream("/CloudConfiguration/EmptyLcpCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid lcpCloudRegionId is specified", mapper.readValue(inputStream("/CloudConfiguration/InPlaceSoftwareUpdateCloudRegionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6},
+ {"No valid tenantId is specified", mapper.readValue(inputStream("/CloudConfiguration/EmptyTenantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid tenantId is specified", mapper.readValue(inputStream("/CloudConfiguration/InPlaceSoftwareUpdateTenantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6},
+ //ValidationException for ModelInfo
+ {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/ModelInfo/ModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 5},
+ {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/ModelInfo/v5CreateConfigurationModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/ModelInfo/v4CreateVfModuleMissingModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 4},
+ {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationIdPreload.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 5},
+ {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/ModelCustomizationName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/ModelCustomization.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 6},
+ {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/ModelCustomization.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 6},
+ {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelInfo/VnfModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, 5},
+ {"No valid model-info is specified", mapper.readValue(inputStream("/ModelInfo/ModelInfoNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelInvariantId format is specified", mapper.readValue(inputStream("/ModelInfo/InvalidModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 2},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/ModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, 4},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/v5ModelInvariantIdNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, 5},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/v5ModelInvariantIdDisablePort.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, 5},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/ModelInvariantIdVnf.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 3},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/ModelInvariantIdConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 3},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/v5DeactivateModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, 5},
+ {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInfo/v3UpdateNetworkBad.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 4},
+ {"No valid modelName is specified", mapper.readValue(inputStream("/ModelInfo/VfModuleModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, 4},
+ {"No valid modelType is specified", mapper.readValue(inputStream("/ModelInfo/ModelTypeNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 3},
+ {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionVfModule.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 3},
+ {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionServiceCreate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 3},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ConfigurationModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 4},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, 4},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 5},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, 5},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, 5},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/ModelVersionIdCreate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelInfo/v5ActivateModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ //ValidationException for Platform and LineOfBusiness
+ {"No valid lineOfBusinessName is specified", mapper.readValue(inputStream("/PlatformAndLineOfBusiness/EmptyLineOfBusiness.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid platform is specified", mapper.readValue(inputStream("/PlatformAndLineOfBusiness/Platform.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 6},
+ {"No valid platformName is specified", mapper.readValue(inputStream("/PlatformAndLineOfBusiness/EmptyPlatformName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ //ValidationException for Project and OwningEntity
+ {"No valid owningEntity is specified", mapper.readValue(inputStream("/ProjectAndOwningEntity/OwningEntity.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 6},
+ {"No valid owningEntityId is specified", mapper.readValue(inputStream("/ProjectAndOwningEntity/EmptyOwningEntityId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid projectName is specified", mapper.readValue(inputStream("/ProjectAndOwningEntity/EmptyProjectName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid owningEntity is specified", mapper.readValue(inputStream("/ProjectAndOwningEntity/ServiceAssignNoOE.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ //ValidationException for RelatedInstances
+ {"No valid connectionPoint relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/RelatedInstances/v5EnablePortNoConnectionPoint.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, 5},
+ {"No valid connectionPoint relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/RelatedInstances/v5EnablePortNoConnectionPoint.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, 5},
+ {"No valid destination vnf relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/RelatedInstances/v5CreateNoDestinationRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid instanceId format in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesIdFormat.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid instanceId in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid instanceName format in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesNameFormat.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid instanceName in relatedInstance for pnf modelType is specified", mapper.readValue(inputStream("/RelatedInstances/v6AddRelationshipsInstanceName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.removeRelationships, 6},
+ {"No valid instanceName in relatedInstance for pnf modelType is specified", mapper.readValue(inputStream("/RelatedInstances/v6AddRelationshipsInstanceName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, 6},
+ {"No valid modelCustomizationName or modelCustomizationId in relatedInstance of vnf is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid modelInfo in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelInvariantId format in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelInvariantIdFormat.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelInvariantId in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelName in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelType in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelType.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelVersion in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelVersion.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid modelVersionId in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid related instances is specified", mapper.readValue(inputStream("/RelatedInstances/ServiceNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, 2},
+ {"No valid related instances is specified", mapper.readValue(inputStream("/RelatedInstances/ServiceNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.removeRelationships, 2},
+ {"No valid related instances is specified", mapper.readValue(inputStream("/RelatedInstances/v5EnablePortNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, 2},
+ {"No valid related instances is specified", mapper.readValue(inputStream("/RelatedInstances/v5EnablePortNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, 5},
+ {"No valid related instances is specified", mapper.readValue(inputStream("/RelatedInstances/v5CreateNoRelatedInstances.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid related instances is specified", mapper.readValue(inputStream("/RelatedInstances/v4RelatedInstancesNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 4},
+ {"No valid related service instance for vfModule request is specified", mapper.readValue(inputStream("/RelatedInstances/VfModuleRelatedInstancesService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid related service instance for vnf request is specified", mapper.readValue(inputStream("/RelatedInstances/VnfRelatedInstancesService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid related service instance for volumeGroup request is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesServiceInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid related vnf instance for vfModule request is specified", mapper.readValue(inputStream("/RelatedInstances/VfModuleRelatedInstancesVnf.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid related vnf instance for volumeGroup request is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesVnfInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid serviceInstanceId matching the serviceInstanceId in request URI is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesInstanceId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid serviceInstanceId matching the serviceInstanceId in request URI is specified", mapper.readValue(inputStream("/RelatedInstances/v6VnfDeleteInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, 6},
+ {"No valid source vnf relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/RelatedInstances/v5CreateNoSourceRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid vnfInstanceId matching the vnfInstanceId in request URI is specified", mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesVnfInstanceId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, 5},
+ {"No valid instanceName format is specified", mapper.readValue(inputStream("/RelatedInstances/InvalidInstanceName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 2},
+ //ValidationException for RequestInfo
+ {"No valid requestInfo is specified", mapper.readValue(inputStream("/RequestInfo/RequestInfoNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid requestInfo is specified", mapper.readValue(inputStream("/RequestInfo/RequestInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, 6},
+ {"No valid requestInfo is specified", mapper.readValue(inputStream("/RequestInfo/RequestInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6},
+ {"No valid productFamilyId is specified", mapper.readValue(inputStream("/RequestInfo/VnfProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 3},
+ {"No valid productFamilyId is specified", mapper.readValue(inputStream("/RequestInfo/NetworkProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 3},
+ {"No valid productFamilyId is specified", mapper.readValue(inputStream("/RequestInfo/NetworkProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, 3},
+ {"No valid productFamilyId is specified", mapper.readValue(inputStream("/RequestInfo/ServiceProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid requestorId is specified", mapper.readValue(inputStream("/RequestInfo/EmptyRequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid requestorId is specified", mapper.readValue(inputStream("/RequestInfo/RequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, 6},
+ {"No valid requestorId is specified", mapper.readValue(inputStream("/RequestInfo/RequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6},
+ //ValidationException for RequestParameters
+ {"No valid aLaCarte in requestParameters", mapper.readValue(inputStream("/RequestParameters/RequestParametersNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, 4},
+ {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParameters/RequestParametersNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParameters/RequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, 6},
+ {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParameters/RequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, 6},
+ {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParameters/AssignEmptyReqParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ //ValidationException for SubscriberInfo
+ {"No valid globalSubscriberId is specified", mapper.readValue(inputStream("/SubscriberInfo/EmptyGlobalSubscriberId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid subscriberInfo is specified", mapper.readValue(inputStream("/SubscriberInfo/EmptySubscriberInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid subscriptionServiceType is specified", mapper.readValue(inputStream("/SubscriberInfo/EmptySubscriptionServiceType.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, 5},
+ {"No valid subscriberInfo is specified", mapper.readValue(inputStream("/SubscriberInfo/AssignEmptySubscriberInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ //Validation for UserParams
+ {"No valid cloudConfiguration in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/AssignCloudConfigVnf.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid cloudConfiguration in userParams network resources is specified", mapper.readValue(inputStream("/RequestParameters/NetworkCloudConfig.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid model-info in userParams is specified", mapper.readValue(inputStream("/RequestParameters/UserParamsModelInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid model-info in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/UserParamsVnfModelInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelVersionId in userParams is specified", mapper.readValue(inputStream("/RequestParameters/UserParamsModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelVersionId in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/VnfModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelVersionId in userParams vfModule resources is specified", mapper.readValue(inputStream("/RequestParameters/VfModuleModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelVersionId in userParams network resources is specified", mapper.readValue(inputStream("/RequestParameters/NetworkModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid platform in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/UserParamsPlatform.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid platformName in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/UserParamsPlatformName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid productFamilyId in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/ProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid vfModules in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/VfModules.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid model-info in userParams vfModules resources is specified", mapper.readValue(inputStream("/RequestParameters/VfModulesModelInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid model-info in userParams network resources is specified", mapper.readValue(inputStream("/RequestParameters/Network.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelCustomizationId in userParams vfModule resources is specified", mapper.readValue(inputStream("/RequestParameters/VfModuleModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelCustomizationId in userParams vnf resources is specified", mapper.readValue(inputStream("/RequestParameters/VnfModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7},
+ {"No valid modelCustomizationId in userParams network resources is specified", mapper.readValue(inputStream("/RequestParameters/NetworkModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, 7}
+ });
+ }
+ @Test
+ public void nullInstanceIdMapTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/RequestParameters/RequestParametersNull.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest = null;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(NullPointerException.class);
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+
+ @Test
+ public void serviceInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("serviceInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid serviceInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void vnfInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("vnfInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid vnfInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void vfModuleInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("vfModuleInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid vfModuleInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void volumeGroupInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("volumeGroupInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid volumeGroupInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void networkInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("networkInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid networkInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void configurationInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("configurationInstanceId", "test");
+ this.action = Action.createInstance;
+ thrown.expect(ValidationException.class);
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expectMessage("No valid configurationInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void testVfModuleV4UsePreLoad() throws JsonParseException, JsonMappingException, IOException, ValidationException {
+ this.requestJSON = inputStream("/SuccessfulValidation/v4CreateVfModule.json");
+ this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
+ this.instanceIdMapTest.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
+ this.reqVersion = 4;
+ this.version = "v" + reqVersion;
+ this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
+ this.msoRequest = new MsoRequest ();
+ msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, version, originalRequestJSON, reqVersion, false);
+
+ this.requestJSON = inputStream("/ModelInfo/v4CreateVfModuleNoCustomizationId.json");
+ this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
+ this.instanceIdMapTest.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
+ this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
+ msoRequest = new MsoRequest ();
+ msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, version, originalRequestJSON, reqVersion, false);
+ }
+ @Test
+ public void buildServiceErrorResponseTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("serviceInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid serviceInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST,
+ MsoException.ServiceException, "Mapping of request to JSON object failed. ",
+ ErrorNumbers.SVC_BAD_PARAMETER, null, version);
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ }
+ @Test
+ public void buildServiceErrorPolicyExceptionResponseTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
+ this.sir = mapper.readValue(inputStream("/SuccessfulValidation/InstanceIdHashMap.json"), ServiceInstancesRequest.class);
+ this.instanceIdMapTest.put("serviceInstanceId", "test");
+ this.action = Action.createInstance;
+ this.reqVersion = 5;
+ this.version = "v" + reqVersion;
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid serviceInstanceId is specified");
+ this.msoRequest = new MsoRequest();
+
+
+ this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON, reqVersion, false);
+ Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST,
+ MsoException.PolicyException, "Mapping of request to JSON object failed. ",
+ ErrorNumbers.SVC_BAD_PARAMETER, null, version);
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ }
+
+ @Test
+ public void domToStrTest() throws Exception {
+ String xmlStr = "<dummy><service-instance-id>1234</service-instance-id></dummy>";
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document document = builder.parse(new InputSource(new StringReader(xmlStr)));
+ String result = MsoRequest.domToStr(document);
+ assertNotNull(result);
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
new file mode 100644
index 0000000000..c1ee40f911
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
@@ -0,0 +1,389 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import static com.shazam.shazamcrest.MatcherAssert.assertThat;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+import org.junit.Test;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.onap.so.exceptions.ValidationException;
+import org.onap.so.serviceinstancebeans.GetOrchestrationListResponse;
+import org.onap.so.serviceinstancebeans.GetOrchestrationResponse;
+import org.onap.so.serviceinstancebeans.Request;
+import org.onap.so.serviceinstancebeans.RequestError;
+import org.onap.so.serviceinstancebeans.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+@Transactional
+public class OrchestrationRequestsTest extends BaseTest {
+
+ @Autowired
+ private InfraActiveRequestsRepository iar;
+
+ private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title></title></head><body></body></html>";
+ public static final Response RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
+ private static final GetOrchestrationListResponse ORCHESTRATION_LIST = generateOrchestrationList();
+ private static final String INVALID_REQUEST_ID = "invalid-request-id";
+
+ private static GetOrchestrationListResponse generateOrchestrationList() {
+ GetOrchestrationListResponse list = null;
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ list = mapper.readValue(new File("src/test/resources/OrchestrationRequest/OrchestrationList.json"),
+ GetOrchestrationListResponse.class);
+ } catch (JsonParseException jpe) {
+ jpe.printStackTrace();
+ } catch (JsonMappingException jme) {
+ jme.printStackTrace();
+ } catch (IOException ioe) {
+ ioe.printStackTrace();
+ }
+ return list;
+ }
+
+ @Test
+ public void testGetOrchestrationRequest() {
+
+ // TEST VALID REQUEST
+ GetOrchestrationResponse testResponse = new GetOrchestrationResponse();
+
+ Request request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest();
+ testResponse.setRequest(request);
+ String testRequestId = request.getRequestId();
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/" + testRequestId));
+
+ ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
+ entity, GetOrchestrationResponse.class);
+
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
+ assertThat(response.getBody(),
+ sameBeanAs(testResponse).ignoring("request.startTime").ignoring("request.requestStatus.finishTime"));
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("00032ab7-na18-42e5-965d-8ea592502018", response.getHeaders().get("X-TransactionID").get(0));
+ }
+
+ @Test
+ public void testGetOrchestrationRequestRequestDetails() {
+ //Test request with modelInfo request body
+ GetOrchestrationResponse testResponse = new GetOrchestrationResponse();
+
+ Request request = ORCHESTRATION_LIST.getRequestList().get(0).getRequest();
+ testResponse.setRequest(request);
+ String testRequestId = request.getRequestId();
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/" + testRequestId));
+
+ ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
+ entity, GetOrchestrationResponse.class);
+
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
+ assertThat(response.getBody(),
+ sameBeanAs(testResponse).ignoring("request.startTime").ignoring("request.requestStatus.finishTime"));
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("00032ab7-3fb3-42e5-965d-8ea592502017", response.getHeaders().get("X-TransactionID").get(0));
+ }
+
+ @Test
+ public void testGetOrchestrationRequestNoRequestID() {
+
+ HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v6/"));
+
+ ResponseEntity<GetOrchestrationListResponse> response = restTemplate.exchange(builder.toUriString(),
+ HttpMethod.GET, entity, GetOrchestrationListResponse.class);
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ }
+
+ @Test
+ public void testGetOrchestrationRequestFilter() {
+ List<String> values = new ArrayList<>();
+ values.add("EQUALS");
+ values.add("vfModule");
+
+ Map<String, List<String>> orchestrationMap = new HashMap<>();
+ orchestrationMap.put("modelType", values);
+
+ List<InfraActiveRequests> requests = iar.getOrchestrationFiltersFromInfraActive(orchestrationMap);
+ HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v6?filter=modelType:EQUALS:vfModule"));
+
+ ResponseEntity<GetOrchestrationListResponse> response = restTemplate.exchange(builder.toUriString(),
+ HttpMethod.GET, entity, GetOrchestrationListResponse.class);
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
+ assertEquals(requests.size(), response.getBody().getRequestList().size());
+ }
+
+ @Test
+ public void testUnlockOrchestrationRequest()
+ throws JsonParseException, JsonMappingException, IOException, ValidationException {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder;
+ ResponseEntity<String> response;
+ RequestError expectedRequestError;
+ RequestError actualRequestError;
+ ServiceException se;
+
+ // Test invalid JSON
+ expectedRequestError = new RequestError();
+ se = new ServiceException();
+ se.setMessageId(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ se.setText("Orchestration RequestId 0017f68c-eb2d-45bb-b7c7-ec31b37dc349 has a status of UNLOCKED and can not be unlocked");
+ expectedRequestError.setServiceException(se);
+
+ builder = UriComponentsBuilder.fromHttpUrl(
+ createURLWithPort("/onap/so/infra/orchestrationRequests/v6/0017f68c-eb2d-45bb-b7c7-ec31b37dc349/unlock"));
+
+ response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
+ actualRequestError = mapper.readValue(response.getBody(), RequestError.class);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ assertThat(actualRequestError, sameBeanAs(expectedRequestError));
+ }
+
+ @Test
+ public void testUnlockOrchestrationRequest_invalid_Json()
+ throws JsonParseException, JsonMappingException, IOException, ValidationException {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder;
+ ResponseEntity<String> response;
+ RequestError expectedRequestError;
+ RequestError actualRequestError;
+ ServiceException se;
+
+ // Test invalid requestId
+ expectedRequestError = new RequestError();
+ se = new ServiceException();
+ se.setMessageId(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ se.setText("Null response from RequestDB when searching by RequestId");
+ expectedRequestError.setServiceException(se);
+
+ builder = UriComponentsBuilder.fromHttpUrl(
+ createURLWithPort("/onap/so/infra/orchestrationRequests/v6/" + INVALID_REQUEST_ID + "/unlock"));
+
+ response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
+ actualRequestError = mapper.readValue(response.getBody(), RequestError.class);
+
+ assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
+ assertThat(actualRequestError, sameBeanAs(expectedRequestError));
+ }
+
+ @Test
+ public void testUnlockOrchestrationRequest_Valid_Status()
+ throws JsonParseException, JsonMappingException, IOException, ValidationException {
+
+ ObjectMapper mapper = new ObjectMapper();
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder;
+ ResponseEntity<String> response;
+ Request request;
+
+ // Test valid status
+ request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest();
+ builder = UriComponentsBuilder.fromHttpUrl(
+ createURLWithPort("/onap/so/infra/orchestrationRequests/v7/" + "5ffbabd6-b793-4377-a1ab-082670fbc7ac" + "/unlock"));
+
+ response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
+
+ String status = iar.findOneByRequestId("5ffbabd6-b793-4377-a1ab-082670fbc7ac").getRequestStatus();
+
+ assertEquals("UNLOCKED", status);
+ assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatusCode().value());
+ assertEquals(response.getBody(), null);
+ }
+
+ @Test
+ public void testUnlockOrchestrationRequest_invalid_Status()
+ throws JsonParseException, JsonMappingException, IOException, ValidationException {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/Request.json")));
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder;
+ ResponseEntity<String> response;
+ Request request;
+ RequestError expectedRequestError;
+ RequestError actualRequestError;
+ ServiceException se;
+ // Update UNLOCKED Request
+ request = ORCHESTRATION_LIST.getRequestList().get(1).getRequest();
+ request.getRequestStatus().setRequestState(Status.UNLOCKED.toString());
+ request.getRequestStatus().setStatusMessage(null);
+ request.getRequestStatus().setPercentProgress(null);
+ request.setRequestDetails(null);
+ request.setRequestScope(null);
+ request.setRequestType(null);
+
+ // Test invalid status
+ request = ORCHESTRATION_LIST.getRequestList().get(0).getRequest();
+ expectedRequestError = new RequestError();
+ se = new ServiceException();
+ se.setMessageId(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ se.setText("Orchestration RequestId " + request.getRequestId() + " has a status of "
+ + request.getRequestStatus().getRequestState() + " and can not be unlocked");
+ expectedRequestError.setServiceException(se);
+
+ builder = UriComponentsBuilder.fromHttpUrl(
+ createURLWithPort("/onap/so/infra/orchestrationRequests/v6/" + request.getRequestId() + "/unlock"));
+
+ response = restTemplate.exchange(builder.toUriString(), HttpMethod.POST, entity, String.class);
+ actualRequestError = mapper.readValue(response.getBody(), RequestError.class);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ assertThat(actualRequestError, sameBeanAs(expectedRequestError));
+ }
+
+ @Test
+ public void testGetOrchestrationRequestRequestDetailsWhiteSpace() {
+ InfraActiveRequests requests = new InfraActiveRequests();
+ requests.setAction("create");
+ requests.setRequestBody(" ");
+ requests.setRequestId("requestId");
+ requests.setRequestScope("service");
+ requests.setRequestType("createInstance");
+ iar.save(requests);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/requestId"));
+
+ ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
+ entity, GetOrchestrationResponse.class);
+
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("requestId", response.getHeaders().get("X-TransactionID").get(0));
+ }
+
+ @Test
+ public void testGetOrchestrationRequestRequestDetailsAlaCarte() throws IOException {
+ InfraActiveRequests requests = new InfraActiveRequests();
+
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/OrchestrationRequest/AlaCarteRequest.json")));
+
+ requests.setAction("create");
+ requests.setRequestBody(requestJSON);
+ requests.setRequestId("requestId");
+ requests.setRequestScope("service");
+ requests.setRequestType("createInstance");
+ iar.save(requests);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<Request> entity = new HttpEntity<Request>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder
+ .fromHttpUrl(createURLWithPort("/onap/so/infra/orchestrationRequests/v7/requestId"));
+
+ ResponseEntity<GetOrchestrationResponse> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,
+ entity, GetOrchestrationResponse.class);
+
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("7.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("requestId", response.getHeaders().get("X-TransactionID").get(0));
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RequestActionMapTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java
index debaa9b3cd..57513088b4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RequestActionMapTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/RequestActionMapTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -17,7 +17,7 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra;
+package org.onap.so.apihandlerinfra;
import org.junit.Test;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstanceBeansTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstanceBeansTest.java
new file mode 100644
index 0000000000..33d9d413d6
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstanceBeansTest.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.openpojo.reflection.PojoClass;
+import com.openpojo.reflection.filters.FilterEnum;
+import com.openpojo.reflection.impl.PojoClassFactory;
+import com.openpojo.validation.Validator;
+import com.openpojo.validation.ValidatorBuilder;
+import com.openpojo.validation.rule.impl.*;
+import com.openpojo.validation.test.impl.*;
+
+
+public class ServiceInstanceBeansTest extends BaseTest{
+ List<PojoClass> pojoClasses;
+ @Before
+ public void setup() {
+ pojoClasses = PojoClassFactory.getPojoClassesRecursively("org.onap.so.serviceinstancebeans", new FilterEnum());
+ }
+ @Test
+ public void validateGettersAndSetters() {
+ Validator validator = ValidatorBuilder.create().with(new SetterMustExistRule(), new GetterMustExistRule())
+ .with(new SetterTester(), new GetterTester()).build();
+ validator.validate(pojoClasses);
+ }
+}
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
new file mode 100644
index 0000000000..1ab66561b0
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
@@ -0,0 +1,1407 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.log4j.MDC;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.onap.so.logger.MsoLogger;
+import org.onap.so.serviceinstancebeans.CloudConfiguration;
+import org.onap.so.serviceinstancebeans.ModelInfo;
+import org.onap.so.serviceinstancebeans.RequestError;
+import org.onap.so.serviceinstancebeans.RequestParameters;
+import org.onap.so.serviceinstancebeans.RequestReferences;
+import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
+import org.onap.so.serviceinstancebeans.ServiceInstancesResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.tomakehurst.wiremock.http.Fault;
+
+import ch.qos.logback.classic.spi.ILoggingEvent;
+
+
+public class ServiceInstancesTest extends BaseTest{
+
+ @Autowired
+ private InfraActiveRequestsRepository iar;
+
+ @Autowired
+ private ServiceInstances servInstances;
+
+ private final String servInstanceuri = "/onap/so/infra/serviceInstantiation/";
+ private final String servInstanceUriPrev7 = "/onap/so/infra/serviceInstances/";
+ private String uri;
+
+ public String inputStream(String JsonInput)throws IOException{
+ JsonInput = "src/test/resources/ServiceInstanceTest" + JsonInput;
+ String input = new String(Files.readAllBytes(Paths.get(JsonInput)));
+ return input;
+ }
+
+ public ResponseEntity<String> sendRequest(String requestJson, String uriPath, HttpMethod reqMethod){
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type",MediaType.APPLICATION_JSON);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(uriPath));
+
+ HttpEntity<String> request = new HttpEntity<String>(requestJson, headers);
+ ResponseEntity<String> response = restTemplate.exchange(builder.toUriString(),
+ reqMethod, request, String.class);
+
+ return response;
+ }
+
+ @Test
+ public void test_mapJSONtoMSOStyle() throws IOException{
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setSerializationInclusion(Include.NON_NULL);
+ String testRequest= inputStream("/ServiceInstanceDefault.json");
+ String resultString = servInstances.mapJSONtoMSOStyle(testRequest, null, false, null);
+ ServiceInstancesRequest sir = mapper.readValue(resultString, ServiceInstancesRequest.class);
+ ModelInfo modelInfo = sir.getRequestDetails().getModelInfo();
+ assertEquals("f7ce78bb-423b-11e7-93f8-0050569a796",modelInfo.getModelCustomizationUuid());
+ assertEquals("modelInstanceName",modelInfo.getModelInstanceName());
+ assertEquals("f7ce78bb-423b-11e7-93f8-0050569a7965",modelInfo.getModelInvariantUuid());
+ assertEquals("10",modelInfo.getModelUuid());
+
+ }
+ @Test
+ public void createServiceInstanceVIDDefault() throws JsonParseException, JsonMappingException, IOException{
+ TestAppender.events.clear();
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ headers.set(MsoLogger.TRANSACTION_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ headers.set(MsoLogger.CLIENT_ID, "VID");
+ //expect
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ //then
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ ILoggingEvent logEvent = TestAppender.events.get(0);
+ Map<String,String> mdc = logEvent.getMDCPropertyMap();
+ assertEquals("32807a28-1a14-4b88-b7b3-2950918aa76d", mdc.get(MsoLogger.REQUEST_ID));
+ assertEquals("VID", mdc.get(MsoLogger.CLIENT_ID));
+ MDC.remove(MsoLogger.CLIENT_ID);
+ assertTrue(response.getBody().contains("1882939"));
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("5.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("32807a28-1a14-4b88-b7b3-2950918aa76d", response.getHeaders().get("X-TransactionID").get(0));
+
+ //ExpectedRecord
+ InfraActiveRequests expectedRecord = new InfraActiveRequests();
+ expectedRecord.setRequestStatus("IN_PROGRESS");
+ expectedRecord.setRequestBody(inputStream("/ServiceInstanceDefault.json"));
+ expectedRecord.setAction("createInstance");
+ expectedRecord.setSource("VID");
+ expectedRecord.setVnfId("1882938");
+ expectedRecord.setLastModifiedBy("APIH");
+ expectedRecord.setServiceInstanceId("1882939");
+ expectedRecord.setServiceInstanceName("testService9");
+ expectedRecord.setRequestScope("service");
+ expectedRecord.setRequestorId("xxxxxx");
+ expectedRecord.setRequestAction("createInstance");
+ expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ //ActualRecord
+ InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+ assertEquals(sameBeanAs(expectedRecord).toString(), sameBeanAs(requestRecord).ignoring("startTime").ignoring("modifyTime").toString());
+
+ }
+ @Test
+ public void createServiceInstanceServiceInstancesUri() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/CreateGenericALaCarteServiceInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expect
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceUriPrev7 + "v5";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePrev7.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ //then
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createServiceInstanceBpelStatusError() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY)));
+
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceStatusError.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void createServiceInstanceBadGateway() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withStatus(org.apache.http.HttpStatus.SC_BAD_GATEWAY).withBody("{}")));
+
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceBadGateway.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void createServiceInstanceEmptyResponse() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withFault(Fault.EMPTY_RESPONSE)));
+
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceEmpty.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_GATEWAY.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void activateServiceInstanceNoRecipeALaCarte() throws JsonParseException, JsonMappingException, IOException{
+ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/activate";
+ headers.set("X-ECOMP-RequestID", "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json"), uri, HttpMethod.POST);
+
+ //ExpectedRecord
+ InfraActiveRequests expectedRecord = new InfraActiveRequests();
+ expectedRecord.setRequestStatus("FAILED");
+ expectedRecord.setAction("activateInstance");
+ expectedRecord.setStatusMessage("Recipe could not be retrieved from catalog DB.");
+ expectedRecord.setProgress(new Long(100));
+ expectedRecord.setSource("VID");
+ expectedRecord.setVnfId("1882938");
+ expectedRecord.setRequestBody(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json"));
+ expectedRecord.setLastModifiedBy("APIH");
+ expectedRecord.setServiceInstanceId("f7ce78bb-423b-11e7-93f8-0050569a7968");
+ expectedRecord.setServiceInstanceName("testService7");
+ expectedRecord.setRequestScope("service");
+ expectedRecord.setRequestAction("activateInstance");
+ expectedRecord.setRequestorId("xxxxxx");
+ expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ //ActualRecord
+ InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+ assertEquals(sameBeanAs(expectedRecord).toString(), sameBeanAs(requestRecord).ignoring("startTime").ignoring("endTime").ignoring("modifyTime").toString());
+ assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void activateServiceInstanceNoRecipe() throws JsonParseException, JsonMappingException, IOException{
+ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/activate";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceNoRecipe.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.NOT_FOUND.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void activateServiceInstance() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/ActivateInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ headers.set("X-TransactionID", "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/activate";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceActivate.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deactivateServiceInstance() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/DeactivateInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/deactivate";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDeactivate.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deleteServiceInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/DeleteInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a8868/";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDelete.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void assignServiceInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/AssignServiceInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/assign";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceAssign.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void unassignServiceInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/UnassignServiceInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/unassign";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceUnassign.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createPortConfiguration() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ headers.set("X-TransactionID", "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePortConfiguration.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertTrue(response.getBody().contains("1882939"));
+ }
+ @Test
+ public void createPortConfigurationEmptyProductFamilyId() throws JsonParseException, JsonMappingException, IOException {
+ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceParseFail.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void deletePortConfiguration() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ headers.set("X-ECOMP-RequestID", "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations/f7ce78bb-423b-11e7-93f8-0050569a7970";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstance.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void enablePort() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations/f7ce78bb-423b-11e7-93f8-0050569a7970/enablePort";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceEnablePort.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void disablePort() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations/f7ce78bb-423b-11e7-93f8-0050569a7970/disablePort";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDisablePort.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void activatePort() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations/f7ce78bb-423b-11e7-93f8-0050569a7970/activate";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceActivatePort.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deactivatePort() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/configurations/f7ce78bb-423b-11e7-93f8-0050569a7970/deactivate";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDeactivatePort.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void addRelationships() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/addRelationships";
+ ResponseEntity<String> response = sendRequest(inputStream("/AddRelationships.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void removeRelationships() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/ALaCarteOrchestrator"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/removeRelationships";
+ ResponseEntity<String> response = sendRequest(inputStream("/RemoveRelationships.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createVnfInstanceNoALaCarte() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/49585b36-2b5a-443a-8b10-c75d34bb5e46/vnfs";
+ ResponseEntity<String> response = sendRequest(inputStream("/VnfCreateDefault.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createVnfInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ String requestId = "b7a6b76f-2ee2-416c-971b-548472a8c5c3";
+ headers.set(MsoLogger.TRANSACTION_ID, requestId);
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs";
+ ResponseEntity<String> response = sendRequest(inputStream("/VnfWithServiceRelatedInstance.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ InfraActiveRequests record = iar.findOneByRequestId(requestId);
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertTrue(response.getBody().contains("1882939"));
+ assertEquals(record.getVnfType(), "vSAMP12/test");
+ }
+ @Test
+ public void createVnfWithServiceRelatedInstanceFail() throws JsonParseException, JsonMappingException, IOException {
+ uri = servInstanceUriPrev7 + "v6" + "/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs";
+ ResponseEntity<String> response = sendRequest(inputStream("/VnfWithServiceRelatedInstanceFail.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ }
+ @Test
+ public void createVnfInstanceInvalidVnfResource() throws JsonParseException, JsonMappingException, IOException {
+ uri = servInstanceuri + "v7" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs";
+ ResponseEntity<String> response = sendRequest(inputStream("/NoVnfResource.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().equals("No valid vnfResource is specified"));
+ }
+ @Test
+ public void replaceVnfInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/replace";
+ ResponseEntity<String> response = sendRequest(inputStream("/ReplaceVnf.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void replaceVnfRecreateInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/RecreateInfraVce"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/replace";
+ ResponseEntity<String> response = sendRequest(inputStream("/ReplaceVnfRecreate.json"), uri, HttpMethod.POST);
+ logger.debug(response.getBody());
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void updateVnfInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ ResponseEntity<String> response = sendRequest(inputStream("/UpdateVnf.json"), uri, HttpMethod.PUT);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void applyUpdatedConfig() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/VnfConfigUpdate"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ String requestId = "b7a6b76f-2ee2-416c-971b-548472a8c5c5";
+ headers.set(MsoLogger.TRANSACTION_ID, requestId);
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/applyUpdatedConfig";
+ ResponseEntity<String> response = sendRequest(inputStream("/ApplyUpdatedConfig.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ InfraActiveRequests record = iar.findOneByRequestId(requestId);
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertNull(record.getVnfType());
+ }
+ @Test
+ public void deleteVnfInstanceV5() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v5" + "/serviceInstances/e446b97d-9c35-437a-95a2-6b4c542c4507/vnfs/49befbfe-fccb-421d-bb4c-0734a43f5ea0";
+ ResponseEntity<String> response = sendRequest(inputStream("/DeleteVnfV5.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createVfModuleInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/CreateVfModuleInfra"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/7a88cbeb-0ec8-4765-a271-4f9e90c3da7b/vnfs/cbba721b-4803-4df7-9347-307c9a955426/vfModules";
+ ResponseEntity<String> response = sendRequest(inputStream("/VfModuleWithRelatedInstances.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertTrue(response.getBody().contains("1882939"));
+ }
+ @Test
+ public void createVfModuleInstanceNoModelCustomization() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v6" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules";
+ ResponseEntity<String> response = sendRequest(inputStream("/VfModuleNoModelCustomization.json"), uri, HttpMethod.POST);
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deleteVfModuleInstanceNoMatchingModelUUD() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v6" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ ResponseEntity<String> response = sendRequest(inputStream("/VfModuleNoMatchingModelUUID.json"), uri, HttpMethod.DELETE);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createVfModuleInstanceNoRecipe() throws JsonParseException, JsonMappingException, IOException {
+ uri = servInstanceuri + "v6" + "/serviceInstances/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules";
+ ResponseEntity<String> response = sendRequest(inputStream("/VfModuleInvalid.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().equals("No valid vfModuleCustomization is specified"));
+ }
+ @Test
+ public void replaceVfModuleInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000/replace";
+ ResponseEntity<String> response = sendRequest(inputStream("/ReplaceVfModule.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void updateVfModuleInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ ResponseEntity<String> response = sendRequest(inputStream("/UpdateVfModule.json"), uri, HttpMethod.PUT);
+ logger.debug(response.getBody());
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createVfModuleNoModelType() throws JsonParseException, JsonMappingException, IOException{
+ headers.set(MsoLogger.TRANSACTION_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ InfraActiveRequests expectedRecord = new InfraActiveRequests();
+ expectedRecord.setRequestStatus("FAILED");
+ expectedRecord.setAction("createInstance");
+ expectedRecord.setStatusMessage("Error parsing request: No valid modelType is specified");
+ expectedRecord.setProgress(new Long(100));
+ expectedRecord.setSource("VID");
+ expectedRecord.setRequestBody(inputStream("/VfModuleNoModelType.json"));
+ expectedRecord.setLastModifiedBy("APIH");
+ expectedRecord.setVfModuleName("testVfModule2");
+ expectedRecord.setVfModuleModelName("serviceModel");
+ expectedRecord.setRequestScope("vfModule");
+ expectedRecord.setRequestAction("createInstance");
+ expectedRecord.setRequestorId("zz9999");
+ expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+ //VnfType is not sent in this request, should be blank in db
+ expectedRecord.setVnfType("");
+ uri = servInstanceuri + "v5/serviceInstances/32807a28-1a14-4b88-b7b3-2950918aa76d/vnfs/32807a28-1a14-4b88-b7b3-2950918aa76d/vfModules";
+
+ ResponseEntity<String> response = sendRequest(inputStream("/VfModuleNoModelType.json"), uri, HttpMethod.POST);
+ //ActualRecord
+ InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ assertEquals(sameBeanAs(expectedRecord).toString(), sameBeanAs(requestRecord).ignoring("startTime").ignoring("endTime").ignoring("modifyTime").toString());
+ assertNotNull(requestRecord.getStartTime());
+ assertNotNull(requestRecord.getEndTime());
+ }
+ @Test
+ public void inPlaceSoftwareUpdate() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/VnfInPlaceUpdate"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/inPlaceSoftwareUpdate";
+ ResponseEntity<String> response = sendRequest(inputStream("/InPlaceSoftwareUpdate.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void inPlaceSoftwareUpdateDuplicate() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/VnfInPlaceUpdate"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ InfraActiveRequests req = new InfraActiveRequests();
+ req.setRequestStatus("IN_PROGRESS");
+ req.setAction("inPlaceSoftwareUpdate");
+ req.setProgress(new Long(10));
+ req.setRequestBody(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json"));
+ req.setServiceInstanceId("f7ce78bb-423b-11e7-93f8-0050569a7908");
+ req.setVnfId("ff305d54-75b4-431b-adb2-eb6b9e5ff033");
+ req.setRequestScope("vnf");
+ req.setVnfName("duplicateCheck123");
+ req.setRequestAction("inPlaceSoftwareUpdate");
+ req.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+ iar.save(req);
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7908/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff033/inPlaceSoftwareUpdate";
+ ResponseEntity<String> response = sendRequest(inputStream("/InPlaceSoftwareUpdate2.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.CONFLICT.getStatusCode(), response.getStatusCode().value());
+
+ InfraActiveRequests newRecord = iar.findOneByRequestBody(inputStream("/InPlaceSoftwareUpdate2.json"));
+
+ assertNotNull(newRecord.getServiceInstanceId());
+ assertNotNull(newRecord.getVnfId());
+
+ }
+
+ @Test
+ public void deleteVfModuleInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ ResponseEntity<String> response = sendRequest(inputStream("/DeleteVfModule.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deactivateAndCloudDeleteVfModuleInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vfModules/ff305d54-75b4-431b-adb2-eb6b9e5ff000/deactivateAndCloudDelete";
+ ResponseEntity<String> response = sendRequest(inputStream("/DeactivateAndCloudDeleteVfModule.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createVolumeGroupInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups";
+ ResponseEntity<String> response = sendRequest(inputStream("/VolumeGroup.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertTrue(response.getBody().contains("1882939"));
+ }
+ @Test
+ public void updateVolumeGroupInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups/ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ ResponseEntity<String> response = sendRequest(inputStream("/UpdateVolumeGroup.json"), uri, HttpMethod.PUT);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deleteVolumeGroupInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7968/vnfs/ff305d54-75b4-431b-adb2-eb6b9e5ff000/volumeGroups/ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ ResponseEntity<String> response = sendRequest(inputStream("/DeleteVolumeGroup.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void createNetworkInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ String requestId = "b7a6b76f-2ee2-416c-971b-548472a8c5c4";
+ headers.set(MsoLogger.TRANSACTION_ID, requestId);
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreate.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ InfraActiveRequests record = iar.findOneByRequestId(requestId);
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertEquals(record.getNetworkType(), "TestNetworkType");
+ }
+ @Test
+ public void updateNetworkInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks/1710966e-097c-4d63-afda-e0d3bb7015fb";
+ ResponseEntity<String> response = sendRequest(inputStream("/UpdateNetwork.json"), uri, HttpMethod.PUT);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ assertTrue(response.getBody().contains("1882939"));
+ }
+ @Test
+ public void deleteNetworkInstance() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks/1710966e-097c-4d63-afda-e0d3bb7015fb";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkInstance.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void deleteNetworkInstanceNoReqParams() throws JsonParseException, JsonMappingException, IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v6" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks/1710966e-097c-4d63-afda-e0d3bb7015fb";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkInstanceNoReqParams.json"), uri, HttpMethod.DELETE);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+ @Test
+ public void convertJsonToServiceInstanceRequestFail() throws JsonParseException, JsonMappingException, IOException {
+ headers.set(MsoLogger.TRANSACTION_ID, "32807a28-1a14-4b88-b7b3-2950918aa76d");
+ //ExpectedRecord
+ InfraActiveRequests expectedRecord = new InfraActiveRequests();
+ expectedRecord.setRequestStatus("FAILED");
+ expectedRecord.setStatusMessage("Error mapping request: ");
+ expectedRecord.setProgress(new Long(100));
+ expectedRecord.setRequestBody(inputStream("/ConvertRequestFail.json"));
+ expectedRecord.setLastModifiedBy("APIH");
+ expectedRecord.setRequestScope("network");
+ expectedRecord.setRequestAction("deleteInstance");
+ expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ uri = servInstanceuri + "v6" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks/1710966e-097c-4d63-afda-e0d3bb7015fb";
+ ResponseEntity<String> response = sendRequest(inputStream("/ConvertRequestFail.json"), uri, HttpMethod.DELETE);
+
+ //ActualRecord
+ InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ assertThat(expectedRecord, sameBeanAs(requestRecord).ignoring("startTime").ignoring("endTime").ignoring("modifyTime").ignoring("statusMessage"));
+ assertThat(requestRecord.getStatusMessage(), containsString("Error mapping request: "));
+ assertNotNull(requestRecord.getStartTime());
+ assertNotNull(requestRecord.getEndTime());
+ }
+ @Test
+ public void convertJsonToServiceInstanceRequestConfigurationFail() throws JsonParseException, JsonMappingException, IOException {
+ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/configurations/test/enablePort";
+ ResponseEntity<String> response = sendRequest(inputStream("/ConvertRequestFail.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatusCode().value());
+ }
+
+ @Test
+ public void creatServiceInstanceGRTestApiNoCustomRecipeFound() throws IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v7" + "/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceMacro.json"), uri, HttpMethod.POST);
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void createNetworkInstanceTestApiUndefinedUsePropertiesDefault() throws IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateAlternateInstanceName.json"), uri, HttpMethod.POST);
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void createNetworkInstanceTestApiIncorrectUsePropertiesDefault() throws IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateTestApiIncorrect.json"), uri, HttpMethod.POST);
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ }
+
+ @Test
+ public void createNetworkInstanceTestApiGrApi() throws IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateTestApiGrApi.json"), uri, HttpMethod.POST);
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void createNetworkInstanceTestApiVnfApi() throws IOException {
+ stubFor(post(urlPathEqualTo("/mso/async/services/CreateNetworkInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v7" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7969/networks";
+ ResponseEntity<String> response = sendRequest(inputStream("/NetworkCreateTestApiVnfApi.json"), uri, HttpMethod.POST);
+
+ //expected response
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void activateServiceInstanceRequestStatus() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/ActivateInstance"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+ headers.set("X-ECOMP-RequestID", "32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ InfraActiveRequests expectedRecord = new InfraActiveRequests();
+ expectedRecord.setRequestStatus("FAILED");
+ expectedRecord.setAction("activateInstance");
+ expectedRecord.setStatusMessage("Recipe could not be retrieved from catalog DB.");
+ expectedRecord.setProgress(new Long(100));
+ expectedRecord.setSource("VID");
+ expectedRecord.setRequestBody(inputStream("/ServiceInstanceALaCarteTrueNoRecipe.json"));
+ expectedRecord.setLastModifiedBy("APIH");
+ expectedRecord.setServiceInstanceId("f7ce78bb-423b-11e7-93f8-0050569a7999");
+ expectedRecord.setServiceInstanceName("testService1234");
+ expectedRecord.setRequestScope("service");
+ expectedRecord.setRequestAction("activateInstance");
+ expectedRecord.setRequestorId("xxxxxx");
+ expectedRecord.setRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ //expect
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceuri + "v5" + "/serviceInstances/f7ce78bb-423b-11e7-93f8-0050569a7999/activate";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstancePrev8.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ InfraActiveRequests requestRecord = iar.findOneByRequestId("32807a28-1a14-4b88-b7b3-2950918aa76d");
+
+ //then
+ assertEquals(Status.IN_PROGRESS.name(), requestRecord.getRequestStatus());
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void invalidRequestId() throws IOException {
+ String illegalRequestId = "1234";
+ headers.set("X-ECOMP-RequestID", illegalRequestId);
+
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST);
+
+ assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value());
+ assertTrue(response.getBody().contains("Request Id " + illegalRequestId + " is not a valid UUID"));
+ }
+ @Test
+ public void invalidBPELResponse() throws IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponseInvalid2.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertEquals("Request Failed due to BPEL error with HTTP Status = 202{\"instanceId\": \"1882939\"}", realResponse.getServiceException().getText());
+ }
+
+ @Test
+ public void invalidBPELResponse2() throws IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/WorkflowActionBB"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponseInvalid.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ uri = servInstanceuri + "v5/serviceInstances";
+ ResponseEntity<String> response = sendRequest(inputStream("/ServiceInstanceDefault.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
+
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class);
+ assertTrue(realResponse.getServiceException().getText().contains("<aetgt:ErrorMessage>Exception in create execution list 500"));
+ }
+
+ @Test
+ public void createMacroServiceInstance() throws JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/mso/async/services/CreateMacroServiceNetworkVnf"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json")
+ .withBodyFile("Camunda/TestResponse.json").withStatus(org.apache.http.HttpStatus.SC_OK)));
+
+ //expect
+ ServiceInstancesResponse expectedResponse = new ServiceInstancesResponse();
+ RequestReferences requestReferences = new RequestReferences();
+ requestReferences.setInstanceId("1882939");
+ expectedResponse.setRequestReferences(requestReferences);
+ uri = servInstanceUriPrev7 + "v5";
+ ResponseEntity<String> response = sendRequest(inputStream("/MacroServiceInstance.json"), uri, HttpMethod.POST);
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+ //then
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ ServiceInstancesResponse realResponse = mapper.readValue(response.getBody(), ServiceInstancesResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse).ignoring("requestReferences.requestId"));
+ }
+
+ @Test
+ public void testUserParams() throws JsonParseException, JsonMappingException, IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesRequest request = mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class);
+ RequestParameters requestParameters = request.getRequestDetails().getRequestParameters();
+ String userParamsTxt = inputStream("/userParams.txt");
+
+ List<Map<String, Object>> userParams = servInstances.configureUserParams(requestParameters);
+ System.out.println(userParams);
+ assertTrue(userParams.size() > 0);
+ assertTrue(userParams.get(0).containsKey("name"));
+ assertTrue(userParams.get(0).containsKey("value"));
+ assertTrue(userParamsTxt.replaceAll("\\s+","").equals(userParams.toString().replaceAll("\\s+","")));
+ }
+
+ @Test
+ public void testConfigureCloudConfig() throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesRequest request = mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class);
+ CloudConfiguration cloudConfig = servInstances.configureCloudConfig(request.getRequestDetails().getRequestParameters());
+
+ assertEquals("mdt25b", cloudConfig.getLcpCloudRegionId());
+ assertEquals("aefb697db6524ddebfe4915591b0a347", cloudConfig.getTenantId());
+ }
+
+ @Test
+ public void testMapToLegacyRequest() throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesRequest request = mapper.readValue(inputStream("/MacroServiceInstance.json"), ServiceInstancesRequest.class);
+ ServiceInstancesRequest expected = mapper.readValue(inputStream("/LegacyMacroServiceInstance.json"), ServiceInstancesRequest.class);
+ servInstances.mapToLegacyRequest(request.getRequestDetails());
+ System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(request));
+ assertThat(request, sameBeanAs(expected));
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java
new file mode 100644
index 0000000000..459214b4ce
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java
@@ -0,0 +1,123 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.io.IOException;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+import org.json.JSONException;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.tasksbeans.TaskList;
+import org.onap.so.apihandlerinfra.tasksbeans.TasksGetResponse;
+import org.onap.so.apihandlerinfra.tasksbeans.ValidResponses;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class TasksHandlerTest extends BaseTest{
+
+ private final String basePath = "onap/so/infra/tasks/v1";
+
+ @Test
+ public void getTasksTestByOriginalRequestId() throws ParseException, JSONException, JsonParseException, JsonMappingException, IOException{
+ stubFor(post(urlPathEqualTo("/sobpmnengine/task"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/GetTaskResponse.json").withStatus(HttpStatus.SC_OK)));
+
+ stubFor(get(urlPathEqualTo("/sobpmnengine/task/b5fa707a-f55a-11e7-a796-005056856d52/variables"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("Camunda/GetTaskVariablesResponse.json").withStatus(HttpStatus.SC_OK)));
+
+ String requestId = "4f6fe9ac-800c-4540-a93e-10d179fa1b0a";
+
+ //expected response
+ TasksGetResponse expectedResponse = new TasksGetResponse();
+
+ List<TaskList> taskList = new ArrayList<TaskList>();
+ TaskList taskList1 = new TaskList();
+ List<String> validEntries = new ArrayList<String>();
+ validEntries.add(ValidResponses.rollback.toString());
+ validEntries.add(ValidResponses.skip.toString());
+ validEntries.add(ValidResponses.manual.toString());
+ validEntries.add(ValidResponses.abort.toString());
+ taskList1.setBuildingBlockName("UpdateConfigurationState");
+ taskList1.setBuildingBlockStep("Configurationactivate SDNO Post-Check");
+ taskList1.setErrorCode("1002");
+ taskList1.setErrorSource("SDNO");
+ taskList1.setErrorMessage("SDN-O exception: failed with message FAIL - AnsibleOperations exception: Failed : HTTP error code : 400 - Error Msg : no node list provided and no inventory file found");
+ taskList1.setNfRole("VPROBE");
+ taskList1.setType("fallout");
+ taskList1.setOriginalRequestId(requestId);
+ taskList1.setOriginalRequestorId("VID");
+ taskList1.setSubscriptionServiceType("PORT-MIRROR");
+ taskList1.setTaskId("b5fa707a-f55a-11e7-a796-005056856d52");
+ taskList1.setValidResponses(validEntries);
+ taskList.add(taskList1);
+
+ expectedResponse.setTaskList(taskList);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(basePath))
+ .queryParam("taskId", "b5fa707a-f55a-11e7-a796-005056856d52");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+
+ ObjectMapper mapper = new ObjectMapper();
+
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+
+ //then
+ assertEquals(Response.Status.ACCEPTED.getStatusCode(), response.getStatusCode().value());
+ TasksGetResponse realResponse = mapper.readValue(response.getBody(), TasksGetResponse.class);
+ assertThat(realResponse, sameBeanAs(expectedResponse));
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ManualTasksTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TestAppender.java
index e18bc5e911..48711a2595 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ManualTasksTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TestAppender.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,21 +18,20 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra;
+package org.onap.so.apihandlerinfra;
-import static org.junit.Assert.assertTrue;
+import java.util.ArrayList;
+import java.util.List;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.AppenderBase;
-import org.junit.Test;
-import javax.ws.rs.core.Response;
-public class ManualTasksTest {
-
- ManualTasks task = new ManualTasks();
-
- @Test
- public void completeTaskTest(){
- Response resp = task.completeTask("test", "v2", "1882993");
- assertTrue(resp.getEntity().toString() != null);
+public class TestAppender extends AppenderBase<ILoggingEvent> {
+ public static List<ILoggingEvent> events = new ArrayList<>();
+
+ @Override
+ protected void append(ILoggingEvent loggingEvent) {
+ events.add(loggingEvent);
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java
index e501bf06ca..96ac02ae75 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/DelE2ESvcRespTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+package org.onap.so.apihandlerinfra.e2eserviceinstancebeans;
import org.junit.Test;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java
index 489991162c..7cfee66d48 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2ERequestTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+package org.onap.so.apihandlerinfra.e2eserviceinstancebeans;
import org.junit.Test;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java
index 808c701606..a3bab01dfd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EServiceInstanceDeleteRequestTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+package org.onap.so.apihandlerinfra.e2eserviceinstancebeans;
import org.junit.Test;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java
index 23676c0bba..59bfa2a1d2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/E2EUserParamTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+package org.onap.so.apihandlerinfra.e2eserviceinstancebeans;
import org.junit.Test;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java
index 87f9315bc9..59e10b3938 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/e2eserviceinstancebeans/NsParametersTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans;
+package org.onap.so.apihandlerinfra.e2eserviceinstancebeans;
import org.junit.Test;
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/RequestDetailsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/RequestDetailsTest.java
index bfe1ff67e8..80cd0fac2f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/RequestDetailsTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/RequestDetailsTest.java
@@ -1,71 +1,71 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-import static org.junit.Assert.assertTrue;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-
-public class RequestDetailsTest {
-
- RequestDetails _requestDetails;
- RequestInfo _requestInfo;
-
- public RequestDetailsTest() {
- }
-
- @Before
- public void setUp() {
- _requestDetails = mock(RequestDetails.class);
- _requestInfo = new RequestInfo();
- when(_requestDetails.getRequestInfo()).thenReturn(_requestInfo);
- }
-
- @After
- public void tearDown() {
- _requestDetails = null;
- _requestInfo = null;
- }
-
- /**
- * Test of getRequestInfo method
- */
- @Test
- public void testGetRequestInfo() {
- _requestDetails.setRequestInfo(_requestInfo);
- assertTrue(_requestDetails.getRequestInfo().equals(_requestInfo));
-
- }
-
- /**
- * Test setRequestInfo
- */
- @Test
- public void testSetRequestInfo() {
- _requestDetails.setRequestInfo(_requestInfo);
- verify(_requestDetails).setRequestInfo(_requestInfo);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+
+public class RequestDetailsTest {
+
+ RequestDetails _requestDetails;
+ RequestInfo _requestInfo;
+
+ public RequestDetailsTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _requestDetails = mock(RequestDetails.class);
+ _requestInfo = new RequestInfo();
+ when(_requestDetails.getRequestInfo()).thenReturn(_requestInfo);
+ }
+
+ @After
+ public void tearDown() {
+ _requestDetails = null;
+ _requestInfo = null;
+ }
+
+ /**
+ * Test of getRequestInfo method
+ */
+ @Test
+ public void testGetRequestInfo() {
+ _requestDetails.setRequestInfo(_requestInfo);
+ assertTrue(_requestDetails.getRequestInfo().equals(_requestInfo));
+
+ }
+
+ /**
+ * Test setRequestInfo
+ */
+ @Test
+ public void testSetRequestInfo() {
+ _requestDetails.setRequestInfo(_requestInfo);
+ verify(_requestDetails).setRequestInfo(_requestInfo);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/RequestInfoTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/RequestInfoTest.java
index 96a1f9e04d..852376eb7a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/RequestInfoTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/RequestInfoTest.java
@@ -1,118 +1,118 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class RequestInfoTest {
-
- RequestInfo _requestInfo;
- String _source;
- ValidResponses _responseValue;
- String _requestorId;
-
- public RequestInfoTest() {
- }
-
- @Before
- public void setUp() {
- _requestInfo = mock(RequestInfo.class);
- _responseValue = ValidResponses.abort;
- _requestorId = "ab1234";
- _source = "VID";
- when(_requestInfo.getRequestorId()).thenReturn(_requestorId);
- when(_requestInfo.getSource()).thenReturn(_source);
- when(_requestInfo.getResponseValue()).thenReturn(_responseValue);
-
- }
-
- @After
- public void tearDown() {
- _requestInfo = null;
- _responseValue = null;
- }
-
- /**
- * Test of getSource method
- */
- @Test
- public void testGetSource() {
- String result = _requestInfo.getSource();
- assertEquals(_source, result);
-
- }
-
- /**
- * Test setSource
- */
- @Test
- public void testSetSource() {
- _requestInfo.setSource("VID");
- verify(_requestInfo).setSource(_source);
- }
-
- /**
- * Test of getRequestorId method
- */
- @Test
- public void testGetRequestorId() {
- String result = _requestInfo.getRequestorId();
- assertEquals(_requestorId, result);
-
- }
-
- /**
- * Test setRequestInfo
- */
- @Test
- public void testSetRequestorId() {
- _requestInfo.setRequestorId(_requestorId);
- verify(_requestInfo).setRequestorId(_requestorId);
- }
-
-
- /**
- * Test of getResponseValue method
- */
- @Test
- public void testGetResponseValue() {
- ValidResponses result = _requestInfo.getResponseValue();
- assertEquals(_responseValue, result);
-
- }
-
- /**
- * Test setResponseValues method
- */
- @Test
- public void testSetResponseValue() {
- _requestInfo.setResponseValue(ValidResponses.abort);
- verify(_requestInfo).setResponseValue(_responseValue);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class RequestInfoTest {
+
+ RequestInfo _requestInfo;
+ String _source;
+ ValidResponses _responseValue;
+ String _requestorId;
+
+ public RequestInfoTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _requestInfo = mock(RequestInfo.class);
+ _responseValue = ValidResponses.abort;
+ _requestorId = "xxxxxx";
+ _source = "VID";
+ when(_requestInfo.getRequestorId()).thenReturn(_requestorId);
+ when(_requestInfo.getSource()).thenReturn(_source);
+ when(_requestInfo.getResponseValue()).thenReturn(_responseValue);
+
+ }
+
+ @After
+ public void tearDown() {
+ _requestInfo = null;
+ _responseValue = null;
+ }
+
+ /**
+ * Test of getSource method
+ */
+ @Test
+ public void testGetSource() {
+ String result = _requestInfo.getSource();
+ assertEquals(_source, result);
+
+ }
+
+ /**
+ * Test setSource
+ */
+ @Test
+ public void testSetSource() {
+ _requestInfo.setSource("VID");
+ verify(_requestInfo).setSource(_source);
+ }
+
+ /**
+ * Test of getRequestorId method
+ */
+ @Test
+ public void testGetRequestorId() {
+ String result = _requestInfo.getRequestorId();
+ assertEquals(_requestorId, result);
+
+ }
+
+ /**
+ * Test setRequestInfo
+ */
+ @Test
+ public void testSetRequestorId() {
+ _requestInfo.setRequestorId(_requestorId);
+ verify(_requestInfo).setRequestorId(_requestorId);
+ }
+
+
+ /**
+ * Test of getResponseValue method
+ */
+ @Test
+ public void testGetResponseValue() {
+ ValidResponses result = _requestInfo.getResponseValue();
+ assertEquals(_responseValue, result);
+
+ }
+
+ /**
+ * Test setResponseValues method
+ */
+ @Test
+ public void testSetResponseValue() {
+ _requestInfo.setResponseValue(ValidResponses.abort);
+ verify(_requestInfo).setResponseValue(_responseValue);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskListTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskListTest.java
index 4909407722..62bfee989b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskListTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskListTest.java
@@ -1,246 +1,247 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.json.JSONArray;
-
-public class TaskListTest {
-
- TaskList _taskList;
- protected String _taskId;
- protected String _type;
- protected String _nfRole;
- protected String _subscriptionServiceType;
- protected String _originalRequestId;
- protected String _originalRequestorId;
- protected String _errorSource;
- protected String _errorCode;
- protected String _errorMessage;
- protected String _buildingBlockName;
- protected String _buildingBlockStep;
- protected JSONArray _validResponses;
-
- public TaskListTest() {
- }
-
- @Before
- public void setUp() {
- _taskList = mock(TaskList.class);
- _taskId = "_taskid";
- _type = "type";
- _nfRole = "nfrole";
- _subscriptionServiceType = "subscriptionservicetype";
- _originalRequestId = "originalrequestid";
- _originalRequestorId = "originalrequestorid";
- _errorSource = "errorsource";
- _errorCode = "errorcode";
- _errorMessage = "errormessage";
- _buildingBlockName = "buildingblockname";
- _buildingBlockStep = "buildingblockstep";
- _validResponses = mock(JSONArray.class);
-
- when(_taskList.getTaskId()).thenReturn(_taskId);
- when(_taskList.getType()).thenReturn(_type);
- when(_taskList.getNfRole()).thenReturn(_nfRole);
- when(_taskList.getSubscriptionServiceType()).thenReturn(_subscriptionServiceType);
- when(_taskList.getOriginalRequestId()).thenReturn(_originalRequestId);
- when(_taskList.getOriginalRequestorId()).thenReturn(_originalRequestorId);
- when(_taskList.getErrorSource()).thenReturn(_errorSource);
- when(_taskList.getErrorCode()).thenReturn(_errorCode);
- when(_taskList.getErrorMessage()).thenReturn(_errorMessage);
- when(_taskList.getBuildingBlockName()).thenReturn(_buildingBlockName);
- when(_taskList.getBuildingBlockStep()).thenReturn(_buildingBlockStep);
- when(_taskList.getValidResponses()).thenReturn(_validResponses);
- }
-
- @After
- public void tearDown() {
- _taskList = null;
- _validResponses = null;
- }
-
- @Test
- public void testGetTaskId() {
- String result = _taskList.getTaskId();
- assertEquals(_taskId, result);
-
- }
-
- @Test
- public void testSetTaskId() {
- _taskList.setTaskId("_taskid");
- verify(_taskList).setTaskId(_taskId);
- }
-
- @Test
- public void testGetType() {
- String result = _taskList.getType();
- assertEquals(_type, result);
-
- }
-
- @Test
- public void testSetType() {
- _taskList.setType(_type);
- verify(_taskList).setType(_type);
- }
-
- @Test
- public void testGetNfRole() {
- String result = _taskList.getNfRole();
- assertEquals(_nfRole, result);
-
- }
-
- @Test
- public void testSetNfRole() {
- _taskList.setType(_nfRole);
- verify(_taskList).setType(_nfRole);
- }
-
- @Test
- public void testGetSubscriptionServiceType() {
- String result = _taskList.getSubscriptionServiceType();
- assertEquals(_subscriptionServiceType, result);
-
- }
-
- @Test
- public void testSetSubscriptionServiceType() {
- _taskList.setSubscriptionServiceType(_subscriptionServiceType);
- verify(_taskList).setSubscriptionServiceType(_subscriptionServiceType);
- }
-
- @Test
- public void testGetOriginalRequestId() {
- String result = _taskList.getOriginalRequestId();
- assertEquals(_originalRequestId, result);
-
- }
-
- @Test
- public void testSetOriginalRequestId() {
- _taskList.setOriginalRequestId(_originalRequestId);
- verify(_taskList).setOriginalRequestId(_originalRequestId);
- }
-
- @Test
- public void testGetOriginalRequestorId() {
- String result = _taskList.getOriginalRequestorId();
- assertEquals(_originalRequestorId, result);
-
- }
-
- @Test
- public void testSetOriginalRequestorId() {
- _taskList.setOriginalRequestorId(_originalRequestorId);
- verify(_taskList).setOriginalRequestorId(_originalRequestorId);
- }
-
- @Test
- public void testGetErrorSource() {
- String result = _taskList.getErrorSource();
- assertEquals(_errorSource, result);
-
- }
-
- @Test
- public void testSetErrorSource() {
- _taskList.setErrorSource(_errorSource);
- verify(_taskList).setErrorSource(_errorSource);
- }
-
- @Test
- public void testGetErrorCode() {
- String result = _taskList.getErrorCode();
- assertEquals(_errorCode, result);
-
- }
-
- @Test
- public void testSetErrorCode() {
- _taskList.setErrorCode(_errorCode);
- verify(_taskList).setErrorCode(_errorCode);
- }
-
- @Test
- public void testGetErrorMessage() {
- String result = _taskList.getErrorMessage();
- assertEquals(_errorMessage, result);
-
- }
-
- @Test
- public void testSetErrorMessage() {
- _taskList.setErrorMessage(_errorMessage);
- verify(_taskList).setErrorMessage(_errorMessage);
- }
-
- @Test
- public void testGetBuildingBlockName() {
- String result = _taskList.getBuildingBlockName();
- assertEquals(_buildingBlockName, result);
-
- }
-
- @Test
- public void testSetBuildingBlockName() {
- _taskList.setBuildingBlockName(_buildingBlockName);
- verify(_taskList).setBuildingBlockName(_buildingBlockName);
- }
-
- @Test
- public void testGetBuildingBlockStep() {
- String result = _taskList.getBuildingBlockStep();
- assertEquals(_buildingBlockStep, result);
-
- }
-
- @Test
- public void testSetBuildingBlockStep() {
- _taskList.setBuildingBlockStep(_buildingBlockStep);
- verify(_taskList).setBuildingBlockStep(_buildingBlockStep);
- }
-
- @Test
- public void testGetValidResponses() {
-
- JSONArray result = _taskList.getValidResponses();
- assertEquals(_validResponses, result);
-
- }
-
- @Test
- public void testSetValidResponses() {
- _taskList.setValidResponses(_validResponses);
- verify(_taskList).setValidResponses(_validResponses);
- }
-
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class TaskListTest {
+
+ TaskList _taskList;
+ protected String _taskId;
+ protected String _type;
+ protected String _nfRole;
+ protected String _subscriptionServiceType;
+ protected String _originalRequestId;
+ protected String _originalRequestorId;
+ protected String _errorSource;
+ protected String _errorCode;
+ protected String _errorMessage;
+ protected String _buildingBlockName;
+ protected String _buildingBlockStep;
+ protected List<String> _validResponses;
+
+ public TaskListTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _taskList = mock(TaskList.class);
+ _taskId = "_taskid";
+ _type = "type";
+ _nfRole = "nfrole";
+ _subscriptionServiceType = "subscriptionservicetype";
+ _originalRequestId = "originalrequestid";
+ _originalRequestorId = "originalrequestorid";
+ _errorSource = "errorsource";
+ _errorCode = "errorcode";
+ _errorMessage = "errormessage";
+ _buildingBlockName = "buildingblockname";
+ _buildingBlockStep = "buildingblockstep";
+ _validResponses = mock(List.class);
+
+ when(_taskList.getTaskId()).thenReturn(_taskId);
+ when(_taskList.getType()).thenReturn(_type);
+ when(_taskList.getNfRole()).thenReturn(_nfRole);
+ when(_taskList.getSubscriptionServiceType()).thenReturn(_subscriptionServiceType);
+ when(_taskList.getOriginalRequestId()).thenReturn(_originalRequestId);
+ when(_taskList.getOriginalRequestorId()).thenReturn(_originalRequestorId);
+ when(_taskList.getErrorSource()).thenReturn(_errorSource);
+ when(_taskList.getErrorCode()).thenReturn(_errorCode);
+ when(_taskList.getErrorMessage()).thenReturn(_errorMessage);
+ when(_taskList.getBuildingBlockName()).thenReturn(_buildingBlockName);
+ when(_taskList.getBuildingBlockStep()).thenReturn(_buildingBlockStep);
+ when(_taskList.getValidResponses()).thenReturn(_validResponses);
+ }
+
+ @After
+ public void tearDown() {
+ _taskList = null;
+ _validResponses = null;
+ }
+
+ @Test
+ public void testGetTaskId() {
+ String result = _taskList.getTaskId();
+ assertEquals(_taskId, result);
+
+ }
+
+ @Test
+ public void testSetTaskId() {
+ _taskList.setTaskId("_taskid");
+ verify(_taskList).setTaskId(_taskId);
+ }
+
+ @Test
+ public void testGetType() {
+ String result = _taskList.getType();
+ assertEquals(_type, result);
+
+ }
+
+ @Test
+ public void testSetType() {
+ _taskList.setType(_type);
+ verify(_taskList).setType(_type);
+ }
+
+ @Test
+ public void testGetNfRole() {
+ String result = _taskList.getNfRole();
+ assertEquals(_nfRole, result);
+
+ }
+
+ @Test
+ public void testSetNfRole() {
+ _taskList.setType(_nfRole);
+ verify(_taskList).setType(_nfRole);
+ }
+
+ @Test
+ public void testGetSubscriptionServiceType() {
+ String result = _taskList.getSubscriptionServiceType();
+ assertEquals(_subscriptionServiceType, result);
+
+ }
+
+ @Test
+ public void testSetSubscriptionServiceType() {
+ _taskList.setSubscriptionServiceType(_subscriptionServiceType);
+ verify(_taskList).setSubscriptionServiceType(_subscriptionServiceType);
+ }
+
+ @Test
+ public void testGetOriginalRequestId() {
+ String result = _taskList.getOriginalRequestId();
+ assertEquals(_originalRequestId, result);
+
+ }
+
+ @Test
+ public void testSetOriginalRequestId() {
+ _taskList.setOriginalRequestId(_originalRequestId);
+ verify(_taskList).setOriginalRequestId(_originalRequestId);
+ }
+
+ @Test
+ public void testGetOriginalRequestorId() {
+ String result = _taskList.getOriginalRequestorId();
+ assertEquals(_originalRequestorId, result);
+
+ }
+
+ @Test
+ public void testSetOriginalRequestorId() {
+ _taskList.setOriginalRequestorId(_originalRequestorId);
+ verify(_taskList).setOriginalRequestorId(_originalRequestorId);
+ }
+
+ @Test
+ public void testGetErrorSource() {
+ String result = _taskList.getErrorSource();
+ assertEquals(_errorSource, result);
+
+ }
+
+ @Test
+ public void testSetErrorSource() {
+ _taskList.setErrorSource(_errorSource);
+ verify(_taskList).setErrorSource(_errorSource);
+ }
+
+ @Test
+ public void testGetErrorCode() {
+ String result = _taskList.getErrorCode();
+ assertEquals(_errorCode, result);
+
+ }
+
+ @Test
+ public void testSetErrorCode() {
+ _taskList.setErrorCode(_errorCode);
+ verify(_taskList).setErrorCode(_errorCode);
+ }
+
+ @Test
+ public void testGetErrorMessage() {
+ String result = _taskList.getErrorMessage();
+ assertEquals(_errorMessage, result);
+
+ }
+
+ @Test
+ public void testSetErrorMessage() {
+ _taskList.setErrorMessage(_errorMessage);
+ verify(_taskList).setErrorMessage(_errorMessage);
+ }
+
+ @Test
+ public void testGetBuildingBlockName() {
+ String result = _taskList.getBuildingBlockName();
+ assertEquals(_buildingBlockName, result);
+
+ }
+
+ @Test
+ public void testSetBuildingBlockName() {
+ _taskList.setBuildingBlockName(_buildingBlockName);
+ verify(_taskList).setBuildingBlockName(_buildingBlockName);
+ }
+
+ @Test
+ public void testGetBuildingBlockStep() {
+ String result = _taskList.getBuildingBlockStep();
+ assertEquals(_buildingBlockStep, result);
+
+ }
+
+ @Test
+ public void testSetBuildingBlockStep() {
+ _taskList.setBuildingBlockStep(_buildingBlockStep);
+ verify(_taskList).setBuildingBlockStep(_buildingBlockStep);
+ }
+
+ @Test
+ public void testGetValidResponses() {
+
+ List<String> result = _taskList.getValidResponses();
+ assertEquals(_validResponses, result);
+
+ }
+
+ @Test
+ public void testSetValidResponses() {
+ _taskList.setValidResponses(_validResponses);
+ verify(_taskList).setValidResponses(_validResponses);
+ }
+
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskRequestReferenceTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskRequestReferenceTest.java
index 6d9df82f87..043f4ea93d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskRequestReferenceTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskRequestReferenceTest.java
@@ -1,71 +1,71 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class TaskRequestReferenceTest {
-
- TaskRequestReference _taskRequestReference;
-
- protected String _taskId;
- public TaskRequestReferenceTest() {
- }
-
- @Before
- public void setUp() {
- _taskRequestReference = mock(TaskRequestReference.class);
- _taskId = "taskid";
-
- when(_taskRequestReference.getTaskId()).thenReturn(_taskId);
- }
-
- @After
- public void tearDown() {
- _taskRequestReference = null;
- }
-
- /**
- * Test getTaskRequestReference
- */
- @Test
- public void taskGetRequestReference() {
- String result = _taskRequestReference.getTaskId();
- assertEquals(_taskId, result);
- }
-
- /**
- * Test setTaskRequestReference
- */
- @Test
- public void testSetRequestInfo() {
- _taskRequestReference.setTaskId(_taskId);
- verify(_taskRequestReference).setTaskId(_taskId);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class TaskRequestReferenceTest {
+
+ TaskRequestReference _taskRequestReference;
+
+ protected String _taskId;
+ public TaskRequestReferenceTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _taskRequestReference = mock(TaskRequestReference.class);
+ _taskId = "taskid";
+
+ when(_taskRequestReference.getTaskId()).thenReturn(_taskId);
+ }
+
+ @After
+ public void tearDown() {
+ _taskRequestReference = null;
+ }
+
+ /**
+ * Test getTaskRequestReference
+ */
+ @Test
+ public void taskGetRequestReference() {
+ String result = _taskRequestReference.getTaskId();
+ assertEquals(_taskId, result);
+ }
+
+ /**
+ * Test setTaskRequestReference
+ */
+ @Test
+ public void testSetRequestInfo() {
+ _taskRequestReference.setTaskId(_taskId);
+ verify(_taskRequestReference).setTaskId(_taskId);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskVariableValueTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskVariableValueTest.java
index 692cdab877..bc6a5ab890 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskVariableValueTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskVariableValueTest.java
@@ -1,113 +1,113 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class TaskVariableValueTest {
- TaskVariableValue _taskVariableValue;
- protected String _name;
- protected String _value;
- protected String _operator;
-
- public TaskVariableValueTest() {
- }
-
- @Before
- public void setUp() {
- _taskVariableValue = mock(TaskVariableValue.class);
- _name = "name";
- _value = "value";
- _operator = "operator";
- when(_taskVariableValue.getName()).thenReturn(_name);
- when(_taskVariableValue.getValue()).thenReturn(_value);
- when(_taskVariableValue.getOperator()).thenReturn(_operator);
- }
-
- @After
- public void tearDown() {
- _taskVariableValue = null;
- }
-
- /**
- * Test of getName method
- */
- @Test
- public void testGetName() {
- _taskVariableValue.setName(_name);
- assertEquals(_taskVariableValue.getName(),_name);
-
- }
-
- /**
- * Test setName
- */
- @Test
- public void testSetName() {
- _taskVariableValue.setName(_name);
- verify(_taskVariableValue).setName(_name);
- }
-
- /**
- * Test of getName method
- */
- @Test
- public void testGetValue() {
- _taskVariableValue.setValue(_value);
- assertEquals(_taskVariableValue.getValue(),_value);
-
- }
-
- /**
- * Test setName
- */
- @Test
- public void testSetValue() {
- _taskVariableValue.setValue(_value);
- verify(_taskVariableValue).setValue(_value);
- }
-
- /**
- * Test of getName method
- */
- @Test
- public void testGetOperator() {
- _taskVariableValue.setOperator(_operator);
- assertEquals(_taskVariableValue.getOperator(),_operator);
-
- }
-
- /**
- * Test setName
- */
- @Test
- public void testSetRequestDetails() {
- _taskVariableValue.setOperator(_operator);
- verify(_taskVariableValue).setOperator(_operator);
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class TaskVariableValueTest {
+ TaskVariableValue _taskVariableValue;
+ protected String _name;
+ protected String _value;
+ protected String _operator;
+
+ public TaskVariableValueTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _taskVariableValue = mock(TaskVariableValue.class);
+ _name = "name";
+ _value = "value";
+ _operator = "operator";
+ when(_taskVariableValue.getName()).thenReturn(_name);
+ when(_taskVariableValue.getValue()).thenReturn(_value);
+ when(_taskVariableValue.getOperator()).thenReturn(_operator);
+ }
+
+ @After
+ public void tearDown() {
+ _taskVariableValue = null;
+ }
+
+ /**
+ * Test of getName method
+ */
+ @Test
+ public void testGetName() {
+ _taskVariableValue.setName(_name);
+ assertEquals(_taskVariableValue.getName(),_name);
+
+ }
+
+ /**
+ * Test setName
+ */
+ @Test
+ public void testSetName() {
+ _taskVariableValue.setName(_name);
+ verify(_taskVariableValue).setName(_name);
+ }
+
+ /**
+ * Test of getName method
+ */
+ @Test
+ public void testGetValue() {
+ _taskVariableValue.setValue(_value);
+ assertEquals(_taskVariableValue.getValue(),_value);
+
+ }
+
+ /**
+ * Test setName
+ */
+ @Test
+ public void testSetValue() {
+ _taskVariableValue.setValue(_value);
+ verify(_taskVariableValue).setValue(_value);
+ }
+
+ /**
+ * Test of getName method
+ */
+ @Test
+ public void testGetOperator() {
+ _taskVariableValue.setOperator(_operator);
+ assertEquals(_taskVariableValue.getOperator(),_operator);
+
+ }
+
+ /**
+ * Test setName
+ */
+ @Test
+ public void testSetRequestDetails() {
+ _taskVariableValue.setOperator(_operator);
+ verify(_taskVariableValue).setOperator(_operator);
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskVariablesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskVariablesTest.java
index 08a9669889..8e2c3ae7da 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TaskVariablesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TaskVariablesTest.java
@@ -1,69 +1,69 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.List;
-
-public class TaskVariablesTest {
-
- TaskVariables _taskVariables;
- private List<TaskVariableValue> _taskVariableValueList;
-
- public TaskVariablesTest() {
- }
-
- @SuppressWarnings("unchecked")
- @Before
- public void setUp() {
- _taskVariables = mock(TaskVariables.class);
- _taskVariableValueList = mock(List.class);
- when(_taskVariables.getTaskVariables()).thenReturn(_taskVariableValueList);
- }
-
- @After
- public void tearDown() {
- _taskVariables = null;
- }
-
- @Test
- public void testGetTaskVariables() {
- List<TaskVariableValue> result = _taskVariables.getTaskVariables();
- assertEquals(_taskVariableValueList, result);
-
- }
-
- @Test
- public void testSetTaskVariables() {
- _taskVariables.setTaskVariables(_taskVariableValueList);
- verify(_taskVariables).setTaskVariables(_taskVariableValueList);
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.List;
+
+public class TaskVariablesTest {
+
+ TaskVariables _taskVariables;
+ private List<TaskVariableValue> _taskVariableValueList;
+
+ public TaskVariablesTest() {
+ }
+
+ @SuppressWarnings("unchecked")
+ @Before
+ public void setUp() {
+ _taskVariables = mock(TaskVariables.class);
+ _taskVariableValueList = mock(List.class);
+ when(_taskVariables.getTaskVariables()).thenReturn(_taskVariableValueList);
+ }
+
+ @After
+ public void tearDown() {
+ _taskVariables = null;
+ }
+
+ @Test
+ public void testGetTaskVariables() {
+ List<TaskVariableValue> result = _taskVariables.getTaskVariables();
+ assertEquals(_taskVariableValueList, result);
+
+ }
+
+ @Test
+ public void testSetTaskVariables() {
+ _taskVariables.setTaskVariables(_taskVariableValueList);
+ verify(_taskVariables).setTaskVariables(_taskVariableValueList);
+
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TasksGetResponseTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TasksGetResponseTest.java
index 9a9756994c..f4ec27e852 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TasksGetResponseTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TasksGetResponseTest.java
@@ -1,69 +1,69 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.List;
-
-public class TasksGetResponseTest {
-
- TasksGetResponse _tasksGetResponse;
- private List<TaskList> _taskList;
-
- public TasksGetResponseTest() {
- }
-
- @SuppressWarnings("unchecked")
- @Before
- public void setUp() {
- _tasksGetResponse = mock(TasksGetResponse.class);
- _taskList = mock(List.class);
- when(_tasksGetResponse.getTaskList()).thenReturn(_taskList);
- }
-
- @After
- public void tearDown() {
- _tasksGetResponse = null;
- }
-
- @Test
- public void testGetTaskList() {
- List<TaskList> result = _tasksGetResponse.getTaskList();
- assertEquals(_taskList, result);
-
- }
-
- @Test
- public void testSetTaskList() {
- _tasksGetResponse.setTaskList(_taskList);
- verify(_tasksGetResponse).setTaskList(_taskList);
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.util.List;
+
+public class TasksGetResponseTest {
+
+ TasksGetResponse _tasksGetResponse;
+ private List<TaskList> _taskList;
+
+ public TasksGetResponseTest() {
+ }
+
+ @SuppressWarnings("unchecked")
+ @Before
+ public void setUp() {
+ _tasksGetResponse = mock(TasksGetResponse.class);
+ _taskList = mock(List.class);
+ when(_tasksGetResponse.getTaskList()).thenReturn(_taskList);
+ }
+
+ @After
+ public void tearDown() {
+ _tasksGetResponse = null;
+ }
+
+ @Test
+ public void testGetTaskList() {
+ List<TaskList> result = _tasksGetResponse.getTaskList();
+ assertEquals(_taskList, result);
+
+ }
+
+ @Test
+ public void testSetTaskList() {
+ _tasksGetResponse.setTaskList(_taskList);
+ verify(_tasksGetResponse).setTaskList(_taskList);
+
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TasksRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TasksRequestTest.java
index 12aa8ef735..09af2b0a52 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/TasksRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/TasksRequestTest.java
@@ -1,70 +1,70 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-import static org.junit.Assert.assertTrue;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-
-public class TasksRequestTest {
- TasksRequest _tasksRequest;
- private RequestDetails _requestDetails;
-
- public TasksRequestTest() {
- }
-
- @Before
- public void setUp() {
- _tasksRequest = mock(TasksRequest.class);
- _requestDetails = new RequestDetails();
- when(_tasksRequest.getRequestDetails()).thenReturn(_requestDetails);
- }
-
- @After
- public void tearDown() {
- _tasksRequest = null;
- }
-
- /**
- * Test of getRequestDetails method
- */
- @Test
- public void testGetRequestDetails() {
- _tasksRequest.setRequestDetails(_requestDetails);
- assertTrue(_tasksRequest.getRequestDetails().equals(_requestDetails));
-
- }
-
- /**
- * Test setRequestDetails
- */
- @Test
- public void testSetRequestDetails() {
- _tasksRequest.setRequestDetails(_requestDetails);
- verify(_tasksRequest).setRequestDetails(_requestDetails);
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+import static org.junit.Assert.assertTrue;
+import org.junit.Before;
+import org.junit.Test;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+
+public class TasksRequestTest {
+ TasksRequest _tasksRequest;
+ private RequestDetails _requestDetails;
+
+ public TasksRequestTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _tasksRequest = mock(TasksRequest.class);
+ _requestDetails = new RequestDetails();
+ when(_tasksRequest.getRequestDetails()).thenReturn(_requestDetails);
+ }
+
+ @After
+ public void tearDown() {
+ _tasksRequest = null;
+ }
+
+ /**
+ * Test of getRequestDetails method
+ */
+ @Test
+ public void testGetRequestDetails() {
+ _tasksRequest.setRequestDetails(_requestDetails);
+ assertTrue(_tasksRequest.getRequestDetails().equals(_requestDetails));
+
+ }
+
+ /**
+ * Test setRequestDetails
+ */
+ @Test
+ public void testSetRequestDetails() {
+ _tasksRequest.setRequestDetails(_requestDetails);
+ verify(_tasksRequest).setRequestDetails(_requestDetails);
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/ValueTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/ValueTest.java
index 8affd08529..dc5cf8ed39 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/ValueTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/ValueTest.java
@@ -1,68 +1,68 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class ValueTest {
- Value _valueInstance;
- protected String _value;
-
- public ValueTest() {
- }
-
- @Before
- public void setUp() {
- _valueInstance = mock(Value.class);
- _value = "_value";
- when(_valueInstance.getValue()).thenReturn(_value);
- }
-
- @After
- public void tearDown() {
- _valueInstance = null;
- }
-
- /**
- * Test of getValue method
- */
- @Test
- public void testGetValue() {
- _valueInstance.setValue(_value);
- assertEquals(_valueInstance.getValue(),_value);
-
- }
-
- /**
- * Test setValue
- */
- @Test
- public void testSetValue() {
- _valueInstance.setValue(_value);
- verify(_valueInstance).setValue(_value);
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class ValueTest {
+ Value _valueInstance;
+ protected String _value;
+
+ public ValueTest() {
+ }
+
+ @Before
+ public void setUp() {
+ _valueInstance = mock(Value.class);
+ _value = "_value";
+ when(_valueInstance.getValue()).thenReturn(_value);
+ }
+
+ @After
+ public void tearDown() {
+ _valueInstance = null;
+ }
+
+ /**
+ * Test of getValue method
+ */
+ @Test
+ public void testGetValue() {
+ _valueInstance.setValue(_value);
+ assertEquals(_valueInstance.getValue(),_value);
+
+ }
+
+ /**
+ * Test setValue
+ */
+ @Test
+ public void testSetValue() {
+ _valueInstance.setValue(_value);
+ verify(_valueInstance).setValue(_value);
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/VariablesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/VariablesTest.java
index ad61675bbc..d79e5f6294 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tasksbeans/VariablesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tasksbeans/VariablesTest.java
@@ -1,95 +1,95 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.tasksbeans;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class VariablesTest {
-
- Variables _variables;
- protected Value _source;
- protected Value _responseValue;
- protected Value _requestorId;
-
- @Before
- public void setUp() {
- _variables = mock(Variables.class);
- _source = mock(Value.class);
- _responseValue = mock(Value.class);
- _requestorId = mock(Value.class);
-
- when(_variables.getSource()).thenReturn(_source);
- when(_variables.getRequestorId()).thenReturn(_requestorId);
- when(_variables.getResponseValue()).thenReturn(_responseValue);
-
- }
-
- @After
- public void tearDown() {
- _variables = null;
- _source = null;
- _responseValue = null;
- _requestorId = null;
- }
-
- @Test
- public void testGetSource() {
- _variables.setSource(_source);
- assertTrue(_variables.getSource().equals(_source));
- }
-
- @Test
- public void testSetSource(){
- _variables.setSource(_source);
- verify(_variables).setSource(_source);
- }
-
- @Test
- public void testGetResponseValue() {
- _variables.setResponseValue(_responseValue);
- assertTrue(_variables.getResponseValue().equals(_responseValue));
- }
-
- @Test
- public void testSetResponseValue(){
- _variables.setResponseValue(_responseValue);
- verify(_variables).setResponseValue(_responseValue);
- }
-
- @Test
- public void testGetRequestorId() {
- _variables.setRequestorId(_requestorId);
- assertTrue(_variables.getRequestorId().equals(_requestorId));
- }
-
- @Test
- public void testSetRequestorId(){
- _variables.setRequestorId(_requestorId);
- verify(_variables).setRequestorId(_requestorId);
- }
-
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.so.apihandlerinfra.tasksbeans;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class VariablesTest {
+
+ Variables _variables;
+ protected Value _source;
+ protected Value _responseValue;
+ protected Value _requestorId;
+
+ @Before
+ public void setUp() {
+ _variables = mock(Variables.class);
+ _source = mock(Value.class);
+ _responseValue = mock(Value.class);
+ _requestorId = mock(Value.class);
+
+ when(_variables.getSource()).thenReturn(_source);
+ when(_variables.getRequestorId()).thenReturn(_requestorId);
+ when(_variables.getResponseValue()).thenReturn(_responseValue);
+
+ }
+
+ @After
+ public void tearDown() {
+ _variables = null;
+ _source = null;
+ _responseValue = null;
+ _requestorId = null;
+ }
+
+ @Test
+ public void testGetSource() {
+ _variables.setSource(_source);
+ assertTrue(_variables.getSource().equals(_source));
+ }
+
+ @Test
+ public void testSetSource(){
+ _variables.setSource(_source);
+ verify(_variables).setSource(_source);
+ }
+
+ @Test
+ public void testGetResponseValue() {
+ _variables.setResponseValue(_responseValue);
+ assertTrue(_variables.getResponseValue().equals(_responseValue));
+ }
+
+ @Test
+ public void testSetResponseValue(){
+ _variables.setResponseValue(_responseValue);
+ verify(_variables).setResponseValue(_responseValue);
+ }
+
+ @Test
+ public void testGetRequestorId() {
+ _variables.setRequestorId(_requestorId);
+ assertTrue(_variables.getRequestorId().equals(_requestorId));
+ }
+
+ @Test
+ public void testSetRequestorId(){
+ _variables.setRequestorId(_requestorId);
+ verify(_variables).setRequestorId(_requestorId);
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
new file mode 100644
index 0000000000..37813811ee
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
@@ -0,0 +1,289 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.CharEncoding;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.so.apihandlerinfra.ApiHandlerApplication;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.Status;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.Action;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.TenantIsolationRequest;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.embedded.LocalServerPort;
+import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.web.util.UriComponentsBuilder;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+public class CloudOrchestrationTest extends BaseTest {
+
+ private static final String path = "/onap/so/infra/cloudResources/v1";
+ private HttpHeaders headers = new HttpHeaders();
+
+
+ @LocalServerPort
+ private int port;
+
+ @Autowired
+ private InfraActiveRequestsRepository iarRepo;
+
+ @Test
+ public void testCreateOpEnvObjectMapperError() throws IOException {
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ String body = response.getBody().toString();
+ assertTrue(body.contains("Mapping of request to JSON object failed."));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testCreateOpEnvError() throws IOException {
+
+ String request = "{\"requestDetails\":{\"requestInfo\":{\"resourceType\":\"operationalEnvironment\",\"instanceName\": \"myOpEnv\",\"source\": \"VID\",\"requestorId\": \"xxxxxx\"},"
+ + " \"requestParameters\": {\"tenantContext\": \"Test\",\"workloadContext\": \"ECOMP_E2E-IST\"}}}";
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(request, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ String body = response.getBody().toString();
+ assertTrue(body.contains("Mapping of request to JSON object failed"));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testCreateOpEnvReqRecord() throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ TenantIsolationRequest request = mapper.readValue(new File("src/test/resources/TenantIsolation/ECOMPOperationEnvironmentCreate.json"), TenantIsolationRequest.class);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<TenantIsolationRequest> entity = new HttpEntity<TenantIsolationRequest>(request, headers);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("123");
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ iarRepo.saveAndFlush(iar);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ assertEquals(409, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testCreateOperationalEnvironment() throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ TenantIsolationRequest request = mapper.readValue(new File("src/test/resources/TenantIsolation/ECOMPOperationEnvironmentCreate.json"), TenantIsolationRequest.class);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ headers.set("X-TransactionID", "987654321");
+ HttpEntity<TenantIsolationRequest> entity = new HttpEntity<TenantIsolationRequest>(request, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ InfraActiveRequests iar = iarRepo.findOneByRequestId("987654321");
+ assertEquals(iar.getRequestBody(), mapper.writeValueAsString(request.getRequestDetails()));
+ assertEquals(200, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testCreateVNFDuplicateCheck() throws IOException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestId");
+ iar.setOperationalEnvName("myVnfOpEnv");
+ iar.setRequestStatus(Status.IN_PROGRESS.toString());
+ iar.setAction(Action.create.toString());
+ iar.setRequestAction(Action.create.toString());
+ iar.setRequestScope("UNKNOWN");
+ iarRepo.saveAndFlush(iar);
+
+ ObjectMapper mapper = new ObjectMapper();
+ TenantIsolationRequest request = mapper.readValue(new File("src/test/resources/TenantIsolation/VNFOperationEnvironmentCreate.json"), TenantIsolationRequest.class);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<TenantIsolationRequest> entity = new HttpEntity<TenantIsolationRequest>(request, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ assertEquals(409, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testCreateVNF() throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ TenantIsolationRequest request = mapper.readValue(new File("src/test/resources/TenantIsolation/VNFOperationEnvironmentCreate.json"), TenantIsolationRequest.class);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<TenantIsolationRequest> entity = new HttpEntity<TenantIsolationRequest>(request, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ assertEquals(200, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testActivate() throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ TenantIsolationRequest request = mapper.readValue(new File("src/test/resources/TenantIsolation/ActivateOperationEnvironment.json"), TenantIsolationRequest.class);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<TenantIsolationRequest> entity = new HttpEntity<TenantIsolationRequest>(request, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments/ff3514e3-5a33-55df-13ab-12abad84e7ff/activate");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ assertEquals(200, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testDeactivate() throws IOException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("ff3514e3-5a33-55df-13ab-12abad84e7fa");
+ iar.setRequestStatus(Status.COMPLETE.toString());
+ iar.setRequestAction("UNKNOWN");
+ iar.setRequestScope("UNKNOWN");
+ iarRepo.saveAndFlush(iar);
+
+
+ ObjectMapper mapper = new ObjectMapper();
+ TenantIsolationRequest request = mapper.readValue(new File("src/test/resources/TenantIsolation/DeactivateOperationEnvironment.json"), TenantIsolationRequest.class);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<TenantIsolationRequest> entity = new HttpEntity<TenantIsolationRequest>(request, headers);
+
+
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments/ff3514e3-5a33-55df-13ab-12abad84e7fa/deactivate");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ assertEquals(200, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testDeactivateThreadException() throws IOException {
+ //need to simulate a 500 error
+ /*CloudOrchestration co = new CloudOrchestration();
+ TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
+ RequestsDatabase reqDB = mock(RequestsDatabase.class);
+ TenantIsolationRunnable thread = mock(TenantIsolationRunnable.class);
+ Response res = Response.status(500).entity("Failed creating a Thread").build();
+
+ co.setRequestsDatabase(reqDB);
+ co.setThread(thread);
+ co.setTenantIsolationRequest(tenantIsolationRequest);
+ String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/DeactivateOperationEnvironment.json"), CharEncoding.UTF_8);
+ when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(null);
+ doNothing().when(tenantIsolationRequest).createRequestRecord(Status.IN_PROGRESS, Action.deactivate);
+ doThrow(Exception.class).when(thread).run();
+ when(tenantIsolationRequest.buildServiceErrorResponse(any(Integer.class), any(MsoException.class), any(String.class), any(String.class), any(List.class))).thenReturn(res);
+
+ Response response = co.activateOperationEnvironment(request, null, "ff3514e3-5a33-55df-13ab-12abad84e7ff");
+ assertEquals(500, response.getStatus());*/
+ }
+
+ @Test
+ @Ignore
+ public void testDeactivateDupCheck() throws IOException {
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestId");
+ iar.setOperationalEnvName("myVnfOpEnv");
+ iar.setRequestStatus(Status.IN_PROGRESS.toString());
+ iar.setAction(Action.create.toString());
+ iar.setRequestAction(Action.create.toString());
+ iar.setRequestScope("UNKNOWN");
+ iarRepo.saveAndFlush(iar);
+ ObjectMapper mapper = new ObjectMapper();
+ String request = mapper.readValue(new File("src/test/resources/TenantIsolation/DeactivateOperationEnvironment.json"), String.class);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(request, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/operationalEnvironments/ff3514e3-5a33-55df-13ab-12abad84e7ff/deactivate");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ assertEquals(409, response.getStatusCodeValue());
+ }
+
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
new file mode 100644
index 0000000000..cc0b9f64e4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
@@ -0,0 +1,401 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.sql.Timestamp;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.ws.rs.core.MediaType;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.embedded.LocalServerPort;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.util.UriComponentsBuilder;
+
+
+public class CloudResourcesOrchestrationTest extends BaseTest{
+
+ @Autowired
+ private InfraActiveRequestsRepository iarRepo;
+ private String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"VID\",\"requestorId\":\"xxxxxx\" } } }";
+ private static final String path = "/onap/so/infra/cloudResourcesRequests";
+
+ @LocalServerPort
+ private int port;
+
+
+
+ HttpHeaders headers = new HttpHeaders();
+
+ @Test
+ public void testUnlockFailObjectMapping() {
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/test/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ String body = response.getBody();
+ assertTrue(body.contains("Mapping of request to JSON object failed."));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testParseOrchestrationError1() {
+ String requestJSON = "{\"requestDetails\": null }";
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/test/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ String body = response.getBody();
+ assertTrue(body.contains("No valid requestDetails is specified"));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testParseOrchestrationError2() {
+ String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"\",\"requestorId\":\"xxxxxx\" } } }";
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/test/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ String body = response.getBody();
+ assertTrue(body.contains("No valid source is specified"));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testParseOrchestrationError3() {
+ String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"VID\",\"requestorId\":\"\" } } }";
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/test/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ String body = response.getBody();
+ assertTrue(body.contains("No valid requestorId is specified"));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testGetInfraActiveRequestNull() {
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<String>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/request-id-null-check/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ String body = response.getBody();
+ assertTrue(body.contains("Orchestration RequestId request-id-null-check is not found in DB"));
+ assertEquals(400, response.getStatusCodeValue());
+
+ }
+
+ @Test
+ public void testUnlockError() {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestIdtestUnlockError");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvironmentId");
+ iar.setOperationalEnvName("operationalEnvName");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("");
+ iar.setRequestStatus("IN_PROGRESS");
+ iar.setRequestAction("TEST");
+
+ iarRepo.saveAndFlush(iar);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/requestId/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testUnlock() throws ParseException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestIdtestUnlock");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvironmentId");
+ iar.setOperationalEnvName("operationalEnvName");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("{}");
+ iar.setRequestStatus("IN_PROGRESS");
+ iar.setRequestAction("TEST");
+
+ DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ Date date = dateFormat.parse("23/09/2007");
+ long time = date.getTime();
+ iar.setStartTime(new Timestamp(time));
+
+ iarRepo.saveAndFlush(iar);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/requestIdtestUnlock/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+
+ assertEquals(204, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testUnlockComplete() throws ParseException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestIdtestUnlockComplete");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvironmentId");
+ iar.setOperationalEnvName("operationalEnvName");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("{}");
+ iar.setRequestStatus("COMPLETE");
+ iar.setRequestAction("TEST");
+
+ DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ Date date = dateFormat.parse("23/09/2007");
+ long time = date.getTime();
+ iar.setStartTime(new Timestamp(time));
+
+ iarRepo.saveAndFlush(iar);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(requestJSON, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1/requestIdtestUnlockComplete/unlock");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.POST, entity, String.class);
+ String body = response.getBody().toString();
+ assertTrue(body.contains("Orchestration RequestId requestIdtestUnlockComplete has a status of COMPLETE and can not be unlocked"));
+ assertEquals(400, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testGetOperationalEnvFilter() {
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(null, headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1");
+
+ builder.queryParam("requestId", "not-there");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+
+ //204s cannot have a body
+ //assertTrue(response.getBody().contains("Orchestration RequestId not-there is not found in DB"));
+ assertEquals(204, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testGetOperationalEnvSuccess() throws ParseException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("90c56827-1c78-4827-bc4d-6afcdb37a51f");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvironmentId");
+ iar.setOperationalEnvName("operationalEnvName");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("{}");
+ iar.setRequestStatus("COMPLETE");
+ iar.setRequestAction("TEST");
+
+ DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ Date date = dateFormat.parse("23/09/2007");
+ long time = date.getTime();
+ iar.setStartTime(new Timestamp(time));
+
+ iarRepo.saveAndFlush(iar);
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>("", headers);
+
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1");
+
+ builder.queryParam("requestId", "90c56827-1c78-4827-bc4d-6afcdb37a51f");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+
+ assertEquals(200, response.getStatusCodeValue());
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+ assertEquals("90c56827-1c78-4827-bc4d-6afcdb37a51f", response.getHeaders().get("X-TransactionID").get(0));
+ }
+
+ @Test
+ public void testGetOperationalEnvFilterSuccess() throws ParseException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestIdtestGetOperationalEnvFilterSuccess");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvironmentId");
+ iar.setOperationalEnvName("myVnfOpEnv");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("");
+ iar.setRequestStatus("COMPLETE");
+ iar.setStatusMessage("status Message");
+ iar.setProgress(20L);
+ iar.setRequestAction("TEST");
+
+ DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ Date date = dateFormat.parse("23/09/2007");
+ long time = date.getTime();
+ iar.setStartTime(new Timestamp(time));
+ iar.setEndTime(new Timestamp(time));
+
+ iarRepo.saveAndFlush(iar);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(null, headers);
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1");
+
+ builder.queryParam("requestId", "requestIdtestGetOperationalEnvFilterSuccess");
+ builder.queryParam("operationalEnvironmentName", "myVnfOpEnv");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+
+ assertEquals(200, response.getStatusCodeValue());
+ assertEquals("application/json", response.getHeaders().get(HttpHeaders.CONTENT_TYPE).get(0));
+ assertEquals("0", response.getHeaders().get("X-MinorVersion").get(0));
+ assertEquals("0", response.getHeaders().get("X-PatchVersion").get(0));
+ assertEquals("1.0.0", response.getHeaders().get("X-LatestVersion").get(0));
+
+ }
+
+ @Test
+ public void testGetOperationalEnvFilterException1() throws ParseException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestId-getOpEnvFilterEx1");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvironmentId");
+ iar.setOperationalEnvName("operationalEnvName");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("");
+ iar.setRequestStatus("COMPLETE");
+ iar.setRequestAction("TEST");
+
+ iarRepo.saveAndFlush(iar);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>("", headers);
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1");
+
+ builder.queryParam("filter", "operationalEnvironmentName:EQUALS:myVnfOpEnv");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+ assertEquals(500, response.getStatusCodeValue());
+ }
+
+ @Test
+ public void testGetOperationalEnvFilterException2() throws ParseException {
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("requestIdFilterException2");
+ iar.setRequestScope("requestScope");
+ iar.setRequestType("requestType");
+ iar.setOperationalEnvId("operationalEnvId");
+ iar.setOperationalEnvName("operationalEnvName");
+ iar.setRequestorId("xxxxxx");
+ iar.setRequestBody("");
+ iar.setRequestStatus("COMPLETE");
+ iar.setRequestAction("TEST");
+
+ iarRepo.saveAndFlush(iar);
+
+ headers.set("Accept", MediaType.APPLICATION_JSON);
+ headers.set("Content-Type", MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(null, headers);
+ UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(createURLWithPort(path) + "/v1");
+
+ builder.queryParam("operationalEnvironmentName", "");
+
+ ResponseEntity<String> response = restTemplate.exchange(
+ builder.toUriString(),
+ HttpMethod.GET, entity, String.class);
+
+
+ assertEquals(500, response.getStatusCodeValue());
+ assertTrue(response.getBody().toString().contains("No valid operationalEnvironmentName value is specified"));
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
new file mode 100644
index 0000000000..37ec14a0b5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
@@ -0,0 +1,114 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation;
+
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.startsWith;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Matchers.contains;
+import static org.mockito.Mockito.doNothing;
+
+import javax.inject.Provider;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.ApiHandlerApplication;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.exceptions.ValidateException;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.Action;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+
+
+public class ModelDistributionRequestTest extends BaseTest{
+
+ private static final String requestJSON = "{\"status\": \"DISTRIBUTION_COMPLETE_ERROR\", \"errorReason\": \"Distribution failed in AAI\" }";
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+ @Mock
+ private Provider<TenantIsolationRunnable> thread;
+ @InjectMocks
+ @Spy
+ private ModelDistributionRequest request = new ModelDistributionRequest();
+ @Mock
+ private TenantIsolationRunnable runnable = new TenantIsolationRunnable();
+
+ @Before
+ public void beforeTest() {
+ Mockito.when(thread.get()).thenReturn(runnable);
+ }
+
+ @Test
+ public void testObjectMapperError() throws ApiException{
+ thrown.expect(ValidateException.class);
+ thrown.expectMessage(startsWith("Mapping of request to JSON object failed"));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_BAD_REQUEST)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ request.updateModelDistributionStatus("", null, null);
+ }
+
+ @Test
+ public void testParseError1() throws ApiException{
+ thrown.expect(ValidateException.class);
+ thrown.expectMessage(startsWith("No valid status is specified"));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_BAD_REQUEST)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ String requestErrorJSON = "{\"errorReason\": \"Distribution failed in AAI\" }";
+ request.updateModelDistributionStatus(requestErrorJSON, null, null);
+ }
+
+ @Test
+ public void testParseError2() throws ApiException{
+ thrown.expect(ValidateException.class);
+ thrown.expectMessage(startsWith("No valid errorReason is specified"));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_BAD_REQUEST)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_BAD_PARAMETER)));
+ String requestErrorJSON = "{\"status\": \"DISTRIBUTION_COMPLETE_ERROR\"}";
+ request.updateModelDistributionStatus(requestErrorJSON, null, null);
+ }
+
+ @Test
+ public void testSuccess() throws ApiException{
+ doNothing().when(runnable).run(any(Action.class), anyString(), any(CloudOrchestrationRequest.class), anyString());
+
+ Response response = request.updateModelDistributionStatus(requestJSON, null, null);
+
+ assertEquals(200, response.getStatus());
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/TenantIsolationRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequestTest.java
index d2d7959622..426be98486 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/TenantIsolationRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/TenantIsolationRequestTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,27 +18,34 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.tenantisolation;
+package org.onap.so.apihandlerinfra.tenantisolation;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import java.util.HashMap;
-import org.apache.commons.io.IOUtils;
-import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Rule;
import org.junit.Test;
-import org.openecomp.mso.apihandler.common.ValidationException;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.TenantIsolationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.Action;
+import org.junit.rules.ExpectedException;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.Action;
+import org.onap.so.exceptions.ValidationException;
+import org.springframework.test.context.ActiveProfiles;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
-public class TenantIsolationRequestTest {
+public class TenantIsolationRequestTest extends BaseTest{
+ @Rule
+ public ExpectedException expectedException = ExpectedException.none();
+
@Test
public void testParseCloudResourceECOMP() throws Exception{
try {
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/ECOMPOperationEnvironmentCreate.json"));
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/ECOMPOperationEnvironmentCreate.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -53,7 +60,7 @@ public class TenantIsolationRequestTest {
@Test
public void testParseCloudResourceVNF() throws Exception{
try {
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/VNFOperationEnvironmentCreate.json"));
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/VNFOperationEnvironmentCreate.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -65,9 +72,11 @@ public class TenantIsolationRequestTest {
}
}
- @Test(expected=ValidationException.class)
+ @Test
public void testParseCloudResourceVNFInvalid() throws Exception {
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/VNFOperationEnvironmentCreateInvalid.json"));
+ expectedException.expect(ValidationException.class);
+
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/VNFOperationEnvironmentCreateInvalid.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -79,7 +88,7 @@ public class TenantIsolationRequestTest {
@Test
public void testParseActivateCloudResource() throws Exception{
try {
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/ActivateOperationEnvironment.json"));
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/ActivateOperationEnvironment.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -91,9 +100,11 @@ public class TenantIsolationRequestTest {
}
}
- @Test(expected = ValidationException.class)
+ @Test
public void testParseActivateCloudResourceInvalid() throws Exception{
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/ActivateOperationEnvironmentInvalid.json"));
+ expectedException.expect(ValidationException.class);
+
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/ActivateOperationEnvironmentInvalid.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -105,7 +116,7 @@ public class TenantIsolationRequestTest {
@Test
public void testParseDeactivateCloudResource() throws Exception{
try {
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/DeactivateOperationEnvironment.json"));
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/DeactivateOperationEnvironment.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -117,9 +128,11 @@ public class TenantIsolationRequestTest {
}
}
- @Test(expected= ValidationException.class)
+ @Test
public void testParseDeactivateCloudResourceInvalid() throws Exception{
- String requestJSON = IOUtils.toString (ClassLoader.class.getResourceAsStream ("/DeactivateOperationEnvironmentInvalid.json"));
+ expectedException.expect(ValidationException.class);
+
+ String requestJSON = new String(Files.readAllBytes(Paths.get("src/test/resources/TenantIsolation/DeactivateOperationEnvironmentInvalid.json")));
ObjectMapper mapper = new ObjectMapper();
HashMap<String, String> instanceIdMap = new HashMap<String,String>();
CloudOrchestrationRequest cor = mapper.readValue(requestJSON, CloudOrchestrationRequest.class);
@@ -127,4 +140,4 @@ public class TenantIsolationRequestTest {
request.parse(cor, instanceIdMap, Action.deactivate);
assertNotNull(request.getRequestId());
}
-} \ No newline at end of file
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClientTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClientTest.java
index 539b1816bd..ef57fa1a76 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClientTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/DmaapOperationalEnvClientTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,10 +18,9 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap;
+package org.onap.so.apihandlerinfra.tenantisolation.dmaap;
import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.spy;
import java.io.IOException;
import java.nio.file.Files;
@@ -29,31 +28,36 @@ import java.nio.file.Paths;
import java.text.ParseException;
import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap.CreateEcompOperationEnvironmentBean;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap.DmaapOperationalEnvClient;
+import org.junit.runner.RunWith;
+import org.onap.so.apihandlerinfra.ApiHandlerApplication;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
import com.fasterxml.jackson.databind.ObjectMapper;
-public class DmaapOperationalEnvClientTest {
+public class DmaapOperationalEnvClientTest extends BaseTest{
- private final String fileLocation = "src/test/resources/org/openecomp/mso/client/asdc/create-ecompoe/";
+ private final String fileLocation = "src/test/resources/org/onap/so/client/asdc/create-ecompoe/";
private static final String operationalEnvironmentId = "28122015552391";
private static final String operationalEnvironmentName = "OpEnv-name";
private static final String operationalEnvironmentType = "VNF";
private static final String tenantContext = "Test";
private static final String workloadContext = "VNF_E2E-IST";
private static final String action = "Create";
-
+ @Autowired
+ private DmaapOperationalEnvClient client;
@Test
- public void verifyCreateEcompOperationEnvironmentRequest() throws IOException, ParseException{
+ public void verifyCreateEcompOperationEnvironmentRequest() throws IOException, ApiException {
String content = this.getJson("ecomp-openv-request.json");
ObjectMapper mapper = new ObjectMapper();
CreateEcompOperationEnvironmentBean expected = mapper.readValue(content, CreateEcompOperationEnvironmentBean.class);
- DmaapOperationalEnvClient client = new DmaapOperationalEnvClient();
- DmaapOperationalEnvClient spy = spy(client);
- String actual = spy.buildRequest(operationalEnvironmentId, operationalEnvironmentName, operationalEnvironmentType,
+ String actual = client.buildRequest(operationalEnvironmentId, operationalEnvironmentName, operationalEnvironmentType,
tenantContext, workloadContext, action);
assertEquals("payloads are equal", mapper.writeValueAsString(expected), actual);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java
index a9763f1d39..59df7ae960 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/OperationalEnvironmentPublisherTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,38 +18,34 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap;
+package org.onap.so.apihandlerinfra.tenantisolation.dmaap;
import static org.junit.Assert.assertEquals;
import java.io.FileNotFoundException;
import java.io.IOException;
-import org.junit.BeforeClass;
import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap.OperationalEnvironmentPublisher;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesException;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.junit.runner.RunWith;
+import org.onap.so.apihandlerinfra.ApiHandlerApplication;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
-public class OperationalEnvironmentPublisherTest {
- private static final String APIH_INFRA_PROP = MsoJavaProperties.class.getClassLoader().getResource("mso.apihandler-infra.properties").toString().substring(5);
-
- @BeforeClass
- public static void setUp() throws MsoPropertiesException {
- MsoPropertiesFactory propertiesFactory = new MsoPropertiesFactory();
- propertiesFactory.removeAllMsoProperties();
- propertiesFactory.initializeMsoProperties("MSO_PROP_APIHANDLER_INFRA", APIH_INFRA_PROP);
- }
+public class OperationalEnvironmentPublisherTest extends BaseTest {
+
+ @Autowired
+ private OperationalEnvironmentPublisher publisher;
@Test
public void getProperties() throws FileNotFoundException, IOException {
- OperationalEnvironmentPublisher publisher = new OperationalEnvironmentPublisher();
- assertEquals("m97898@mso.ecomp.att.com", publisher.getUserName());
+ assertEquals("testuser", publisher.getUserName());
assertEquals("VjR5NDcxSzA=", publisher.getPassword());
- assertEquals("com.att.ecomp.mso.operationalEnvironmentEvent", publisher.getTopic());
- assertEquals("https://dcae-mrtr-ftl3.ecomp.cci.att.com:3905", publisher.getHost().get());
+ assertEquals("test.operationalEnvironmentEvent", publisher.getTopic());
+ assertEquals("http://localhost:" + env.getProperty("wiremock.server.port"), publisher.getHost().get());
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/AsdcDmaapClientTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java
index f62b360071..3fcfa5dfa8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/dmaap/AsdcDmaapClientTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/dmaap/SDCDmaapClientTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap;
+package org.onap.so.apihandlerinfra.tenantisolation.dmaap;
import static org.junit.Assert.assertEquals;
@@ -26,13 +26,14 @@ import java.io.IOException;
import java.text.ParseException;
import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap.CreateEcompOperationEnvironmentBean;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.tenantisolation.dmaap.CreateEcompOperationEnvironmentBean;
import com.fasterxml.jackson.databind.ObjectMapper;
-public class AsdcDmaapClientTest {
+public class SDCDmaapClientTest extends BaseTest{
- private final String fileLocation = "src/test/resources/org/openecomp/mso/client/asdc/create-ecompoe/";
+ private final String fileLocation = "src/test/resources/org/onap/so/client/asdc/create-ecompoe/";
private static final String operationalEnvironmentId = "28122015552391";
private static final String operationalEnvironmentName = "Operational Environment Name";
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/TasksHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/SDCClientCallFailedTest.java
index 91225190a3..5ee2eeaeba 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/TasksHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/SDCClientCallFailedTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,28 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra;
+package org.onap.so.apihandlerinfra.tenantisolation.exceptions;
-import static org.junit.Assert.assertTrue;
-
-import java.text.ParseException;
-
-import javax.ws.rs.core.Response;
+import static org.junit.Assert.assertEquals;
import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
-public class TasksHandlerTest {
+public class SDCClientCallFailedTest extends BaseTest{
- TasksHandler handler = new TasksHandler();
+ @Test
+ public void testAsdcException() {
+ SDCClientCallFailed asdc = new SDCClientCallFailed("failed");
+
+ assertEquals("failed", asdc.getMessage());
+ }
@Test
- public void queryFiltersTest() throws ParseException{
- Response resp = handler.queryFilters("10020", "399495", "test", "nfRole", "buildingBlockName", "originalRequestDate", "originalRequestorId", "v2");
- assertTrue(resp.getEntity().toString() != null);
+ public void testAsdcExceptionWithCause() {
+ SDCClientCallFailed asdc = new SDCClientCallFailed("failed", new Throwable("throwable"));
+
+ assertEquals("failed", asdc.getMessage());
+ assertEquals("throwable", asdc.getCause().getMessage());
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/TenantIsolationExceptionTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/TenantIsolationExceptionTest.java
new file mode 100644
index 0000000000..f73a194a7b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/exceptions/TenantIsolationExceptionTest.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.exceptions;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+
+public class TenantIsolationExceptionTest extends BaseTest{
+
+ @Test
+ public void testTenantIsolation() {
+ TenantIsolationException exception = new TenantIsolationException();
+
+ assertNotNull(exception);
+ }
+
+ @Test
+ public void testTenantIsolationException() {
+ TenantIsolationException exception = new TenantIsolationException("exception");
+
+ assertEquals("Tenant Isolation error: exception", exception.getMessage());
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
new file mode 100644
index 0000000000..9aa961c665
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
@@ -0,0 +1,147 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.helpers;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyString;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import org.apache.http.HttpStatus;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.client.aai.AAIVersion;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.objects.AAIOperationalEnvironment;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+
+public class AAIClientHelperTest extends BaseTest{
+
+ @Autowired
+ private AAIClientHelper clientHelper;
+
+ @Test
+ public void testGetAaiOperationalEnvironmentSuccess() throws Exception {
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ AAIResultWrapper wrapper = clientHelper.getAaiOperationalEnvironment("EMOE-001");
+ Optional<AAIOperationalEnvironment> aaiOpEnv = wrapper.asBean(AAIOperationalEnvironment.class);
+ assertEquals("EMOE-001", aaiOpEnv.get().getOperationalEnvironmentId());
+ }
+
+ @Test
+ public void testUpdateSuccess() {
+ stubFor(post(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ AAIOperationalEnvironment ecompEnv = new AAIOperationalEnvironment();
+ ecompEnv.setTenantContext("Test");
+ ecompEnv.setWorkloadContext("ECOMPL_PSL");
+
+ try {
+ AAIClientHelper clientHelper = mock(AAIClientHelper.class);
+ doNothing().when(clientHelper).updateAaiOperationalEnvironment(any(String.class), any(AAIOperationalEnvironment.class));
+ clientHelper.updateAaiOperationalEnvironment("EMOE-001", ecompEnv);
+
+ verify(clientHelper, times(1)).updateAaiOperationalEnvironment("EMOE-001", ecompEnv);
+ } catch(Exception e) {
+ fail("shouldn't reach here");
+ }
+ }
+
+ @Test
+ public void testUpdateMapSuccess() {
+ stubFor(post(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ Map<String, String> payload = new HashMap<String, String>();
+ payload.put("tenant-context", "Test");
+ payload.put("workload-context", "ECOMPL_PSL");
+
+ try {
+ AAIClientHelper clientHelper = mock(AAIClientHelper.class);
+ doNothing().when(clientHelper).updateAaiOperationalEnvironment("EMOE-001", payload);
+ clientHelper.updateAaiOperationalEnvironment("EMOE-001", payload);
+
+ verify(clientHelper, times(1)).updateAaiOperationalEnvironment("EMOE-001", payload);
+ } catch(Exception e) {
+ fail("shouldn't reach here");
+ }
+ }
+
+ @Test
+ public void testCreateSuccess() {
+ stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ AAIOperationalEnvironment ecompEnv = new AAIOperationalEnvironment();
+ ecompEnv.setOperationalEnvironmentId("opeEvnId");
+ ecompEnv.setTenantContext("Test");
+ ecompEnv.setWorkloadContext("ECOMPL_PSL");
+
+ try {
+ AAIClientHelper clientHelper = mock(AAIClientHelper.class);
+ doNothing().when(clientHelper).createOperationalEnvironment(any(AAIOperationalEnvironment.class));
+ clientHelper.createOperationalEnvironment(ecompEnv);
+
+ verify(clientHelper, times(1)).createOperationalEnvironment(ecompEnv);
+ } catch(Exception e) {
+ fail("shouldn't reach here");
+ }
+ }
+
+ @Test
+ public void testcreateRelationshipSuccess() {
+ stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ AAIOperationalEnvironment ecompEnv = new AAIOperationalEnvironment();
+ ecompEnv.setTenantContext("Test");
+ ecompEnv.setWorkloadContext("ECOMPL_PSL");
+
+ try {
+ AAIClientHelper clientHelper = mock(AAIClientHelper.class);
+ doNothing().when(clientHelper).createRelationship(anyString(), anyString());
+ clientHelper.createRelationship("managingEcomp", "vnfOp");
+
+ verify(clientHelper, times(1)).createRelationship("managingEcomp", "vnfOp");
+ } catch(Exception e) {
+ fail("shouldn't reach here");
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java
index 12312764c3..cf6facc59f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientObjectBuilderTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,21 +18,22 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.tenantisolation.helpers;
+package org.onap.so.apihandlerinfra.tenantisolation.helpers;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.OperationalEnvironment;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestDetails;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestInfo;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestParameters;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.OperationalEnvironment;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestDetails;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestInfo;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestParameters;
import com.fasterxml.jackson.databind.ObjectMapper;
-public class AAIClientObjectBuilderTest {
+public class AAIClientObjectBuilderTest extends BaseTest{
private String expectedAAIObject = "{\"operational-environment-name\":\"TEST_ECOMP_ENVIRONMENT\",\"operational-environment-type\":\"ECOMP\",\"operational-environment-status\":\"Active\",\"tenant-context\":\"TEST\",\"workload-context\":\"ECOMP_TEST\"}";
private CloudOrchestrationRequest request;
@@ -60,8 +61,8 @@ public class AAIClientObjectBuilderTest {
@Test
public void testGetAaiClientObjectBuilder() throws Exception {
- AAIClientObjectBuilder builder = new AAIClientObjectBuilder(request);
- assertEquals(expectedAAIObject, mapper.writeValueAsString(builder.buildAAIOperationalEnvironment("Active")));
+ AAIClientObjectBuilder builder = new AAIClientObjectBuilder();
+ assertEquals(expectedAAIObject, mapper.writeValueAsString(builder.buildAAIOperationalEnvironment("Active", request)));
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java
new file mode 100644
index 0000000000..3e06275fca
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/ActivateVnfDBHelperTest.java
@@ -0,0 +1,142 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.helpers;
+
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.onap.so.apihandlerinfra.ApiHandlerApplication;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.DistributionStatus;
+import org.onap.so.db.request.beans.OperationalEnvDistributionStatus;
+import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+
+
+public class ActivateVnfDBHelperTest extends BaseTest{
+
+ String operationalEnvironmentId = "TEST_operationalEnvironmentId";
+ String requestId = "TEST_requestId";
+ String origRequestId = "TEST_requestId";
+
+ String workloadContext1 = "TEST_workloadContext1";
+ String serviceModelVersionId1 = "TEST_serviceModelVersionId1";
+ String distributionId1 = "TEST_distributionId1";
+ String errorReason = "ABORTED";
+ int retryCountThree = 3;
+ int retryCountZero = 0;
+ String recoveryActionRetry = "RETRY";
+ String statusOk = DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString();
+ String statusError = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
+ String statusSent = "SENT";
+
+ OperationalEnvDistributionStatus expectedDistStatus;
+ OperationalEnvServiceModelStatus expectedServiceModelStatus;
+
+ @Autowired
+ private ActivateVnfDBHelper dbHelper;
+
+ @Before
+ public void testSetUp() {
+ // prepare expected OperationalEnvDistributionStatus object
+ expectedDistStatus = new OperationalEnvDistributionStatus();
+ expectedDistStatus.setDistributionId(distributionId1);
+ expectedDistStatus.setOperationalEnvId(operationalEnvironmentId);
+ expectedDistStatus.setServiceModelVersionId(serviceModelVersionId1);
+ expectedDistStatus.setDistributionIdStatus(statusOk);
+ expectedDistStatus.setRequestId(requestId);
+ expectedDistStatus.setDistributionIdErrorReason("");
+
+ // prepare expected OperationalEnvServiceModelStatus object
+ expectedServiceModelStatus = new OperationalEnvServiceModelStatus();
+ expectedServiceModelStatus.setRequestId(requestId);
+ expectedServiceModelStatus.setOperationalEnvId(operationalEnvironmentId);
+ expectedServiceModelStatus.setServiceModelVersionId(serviceModelVersionId1);
+ expectedServiceModelStatus.setServiceModelVersionDistrStatus(statusOk);
+ expectedServiceModelStatus.setRecoveryAction(recoveryActionRetry);
+ expectedServiceModelStatus.setRetryCount(new Integer(retryCountThree));
+ expectedServiceModelStatus.setWorkloadContext(workloadContext1);
+ }
+
+ @Test
+ public void testOperationalEnvDistributionStatusDbMethods() throws Exception {
+
+ // test insert method
+ OperationalEnvDistributionStatus distStatus1 =
+ dbHelper.insertRecordToOperationalEnvDistributionStatus(distributionId1,
+ operationalEnvironmentId,
+ serviceModelVersionId1,
+ requestId,
+ statusOk,
+ "");
+ assertThat(distStatus1, sameBeanAs(expectedDistStatus));
+
+ // prepare updated expected object
+ OperationalEnvDistributionStatus expectedUpdatedDistStatus = expectedDistStatus;
+ expectedUpdatedDistStatus.setDistributionIdStatus(statusError);
+ expectedUpdatedDistStatus.setDistributionIdErrorReason(errorReason);
+
+ // test update method - statusOk to statusError
+ OperationalEnvDistributionStatus distStatus2 =
+ dbHelper.updateStatusInOperationalEnvDistributionStatus(distStatus1,
+ statusError,
+ errorReason
+ );
+ assertThat(distStatus2, sameBeanAs(expectedUpdatedDistStatus));
+
+ }
+
+ @Test
+ public void testOperationalEnvServiceModelStatusDbMethods() throws Exception {
+
+ // test insert method
+ OperationalEnvServiceModelStatus serviceModelStatus1 =
+ dbHelper.insertRecordToOperationalEnvServiceModelStatus(requestId,
+ operationalEnvironmentId,
+ serviceModelVersionId1,
+ statusOk,
+ recoveryActionRetry,
+ retryCountThree,
+ workloadContext1);
+ assertThat(serviceModelStatus1, sameBeanAs(expectedServiceModelStatus));
+
+ // prepare updated expected object
+ OperationalEnvServiceModelStatus expectedUpdatedServiceModelStatus = serviceModelStatus1;
+ expectedUpdatedServiceModelStatus.setServiceModelVersionDistrStatus(statusError);
+ expectedUpdatedServiceModelStatus.setRetryCount(new Integer(retryCountZero));
+
+ // test update method - update statusOk to statusError & retryCountThree to retryCountZero
+ OperationalEnvServiceModelStatus serviceModelStatus2 =
+ dbHelper.updateRetryCountAndStatusInOperationalEnvServiceModelStatus(serviceModelStatus1,
+ statusError,
+ retryCountZero);
+ assertThat(serviceModelStatus2, sameBeanAs(expectedUpdatedServiceModelStatus));
+
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelperTest.java
new file mode 100644
index 0000000000..7fd92d2d7e
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelperTest.java
@@ -0,0 +1,194 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.helpers;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.apache.http.HttpStatus;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class SDCClientHelperTest extends BaseTest{
+
+ String serviceModelVersionId = "TEST_uuid1";
+ String operationalEnvironmentId = "TEST_operationalEnvironmentId";
+ String workloadContext = "TEST_workloadContext";
+
+ @Autowired
+ private SDCClientHelper sdcClientUtils;
+
+ @Test
+ public void postActivateOperationalEnvironment_Test() throws ApiException {
+
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("statusCode", "202");
+ jsonObject.put("message", "Success");
+ jsonObject.put("distributionId", "TEST_distributionId");
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_uuid1/distr.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ JSONObject jsonResponse = sdcClientUtils.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext);
+
+ assertEquals("202", jsonResponse.get("statusCode"));
+ assertEquals("Success", jsonResponse.get("message"));
+
+ }
+
+ @Test
+ public void postActivateOperationalEnvironment_InvalidJson_Test() throws ApiException {
+
+ // ERROR in asdc response, invalid json object
+ JSONObject jsonErrorResponse = new JSONObject();
+ jsonErrorResponse.put("requestError", "");
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_uuid1/distr.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonErrorResponse.toString()).withStatus(HttpStatus.SC_BAD_REQUEST)));
+
+ JSONObject jsonResponse = sdcClientUtils.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext);
+
+ assertEquals("500", jsonResponse.get("statusCode"));
+ assertEquals("", jsonResponse.get("messageId"));
+ assertEquals(" Encountered Error while calling SDC POST Activate. JSONObject[\"requestError\"] is not a JSONObject.", jsonResponse.get("message"));
+
+ }
+
+ @Test
+ public void buildUriBuilderTest() {
+
+ try {
+ String url = sdcClientUtils.buildUriBuilder(serviceModelVersionId, operationalEnvironmentId);
+ assertEquals("http://localhost:" + env.getProperty("wiremock.server.port") + "/sdc/v1/catalog/services/TEST_uuid1/distribution/TEST_operationalEnvironmentId/activate", url);
+
+ } catch (Exception e) {
+ fail("Exception caught: " + e.getMessage());
+
+ }
+ }
+
+
+ @Test
+ public void buildJsonWorkloadContextTest() throws JSONException {
+
+ String jsonPayload = sdcClientUtils.buildJsonWorkloadContext(workloadContext);
+ assertEquals("{\"workloadContext\":\"TEST_workloadContext\"}", jsonPayload);
+
+ }
+
+ @Test
+ public void enhanceJsonResponseTest_Success() throws JSONException {
+
+ // build success response data
+ JSONObject sdcResponseJsonObj = new JSONObject();
+ sdcResponseJsonObj.put("distributionId", "TEST_distributionId");
+
+ int statusCode = 202;
+ sdcResponseJsonObj = sdcClientUtils.enhanceJsonResponse(sdcResponseJsonObj, statusCode);
+
+ assertEquals("202", sdcResponseJsonObj.getString("statusCode"));
+ assertEquals("", sdcResponseJsonObj.getString("messageId"));
+ assertEquals("Success", sdcResponseJsonObj.getString("message"));
+ assertEquals("TEST_distributionId", sdcResponseJsonObj.getString("distributionId"));
+
+ }
+
+ @Test
+ public void enhanceJsonResponseTest_Error() throws JSONException {
+
+ // build error response data
+ JSONObject jsonMessages = new JSONObject();
+ jsonMessages.put("messageId", "SVC4675");
+ jsonMessages.put("text", "Error: Service state is invalid for this action.");
+ JSONObject jsonServException = new JSONObject();
+ jsonServException.put("serviceException", jsonMessages);
+ JSONObject jsonErrorRequest = new JSONObject();
+ jsonErrorRequest.put("requestError", jsonServException);
+
+ String responseData = jsonErrorRequest.toString();
+
+ JSONObject sdcResponseJsonObj = new JSONObject(responseData);
+ int statusCode = 409;
+ sdcResponseJsonObj = sdcClientUtils.enhanceJsonResponse(sdcResponseJsonObj, statusCode);
+
+ assertEquals("409", sdcResponseJsonObj.getString("statusCode"));
+ assertEquals("SVC4675", sdcResponseJsonObj.getString("messageId"));
+ assertEquals("Error: Service state is invalid for this action.", sdcResponseJsonObj.getString("message"));
+
+ }
+
+ @Test
+ public void enhanceJsonResponseTest_Error_policyException() throws JSONException {
+
+ // build error response data
+ JSONObject jsonMessages = new JSONObject();
+ jsonMessages.put("messageId", "POL5003");
+ jsonMessages.put("text", "Error: Not authorized to use the API.");
+ JSONObject jsonServException = new JSONObject();
+ jsonServException.put("policyException", jsonMessages);
+ JSONObject jsonErrorRequest = new JSONObject();
+ jsonErrorRequest.put("requestError", jsonServException);
+
+ String responseData = jsonErrorRequest.toString();
+
+ JSONObject sdcResponseJsonObj = new JSONObject(responseData);
+ int statusCode = 403;
+ sdcResponseJsonObj = sdcClientUtils.enhanceJsonResponse(sdcResponseJsonObj, statusCode);
+
+ assertEquals("403", sdcResponseJsonObj.getString("statusCode"));
+ assertEquals("POL5003", sdcResponseJsonObj.getString("messageId"));
+ assertEquals("Error: Not authorized to use the API.", sdcResponseJsonObj.getString("message"));
+
+ }
+
+ @Test
+ public void enhanceJsonResponseTest_Error_UnexpectedFormat() throws JSONException {
+
+ // build error response data
+ JSONObject jsonMessages = new JSONObject();
+ jsonMessages.put("messageId", "POL5003");
+ jsonMessages.put("text", "Error: Not authorized to use the API.");
+ JSONObject jsonServException = new JSONObject();
+ jsonServException.put("policyException", jsonMessages);
+ JSONObject jsonErrorRequest = new JSONObject();
+ jsonErrorRequest.put("unexpectedResponseTag", jsonServException);
+
+ String responseData = jsonErrorRequest.toString();
+
+ JSONObject sdcResponseJsonObj = new JSONObject(responseData);
+ int statusCode = 403;
+ sdcResponseJsonObj = sdcClientUtils.enhanceJsonResponse(sdcResponseJsonObj, statusCode);
+
+ assertEquals("500", sdcResponseJsonObj.getString("statusCode"));
+ assertEquals("Undefined Error Message!", sdcResponseJsonObj.getString("messageId"));
+ assertEquals("Unexpected response format from SDC.", sdcResponseJsonObj.getString("message"));
+
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java
new file mode 100644
index 0000000000..3c991ef0c5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java
@@ -0,0 +1,238 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.process;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.http.HttpStatus;
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
+import org.onap.so.apihandlerinfra.tenantisolation.helpers.AAIClientHelper;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.Manifest;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RecoveryAction;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestDetails;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestParameters;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.ServiceModelList;
+import org.onap.so.client.aai.AAIVersion;
+import org.onap.so.client.aai.entities.AAIResultWrapper;
+import org.onap.so.client.aai.objects.AAIOperationalEnvironment;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.beans.OperationalEnvDistributionStatus;
+import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository;
+import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+public class ActivateVnfOperationalEnvironmentTest extends BaseTest{
+
+ @Autowired
+ private OperationalEnvDistributionStatusRepository distributionDbRepository;
+ @Autowired
+ private OperationalEnvServiceModelStatusRepository serviceModelDbRepository;
+ @Autowired
+ private ActivateVnfOperationalEnvironment activateVnf;
+ @Autowired
+ private InfraActiveRequestsRepository infraActiveRequestsRepository;
+ @Autowired
+ private AAIClientHelper clientHelper;
+
+ String requestId = "TEST_requestId";
+ String operationalEnvironmentId = "EMOE-001";
+ CloudOrchestrationRequest request = new CloudOrchestrationRequest();
+ String workloadContext = "PVT";
+ String recoveryActionRetry = "RETRY";
+ String serviceModelVersionId = "TEST_serviceModelVersionId";
+ int retryCount = 3;
+ String sdcDistributionId = "TEST_distributionId";
+ String statusSent = "SENT";
+
+ @After
+ public void after() throws Exception {
+ distributionDbRepository.deleteAll();
+ serviceModelDbRepository.deleteAll();
+ }
+
+ @Test
+ public void getAAIOperationalEnvironmentTest() throws Exception {
+
+ AAIOperationalEnvironment aaiOpEnv = null;
+
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ AAIResultWrapper wrapper = clientHelper.getAaiOperationalEnvironment("EMOE-001");
+ aaiOpEnv = wrapper.asBean(AAIOperationalEnvironment.class).get();
+ assertEquals("EMOE-001", aaiOpEnv.getOperationalEnvironmentId());
+ assertNotNull(activateVnf.getAAIOperationalEnvironment(operationalEnvironmentId));
+ assertEquals( "EMOE-001", activateVnf.getAAIOperationalEnvironment(operationalEnvironmentId).getOperationalEnvironmentId());
+
+ }
+
+ @Test
+ public void executionTest() throws Exception {
+
+ List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>();
+ ServiceModelList serviceModelList1 = new ServiceModelList();
+ serviceModelList1.setRecoveryAction(RecoveryAction.retry);
+ serviceModelList1.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelVersionIdList.add(serviceModelList1);
+
+ RequestDetails requestDetails = new RequestDetails();
+ RequestParameters requestParameters = new RequestParameters();
+ Manifest manifest = new Manifest();
+ manifest.setServiceModelList(serviceModelVersionIdList);
+ requestParameters.setManifest(manifest);
+ requestParameters.setWorkloadContext(workloadContext);
+ requestDetails.setRequestParameters(requestParameters);
+
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+ request.setRequestDetails(requestDetails);
+
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("statusCode", "202");
+ jsonObject.put("message", "Success");
+ jsonObject.put("distributionId", sdcDistributionId);
+
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED)));
+
+
+ activateVnf.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+
+ // insert record, status sent
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusSent, distStatus.getDistributionIdStatus());
+
+ // insert record, status sent
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+
+ }
+
+ @Test
+ public void processActivateSDCRequestTest_202() throws Exception {
+
+ String distributionId = "TEST_distributionId";
+
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("statusCode", "202");
+ jsonObject.put("message", "Success");
+ jsonObject.put("distributionId", distributionId);
+
+ // prepare request detail
+ List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>();
+ ServiceModelList serviceModelList1 = new ServiceModelList();
+ serviceModelList1.setRecoveryAction(RecoveryAction.retry);
+ serviceModelList1.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelVersionIdList.add(serviceModelList1);
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ activateVnf.processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext,
+ distributionDbRepository, serviceModelDbRepository);
+
+ // insert record, status sent
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusSent, distStatus.getDistributionIdStatus());
+
+ // insert record, status sent
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+
+ }
+
+ @Test
+ public void processActivateSDCRequestTest_409() throws Exception {
+
+ // ERROR in asdc
+ JSONObject jsonMessages = new JSONObject();
+ jsonMessages.put("message", "Failure");
+ jsonMessages.put("messageId", "SVC4675");
+ jsonMessages.put("text", "Error: Service state is invalid for this action.");
+ JSONObject jsonServException = new JSONObject();
+ jsonServException.put("policyException", jsonMessages);
+ //jsonServException.put("serviceException", jsonMessages);
+ JSONObject jsonErrorResponse = new JSONObject();
+ jsonErrorResponse.put("requestError", jsonServException);
+
+ // prepare request detail
+ List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>();
+ ServiceModelList serviceModelList1 = new ServiceModelList();
+ serviceModelList1.setRecoveryAction(RecoveryAction.retry);
+ serviceModelList1.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelVersionIdList.add(serviceModelList1);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestId);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonErrorResponse.toString()).withStatus(HttpStatus.SC_CONFLICT)));
+
+ try {
+ activateVnf.processActivateSDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext,
+ distributionDbRepository, serviceModelDbRepository);
+
+ } catch (Exception ex) {
+
+ // insert record, status sent
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus());
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED"));
+
+ }
+
+ infraActiveRequestsRepository.delete(requestId);
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java
new file mode 100644
index 0000000000..3dcac0da18
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java
@@ -0,0 +1,640 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.process;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.hamcrest.Matchers.startsWith;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.http.HttpStatus;
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
+import org.onap.so.apihandlerinfra.tenantisolation.helpers.ActivateVnfDBHelper;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.Distribution;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.DistributionStatus;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.Status;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.beans.OperationalEnvDistributionStatus;
+import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.onap.so.db.request.data.repository.OperationalEnvDistributionStatusRepository;
+import org.onap.so.db.request.data.repository.OperationalEnvServiceModelStatusRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ActivateVnfStatusOperationalEnvironmentTest extends BaseTest{
+
+ @Autowired
+ private OperationalEnvDistributionStatusRepository distributionDbRepository;
+ @Autowired
+ private OperationalEnvServiceModelStatusRepository serviceModelDbRepository;
+ @Autowired
+ private ActivateVnfStatusOperationalEnvironment activateVnfStatus;
+ @Autowired
+ private InfraActiveRequestsRepository infraActiveRequestsRepository;
+ @Autowired
+ private ActivateVnfDBHelper dbHelper;
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ private String requestId = "TEST_requestId";
+ private String requestIdOrig = "TEST_requestIdOrig";
+ private String operationalEnvironmentId = "TEST_operationalEnvironmentId";
+ private CloudOrchestrationRequest request = new CloudOrchestrationRequest();
+ private String workloadContext = "TEST_workloadContext";
+ private String recoveryActionRetry = "RETRY";
+ private String recoveryActionAbort = "ABORT";
+ private String recoveryActionSkip = "SKIP";
+ private String serviceModelVersionId = "TEST_serviceModelVersionId";
+ private String serviceModelVersionId1 = "TEST_serviceModelVersionId1";
+ private int retryCountThree = 3;
+ private int retryCountTwo = 2;
+ private int retryCountZero = 0;
+ private String sdcDistributionId = "TEST_distributionId";
+ private String sdcDistributionId1 = "TEST_distributionId1";
+ private String statusOk = Status.DISTRIBUTION_COMPLETE_OK.toString();
+ private String statusError = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
+ private String statusSent = "SENT";
+
+ @After
+ public void after() throws Exception {
+ distributionDbRepository.deleteAll();
+ serviceModelDbRepository.deleteAll();
+ }
+
+ @Test
+ public void checkOrUpdateOverallStatusTest_Ok() throws Exception {
+
+ // two entries, both status Ok & retry 0
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountZero);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusOk);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId1);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountZero);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusOk);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig, serviceModelDbRepository);
+
+ // overall is success
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("COMPLETE"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+ }
+
+ @Test
+ public void checkOrUpdateOverallStatusTest_Error() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountZero);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ try {
+ activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig, serviceModelDbRepository);
+ }catch(ApiException e){
+ assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. "));
+ assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST);
+ assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ }
+
+ // overall is failure
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+ }
+
+ @Test
+ public void checkOrUpdateOverallStatusTest_Waiting() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountTwo);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ activateVnfStatus.checkOrUpdateOverallStatus(operationalEnvironmentId, requestIdOrig, serviceModelDbRepository);
+
+ // do nothing, waiting for more
+ assertNull(infraActiveRequestsRepository.findOne(requestIdOrig));
+ }
+
+ @Test
+ public void executionTest_Ok() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountThree);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusSent);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusSent);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+ distributionDbRepository.saveAndFlush(distributionDb);
+
+
+
+ // prepare distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_OK);
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+
+ // status ok
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusOk, distStatus.getDistributionIdStatus());
+ assertEquals("", distStatus.getDistributionIdErrorReason());
+
+ // status ok
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+ assertEquals(statusOk, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(new Integer(retryCountZero), servStatus.getRetryCount());
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("COMPLETE"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+
+ }
+
+ @Test
+ public void executionTest_ERROR_Status_And_RETRY() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountThree);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusError);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+ distributionDbRepository.saveAndFlush(distributionDb);
+
+
+
+ // prepare new distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
+ distribution.setErrorReason("Unable to process.");
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ // prepare sdc return data
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("statusCode", "202");
+ jsonObject.put("message", "Success");
+ jsonObject.put("distributionId", sdcDistributionId1);
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+
+ // old distributionId, status error
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusError, distStatus.getDistributionIdStatus());
+ assertEquals("Unable to process.", distStatus.getDistributionIdErrorReason());
+
+ // new distributionId, status sent
+ OperationalEnvDistributionStatus newDistStatus = distributionDbRepository.findOne(sdcDistributionId1);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, newDistStatus.getOperationalEnvId());
+ assertEquals(statusSent, newDistStatus.getDistributionIdStatus());
+ assertEquals("", newDistStatus.getDistributionIdErrorReason());
+
+ // count is less 1, status sent
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+ assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(new Integer(retryCountTwo), servStatus.getRetryCount());
+
+ // no update
+ assertNull(infraActiveRequestsRepository.findOne(requestIdOrig));
+
+ }
+
+ @Test
+ public void executionTest_ERROR_Status_And_RETRY_And_RetryZero() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountZero);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusError);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+ distributionDbRepository.saveAndFlush(distributionDb);
+
+
+
+ // prepare distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("statusCode", "202");
+ jsonObject.put("message", "Success");
+ jsonObject.put("distributionId", sdcDistributionId);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ try {
+ activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+ }catch(ApiException e){
+ assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. "));
+ assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST);
+ assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ }
+
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusError, distStatus.getDistributionIdStatus());
+ assertEquals(null, distStatus.getDistributionIdErrorReason());
+
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+ assertEquals(statusError, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(new Integer(retryCountZero), servStatus.getRetryCount());
+
+ // Retry count is zero, no more retry. all retry failed.
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+
+ }
+
+ @Test
+ public void executionTest_ERROR_Status_And_RETRY_And_ErrorSdc() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountThree);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusError);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+ distributionDbRepository.saveAndFlush(distributionDb);
+
+
+
+ // prepare distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
+ distribution.setErrorReason("Unable to process.");
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ // ERROR in sdc
+ JSONObject jsonMessages = new JSONObject();
+ jsonMessages.put("statusCode", "409");
+ jsonMessages.put("message", "Undefined Error Message!");
+ jsonMessages.put("messageId", "SVC4675");
+ jsonMessages.put("text", "Error: Service state is invalid for this action.");
+ JSONObject jsonServException = new JSONObject();
+ jsonServException.put("serviceException", jsonMessages);
+ JSONObject jsonErrorRequest = new JSONObject();
+ jsonErrorRequest.put("requestError", jsonServException);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonMessages.toString()).withStatus(HttpStatus.SC_CONFLICT)));
+
+ try {
+ activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+ }catch(ApiException e){
+ assertThat(e.getMessage(), startsWith("Failure calling SDC: statusCode: "));
+ assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST);
+ assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ }
+ // status as-is / no changes
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusError, distStatus.getDistributionIdStatus());
+ assertEquals(null, distStatus.getDistributionIdErrorReason());
+
+ // status as-is / no changes
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+ assertEquals(statusError, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(new Integer(retryCountThree), servStatus.getRetryCount());
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED"));
+ assertTrue(infraActiveRequest.getStatusMessage().contains("Undefined Error Message!"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+
+ }
+
+ @Test
+ public void executionTest_ERROR_Status_And_SKIP() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionSkip);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountThree);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusError);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+ distributionDbRepository.saveAndFlush(distributionDb);
+
+
+
+ // prepare distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("COMPLETE"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+
+ }
+
+ @Test
+ public void executionTest_ERROR_Status_And_ABORT() throws Exception {
+
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionAbort);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountThree);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusError);
+ serviceModelDbRepository.saveAndFlush(serviceModelDb);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusError);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+ distributionDbRepository.saveAndFlush(distributionDb);
+
+
+
+ // prepare distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestIdOrig);
+ iar.setRequestStatus("PENDING");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ try {
+ activateVnfStatus.execute(requestId, request, distributionDbRepository, serviceModelDbRepository);
+ }catch(ApiException e){
+ assertThat(e.getMessage(), startsWith("Overall Activation process is a Failure. "));
+ assertEquals(e.getHttpResponseCode(), HttpStatus.SC_BAD_REQUEST);
+ assertEquals(e.getMessageID(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR);
+ }
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestIdOrig);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE"));
+ assertTrue(infraActiveRequest.getRequestStatus().contains("FAILED"));
+
+ // cleanup
+ infraActiveRequestsRepository.delete(requestIdOrig);
+
+ }
+
+ @Test
+ @Ignore
+ public void callSDClientForRetryTest_202() throws Exception {
+ OperationalEnvServiceModelStatus serviceModelDb = new OperationalEnvServiceModelStatus();
+ serviceModelDb.setRequestId(requestIdOrig);
+ serviceModelDb.setServiceModelVersionId(serviceModelVersionId);
+ serviceModelDb.setWorkloadContext(workloadContext);
+ serviceModelDb.setRecoveryAction(recoveryActionRetry);
+ serviceModelDb.setOperationalEnvId(operationalEnvironmentId);
+ serviceModelDb.setRetryCount(retryCountThree);
+ serviceModelDb.setServiceModelVersionDistrStatus(statusSent);
+
+ OperationalEnvDistributionStatus distributionDb = new OperationalEnvDistributionStatus();
+ distributionDb.setDistributionId(sdcDistributionId);
+ distributionDb.setRequestId(requestIdOrig);
+ distributionDb.setOperationalEnvId(operationalEnvironmentId);
+ distributionDb.setDistributionIdStatus(statusSent);
+ distributionDb.setServiceModelVersionId(serviceModelVersionId);
+ distributionDb.setDistributionIdErrorReason(null);
+
+
+
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("statusCode", "202");
+ jsonObject.put("message", "Success");
+ jsonObject.put("distributionId", sdcDistributionId1);
+
+ // prepare distribution obj
+ Distribution distribution = new Distribution();
+ distribution.setStatus(Status.DISTRIBUTION_COMPLETE_OK);
+ request.setDistribution(distribution);
+ request.setDistributionId(sdcDistributionId);
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+
+ stubFor(post(urlPathMatching("/sdc/v1/catalog/services/TEST_serviceModelVersionId/distr.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(jsonObject.toString()).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ JSONObject jsonResponse = activateVnfStatus.callSDClientForRetry(distributionDb, serviceModelDb, distribution,
+ distributionDbRepository, serviceModelDbRepository);
+
+ assertEquals("TEST_distributionId1", jsonResponse.get("distributionId"));
+ assertEquals("Success", jsonResponse.get("message"));
+ assertEquals("202", jsonResponse.get("statusCode"));
+
+ // insert new record, status sent
+ OperationalEnvDistributionStatus distStatus = distributionDbRepository.findOne(sdcDistributionId1);
+ assertNotNull(distStatus);
+ assertEquals(operationalEnvironmentId, distStatus.getOperationalEnvId());
+ assertEquals(statusSent, distStatus.getDistributionIdStatus());
+
+ // insert new record, status sent
+ OperationalEnvServiceModelStatus servStatus = serviceModelDbRepository.findOneByOperationalEnvIdAndServiceModelVersionId(operationalEnvironmentId, serviceModelVersionId);
+ assertNotNull(servStatus);
+ assertEquals(statusSent, servStatus.getServiceModelVersionDistrStatus());
+ assertEquals(operationalEnvironmentId, servStatus.getOperationalEnvId());
+
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
new file mode 100644
index 0000000000..d64cf6106a
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.process;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.http.HttpStatus;
+import org.junit.Test;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.exceptions.ValidateException;
+import org.onap.so.apihandlerinfra.logging.ErrorLoggerInfo;
+import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.OperationalEnvironment;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestDetails;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestInfo;
+import org.onap.so.apihandlerinfra.tenantisolationbeans.RequestParameters;
+import org.onap.so.client.aai.AAIVersion;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.onap.so.logger.MessageEnum;
+import org.onap.so.logger.MsoLogger;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+public class CreateEcompOperationalEnvironmentTest extends BaseTest{
+
+ @Autowired
+ private CreateEcompOperationalEnvironment createEcompOpEn;
+ @Autowired
+ private InfraActiveRequestsRepository infraActiveRequestsRepository;
+
+ public CloudOrchestrationRequest getCloudOrchestrationRequest() {
+ CloudOrchestrationRequest request = new CloudOrchestrationRequest();
+ RequestDetails reqDetails = new RequestDetails();
+ RequestInfo reqInfo = new RequestInfo();
+ RequestParameters reqParams = new RequestParameters();
+ reqParams.setTenantContext("TEST");
+ reqParams.setWorkloadContext("ECOMP_TEST");
+ reqParams.setOperationalEnvironmentType(OperationalEnvironment.ECOMP);
+ reqInfo.setInstanceName("TEST_ECOMP_ENVIRONMENT");
+ reqDetails.setRequestInfo(reqInfo);
+ reqDetails.setRequestParameters(reqParams);
+ request.setRequestDetails(reqDetails);
+ request.setOperationalEnvironmentId("operationalEnvId");
+
+ return request;
+ }
+
+ @Test
+ public void testProcess() throws ApiException {
+ stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(post(urlPathMatching("/events/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("123");
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ createEcompOpEn.execute("123", getCloudOrchestrationRequest());
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOneByRequestId("123");
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESS"));
+ assertTrue(infraActiveRequest.getRequestStatus().equals("COMPLETE"));
+ }
+
+ @Test
+ public void testProcessException() {
+ stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(post(urlPathMatching("/events/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_NOT_FOUND)));
+ ErrorLoggerInfo errorLoggerInfo = new ErrorLoggerInfo.Builder(MessageEnum.APIH_GENERAL_EXCEPTION, MsoLogger.ErrorCode.DataError).build();
+ ValidateException expectedException = new ValidateException.Builder("Could not publish DMaap", HttpStatus.SC_BAD_REQUEST, ErrorNumbers.SVC_BAD_PARAMETER)
+ .errorInfo(errorLoggerInfo).build();
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId("123");
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ try {
+ createEcompOpEn.execute("123", getCloudOrchestrationRequest());
+ }catch(ApiException e){
+ assertThat(e, sameBeanAs((ApiException) expectedException).ignoring("cause"));
+ }
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOneByRequestId("123");
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("FAILURE"));
+ assertTrue(infraActiveRequest.getRequestStatus().equals("FAILED"));
+ }
+
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
new file mode 100644
index 0000000000..8fe40f31a4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
@@ -0,0 +1,146 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.process;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.nio.file.Files;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.http.HttpStatus;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ApiException;
+import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
+import org.onap.so.client.aai.AAIVersion;
+import org.onap.so.client.aai.objects.AAIOperationalEnvironment;
+import org.onap.so.client.grm.beans.Property;
+import org.onap.so.client.grm.beans.ServiceEndPointList;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+public class CreateVnfOperationalEnvironmentTest extends BaseTest{
+
+ private CloudOrchestrationRequest request;
+ private ServiceEndPointList serviceEndpoints;
+
+ @Autowired
+ private CreateVnfOperationalEnvironment createVnfOpEnv;
+ @Autowired
+ private InfraActiveRequestsRepository infraActiveRequestsRepository;
+
+ @Before
+ public void testSetUp() throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ String jsonRequest = getFileContentsAsString("__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json");
+ request = mapper.readValue(jsonRequest, CloudOrchestrationRequest.class);
+ String jsonServiceEndpoints = getFileContentsAsString("__files/vnfoperenv/endpoints.json");
+ serviceEndpoints = mapper.readValue(jsonServiceEndpoints, ServiceEndPointList.class);
+ }
+
+ @Test
+ public void testGetEcompManagingEnvironmentId() throws Exception {
+ createVnfOpEnv.setRequest(request);
+ assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff000", createVnfOpEnv.getEcompManagingEnvironmentId());
+ }
+
+ @Test
+ public void testGetTenantContext() throws Exception {
+ createVnfOpEnv.setRequest(request);
+ assertEquals("Test", createVnfOpEnv.getTenantContext());
+ }
+
+ @Test
+ public void testGetEnvironmentName() throws Exception {
+ createVnfOpEnv.setRequest(request);
+ List<Property> props = serviceEndpoints.getServiceEndPointList().get(0).getProperties();
+ assertEquals("DEV", createVnfOpEnv.getEnvironmentName(props));
+ }
+
+ @Test
+ public void testBuildServiceNameForVnf() throws Exception {
+ createVnfOpEnv.setRequest(request);
+ assertEquals("Test.VNF_E2E-IST.Inventory", createVnfOpEnv.buildServiceNameForVnf("TEST.ECOMP_PSL.Inventory"));
+ }
+
+ @Test
+ public void testGetSearchKey() {
+ createVnfOpEnv.setRequest(request);
+ AAIOperationalEnvironment ecompEnv = new AAIOperationalEnvironment();
+ ecompEnv.setTenantContext("Test");
+ ecompEnv.setWorkloadContext("ECOMPL_PSL");
+ assertEquals("Test.ECOMPL_PSL.*", createVnfOpEnv.getSearchKey(ecompEnv));
+ }
+
+ public String getFileContentsAsString(String fileName) {
+ String content = "";
+ try {
+ ClassLoader classLoader = this.getClass().getClassLoader();
+ File file = new File(classLoader.getResource(fileName).getFile());
+ content = new String(Files.readAllBytes(file.toPath()));
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ System.out.println("Exception encountered reading " + fileName + ". Error: " + e.getMessage());
+ }
+ return content;
+ }
+
+ @Test
+ public void testExecute() throws ApiException{
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(post(urlPathMatching("/GRMLWPService/v1/serviceEndPoint/findRunning"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/endpoints.json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(post(urlPathMatching("/GRMLWPService/v1/serviceEndPoint/add"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBodyFile("vnfoperenv/ecompOperationalEnvironment.json").withStatus(HttpStatus.SC_ACCEPTED)));
+ String requestId = UUID.randomUUID().toString();
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestId);
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+ createVnfOpEnv.execute(requestId, request);
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESS"));
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
new file mode 100644
index 0000000000..a9be10c3f4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
@@ -0,0 +1,160 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.tenantisolation.process;
+
+import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
+import static com.github.tomakehurst.wiremock.client.WireMock.get;
+import static com.github.tomakehurst.wiremock.client.WireMock.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.put;
+import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching;
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.startsWith;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.http.HttpStatus;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onap.so.apihandler.common.ErrorNumbers;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.apihandlerinfra.exceptions.ValidateException;
+import org.onap.so.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
+import org.onap.so.client.aai.AAIVersion;
+import org.onap.so.db.request.beans.InfraActiveRequests;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class DeactivateVnfOperationalEnvironmentTest extends BaseTest{
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ @Autowired
+ private DeactivateVnfOperationalEnvironment deactivate;
+ @Autowired
+ private InfraActiveRequestsRepository infraActiveRequestsRepository;
+
+ private CloudOrchestrationRequest request = new CloudOrchestrationRequest();
+ private String operationalEnvironmentId = "ff3514e3-5a33-55df-13ab-12abad84e7ff";
+ private String requestId = "ff3514e3-5a33-55df-13ab-12abad84e7fe";
+
+ @Test
+ public void testDeactivateOperationalEnvironment() throws Exception {
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+ request.setRequestDetails(null);
+
+ String json = "{\"operational-environment-status\" : \"ACTIVE\"}";
+
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json).withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(put(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+ stubFor(post(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_ACCEPTED)));
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestId);
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ deactivate.execute(requestId, request);
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESSFUL"));
+
+ }
+
+ @Test
+ public void testDeactivateInvalidStatus() throws Exception {
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+ request.setRequestDetails(null);
+
+ String json = "{\"operational-environment-status\" : \"SUCCESS\"}";
+
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ thrown.expect(ValidateException.class);
+ thrown.expectMessage(startsWith("Invalid OperationalEnvironmentStatus on OperationalEnvironmentId: "));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_BAD_REQUEST)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR)));
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestId);
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ deactivate.execute(requestId, request);
+ }
+
+ @Test
+ public void testDeactivateInactiveStatus() throws Exception {
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+ request.setRequestDetails(null);
+
+ String json = "{\"operational-environment-status\" : \"INACTIVE\"}";
+
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ InfraActiveRequests iar = new InfraActiveRequests();
+ iar.setRequestId(requestId);
+ iar.setOperationalEnvName("myOpEnv");
+ iar.setRequestScope("create");
+ iar.setRequestStatus("PENDING");
+ iar.setRequestAction("UNKNOWN");
+ infraActiveRequestsRepository.saveAndFlush(iar);
+
+ deactivate.execute(requestId, request);
+
+ InfraActiveRequests infraActiveRequest = infraActiveRequestsRepository.findOne(requestId);
+ assertNotNull(infraActiveRequest);
+ assertTrue(infraActiveRequest.getStatusMessage().contains("SUCCESS"));
+ }
+
+ @Test
+ public void testDeactivateNullStatus() throws Exception {
+ request.setOperationalEnvironmentId(operationalEnvironmentId);
+ request.setRequestDetails(null);
+
+ String json = "{\"operational-environment-status\" : \"\"}";
+
+ stubFor(get(urlPathMatching("/aai/" + AAIVersion.LATEST + "/cloud-infrastructure/operational-environments/.*"))
+ .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json).withStatus(HttpStatus.SC_ACCEPTED)));
+
+ thrown.expect(ValidateException.class);
+ thrown.expectMessage(startsWith("OperationalEnvironmentStatus is null on OperationalEnvironmentId: "));
+ thrown.expect(hasProperty("httpResponseCode", is(HttpStatus.SC_BAD_REQUEST)));
+ thrown.expect(hasProperty("messageID", is(ErrorNumbers.SVC_DETAILED_SERVICE_ERROR)));
+ deactivate.execute(requestId, request);
+ }
+}
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
index 7cf60d339d..8236e6766f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/tenantisolationbeans/TenantIsolationBeansTest.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,44 +18,70 @@
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.apihandlerinfra.tenantisolationbeans;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import com.openpojo.reflection.PojoClass;
-import com.openpojo.reflection.filters.FilterPackageInfo;
-import com.openpojo.reflection.impl.PojoClassFactory;
-import com.openpojo.validation.Validator;
-import com.openpojo.validation.ValidatorBuilder;
-import com.openpojo.validation.affirm.Affirm;
-import com.openpojo.validation.rule.impl.GetterMustExistRule;
-import com.openpojo.validation.rule.impl.SetterMustExistRule;
-import com.openpojo.validation.test.impl.GetterTester;
-import com.openpojo.validation.test.impl.SetterTester;
-
-public class TenantIsolationBeansTest {
-
- private static final int EXPECTED_CLASS_COUNT = 26;
- private static final String POJO_PACKAGE = "org.openecomp.mso.apihandlerinfra.tenantisolationbeans";
-
- @Test
- public void ensureExpectedPojoCount() {
- List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses( POJO_PACKAGE,
- new FilterPackageInfo());
- Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
- }
-
- @Test
- public void testPojoStructureAndBehavior() {
- Validator validator = ValidatorBuilder.create()
- .with(new GetterMustExistRule())
- .with(new SetterMustExistRule())
- .with(new SetterTester())
- .with(new GetterTester())
- .build();
-
- validator.validate(POJO_PACKAGE, new FilterPackageInfo());
- }
-}
+package org.onap.so.apihandlerinfra.tenantisolationbeans;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.List;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.BaseTest;
+
+import com.openpojo.reflection.PojoClass;
+import com.openpojo.reflection.filters.FilterPackageInfo;
+import com.openpojo.reflection.impl.PojoClassFactory;
+import com.openpojo.validation.Validator;
+import com.openpojo.validation.ValidatorBuilder;
+import com.openpojo.validation.affirm.Affirm;
+import com.openpojo.validation.rule.impl.GetterMustExistRule;
+import com.openpojo.validation.rule.impl.SetterMustExistRule;
+import com.openpojo.validation.test.impl.GetterTester;
+import com.openpojo.validation.test.impl.SetterTester;
+
+public class TenantIsolationBeansTest extends BaseTest{
+
+ private static final int EXPECTED_CLASS_COUNT = 25;
+ private static final String POJO_PACKAGE = "org.onap.so.apihandlerinfra.tenantisolationbeans";
+
+ @Test
+ public void ensureExpectedPojoCount() {
+ List<PojoClass> pojoClasses = PojoClassFactory.getPojoClasses( POJO_PACKAGE,
+ new FilterPackageInfo());
+ Affirm.affirmEquals("Classes added / removed?", EXPECTED_CLASS_COUNT, pojoClasses.size());
+ }
+
+ @Test
+ public void testPojoStructureAndBehavior() {
+ Validator validator = ValidatorBuilder.create()
+ .with(new GetterMustExistRule())
+ .with(new SetterMustExistRule())
+ .with(new SetterTester())
+ .with(new GetterTester())
+ .build();
+
+ validator.validate(POJO_PACKAGE, new FilterPackageInfo());
+ }
+
+ @Test
+ public void testTenantIsolationToString() {
+ TenantIsolationRequest request = new TenantIsolationRequest();
+ request.setRequestId("requestId");
+ request.setRequestScope("scope");
+ request.setRequestType("type");
+ request.setStartTime("time");
+ request.setRequestDetails(new RequestDetails());
+ request.setRequestStatus(new RequestStatus());
+
+ assertNotNull(request.toString());
+ }
+
+ @Test
+ public void testRequestListToString() {
+ RequestList list = new RequestList();
+ list.setRequest(new Request());
+ list.setRequestStatus(new RequestStatus());
+
+ assertNotNull(list.toString());
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java
new file mode 100644
index 0000000000..93542c0a76
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * 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.so.apihandlerinfra.validation;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+
+import org.junit.Test;
+import org.onap.so.apihandlerinfra.Action;
+import org.onap.so.apihandlerinfra.BaseTest;
+import org.onap.so.exceptions.ValidationException;
+import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class RelatedInstancesValidationTest extends BaseTest{
+
+ @Test
+ public void testCreateVnfNetworkCollection() throws IOException, ValidationException {
+ String requestJson = new String(Files.readAllBytes(Paths.get("src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json")));
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesRequest sir = mapper.readValue(requestJson, ServiceInstancesRequest.class);
+ ValidationInformation info = new ValidationInformation(sir, new HashMap<String, String>(), Action.createInstance,
+ 6, false, sir.getRequestDetails().getRequestParameters());
+ info.setRequestScope("vnf");
+ sir.setServiceInstanceId("0fd90c0c-0e3a-46e2-abb5-4c4820d5985b");
+ sir.getRequestDetails().getModelInfo().setModelCustomizationName("name");
+ RelatedInstancesValidation validation = new RelatedInstancesValidation();
+ validation.validate(info);
+
+ assertEquals(info.getVnfType(), "Test/name");
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeanTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeanTest.java
deleted file mode 100644
index 9028109735..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/BeanTest.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.vnfbeans.VnfInputs;
-
-public class BeanTest {
-
- @Test
- public void testVnfInputs(){
- VnfInputs bean = new VnfInputs();
- bean.setAicCloudRegion("south");
- bean.setAicNodeClli("38982");
- bean.setAsdcServiceModelVersion("v2");
- bean.setBackoutOnFailure(false);
- bean.setIsBaseVfModule(true);
- bean.setPersonaModelId("2017");
- bean.setPersonaModelVersion("v3");
- bean.setProvStatus("active");
- bean.setServiceId("123456");
- bean.setServiceInstanceId("aaa1234");
- bean.setServiceType("vnf");
- bean.setTenantId("89903042");
- bean.setVfModuleId("4993022");
- bean.setVfModuleModelName("m1");
- bean.setVnfId("34");
- bean.setVnfName("test");
- bean.setVnfPersonaModelId("1002");
- bean.setVnfPersonaModelVersion("v3");
- bean.setVnfType("fddf");
- bean.setVolumeGroupId("7889");
- bean.setVolumeGroupName("test");
-
- String str = bean.toString();
- assertTrue(str != null);
-
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
deleted file mode 100644
index 901e03fc17..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
+++ /dev/null
@@ -1,1327 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra;
-
-import static org.junit.Assert.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.message.BasicHttpResponse;
-import org.hibernate.Session;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.openecomp.mso.apihandler.common.CamundaClient;
-import org.openecomp.mso.apihandler.common.RequestClient;
-import org.openecomp.mso.apihandler.common.RequestClientFactory;
-import org.openecomp.mso.apihandler.common.RequestClientParamater;
-import org.openecomp.mso.apihandler.common.ValidationException;
-import org.openecomp.mso.db.AbstractSessionFactoryManager;
-import org.openecomp.mso.db.catalog.CatalogDatabase;
-import org.openecomp.mso.db.catalog.beans.Service;
-import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-import org.openecomp.mso.requestsdb.OperationStatus;
-import org.openecomp.mso.requestsdb.RequestsDatabase;
-import org.openecomp.mso.serviceinstancebeans.ServiceInstancesRequest;
-
-import mockit.Expectations;
-import mockit.Mock;
-import mockit.MockUp;
-import mockit.Mocked;
-
-public class E2EServiceInstancesTest {
-
- private final String compareModelsRequest = "{" +
- "\"globalSubscriberId\": \"60c3e96e-0970-4871-b6e0-3b6de7561519\"," +
- "\"serviceType\": \"vnf\"," +
- "\"modelInvariantIdTarget\": \"60c3e96e-0970-4871-b6e0-3b6de1234567\"," +
- "\"modelVersionIdTarget\": \"modelVersionIdTarget\"" +
- "}";
-
- private final String scaleRequest = "{\"service\":{\"serviceType\":\"example-service-type\",\"globalSubscriberId\":\"test_custormer\",\"resources\":[{\"resourceInstanceId\":\"ns111\",\"scaleType\":\"SCALE_NS\",\"scaleNsData\":{\"scaleNsByStepsData\":{\"numberOfSteps\":\"4\",\"aspectId\":\"TIC_EDGE_HW\",\"scalingDirection\":\"UP\"}}}],\"serviceInstanceName\":\"XXXX\"}}";
-
- String jsonBody = "{" +
- "\"service\": {" +
- "\"name\": \"so_test4\"," +
- "\"description\": \"so_test2\"," +
- "\"serviceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561519\"," +
- "\"serviceUuid\": \"592f9437-a9c0-4303-b9f6-c445bb7e9814\"," +
- "\"globalSubscriberId\": \"123457\"," +
- "\"serviceType\": \"voLTE\"," +
- "\"parameters\": {" +
- "\"resources\": [" +
- "{" +
- "\"resourceName\": \"vIMS\"," +
- "\"resourceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561516\"," +
- "\"resourceUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561512\"," +
- "\"parameters\": {" +
- "\"locationConstraints\": [" +
- "{" +
- "\"vnfProfileId\": \"zte-vBAS-1.0\"," +
- "\"locationConstraints\": {" +
- "\"vimId\": \"4050083f-465f-4838-af1e-47a545222ad0\"" +
- "}" +
- "}," +
- "{" +
- "\"vnfProfileId\": \"zte-vMME-1.0\"," +
- "\"locationConstraints\": {" +
- "\"vimId\": \"4050083f-465f-4838-af1e-47a545222ad0\"" +
- "}" +
- "}" +
- "]" +
- "}" +
- "}," +
- "{" +
- "\"resourceName\": \"vEPC\"," +
- "\"resourceInvariantUuid\": \"61c3e96e-0970-4871-b6e0-3b6de7561516\"," +
- "\"resourceUuid\": \"62c3e96e-0970-4871-b6e0-3b6de7561512\"," +
- "\"parameters\": {" +
- "\"locationConstraints\": [" +
- "{" +
- "\"vnfProfileId\": \"zte-CSCF-1.0\"," +
- "\"locationConstraints\": {" +
- "\"vimId\": \"4050083f-465f-4838-af1e-47a545222ad1\"" +
- "}" +
- "}" +
- "]" +
- "}" +
- "}," +
- "{" +
- "\"resourceName\": \"underlayvpn\"," +
- "\"resourceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561513\"," +
- "\"resourceUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561514\"," +
- "\"parameters\": {" +
- "\"locationConstraints\": []" +
- "}" +
- "}," +
- "{" +
- "\"resourceName\": \"overlayvpn\"," +
- "\"resourceInvariantUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561517\"," +
- "\"resourceUuid\": \"60c3e96e-0970-4871-b6e0-3b6de7561518\"," +
- "\"parameters\": {" +
- "\"locationConstraints\": []" +
- "}" +
- "}" +
- "]," +
- "\"requestInputs\": {" +
- "\"externalDataNetworkName\": \"Flow_out_net\"," +
- "\"m6000_mng_ip\": \"181.18.20.2\"," +
- "\"externalCompanyFtpDataNetworkName\": \"Flow_out_net\"," +
- "\"externalPluginManageNetworkName\": \"plugin_net_2014\"," +
- "\"externalManageNetworkName\": \"mng_net_2017\"," +
- "\"sfc_data_network\": \"sfc_data_net_2016\"," +
- "\"NatIpRange\": \"210.1.1.10-210.1.1.20\"," +
- "\"location\": \"4050083f-465f-4838-af1e-47a545222ad0\"," +
- "\"sdncontroller\": \"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"" +
- "}" +
- "}" +
- "}" +
- "}";
-
- @BeforeClass
- public static void setUp() throws Exception {
-
- MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- msoPropertiesFactory.removeAllMsoProperties();
- msoPropertiesFactory.initializeMsoProperties(Constants.MSO_PROP_APIHANDLER_INFRA, "src/test/resources/mso.apihandler-infra.properties");
- }
-
- @Test
- public void createE2EServiceInstanceTestSuccess() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("success"));
- }
-
- @Test
- public void createE2EServiceInstanceTestBpelHTTPException() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 500,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- @Test
- public void createE2EServiceInstanceTestBpelHTTPExceptionWithNullREsponseBody() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 500,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- @Test
- public void createE2EServiceInstanceTestNullBPELResponse() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- HttpResponse resp = null;
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestBPMNNullREsponse() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(String camundaReqXML, String requestId,
- String requestTimeout, String schemaVersion,
- String serviceInstanceId, String action) {
- HttpResponse resp = null;
- return resp;
- }
- };
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestNullBpmn() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- ;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestNullReceipe() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestNullDBResponse() {
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestInvalidRequest() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestEmptyDBQuery() {
-
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- // assertTrue(true);
- }
-
- @Test
- public void createE2EServiceInstanceTestDBQueryFail() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceName(
- String serviceName) {
- OperationStatus operationStatus = new OperationStatus();
- return operationStatus;
- }
- };
-
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("serviceException"));
- }
-
- @Test
- public void createE2EServiceInstanceTestForEmptyRequest() {
-
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = "";
- Response resp = instance.createE2EServiceInstance(request, "v3");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr
- .contains("Mapping of request to JSON object failed. No content to map due to end-of-input"));
- }
-
- @Test
- public void deleteE2EServiceInstanceTestNormal() {
-
- final MockUp<CatalogDatabase> mockCDB = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
-
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- rec.setOrchestrationUri("/test/delE2E");
- rec.setRecipeTimeout(180);
- return rec;
- }
- };
-
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- final MockUp<CamundaClient> mockCmaundaClient = new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 200, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"globalSubscriberId\":\"299392392\",\"serviceType\":\"VoLTE\"}";
-
- instance.deleteE2EServiceInstance(request, "v3", "12345678");
- mockCDB.tearDown();
- mockMsoRequest.tearDown();
- mockCmaundaClient.tearDown();
-
- }
-
- @Test
- public void deleteE2EServiceInstanceTestFail() {
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"globalSubscriberId\":\"299392392\",\"serviceType\":\"VoLTE\"}";
- instance.deleteE2EServiceInstance(request, "v3", "12345678");
- }
-
- @Test
- public void deleteE2EServiceInstanceTestFailClient(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session) {
- final MockUp<CatalogDatabase> mockCDB = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
-
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- rec.setOrchestrationUri("/test/delE2E");
- rec.setRecipeTimeout(180);
- return rec;
- }
- };
-
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"globalSubscriberId\":\"299392392\",\"serviceType\":\"VoLTE\"}";
-
- instance.deleteE2EServiceInstance(request, "v3", "12345678");
- mockCDB.tearDown();
- mockMsoRequest.tearDown();
-
- }
-
- @Test
- public void deleteE2EServiceInstanceTestFailRecipe(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session) {
- final MockUp<CatalogDatabase> mockCDB = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
-
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"globalSubscriberId\":\"299392392\",\"serviceType\":\"VoLTE\"}";
-
- instance.deleteE2EServiceInstance(request, "v3", "12345678");
- mockCDB.tearDown();
- mockMsoRequest.tearDown();
-
- }
-
- @Test
- public void deleteE2EServiceInstanceTestFailModelName(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session) {
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- new Expectations() {{
- sessionFactoryManager.getSessionFactory().openSession();
- result = session;
- }};
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = "{\"globalSubscriberId\":\"299392392\",\"serviceType\":\"VoLTE\"}";
-
- instance.deleteE2EServiceInstance(request, "v3", "12345678");
- mockMsoRequest.tearDown();
-
- }
-
- @Test
- public void getE2EServiceInstanceTest() {
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatus(String serviceId,
- String operationId) {
- OperationStatus os = new OperationStatus();
- os.setOperation("");
- os.setOperationContent("");
- os.setOperationId("123456");
- os.setProgress("");
- os.setServiceId("12345");
- os.setServiceName("VoLTE");
- os.setReason("");
- os.setResult("");
- os.setUserId("");
- return os;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response resp = instance
- .getE2EServiceInstances("12345", "v3", "123456");
-
- }
-
- @Test
- public void updateE2EServiceInstanceTestNormal() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceId(
- String serviceID) {
- OperationStatus operationStatus = new OperationStatus();
- operationStatus.setProgress("100");
- operationStatus.setResult("finish");
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("success"));
- }
-
- @Test
- public void updateE2EServiceInstanceTestChkStatusFalse() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceId(
- String serviceID) {
- OperationStatus operationStatus = new OperationStatus();
- operationStatus.setResult("processing");
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
- String respStr = resp.getEntity().toString();
- assertTrue(!respStr.contains("SVC2000"));
- }
-
- @Test
- public void updateE2EServiceInstanceExceptionMsoRequestTest() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceId(
- String serviceID) {
- OperationStatus operationStatus = new OperationStatus();
- operationStatus.setProgress("100");
- operationStatus.setResult("finish");
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
- MockUp<MsoRequest> msoRequest = new MockUp<MsoRequest>() {
- @Mock
- void parse (ServiceInstancesRequest sir, HashMap<String,String> instanceIdMap, Action action, String version, String originalRequestJSON) throws ValidationException {
-
- throw new ValidationException("mock failure");
- }
- };
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
- assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), resp.getStatus());
- msoRequest.tearDown();
- }
-
- @Test
- public void updateE2EServiceInstanceExceptionCatalogDbTest() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceId(
- String serviceID) {
- OperationStatus operationStatus = new OperationStatus();
- operationStatus.setProgress("100");
- operationStatus.setResult("finish");
- return operationStatus;
- }
- };
-
- MockUp<CatalogDatabase> catalog = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) throws Exception {
- throw new Exception();
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
- assertEquals(Response.Status.NOT_FOUND.getStatusCode(), resp.getStatus());
- catalog.tearDown();
- }
-
- @Test
- public void updateE2EServiceInstanceNullServiceTest() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceId(
- String serviceID) {
- OperationStatus operationStatus = new OperationStatus();
- operationStatus.setProgress("100");
- operationStatus.setResult("finish");
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- MockUp<CatalogDatabase> catalog = new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- return null;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
- assertEquals(Response.Status.NOT_FOUND.getStatusCode(), resp.getStatus());
- catalog.tearDown();
- }
-
- @Test
- public void updateE2EServiceInstanceRequestClientExceptionTest() {
- new MockUp<RequestsDatabase>() {
- @Mock
- public OperationStatus getOperationStatusByServiceId(
- String serviceID) {
- OperationStatus operationStatus = new OperationStatus();
- operationStatus.setProgress("100");
- operationStatus.setResult("finish");
- return operationStatus;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- return rec;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- MockUp<CamundaClient> client = new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) throws Exception {
- throw new Exception();
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- String request = jsonBody;
- Response resp = instance.updateE2EServiceInstance(request, "v3", "12345");
- assertEquals(Response.Status.BAD_GATEWAY.getStatusCode(), resp.getStatus());
- client.tearDown();
- }
-
- @Test
- public void compareModelwithTargetVersionBadRequest(){
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.compareModelwithTargetVersion("", "12345", "v3");
-
- assertNotNull(response);
- assertTrue(response.getEntity().toString().contains("Mapping of request to JSON object failed."));
-
- }
- @Test
- public void compareModelwithTargetVersionFailedBPMNCall(){
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) throws IOException {
- throw new ClientProtocolException();
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.compareModelwithTargetVersion(compareModelsRequest, "12345", "v3");
-
- assertNotNull(response);
- assertTrue(response.getEntity().toString().contains("Failed calling bpmn"));
-
- }
-
- @Test
- public void compareModelwithTargetVersionSuccess(){
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "compareModelwithTargetVersion, test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
-
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.compareModelwithTargetVersion(compareModelsRequest, "12345", "v3");
-
- assertNotNull(response);
- assertTrue(response.getStatus()==202);
-
- }
-
- @Test
- public void scaleE2EserviceInstancesTestFailInvalidRequest(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session ) {
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.scaleE2EServiceInstance(jsonBody, "v3", "12345");
- }
-
- @Test
- public void scaleE2EserviceInstancesTestNormal() {
-
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- final MockUp<CatalogDatabase> mockCDB = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
-
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- rec.setOrchestrationUri("/test/delE2E");
- rec.setRecipeTimeout(180);
- return rec;
- }
- };
-
- final MockUp<RequestClientFactory> mockRequestClient = new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- final MockUp<CamundaClient> mockCamundaClient = new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP", 1, 1);
- HttpResponse resp = new BasicHttpResponse(pv, 202,
- "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.scaleE2EServiceInstance(scaleRequest, "v3", "12345");
- mockMsoRequest.tearDown();
- mockCDB.tearDown();
- mockRequestClient.tearDown();
- mockCamundaClient.tearDown();
- }
-
- @Test
- public void scaleE2EserviceInstancesTestFailCamundaClient(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session) {
-
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- final MockUp<CatalogDatabase> mockCDB = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
-
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- rec.setOrchestrationUri("/test/delE2E");
- rec.setRecipeTimeout(180);
- return rec;
- }
- };
-
- final MockUp<RequestClientFactory> mockRequestClient = new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI,
- MsoJavaProperties props) throws IllegalStateException {
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.scaleE2EServiceInstance(scaleRequest, "v3", "12345");
- mockMsoRequest.tearDown();
- mockCDB.tearDown();
- mockRequestClient.tearDown();
- }
-
- @Test
- public void scaleE2EserviceInstancesTestFailRequestClient(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session) {
-
- final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord(Status status, Action action) {
- return;
- }
- };
-
- final MockUp<CatalogDatabase> mockCDB = new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName(String modelName) {
- Service svc = new Service();
- return svc;
- }
-
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID(String modelUUID,
- String action) {
- ServiceRecipe rec = new ServiceRecipe();
- rec.setOrchestrationUri("/test/delE2E");
- rec.setRecipeTimeout(180);
- return rec;
- }
- };
-
- E2EServiceInstances instance = new E2EServiceInstances();
- Response response = instance.scaleE2EServiceInstance(scaleRequest, "v3", "12345");
- mockMsoRequest.tearDown();
- mockCDB.tearDown();
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandlerTest.java
deleted file mode 100644
index 5502d38268..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/GlobalHealthcheckHandlerTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra;
-
-import static org.junit.Assert.*;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.http.HttpStatus;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.mso.HealthCheckUtils;
-import org.openecomp.mso.MsoStatusUtil;
-import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-
-public class GlobalHealthcheckHandlerTest {
-
- public static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
- public static final Response HEALTH_CHECK_RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
-
- @Test
- public final void testGlobalHealthcheck() {
- try {
- MsoStatusUtil statusUtil = Mockito.mock(MsoStatusUtil.class);
- HealthCheckUtils utils = Mockito.mock(HealthCheckUtils.class);
- Mockito.when(utils.verifyGlobalHealthCheck(true, null)).thenReturn(true);
- Mockito.when(statusUtil.getSiteStatus(Mockito.anyString())).thenReturn(true);
- GlobalHealthcheckHandler gh = Mockito.mock(GlobalHealthcheckHandler.class);
- Mockito.when(gh.globalHealthcheck(Mockito.anyBoolean())).thenReturn(HEALTH_CHECK_RESPONSE);
- Response resp = gh.globalHealthcheck(true);
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java
deleted file mode 100644
index 7fb3bf00b0..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java
+++ /dev/null
@@ -1,624 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-
-import mockit.Expectations;
-import mockit.Mocked;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.CharEncoding;
-import org.hibernate.Session;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.openecomp.mso.apihandler.common.ValidationException;
-import org.openecomp.mso.db.AbstractSessionFactoryManager;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.serviceinstancebeans.ServiceInstancesRequest;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import junitparams.JUnitParamsRunner;
-import junitparams.Parameters;
-
-@RunWith(JUnitParamsRunner.class)
-public class MsoRequestTest {
- private ObjectMapper mapper = new ObjectMapper();
- private HashMap<String, String> instanceIdMapTest = new HashMap<>();
- private ServiceInstancesRequest sir;
- private MsoRequest msoRequest;
- private Action action;
- private String version;
- private String originalRequestJSON;
- private String requestJSON;
- private boolean expected;
- private String expectedException;
-
- @Rule
- public ExpectedException thrown = ExpectedException.none();
-
-
- @Before
- public void validate(){
- msoRequest = new MsoRequest();
- }
- public String inputStream(String JsonInput)throws IOException{
- String input = IOUtils.toString(ClassLoader.class.getResourceAsStream (JsonInput), CharEncoding.UTF_8);
- return input;
- }
- @Test
- public void nullInstanceIdMapTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/RequestParametersNull.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest = null;
- thrown.expect(NullPointerException.class);
- this.msoRequest = new MsoRequest("nullINstanceIdMap");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- @Parameters(method = "successParameters")
- public void successTest(ServiceInstancesRequest sir, HashMap<String, String> instanceIdMapTest, Action action, String version) throws ValidationException{
- this.sir = sir;
- this.instanceIdMapTest = instanceIdMapTest;
- this.action = action;
- this.version = version;
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.instanceIdMapTest.put("vnfInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.msoRequest = new MsoRequest("successTest");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Parameters
- private Collection<Object[]> successParameters() throws JsonParseException, JsonMappingException, IOException{
- return Arrays.asList(new Object[][]{
- {mapper.readValue(inputStream("/EmptyRequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {mapper.readValue(inputStream("/ValidModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v4"},
- {mapper.readValue(inputStream("/EmptyCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v3"},
- {mapper.readValue(inputStream("/RelatedInstancesModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v5"},
- {mapper.readValue(inputStream("/PlatformTest.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v5"},
- {mapper.readValue(inputStream("/v5EnablePortMirrorService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "v5"},
- {mapper.readValue(inputStream("/ValidModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {mapper.readValue(inputStream("/ValidModelCustomizationIdService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {mapper.readValue(inputStream("/ServiceProductFamilyIdUpdate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v5"},
- {mapper.readValue(inputStream("/ServiceProductFamilyIdFlag.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v5"},
- {mapper.readValue(inputStream("/VnfModelCustomizationIdEmpty.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v5"},
- {mapper.readValue(inputStream("/RelatedInstancesVfModule.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {mapper.readValue(inputStream("/RelatedInstances.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {mapper.readValue(inputStream("/VnfModelCustomizationNameNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {mapper.readValue(inputStream("/VnfModelCustomizationTest.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {mapper.readValue(inputStream("/ServiceModelNameEmptyOnDelete.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v2"},
- {mapper.readValue(inputStream("/ServiceModelNameEmptyOnActivate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v2"},
- {mapper.readValue(inputStream("/ModelVersionNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v3"},
- {mapper.readValue(inputStream("/ModelInvariantIdService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "v4"},
- {mapper.readValue(inputStream("/ModelInvariantIdConfigurationDelete.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v3"},
- {mapper.readValue(inputStream("/ModelCustomizationIdUsingPreload.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {mapper.readValue(inputStream("/ServiceInPlaceSoftwareUpdate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {mapper.readValue(inputStream("/EmptyOwningEntityName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {mapper.readValue(inputStream("/VnfRequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v6"},
- {mapper.readValue(inputStream("/VnfActivate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v6"},
- {mapper.readValue(inputStream("/ServiceInPlaceSoftwareUpdate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, "v6"},
- {mapper.readValue(inputStream("/ProjectAndOwningEntity2.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v6"},
- {mapper.readValue(inputStream("/PlatformAndLineOfBusiness2.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v6"},
- {mapper.readValue(inputStream("/UserParams.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"}
- });
- }
- @Test
- @Parameters(method = "aLaCarteParameters")
- public void aLaCarteFlagTest(boolean expected, ServiceInstancesRequest sir, HashMap<String, String> instanceIdMapTest, Action action, String version) throws JsonParseException, IOException, ValidationException{
- this.expected = expected;
- this.sir = sir;
- this.instanceIdMapTest = instanceIdMapTest;
- this.action = action;
- this.version = version;
- this.msoRequest = new MsoRequest("aLaCarteCheck");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals(expected, msoRequest.getALaCarteFlag());
- }
- @Parameters
- private Collection<Object[]> aLaCarteParameters() throws IOException{
- return Arrays.asList(new Object[][] {
- {false, mapper.readValue(inputStream("/RequestParametersNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v3"},
- {true, mapper.readValue(inputStream("/RequestParametersALaCarteTrue.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {true, mapper.readValue(inputStream("/v2requestParametersALaCarteFalse.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v2"},
- });
- }
- @Test
- @Parameters(method = "validationParameters")
- public void validationFailureTest(String expectedException, ServiceInstancesRequest sir, HashMap<String, String> instanceIdMapTest, Action action, String version) throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.expectedException = expectedException;
- this.sir = sir;
- this.instanceIdMapTest = instanceIdMapTest;
- this.action = action;
- this.version = version;
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.instanceIdMapTest.put("vnfInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- thrown.expect(ValidationException.class);
- thrown.expectMessage(expectedException);
- this.msoRequest = new MsoRequest("validationFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Parameters
- private Collection<Object[]> validationParameters() throws IOException{
- return Arrays.asList(new Object[][] {
- {"No valid aLaCarte in requestParameters", mapper.readValue(inputStream("/RequestParametersNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, "v4"},
- {"No valid model-info is specified", mapper.readValue(inputStream("/ModelInfoNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid requestInfo is specified", mapper.readValue(inputStream("/RequestInfoNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelType is specified", mapper.readValue(inputStream("/ModelTypeNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid lcpCloudRegionId is specified", mapper.readValue(inputStream("/EmptyLcpCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid tenantId is specified", mapper.readValue(inputStream("/EmptyTenantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParametersNull.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid subscriptionServiceType is specified", mapper.readValue(inputStream("/EmptySubscriptionServiceType.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid instanceName format is specified", mapper.readValue(inputStream("/InvalidInstanceName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v2"},
- {"No valid requestorId is specified", mapper.readValue(inputStream("/EmptyRequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelInvariantId format is specified", mapper.readValue(inputStream("/InvalidModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v2"},
- {"No valid subscriberInfo is specified", mapper.readValue(inputStream("/EmptySubscriberInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid globalSubscriberId is specified", mapper.readValue(inputStream("/EmptyGlobalSubscriberId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid platformName is specified", mapper.readValue(inputStream("/EmptyPlatform.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid platform is specified", mapper.readValue(inputStream("/Platform.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v6"},
- {"No valid lineOfBusinessName is specified", mapper.readValue(inputStream("/EmptyLineOfBusiness.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid projectName is specified", mapper.readValue(inputStream("/EmptyProject.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid owningEntity is specified", mapper.readValue(inputStream("/OwningEntity.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v6"},
- {"No valid owningEntityId is specified", mapper.readValue(inputStream("/EmptyOwningEntityId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/ModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/VnfModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {"No valid modelName is specified", mapper.readValue(inputStream("/VfModuleModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v4"},
- {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/VnfModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/CloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v4"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ConfigurationModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid productFamilyId is specified", mapper.readValue(inputStream("/VnfProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {"No valid productFamilyId is specified", mapper.readValue(inputStream("/NetworkProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {"No valid productFamilyId is specified", mapper.readValue(inputStream("/NetworkProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v3"},
- {"No valid productFamilyId is specified", mapper.readValue(inputStream("/ServiceProductFamilyId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelVersionId in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelType in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelType.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelInfo in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid instanceName format in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesNameFormat.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid instanceId in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid instanceId format in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesIdFormat.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelInvariantId in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelName in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelName.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelVersion in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelVersion.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelInvariantId format in relatedInstance is specified", mapper.readValue(inputStream("/RelatedInstancesModelInvariantIdFormat.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelCustomizationName or modelCustomizationId in relatedInstance of vnf is specified", mapper.readValue(inputStream("/RelatedInstancesModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid serviceInstanceId matching the serviceInstanceId in request URI is specified", mapper.readValue(inputStream("/RelatedInstancesInstanceId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid vnfInstanceId matching the vnfInstanceId in request URI is specified", mapper.readValue(inputStream("/RelatedInstancesVnfInstanceId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid related vnf instance for volumeGroup request is specified", mapper.readValue(inputStream("/RelatedInstancesVnfInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid related service instance for volumeGroup request is specified", mapper.readValue(inputStream("/RelatedInstancesServiceInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid related vnf instance for vfModule request is specified", mapper.readValue(inputStream("/VfModuleRelatedInstancesVnf.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid related service instance for vfModule request is specified", mapper.readValue(inputStream("/VfModuleRelatedInstancesService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid related service instance for vnf request is specified", mapper.readValue(inputStream("/VnfRelatedInstancesService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/VnfModelCustomizationIdPreload.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v5"},
- {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelVersionService.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v3"},
- {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelVersionVfModule.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInvariantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "v4"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/v5ModelInvariantIdNetwork.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "v5"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/v5ModelInvariantIdDisablePort.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, "v5"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInvariantIdVnf.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v3"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/ModelInvariantIdConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v3"},
- {"No valid modelVersion is specified", mapper.readValue(inputStream("/ModelInvariantIdServiceCreate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v4"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "v4"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v5"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "v5"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/v2ModelVersionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, "v5"},
- {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/ModelVersionIdTest.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/ModelVersionIdCreate.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, "v6"},
- {"No valid requestInfo is specified", mapper.readValue(inputStream("/RequestInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, "v6"},
- {"No valid requestorId is specified", mapper.readValue(inputStream("/RequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.applyUpdatedConfig, "v6"},
- {"No valid requestParameters is specified", mapper.readValue(inputStream("/RequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {"No valid requestInfo is specified", mapper.readValue(inputStream("/RequestInfo.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {"No valid requestorId is specified", mapper.readValue(inputStream("/RequestorId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {"No valid cloudConfiguration is specified", mapper.readValue(inputStream("/InPlaceSoftwareUpdateCloudConfiguration.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {"No valid lcpCloudRegionId is specified", mapper.readValue(inputStream("/InPlaceSoftwareUpdateCloudRegionId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {"No valid tenantId is specified", mapper.readValue(inputStream("/InPlaceSoftwareUpdateTenantId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.inPlaceSoftwareUpdate, "v6"},
- {"No valid serviceInstanceId matching the serviceInstanceId in request URI is specified", mapper.readValue(inputStream("/v6VnfDeleteInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deleteInstance, "v6"},
- {"No valid related instances is specified", mapper.readValue(inputStream("/ServiceNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, "v2"},
- {"No valid related instances is specified", mapper.readValue(inputStream("/ServiceNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.removeRelationships, "v2"},
- {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/VnfRequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.replaceInstance, "v6"},
- {"No valid modelCustomizationId or modelCustomizationName is specified", mapper.readValue(inputStream("/VnfRequestParameters.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v6"},
- {"No valid instanceName in relatedInstance for pnf modelType is specified", mapper.readValue(inputStream("/v6AddRelationshipsBadData.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.removeRelationships, "v6"},
- {"No valid instanceName in relatedInstance for pnf modelType is specified", mapper.readValue(inputStream("/v6AddRelationshipsBadData.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.addRelationships, "v6"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/v5DeactivatePortMirrorBadData.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.deactivateInstance, "v5"},
- {"No valid modelVersionId is specified", mapper.readValue(inputStream("/v5ActivatePortMirrorBadData.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.activateInstance, "v5"},
- {"No valid related instances is specified", mapper.readValue(inputStream("/v5EnablePortMirrorNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, "v2"},
- {"No valid connectionPoint relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/v5EnablePortMirrorNoConnectionPoint.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.disablePort, "v5"},
- {"No valid connectionPoint relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/v5EnablePortMirrorNoConnectionPoint.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "v5"},
- {"No valid related instances is specified", mapper.readValue(inputStream("/v5EnablePortMirrorNoRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.enablePort, "v5"},
- {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/v5PortMirrorCreateConfigurationBad.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid source vnf relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/v5PortMirrorCreateNoSourceRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid destination vnf relatedInstance for Port Configuration is specified", mapper.readValue(inputStream("/v5PortMirrorCreateNoDestinationRelatedInstance.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid related instances is specified", mapper.readValue(inputStream("/v5PortMirrorCreateNoRelatedInstances.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {"No valid modelCustomizationId is specified", mapper.readValue(inputStream("/v4CreateVfModuleMissingModelCustomizationId.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v4"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/v3DeleteServiceInstanceALaCarte.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v3"},
- {"No valid modelInvariantId is specified", mapper.readValue(inputStream("/v3UpdateNetworkBad.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v4"},
- {"No valid related instances is specified", mapper.readValue(inputStream("/v3VolumeGroupBad.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.updateInstance, "v4"}
- });
- }
- @Test
- public void setInstancedIdHashMapTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.instanceIdMapTest.put("vnfInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff001");
- this.instanceIdMapTest.put("vfModuleInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff002");
- this.instanceIdMapTest.put("volumeGroupInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff003");
- this.instanceIdMapTest.put("networkInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff004");
- this.instanceIdMapTest.put("configurationInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff005");
- this.action = Action.createInstance;
- this.version = "v5";
- this.msoRequest = new MsoRequest("setInstanceIdHashMap");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff000", msoRequest.getServiceInstancesRequest().getServiceInstanceId());
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff001", msoRequest.getServiceInstancesRequest().getVnfInstanceId());
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff002", msoRequest.getServiceInstancesRequest().getVfModuleInstanceId());
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff003", msoRequest.getServiceInstancesRequest().getVolumeGroupInstanceId());
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff004", msoRequest.getServiceInstancesRequest().getNetworkInstanceId());
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff005", msoRequest.getServiceInstancesRequest().getConfigurationId());
- }
- @Test
- public void serviceInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("serviceInstanceId", "test");
- this.action = Action.createInstance;
- this.version = "v5";
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid serviceInstanceId is specified");
- this.msoRequest = new MsoRequest("serviceInstanceIdFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- public void vnfInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("vnfInstanceId", "test");
- this.action = Action.createInstance;
- this.version = "v5";
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid vnfInstanceId is specified");
- this.msoRequest = new MsoRequest("vnfInstanceIdFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- public void vfModuleInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("vfModuleInstanceId", "test");
- this.action = Action.createInstance;
- this.version = "v5";
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid vfModuleInstanceId is specified");
- this.msoRequest = new MsoRequest("vfModuleInstanceIdFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- public void volumeGroupInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("volumeGroupInstanceId", "test");
- this.action = Action.createInstance;
- this.version = "v5";
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid volumeGroupInstanceId is specified");
- this.msoRequest = new MsoRequest("volumeGroupInstanceIdFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- public void networkInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("networkInstanceId", "test");
- this.action = Action.createInstance;
- this.version = "v5";
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid networkInstanceId is specified");
- this.msoRequest = new MsoRequest("networkInstanceIdFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- public void configurationInstanceIdHashMapFailureTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/v2AutoBuildVfModulesTrue.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("configurationInstanceId", "test");
- this.action = Action.createInstance;
- this.version = "v5";
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid configurationInstanceId is specified");
- this.msoRequest = new MsoRequest("configurationInstanceIdFailure");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- }
- @Test
- public void setVolumeGroupRelatedInstancesTest() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.sir = mapper.readValue(inputStream("/VolumeGroupRelatedInstances.json"), ServiceInstancesRequest.class);
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.instanceIdMapTest.put("vnfInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff001");
- this.action = Action.createInstance;
- this.version = "v5";
- this.msoRequest = new MsoRequest("setVolumeGroupRelatedInstances");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("vSAMP12", msoRequest.getServiceInstanceType());
- assertEquals("vSAMP12" + "/" + "test", msoRequest.getVnfType());
- assertEquals("1.0", msoRequest.getAsdcServiceModelVersion());
- }
- @Test
- @Parameters(method = "projectParameters")
- public void setProjectAndOwningEntityTest(ServiceInstancesRequest sir, HashMap<String, String> instanceIdMapTest, Action action, String version) throws ValidationException, JsonParseException, JsonMappingException, IOException{
- this.sir = sir;
- this.action = action;
- this.version = version;
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.msoRequest = new MsoRequest("setProjectAndOwningEntity");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("projectName", msoRequest.getProject().getProjectName());
- assertEquals("oeId", msoRequest.getOwningEntity().getOwningEntityId());
- assertEquals("oeName", msoRequest.getOwningEntity().getOwningEntityName());
- }
- @Parameters
- private Collection<Object[]> projectParameters() throws IOException{
- return Arrays.asList(new Object[][] {
- {mapper.readValue(inputStream("/ProjectAndOwningEntity.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {mapper.readValue(inputStream("/ProjectAndOwningEntity.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v6"},
- });
- }
-
- @Test
- public void setModelInfoTest() throws ValidationException, JsonParseException, JsonMappingException, IOException{
- this.sir = mapper.readValue(inputStream("/RequestParametersALaCarteTrue.json"), ServiceInstancesRequest.class);
- this.action = Action.createInstance;
- this.version = "v5";
- this.msoRequest = new MsoRequest("setModelInfo");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("test", msoRequest.getServiceInstancesRequest().getRequestDetails().getModelInfo().getModelVersionId());
- }
- @Test
- public void setServiceInstanceTypeTest() throws ValidationException, JsonParseException, JsonMappingException, IOException{
- this.sir = mapper.readValue(inputStream("/RequestParametersALaCarteTrue.json"), ServiceInstancesRequest.class);
- this.action = Action.createInstance;
- this.version = "v5";
- this.msoRequest = new MsoRequest("setServiceInstanceType");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("SDNW Service 1710", msoRequest.getServiceInstanceType());
- }
- @Test
- @Parameters(method = "platformParameters")
- public void setPlatformAndLineOfBusinessTest(ServiceInstancesRequest sir, HashMap<String, String> instanceIdMapTest, Action action, String version) throws ValidationException, JsonParseException, JsonMappingException, IOException{
- this.sir = sir;
- this.action = action;
- this.instanceIdMapTest = instanceIdMapTest;
- this.version = version;
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.msoRequest = new MsoRequest("setPlatformAndLineOfBusiness");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("platformName", msoRequest.getPlatform().getPlatformName());
- assertEquals("lobName", msoRequest.getLineOfBusiness().getLineOfBusinessName());
- }
- @Parameters
- private Collection<Object[]> platformParameters() throws IOException{
- return Arrays.asList(new Object[][] {
- {mapper.readValue(inputStream("/PlatformAndLineOfBusiness.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v5"},
- {mapper.readValue(inputStream("/PlatformAndLineOfBusiness.json"), ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "v6"},
- });
- }
-
- @Test
- public void setNetworkTypeTest() throws ValidationException, JsonParseException, JsonMappingException, IOException{
- this.sir = mapper.readValue(inputStream("/NetworkType.json"), ServiceInstancesRequest.class);
- this.action = Action.createInstance;
- this.version = "v2";
- this.msoRequest = new MsoRequest("setNetworkType");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("TestNetworkType", msoRequest.getNetworkType());
- }
- @Test
- public void setModelNameVersionIdTest() throws ValidationException, JsonParseException, JsonMappingException, IOException{
- this.sir = mapper.readValue(inputStream("/ModelNameVersionId.json"), ServiceInstancesRequest.class);
- this.action = Action.createInstance;
- this.version = "v5";
- this.msoRequest = new MsoRequest("setModelNameVersionId");
- this.msoRequest.parse(sir, instanceIdMapTest, action, version, originalRequestJSON);
- assertEquals("test", msoRequest.getModelInfo().getModelNameVersionId());
- }
- @Test
- public void testParseOrchestration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = " {\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"}}}";
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("ParseOrchestration");
- msoRequest.parseOrchestration(sir);
- assertEquals(msoRequest.getRequestInfo().getSource(),"VID");
- assertEquals(msoRequest.getRequestInfo().getRequestorId(),"zz9999");
-
- }
- @Test
- public void testParseOrchestrationFailure() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = " {\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\"}}}";
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- thrown.expect(ValidationException.class);
- thrown.expectMessage("No valid requestorId is specified");
- this. msoRequest = new MsoRequest ("ParseOrchestration");
- msoRequest.parseOrchestration(sir);
- }
- @Test
- public void testParseV3VnfCreate() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v3VnfCreate.json");
- this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, "v3", originalRequestJSON);
- assertEquals(msoRequest.getRequestInfo().getSource(),"VID");
- assertEquals(msoRequest.getReqVersion(),3);
- }
- @Test
- public void testParseV3UpdateNetwork() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v3UpdateNetwork.json");
- this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.updateInstance, "v3", originalRequestJSON);
- }
- @Test
- public void testParseV3DeleteNetwork() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v3DeleteNetwork.json");
- this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.deleteInstance, "v3", originalRequestJSON);
- }
- @Test
- public void testParseV3ServiceInstanceDelete() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- String requestJSON2;
- this.requestJSON = inputStream("/v3DeleteServiceInstance.json");
- requestJSON2 = inputStream("/v3DeleteServiceInstanceALaCarte.json");
- this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.deleteInstance, "v3", originalRequestJSON);
- boolean testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isaLaCarte();
- assertFalse(testIsALaCarteSet);
- this.sir = mapper.readValue(requestJSON2, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("12345");
- msoRequest.parse(sir, instanceIdMapTest, Action.deleteInstance, "v3", originalRequestJSON);
- testIsALaCarteSet = msoRequest.getServiceInstancesRequest().getRequestDetails().getRequestParameters().isaLaCarte();
- assertTrue(testIsALaCarteSet);
- assertTrue(msoRequest.getALaCarteFlag());
- }
- @Test
- public void testVfModuleV4UsePreLoad() throws JsonParseException, JsonMappingException, IOException, ValidationException {
- this.requestJSON = inputStream("/v4CreateVfModule.json");
- this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.instanceIdMapTest.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, "v4", originalRequestJSON);
-
- this.requestJSON = inputStream("/v4CreateVfModuleNoCustomizationId.json");
- this.instanceIdMapTest.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.instanceIdMapTest.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, "v4", originalRequestJSON);
- }
- @Test
- public void testV5PortMirrorCreateConfiguration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5PortMirrorCreateConfiguration.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, "v5", originalRequestJSON);
- }
- @Test
- public void testV6PortMirrorCreateConfiguration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v6PortMirrorCreateConfiguration.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.createInstance, "v6", originalRequestJSON);
- }
- @Test
- public void testV5EnablePortMirrorConfiguration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5EnablePortMirrorConfiguration.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.enablePort, "v5", originalRequestJSON);
- }
- @Test
- public void testV5DisablePortMirrorConfiguration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5EnablePortMirrorConfiguration.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.disablePort, "v5", originalRequestJSON);
- }
- @Test
- public void testV5ActivatePortMirrorConfiguration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5ActivatePortMirrorConfiguration.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.activateInstance, "v5", originalRequestJSON);
- }
- @Test
- public void testV5ActivatePortMirrorNoRelatedInstance() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5ActivatePortMirrorNoRelatedInstance.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.activateInstance, "v5", originalRequestJSON);
- }
- @Test
- public void testV5DeactivatePortMirrorConfiguration() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5DeactivatePortMirrorConfiguration.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.deactivateInstance, "v5", originalRequestJSON);
- }
- @Test
- public void testV5DeactivatePortMirrorNoRelatedInstance() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v5DeactivatePortMirrorNoRelatedInstance.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("1234");
- msoRequest.parse(sir, instanceIdMapTest, Action.deactivateInstance, "v5", originalRequestJSON);
- }
- @Test
- public void testV6AddRelationships() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v6AddRelationships.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("V6AddRelationships");
- msoRequest.parse(sir, instanceIdMapTest, Action.addRelationships, "v6", originalRequestJSON);
- }
- @Test
- public void testV6RemoveRelationships() throws JsonParseException, JsonMappingException, IOException, ValidationException{
- this.requestJSON = inputStream("/v6AddRelationships.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("V6RemoveRelationships");
- msoRequest.parse(sir, instanceIdMapTest, Action.removeRelationships, "v6", originalRequestJSON);
- assertNotNull(msoRequest.getRequestId());
- assertEquals(msoRequest.getReqVersion(), 6);
- }
-
- @Test
- public void createRequestRecord(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
- @Mocked Session session) throws ValidationException, IOException {
-
- new Expectations() {{
- sessionFactoryManager.getSessionFactory().openSession(); result = session;
- }};
-
- this.requestJSON = inputStream("/v6AddRelationships.json");
- this.instanceIdMapTest.put("serviceInstanceId", "ff305d54-75b4-431b-adb2-eb6b9e5ff000");
- this.sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- this.msoRequest = new MsoRequest ("V6RemoveRelationships");
- msoRequest.parse(sir, instanceIdMapTest, Action.removeRelationships, "v6", originalRequestJSON);
- msoRequest.createRequestRecord(Status.COMPLETE, Action.createInstance);
-
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequestsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequestsTest.java
deleted file mode 100644
index 048efb1781..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/OrchestrationRequestsTest.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-import java.net.URI;
-import java.sql.Timestamp;
-import java.time.LocalDateTime;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import mockit.MockUp;
-import org.apache.http.HttpStatus;
-import org.jboss.resteasy.spi.ResteasyUriInfo;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.openecomp.mso.apihandler.common.ValidationException;
-import org.openecomp.mso.requestsdb.InfraActiveRequests;
-import org.openecomp.mso.requestsdb.RequestsDatabase;
-import org.openecomp.mso.serviceinstancebeans.GetOrchestrationResponse;
-import org.openecomp.mso.serviceinstancebeans.InstanceReferences;
-import org.openecomp.mso.serviceinstancebeans.Request;
-import org.openecomp.mso.serviceinstancebeans.RequestStatus;
-import org.openecomp.mso.serviceinstancebeans.ServiceInstancesRequest;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class OrchestrationRequestsTest {
-
- private static final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title></title></head><body></body></html>";
- public static final Response RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
- @Mock
- private static RequestsDatabase db;
- private static OrchestrationRequests orReq;
- private static GetOrchestrationResponse orRes;
-
- @Test
- public void testGetOrchestrationRequest() {
- orReq = Mockito.mock(OrchestrationRequests.class);
- orRes = new GetOrchestrationResponse();
- try {
- // create InfraActiveRequests object
- InfraActiveRequests infraRequests = new InfraActiveRequests();
- infraRequests.setRequestId("rq1234d1-5a33-55df-13ab-12abad84e333");
- infraRequests.setNetworkType("CONTRAIL30_BASIC");
- infraRequests.setRequestType("createInstance");
- infraRequests.setSource("VID");
- infraRequests.setTenantId("19123c2924c648eb8e42a3c1f14b7682");
- infraRequests.setServiceInstanceId("bc305d54-75b4-431b-adb2-eb6b9e546014");
- infraRequests.setRequestStatus("IN_PROGRESS");
- infraRequests.setRequestorId("ab1234");
- String body = "{\"modelInfo\":{\"modelInvariantId\":\"9771b085-4705-4bf7-815d-8c0627bb7e36\",\"modelType\":\"service\",\"modelName\":\"Service with VNFs with modules\",\"modelVersion\":\"1.0\"}}";
- infraRequests.setRequestBody(body);
-
- db = Mockito.mock(RequestsDatabase.class);
- Mockito.when(db.getRequestFromInfraActive(Mockito.anyString())).thenReturn(infraRequests);
-
- ///// mock mapInfraActiveRequestToRequest()
- Request request = new Request();
- request.setRequestId(infraRequests.getRequestId());
- request.setRequestScope(infraRequests.getRequestScope());
- request.setRequestType(infraRequests.getRequestAction());
-
- InstanceReferences ir = new InstanceReferences();
- if (infraRequests.getNetworkId() != null)
- ir.setNetworkInstanceId(infraRequests.getNetworkId());
- if (infraRequests.getNetworkName() != null)
- ir.setNetworkInstanceName(infraRequests.getNetworkName());
- if (infraRequests.getServiceInstanceId() != null)
- ir.setServiceInstanceId(infraRequests.getServiceInstanceId());
- if (infraRequests.getServiceInstanceName() != null)
- ir.setServiceInstanceName(infraRequests.getServiceInstanceName());
- if (infraRequests.getVfModuleId() != null)
- ir.setVfModuleInstanceId(infraRequests.getVfModuleId());
- if (infraRequests.getVfModuleName() != null)
- ir.setVfModuleInstanceName(infraRequests.getVfModuleName());
- if (infraRequests.getVnfId() != null)
- ir.setVnfInstanceId(infraRequests.getVnfId());
- if (infraRequests.getVnfName() != null)
- ir.setVnfInstanceName(infraRequests.getVnfName());
- if (infraRequests.getVolumeGroupId() != null)
- ir.setVolumeGroupInstanceId(infraRequests.getVolumeGroupId());
- if (infraRequests.getVolumeGroupName() != null)
- ir.setVolumeGroupInstanceName(infraRequests.getVolumeGroupName());
- if (infraRequests.getRequestorId() != null)
- ir.setRequestorId(infraRequests.getRequestorId());
-
- request.setInstanceReferences(ir);
- RequestStatus status = new RequestStatus();
-
- if (infraRequests.getRequestStatus() != null) {
- status.setRequestState(infraRequests.getRequestStatus());
- }
-
- request.setRequestStatus(status);
- // RequestStatus reqStatus = request.getRequestStatus();
- orRes.setRequest(request);
-// Mockito.when(orReq.getOrchestrationRequest(Mockito.anyString(), Mockito.anyString())).thenReturn(RESPONSE);
- Response resp = orReq.getOrchestrationRequest("rq1234d1-5a33-55df-13ab-12abad84e333", "v3");
-
- assertEquals(db.getRequestFromInfraActive("rq1234d1-5a33-55df-13ab-12abad84e333").getRequestId(),
- "rq1234d1-5a33-55df-13ab-12abad84e333");
- assertEquals(db.getRequestFromInfraActive("rq1234d1-5a33-55df-13ab-12abad84e333").getSource(), "VID");
- assertEquals(db.getRequestFromInfraActive("rq1234d1-5a33-55df-13ab-12abad84e333").getTenantId(),
- "19123c2924c648eb8e42a3c1f14b7682");
- assertEquals(db.getRequestFromInfraActive("rq1234d1-5a33-55df-13ab-12abad84e333").getServiceInstanceId(),
- "bc305d54-75b4-431b-adb2-eb6b9e546014");
- assertEquals(db.getRequestFromInfraActive("rq1234d1-5a33-55df-13ab-12abad84e333").getRequestStatus(),
- "IN_PROGRESS");
- assertEquals(db.getRequestFromInfraActive("rq1234d1-5a33-55df-13ab-12abad84e333").getRequestorId(),
- "ab1234");
- assertEquals(request.getInstanceReferences().getServiceInstanceId(),"bc305d54-75b4-431b-adb2-eb6b9e546014");
- assertEquals(request.getInstanceReferences().getRequestorId(),"ab1234");
- assertEquals(orRes.getRequest().getRequestId(), "rq1234d1-5a33-55df-13ab-12abad84e333");
-// assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testGetOrchestrationRequestNotPresent() {
- String requestJSON = " {\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"ab1234\"}}}";
- try {
-
- InfraActiveRequests infraRequests = new InfraActiveRequests();
- infraRequests.setRequestId("rq1234d1-5a33-55df-13ab-12abad84e333");
- infraRequests.setNetworkType("CONTRAIL30_BASIC");
- infraRequests.setSource("VID");
- infraRequests.setTenantId("19123c2924c648eb8e42a3c1f14b7682");
- infraRequests.setServiceInstanceId("ea4d5374-d28d-4bbf-9691-22985f088b12");
- infraRequests.setRequestStatus(Status.IN_PROGRESS.name());
- infraRequests.setStartTime(Timestamp.valueOf(LocalDateTime.now()));
- final List<InfraActiveRequests> infraActiveRequests = Collections.singletonList(infraRequests);
-
- // create InfraActiveRequests object
- final MockUp<RequestsDatabase> mockUpRDB = new MockUp<RequestsDatabase>() {
- @mockit.Mock
- public InfraActiveRequests getRequestFromInfraActive(String requestId) {
- return infraRequests;
- }
-
- @mockit.Mock
- public List<InfraActiveRequests> getOrchestrationFiltersFromInfraActive(Map<String, List<String>> orchestrationMap) {
- return infraActiveRequests;
- }
-
- @mockit.Mock
- public int updateInfraStatus(String requestId, String requestStatus, String lastModifiedBy) {
- return 1;
- }
- };
-
- Response response = null;
- try {
- OrchestrationRequests requests = new OrchestrationRequests();
- final ResteasyUriInfo ui = new ResteasyUriInfo(new URI("", "", "", "filter=service-instance-id:EQUALS:abc", ""));
- response = requests.getOrchestrationRequest(ui,"v5");
- } finally {
- mockUpRDB.tearDown();
- }
- assertEquals(HttpStatus.SC_OK, response.getStatus());
- assertNotNull(response.getEntity());
-
-
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testUnlockOrchestrationRequest()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- ObjectMapper mapper = new ObjectMapper();
- String requestJSON = " {\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"ab1234\"}}}";
- //String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"instanceName\":\"Vfmodule_vLB-0514-1\",\"source\":\"VID\",\"suppressRollback\":false,\"requestorId\":\"demo\"},\"modelInfo\":{\"modelType\":\"vfModule\",\"modelInvariantId\":\"80d62376-2d6d-4618-b666-bf00d0e58296\",\"modelVersionId\":\"578b52e5-4572-444d-8de7-2c140ec2e6e5\",\"modelName\":\"Vloadbalancer..base_vlb..module-0\",\"modelVersion\":\"1\",\"modelCustomizationId\":\"bf87db73-2854-4cd1-adfd-8cd08e12befe\",\"modelCustomizationName\":\"Vloadbalancer..base_vlb..module-0\"},\"requestParameters\":{\"usePreload\":true},\"cloudConfiguration\":{\"lcpCloudRegionId\":\"RegionOne\",\"tenantId\":\"ebb0ea7144004bacac1e39ff23105fa7\"},\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceId\":\"60e28eb9-2808-4a5a-830f-ec982f01dcfe\",\"modelInfo\":{\"modelType\":\"service\",\"modelName\":\"vLoadBalancer\",\"modelInvariantId\":\"3f95e3ed-394d-4301-8c9b-c5f39ff89cfd\",\"modelVersion\":\"1.0\",\"modelVersionId\":\"da1b5347-7bcb-4cc4-8c29-d18dafdb1a47\"}}},{\"relatedInstance\":{\"instanceId\":\"338811a1-f7cd-4093-9903-d0f69b7cb176\",\"modelInfo\":{\"modelType\":\"vnf\",\"modelName\":\"vLoadBalancer\",\"modelInvariantId\":\"040740de-1ce8-4737-ad39-970684b0e3e8\",\"modelVersion\":\"1.0\",\"modelVersionId\":\"5fd1ce25-c414-4baf-903b-5042a60cfb02\",\"modelCustomizationId\":\"5801ace5-7cc7-4011-b677-165a0e8a2a27\",\"modelCustomizationName\":\"vLoadBalancer 0\"}}}]}}";
-
- MsoRequest msoRequest = new MsoRequest("rq1234d1-5a33-55df-13ab-12abad84e333");
- ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class);
- msoRequest.parseOrchestration(sir);
-
- //create object instead of a DB call.
-
-
- final MockUp<RequestsDatabase> mockUp = new MockUp<RequestsDatabase>() {
- @mockit.Mock
- public InfraActiveRequests getRequestFromInfraActive(String requestId) {
- InfraActiveRequests infraRequests = new InfraActiveRequests();
- infraRequests.setRequestId("rq1234d1-5a33-55df-13ab-12abad84e333");
- infraRequests.setNetworkType("CONTRAIL30_BASIC");
- infraRequests.setSource("VID");
- infraRequests.setTenantId("19123c2924c648eb8e42a3c1f14b7682");
- infraRequests.setServiceInstanceId("ea4d5374-d28d-4bbf-9691-22985f088b12");
- infraRequests.setRequestStatus(Status.IN_PROGRESS.name());
- infraRequests.setStartTime(Timestamp.valueOf(LocalDateTime.now()));
- infraRequests.setRequestBody(requestJSON);
- return infraRequests;
- }
-
- @mockit.Mock
- public int updateInfraStatus(String requestId, String requestStatus, String lastModifiedBy) {
- return 1;
- }
- };
-
- final Response response;
- try {
- OrchestrationRequests requests = new OrchestrationRequests();
- response = requests.unlockOrchestrationRequest(requestJSON, "rq1234d1-5a33-55df-13ab-12abad84e333", "v5");
- } finally {
- mockUp.tearDown();
- }
-
- assertEquals(HttpStatus.SC_NO_CONTENT, response.getStatus());
- assertEquals("", response.getEntity().toString());
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResultTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResultTest.java
deleted file mode 100644
index 3bc2edf8e2..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/RecipeLookupResultTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra;
-
-import org.junit.After;
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-
-
-public class RecipeLookupResultTest {
-
- RecipeLookupResult instance;
-
- public RecipeLookupResultTest() {
- }
-
- @Before
- public void setUp() {
- instance = mock(RecipeLookupResult.class);
- }
-
- @After
- public void tearDown() {
- instance = null;
- }
-
- /**
- * Test of getOrchestrationURI method
- */
- @Test
- public void testGetOrchestrationURI() {
- String expResult = "orchestrationURI";
- when(instance.getOrchestrationURI()).thenReturn(expResult);
- String result = instance.getOrchestrationURI();
- assertEquals(expResult, result);
- }
-
-
- /**
- * Test of setOrchestrationURI method.
- */
- @Test
- public void testSetOrchestrationURI() {
- String orchestrationUri = "orchestrationURI";
- instance.setOrchestrationURI(orchestrationUri);
- verify(instance).setOrchestrationURI(orchestrationUri);
- }
-
- /**
- * Test of getRecipeTimeout method
- */
- @Test
- public void testGetRecipeTimeout() {
- int expResult = 10;
- when(instance.getRecipeTimeout()).thenReturn(expResult);
- int result = instance.getRecipeTimeout();
- assertEquals(expResult, result);
- }
-
-
- /**
- * Test of setRecipeTimeout method.
- */
- @Test
- public void testSetRecipeTimeout() {
- int recipeTimeOut = 10;
- instance.setRecipeTimeout(recipeTimeOut);
- verify(instance).setRecipeTimeout(10);
- }
-
-
-}
- \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java
deleted file mode 100644
index 938a1038a4..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java
+++ /dev/null
@@ -1,1168 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra;
-
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import javax.ws.rs.core.Response;
-import mockit.Mock;
-import mockit.MockUp;
-import org.apache.http.HttpResponse;
-import org.apache.http.ProtocolVersion;
-import org.apache.http.entity.BasicHttpEntity;
-import org.apache.http.message.BasicHttpResponse;
-import org.hibernate.criterion.Criterion;
-import org.hibernate.criterion.Order;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openecomp.mso.apihandler.common.CamundaClient;
-import org.openecomp.mso.apihandler.common.RequestClient;
-import org.openecomp.mso.apihandler.common.RequestClientFactory;
-import org.openecomp.mso.apihandler.common.RequestClientParamater;
-import org.openecomp.mso.db.catalog.CatalogDatabase;
-import org.openecomp.mso.db.catalog.beans.Service;
-import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
-import org.openecomp.mso.db.catalog.beans.VfModule;
-import org.openecomp.mso.db.catalog.beans.VfModuleCustomization;
-import org.openecomp.mso.db.catalog.beans.VnfComponentsRecipe;
-import org.openecomp.mso.db.catalog.beans.VnfRecipe;
-import org.openecomp.mso.db.catalog.beans.VnfResource;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-import org.openecomp.mso.requestsdb.InfraActiveRequests;
-import org.openecomp.mso.requestsdb.RequestsDatabase;
-
-public class ServiceInstanceTest {
-
- /*** Create Service Instance Test Cases ***/
-
- @BeforeClass
- public static void setUp() throws Exception {
- MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- msoPropertiesFactory.removeAllMsoProperties();
- msoPropertiesFactory.initializeMsoProperties(Constants.MSO_PROP_APIHANDLER_INFRA, "src/test/resources/mso.apihandler-infra.properties");
- }
-
-
- @Test
- public void createServiceInstanceInvalidModelInfo(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v5");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid model-info is specified"));
- }
-
- @Test
- public void createServiceInstanceNormalDuplicate(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return new InfraActiveRequests();
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains(
- "Locked instance - This service (testService) already has a request being worked with a status of null (RequestId - null). The existing request must finish or be cleaned up before proceeding."));
- }
-
- @Test
- public void createServiceInstanceTestDBException(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Exception while creating record in DB") && respBody.contains("NullPointerException"));
- }
-
- @Ignore // 1802 merge
- @Test
- public void createServiceInstanceTestBpmnFail(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Failed calling bpmn properties")); // was: Request Failed due to BPEL error
- }
-
- @Test(expected = Exception.class)
- public void createServiceInstanceTest200Http(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
- HttpResponse resp = new BasicHttpResponse(pv,200, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- }
-
- @Test
- public void createServiceInstanceTest500Http(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
- HttpResponse resp = new BasicHttpResponse(pv,500, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Request Failed due to BPEL error with HTTP Status"));
- }
-
- @Test
- public void createServiceInstanceTestVnfModelType(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
- HttpResponse resp = new BasicHttpResponse(pv,500, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
- String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"vnf\",\"modelName\":\"serviceModel\",\"modelCustomizationName\":\"test\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v5");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("No valid modelVersionId is specified"));
- }
-
- @Test
- public void createServiceInstanceTestNullHttpResp(){
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater){
- return null;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("bpelResponse is null"));
- }
-
- @Test
- public void createServiceInstanceNormalNullDBFatch(){
- new MockUp<RequestsDatabase>() {
- @Mock
- private List<InfraActiveRequests> executeInfraQuery (List <Criterion> criteria, Order order) {
- return Collections.EMPTY_LIST;
- }
- };
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Recipe could not be retrieved from catalog DB null"));
- }
-
-
- @Test
- public void createServiceInstanceInvalidModelVersionId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v5");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid modelVersionId is specified"));
- }
-
- @Ignore // 1802 merge
- @Test
- public void createServiceInstanceNullInstanceName(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid instanceName is specified"));
- }
-
-
- @Test
- public void createServiceInstanceNullModelInfo(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid model-info is specified"));
- }
-
- @Test
- public void createServiceInstanceInvalidModelInvariantId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"1234\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid modelType is specified"));
- }
-
- @Test
- public void createServiceInstanceNullModelVersion(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid modelType is specified"));
- }
-
-
- @Test
- public void createServiceInstanceNullModelType(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid modelType is specified"));
- }
-
- @Test
- public void createServiceInstanceInvalidModelType(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"testmodel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Mapping of request to JSON object failed."));
- }
-
- @Ignore // 1802 merge
- @Test
- public void createServiceInstanceNullModelName(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\":\"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid modelName is specified"));
- }
-
- @Ignore // 1802 merge
- @Test
- public void createServiceInstanceInvalidVersionForAutoBuildVfModules(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": true,\"subscriptionServiceType\":\"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("AutoBuildVfModule is not valid in the v2 version"));
- }
-
- @Test
- public void createServiceInstanceNullRequestParameter(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid subscriptionServiceType is specified"));
- }
-
- @Test
- public void createServiceInstanceNullSubscriptionType(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid subscriptionServiceType is specified"));
- }
-
- @Test
- public void createServiceInstanceAnbormalInvalidJson(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"name\":\"test\"}";
- Response resp = instance.createServiceInstance(requestJson, "v2");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Mapping of request to JSON object failed"));
- }
-
- /*** Activate Service Instance Test Cases ***/
-
- @Test
- public void activateServiceInstanceAnbormalInvalidJson(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"name\":\"test\"}";
- Response resp = instance.activateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Mapping of request to JSON object failed"));
- }
-
- @Test
- public void activateServiceInstanceInvalidModelVersionId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d37\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.activateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid modelVersionId in relatedInstance is specified"));
- }
-
- @Test
- public void activateServiceInstanceInvalidServiceInstanceId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d37\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.activateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid serviceInstanceId matching the serviceInstanceId in request URI is specified"));
- }
-
- @Test
- public void activateServiceInstanceTestNormal(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.activateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- /*** Deactivate Service Instance Test Cases ***/
-
- @Test
- public void deactivateServiceInstanceAnbormalInvalidJson(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"name\":\"test\"}";
- Response resp = instance.deactivateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Mapping of request to JSON object failed"));
- }
-
- @Test
- public void deactivateServiceInstanceInvalidModelVersionId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d37\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.deactivateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid modelVersionId in relatedInstance is specified"));
- }
-
- @Test
- public void deactivateServiceInstanceInvalidServiceInstanceId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d37\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.deactivateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid serviceInstanceId matching the serviceInstanceId in request URI is specified"));
- }
-
- @Test
- public void deactivateServiceInstanceTestNormal(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.deactivateServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- /*** Delete Service Instance Test Cases ***/
-
- @Test
- public void deleteServiceInstanceAnbormalInvalidJson(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"name\":\"test\"}";
- Response resp = instance.deleteServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Mapping of request to JSON object failed"));
- }
-
- @Test
- public void deleteServiceInstanceInvalidModelVersionId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d37\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.deleteServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid modelVersionId is specified"));
- }
-
- @Test
- public void deleteServiceInstanceInvalidServiceInstanceId(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d37\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
- Response resp = instance.deleteServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid modelVersionId is specified"));
- }
-
- @Test
- public void deleteServiceInstanceTestNormal(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.deleteServiceInstance(requestJson, "v5","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- /*** Create Vnf Instance Test Cases ***/
-
- @Ignore // 1802 merge
- @Test
- public void createVNFInstanceTestInvalidCloudConfiguration(){
- ServiceInstances instance = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.createVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid cloudConfiguration is specified"));
- }
-
- @Test
- public void createVNFInstanceTestInvalidIcpCloudRegionId(){
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"cloudConfiguration\":{}, \"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.createVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid lcpCloudRegionId is specified"));
- }
-
- @Test
- public void createVNFInstanceTestInvalidTenantId(){
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"cloudConfiguration\":{\"lcpCloudRegionId\":\"2993841\"}, \"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.createVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid tenantId is specified"));
- }
-
- @Test
- public void createVNFInstanceTestNormal(){
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public int updateInfraStatus (String requestId, String requestStatus, long progress, String lastModifiedBy) {
- return 1;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public VnfResource getVnfResourceByModelCustomizationId(String modelCustomizationId) {
- VnfResource vnfResource = new VnfResource();
- return vnfResource;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public VnfRecipe getVnfRecipe (String vnfType, String action) {
- VnfRecipe recipe =new VnfRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
-
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
- HttpResponse resp = new BasicHttpResponse(pv,200, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
-
- final String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"1882939\",\"vnfInstanceId\":\"1882938\"," +
- "\"networkInstanceId\":\"1882937\",\"volumeGroupInstanceId\":\"1882935\",\"vfModuleInstanceId\":\"1882934\"," +
- "\"requestDetails\":{\"cloudConfiguration\":{\"lcpCloudRegionId\":\"2993841\",\"tenantId\":\"2910032\"}," +
- "\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\"," +
- "\"modelInfo\":{\"modelInvariantId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\":{\"source\":\"VID\",\"requestorId\":\"zz9999\",\"instanceName\":\"testService\",\"productFamilyId\":\"productFamilyId1\"}," +
- "\"requestParameters\":{\"autoBuildVfModules\":false,\"subscriptionServiceType\":\"test\",\"aLaCarte\":false},\"modelInfo\":{\"modelInvariantId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"vnf\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\"}}}";
- Response resp = instance.createVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.equals("success"));
- }
-
- /*** Replace Vnf Instance Test Cases ***/
- @Test
- public void replaceVNFInstanceTestNormal(){
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"cloudConfiguration\":{\"lcpCloudRegionId\":\"2993841\",\"tenantId\":\"2910032\"}, \"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.replaceVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34","557ea944-c83e-43cf-9ed7-3a354abd6d93");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- /*** Update Vnf Instance Test Cases ***/
-
- @Test
- public void updateVNFInstanceTestNormal(){
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"cloudConfiguration\":{\"lcpCloudRegionId\":\"2993841\",\"tenantId\":\"2910032\"}, \"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.updateVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34","557ea944-c83e-43cf-9ed7-3a354abd6d93");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- /*** Update Vnf Instance Test Cases ***/
-
- @Test
- public void deleteVNFInstanceTestNormal(){
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"1882939\","
- +"\"vnfInstanceId\":\"1882938\","
- +"\"networkInstanceId\":\"1882937\","
- +"\"volumeGroupInstanceId\":\"1882935\","
- +"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"cloudConfiguration\":{\"lcpCloudRegionId\":\"2993841\",\"tenantId\":\"2910032\"}, \"relatedInstanceList\" :[{\"relatedInstance\":{\"instanceName\":\"testInstance\",\"instanceId\":\"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"4839499\"}}}],\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersionId\":\"288393\",\"modelCustomizationId\":\"389823213\"}}}";
- Response resp = instance.deleteVnfInstance(requestJson, "v3","557ea944-c83e-43cf-9ed7-3a354abd6d34","557ea944-c83e-43cf-9ed7-3a354abd6d93");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
- }
-
- @Test
- public void createVFModuleTestNormal(){
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public int updateInfraStatus (String requestId, String requestStatus, long progress, String lastModifiedBy) {
- return 1;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public Service getServiceByModelName (String defaultServiceModelName) {
- Service serviceRecord = new Service();
- serviceRecord.setModelUUID("2883992993");
- return serviceRecord;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public ServiceRecipe getServiceRecipeByModelUUID (String uuid,String action) {
- ServiceRecipe recipe =new ServiceRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
- new MockUp<RequestClientFactory>() {
- @Mock
- public RequestClient getRequestClient(String orchestrationURI, MsoJavaProperties props) throws IllegalStateException{
- RequestClient client = new CamundaClient();
- client.setUrl("/test/url");
- return client;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public VnfResource getVnfResourceByModelCustomizationId(String modelCustomizationId) {
- VnfResource vnfResource = new VnfResource();
- return vnfResource;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public VnfComponentsRecipe getVnfComponentsRecipeByVfModuleModelUUId (String vfModuleModelUUId, String vnfComponentType, String action) {
- VnfComponentsRecipe recipe =new VnfComponentsRecipe();
- recipe.setOrchestrationUri("/test/mso");
- recipe.setRecipeTimeout(1000);
- return recipe;
- }
- };
- new MockUp<CatalogDatabase>() {
- @Mock
- public VfModule getVfModuleByModelUuid(String modelUuid) {
- VfModule vfModule =new VfModule();
- return vfModule;
- }
- };
-
- new MockUp<CatalogDatabase>() {
- @Mock
- public VfModuleCustomization getVfModuleCustomizationByModelCustomizationId(String modelCustomizationUuid) {
- VfModuleCustomization vfModuleCustomization =new VfModuleCustomization();
- final VfModule vfModule = new VfModule();
- vfModule.setModelUUID("296e278c-bfa8-496e-b59e-fb1fe715f726");
- vfModuleCustomization.setVfModule(vfModule);
- return vfModuleCustomization;
- }
- };
-
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater){
- ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
- HttpResponse resp = new BasicHttpResponse(pv,200, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
-
- final String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- ServiceInstances instance = new ServiceInstances();
- String s = "\"cloudConfiguration\":{}";
- String requestJson = "{\"serviceInstanceId\":\"43b34d6d-1ab2-4c7a-a3a0-5471306550c5\",\"vnfInstanceId\":\"7b1ead4f-ea06-45c6-921e-124061e5eae7\",\"networkInstanceId\":\"1882937\",\"volumeGroupInstanceId\":\"1882935\",\"vfModuleInstanceId\":\"1882934\",\"requestDetails\":{\"requestInfo\":{\"instanceName\":\"vf-inst\",\"source\":\"VID\",\"suppressRollback\":false,\"requestorId\":\"123123\"},\"modelInfo\":{\"modelType\":\"vfModule\",\"modelInvariantId\":\"dde10afa-c732-4f0f-8501-2d2e01ea46ef\",\"modelVersionId\":\"296e278c-bfa8-496e-b59e-fb1fe715f726\",\"modelName\":\"CarrierTosca0::module-1\",\"modelCustomizationId\":\"ce0fdd17-c677-4bb5-b047-97016ec1e403\",\"modelCustomizationName\":\"ce0fdd17-c677-4bb5-b047-97016ec1e403\",\"modelVersion\":\"1.0\"},\"requestParameters\":{\"userParams\":[]},\"cloudConfiguration\":{\"lcpCloudRegionId\":\"EastUS\",\"tenantId\":\"48de34f6-65a1-4d09-84b4-68b011151672\"},\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceId\":\"43b34d6d-1ab2-4c7a-a3a0-5471306550c5\",\"modelInfo\":{\"modelType\":\"service\",\"modelInvariantId\":\"1192c9b7-bc24-42c9-8f11-415dc679be88\",\"modelVersionId\":\"acb8b74b-afe6-4cc2-92c3-0a09961ab77e\",\"modelName\":\"service\",\"modelVersion\":\"1.0\"}}},{\"relatedInstance\":{\"instanceId\":\"7b1ead4f-ea06-45c6-921e-124061e5eae7\",\"modelInfo\":{\"modelType\":\"vnf\",\"modelInvariantId\":\"a545165e-9646-4030-824c-b9d9c66a886a\",\"modelVersionId\":\"a0b6dffe-0de3-4099-8b94-dc05be942914\",\"modelName\":\"vnf-mdoel\",\"modelVersion\":\"1.0\",\"modelCustomizationName\":\"vnf-mdoel 0\"}}}]}}";
- Response resp = instance.createVfModuleInstance(requestJson, "v5","43b34d6d-1ab2-4c7a-a3a0-5471306550c5", "7b1ead4f-ea06-45c6-921e-124061e5eae7");
- String respStr = resp.getEntity().toString();
- assertTrue(respStr.equals("success"));
- }
-
- @Test
- public void createPortConfigurationTestNormal() {
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public int updateInfraStatus (String requestId, String requestStatus, long progress, String lastModifiedBy) {
- return 1;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- new MockUp<CamundaClient>() {
- @Mock
- public HttpResponse post(RequestClientParamater requestClientParamater) {
- ProtocolVersion pv = new ProtocolVersion("HTTP",1,1);
- HttpResponse resp = new BasicHttpResponse(pv,200, "test response");
- BasicHttpEntity entity = new BasicHttpEntity();
-
- final String body = "{\"content\":\"success\",\"message\":\"success\"}";
- InputStream instream = new ByteArrayInputStream(body.getBytes());
- entity.setContent(instream);
- resp.setEntity(entity);
- return resp;
- }
- };
-
- ServiceInstances sir = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"43b34d6d-1ab2-4c7a-a3a0-5471306550c5\",\"vnfInstanceId\":\"7b1ead4f-ea06-45c6-921e-124061e5eae7\",\"networkInstanceId\":\"1882937\",\"volumeGroupInstanceId\":\"1882935\",\"vfModuleInstanceId\":\"1882934\",\"requestDetails\":{\"requestInfo\":{\"instanceName\":\"vf-inst\",\"source\":\"VID\",\"suppressRollback\":false,\"requestorId\":\"123123\"},\"modelInfo\":{\"modelType\":\"vfModule\",\"modelInvariantId\":\"dde10afa-c732-4f0f-8501-2d2e01ea46ef\",\"modelVersionId\":\"296e278c-bfa8-496e-b59e-fb1fe715f726\",\"modelName\":\"CarrierTosca0::module-1\",\"modelCustomizationId\":\"ce0fdd17-c677-4bb5-b047-97016ec1e403\",\"modelCustomizationName\":\"ce0fdd17-c677-4bb5-b047-97016ec1e403\",\"modelVersion\":\"1.0\"},\"requestParameters\":{\"userParams\":[]},\"cloudConfiguration\":{\"lcpCloudRegionId\":\"EastUS\",\"tenantId\":\"48de34f6-65a1-4d09-84b4-68b011151672\"},\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceId\":\"43b34d6d-1ab2-4c7a-a3a0-5471306550c5\",\"modelInfo\":{\"modelType\":\"service\",\"modelInvariantId\":\"1192c9b7-bc24-42c9-8f11-415dc679be88\",\"modelVersionId\":\"acb8b74b-afe6-4cc2-92c3-0a09961ab77e\",\"modelName\":\"service\",\"modelVersion\":\"1.0\"}}},{\"relatedInstance\":{\"instanceId\":\"7b1ead4f-ea06-45c6-921e-124061e5eae7\",\"modelInfo\":{\"modelType\":\"vnf\",\"modelInvariantId\":\"a545165e-9646-4030-824c-b9d9c66a886a\",\"modelVersionId\":\"a0b6dffe-0de3-4099-8b94-dc05be942914\",\"modelName\":\"vnf-mdoel\",\"modelVersion\":\"1.0\",\"modelCustomizationName\":\"vnf-mdoel 0\"}}}]}}";
- final Response response = sir.createPortConfiguration(requestJson, "v5", "43b34d6d-1ab2-4c7a-a3a0-5471306550c5");
- }
-
- @Test
- public void createPortConfigurationTestBlankOrchestrationURI() {
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public InfraActiveRequests checkInstanceNameDuplicate (HashMap<String,String> instanceIdMap, String instanceName, String requestScope) {
- return null;
- }
- };
-
- new MockUp<RequestsDatabase>() {
- @Mock
- public int updateInfraStatus (String requestId, String requestStatus, long progress, String lastModifiedBy) {
- return 1;
- }
- };
-
- new MockUp<MsoRequest>() {
- @Mock
- public void createRequestRecord (Status status, Action action) {
- return;
- }
- };
-
- ServiceInstances sir = new ServiceInstances();
- String requestJson = "{\"serviceInstanceId\":\"43b34d6d-1ab2-4c7a-a3a0-5471306550c5\",\"vnfInstanceId\":\"7b1ead4f-ea06-45c6-921e-124061e5eae7\",\"networkInstanceId\":\"1882937\",\"volumeGroupInstanceId\":\"1882935\",\"vfModuleInstanceId\":\"1882934\",\"requestDetails\":{\"requestInfo\":{\"instanceName\":\"vf-inst\",\"source\":\"VID\",\"suppressRollback\":false,\"requestorId\":\"123123\"},\"modelInfo\":{\"modelType\":\"vfModule\",\"modelInvariantId\":\"dde10afa-c732-4f0f-8501-2d2e01ea46ef\",\"modelVersionId\":\"296e278c-bfa8-496e-b59e-fb1fe715f726\",\"modelName\":\"CarrierTosca0::module-1\",\"modelCustomizationId\":\"ce0fdd17-c677-4bb5-b047-97016ec1e403\",\"modelCustomizationName\":\"ce0fdd17-c677-4bb5-b047-97016ec1e403\",\"modelVersion\":\"1.0\"},\"requestParameters\":{\"userParams\":[]},\"cloudConfiguration\":{\"lcpCloudRegionId\":\"EastUS\",\"tenantId\":\"48de34f6-65a1-4d09-84b4-68b011151672\"},\"relatedInstanceList\":[{\"relatedInstance\":{\"instanceId\":\"43b34d6d-1ab2-4c7a-a3a0-5471306550c5\",\"modelInfo\":{\"modelType\":\"service\",\"modelInvariantId\":\"1192c9b7-bc24-42c9-8f11-415dc679be88\",\"modelVersionId\":\"acb8b74b-afe6-4cc2-92c3-0a09961ab77e\",\"modelName\":\"service\",\"modelVersion\":\"1.0\"}}},{\"relatedInstance\":{\"instanceId\":\"7b1ead4f-ea06-45c6-921e-124061e5eae7\",\"modelInfo\":{\"modelType\":\"vnf\",\"modelInvariantId\":\"a545165e-9646-4030-824c-b9d9c66a886a\",\"modelVersionId\":\"a0b6dffe-0de3-4099-8b94-dc05be942914\",\"modelName\":\"vnf-mdoel\",\"modelVersion\":\"1.0\",\"modelCustomizationName\":\"vnf-mdoel 0\"}}}]}}";
- final Response response = sir.createPortConfiguration(requestJson, "v5", "43b34d6d-1ab2-4c7a-a3a0-5471306550c5");
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstancesTest.java
deleted file mode 100644
index a217922b4a..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstancesTest.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.http.HttpStatus;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.mso.apihandler.common.ValidationException;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-
-public class ServiceInstancesTest {
-
- private static final String requestJSONCreate = "{ \"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\" },"
- + " \"subscriberInfo\": { \"globalSubscriberId\": \"{some subscriber id}\","
- + " \"subscriberName\": \"{some subscriber name}\" },"
- + " \"requestInfo\": { \"productFamilyId\": \"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb\", "
- + "\"source\": \"VID\", \"suppressRollback\": true, \"requestorId\": \"az2016\" },"
- + " \"requestParameters\": { \"subscriptionServiceType\": \"MOG\", \"aLaCarte\": false,"
- + " \"userParams\": [ { \"name\": \"someUserParam\", \"value\": \"someValue\" } ] } } } ";
-
- private static final String requestJSONActivateDeacivate =
- "{ \"requestDetails\": { \"modelInfo\": { \"modelType\": \"service\","
- + " \"modelInvariantId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\", "
- + "\"modelVersionId\": \"fe6985cd-ea33-3346-ac12-ab121484a3fe\", "
- + "\"modelName\": \"Test\", \"modelVersion\": \"1.0\" }, "
- + "\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"az2016\" }, "
- + "\"requestParameters\": { \"userParams\": [ { \"name\": \"aic_zone\", "
- + "\"value\": \"someValue\" } ] } } } ";
-
- private static final String requestJSONDelete =
- "{ \"requestDetails\": { \"modelInfo\": { \"modelType\":\"network\", "
- + "\"modelName\":\"CONTRAIL30_BASIC\" }, \"cloudConfiguration\": { \"lcpCloudRegionId\":\"mdt1\", "
- + "\"tenantId\":\"8b1df54faa3b49078e3416e21370a3ba\" }, "
- + "\"requestInfo\": { \"source\":\"VID\", \"requestorId\":\"az2016\" } } }";
-
- @Test
- public void testCreateServiceInstance()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title></title></head><body></body></html>";
- final Response SERVICE_RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
-
- try {
- ServiceInstances sir = Mockito.mock(ServiceInstances.class);
- sir.createServiceInstance(requestJSONCreate, "v3");
- Mockito.when(sir.createServiceInstance(requestJSONCreate, "v3")).thenReturn(SERVICE_RESPONSE);
- Response resp = sir.createServiceInstance(requestJSONCreate, "v3");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testActivateServiceInstance()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title></title></head><body></body></html>";
- final Response SERVICE_RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
- try {
- ServiceInstances sir = Mockito.mock(ServiceInstances.class);
- Mockito.when(sir.activateServiceInstance(requestJSONActivateDeacivate, "v5", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"))
- .thenReturn(SERVICE_RESPONSE);
- Response resp = sir.activateServiceInstance(requestJSONActivateDeacivate, "v5", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testDeactivateServiceInstance()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title></title></head><body></body></html>";
- final Response SERVICE_RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
- try {
- ServiceInstances sir = Mockito.mock(ServiceInstances.class);
- Mockito.when(sir.deactivateServiceInstance(requestJSONActivateDeacivate, "v5", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"))
- .thenReturn(SERVICE_RESPONSE);
- Response resp = sir.deactivateServiceInstance(requestJSONActivateDeacivate, "v5", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testDeleteServiceInstance()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String CHECK_HTML = "<!DOCTYPE html><html><head><meta charset=\"ISO-8859-1\"><title>Health Check</title></head><body>Application ready</body></html>";
- final Response SERVICE_RESPONSE = Response.status(HttpStatus.SC_OK).entity(CHECK_HTML).build();
- try {
- ServiceInstances sir = Mockito.mock(ServiceInstances.class);
- Mockito.when(sir.deleteServiceInstance(requestJSONDelete, "v5", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"))
- .thenReturn(SERVICE_RESPONSE);
- Response resp = sir.deleteServiceInstance(requestJSONDelete, "v5", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestDetailsTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestDetailsTest.java
deleted file mode 100644
index f257ca7a80..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestDetailsTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-import static org.junit.Assert.assertTrue;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.RequestDetails;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.RequestInfo;
-
-
-
-public class RequestDetailsTest {
-
- RequestDetails _requestDetails;
- RequestInfo _requestInfo;
-
- public RequestDetailsTest() {
- }
-
- @Before
- public void setUp() {
- _requestDetails = mock(RequestDetails.class);
- _requestInfo = new RequestInfo();
- when(_requestDetails.getRequestInfo()).thenReturn(_requestInfo);
- }
-
- @After
- public void tearDown() {
- _requestDetails = null;
- _requestInfo = null;
- }
-
- /**
- * Test of getRequestInfo method
- */
- @Test
- public void testGetRequestInfo() {
- _requestDetails.setRequestInfo(_requestInfo);
- assertTrue(_requestDetails.getRequestInfo().equals(_requestInfo));
-
- }
-
- /**
- * Test setRequestInfo
- */
- @Test
- public void testSetRequestInfo() {
- _requestDetails.setRequestInfo(_requestInfo);
- verify(_requestDetails).setRequestInfo(_requestInfo);
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestInfoTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestInfoTest.java
deleted file mode 100644
index 3ff389124a..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/RequestInfoTest.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.RequestInfo;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.ValidResponses;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class RequestInfoTest {
-
- RequestInfo _requestInfo;
- String _source;
- ValidResponses _responseValue;
- String _requestorId;
-
- public RequestInfoTest() {
- }
-
- @Before
- public void setUp() {
- _requestInfo = mock(RequestInfo.class);
- _responseValue = ValidResponses.abort;
- _requestorId = "ab1234";
- _source = "VID";
- when(_requestInfo.getRequestorId()).thenReturn(_requestorId);
- when(_requestInfo.getSource()).thenReturn(_source);
- when(_requestInfo.getResponseValue()).thenReturn(_responseValue);
-
- }
-
- @After
- public void tearDown() {
- _requestInfo = null;
- _responseValue = null;
- }
-
- /**
- * Test of getSource method
- */
- @Test
- public void testGetSource() {
- String result = _requestInfo.getSource();
- assertEquals(_source, result);
-
- }
-
- /**
- * Test setSource
- */
- @Test
- public void testSetSource() {
- _requestInfo.setSource("VID");
- verify(_requestInfo).setSource(_source);
- }
-
- /**
- * Test of getRequestorId method
- */
- @Test
- public void testGetRequestorId() {
- String result = _requestInfo.getRequestorId();
- assertEquals(_requestorId, result);
-
- }
-
- /**
- * Test setRequestInfo
- */
- @Test
- public void testSetRequestorId() {
- _requestInfo.setRequestorId(_requestorId);
- verify(_requestInfo).setRequestorId(_requestorId);
- }
-
-
- /**
- * Test of getResponseValue method
- */
- @Test
- public void testGetResponseValue() {
- ValidResponses result = _requestInfo.getResponseValue();
- assertEquals(_responseValue, result);
-
- }
-
- /**
- * Test setResponseValues method
- */
- @Test
- public void testSetResponseValue() {
- _requestInfo.setResponseValue(ValidResponses.abort);
- verify(_requestInfo).setResponseValue(_responseValue);
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskListTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskListTest.java
deleted file mode 100644
index 293278955a..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskListTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.json.JSONArray;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TaskList;
-
-public class TaskListTest {
-
- TaskList _taskList;
- protected String _taskId;
- protected String _type;
- protected String _nfRole;
- protected String _subscriptionServiceType;
- protected String _originalRequestId;
- protected String _originalRequestorId;
- protected String _errorSource;
- protected String _errorCode;
- protected String _errorMessage;
- protected String _buildingBlockName;
- protected String _buildingBlockStep;
- protected JSONArray _validResponses;
-
- public TaskListTest() {
- }
-
- @Before
- public void setUp() {
- _taskList = mock(TaskList.class);
- _taskId = "_taskid";
- _type = "type";
- _nfRole = "nfrole";
- _subscriptionServiceType = "subscriptionservicetype";
- _originalRequestId = "originalrequestid";
- _originalRequestorId = "originalrequestorid";
- _errorSource = "errorsource";
- _errorCode = "errorcode";
- _errorMessage = "errormessage";
- _buildingBlockName = "buildingblockname";
- _buildingBlockStep = "buildingblockstep";
- _validResponses = mock(JSONArray.class);
-
- when(_taskList.getTaskId()).thenReturn(_taskId);
- when(_taskList.getType()).thenReturn(_type);
- when(_taskList.getNfRole()).thenReturn(_nfRole);
- when(_taskList.getSubscriptionServiceType()).thenReturn(_subscriptionServiceType);
- when(_taskList.getOriginalRequestId()).thenReturn(_originalRequestId);
- when(_taskList.getOriginalRequestorId()).thenReturn(_originalRequestorId);
- when(_taskList.getErrorSource()).thenReturn(_errorSource);
- when(_taskList.getErrorCode()).thenReturn(_errorCode);
- when(_taskList.getErrorMessage()).thenReturn(_errorMessage);
- when(_taskList.getBuildingBlockName()).thenReturn(_buildingBlockName);
- when(_taskList.getBuildingBlockStep()).thenReturn(_buildingBlockStep);
- when(_taskList.getValidResponses()).thenReturn(_validResponses);
- }
-
- @After
- public void tearDown() {
- _taskList = null;
- _validResponses = null;
- }
-
- @Test
- public void testGetTaskId() {
- String result = _taskList.getTaskId();
- assertEquals(_taskId, result);
-
- }
-
- @Test
- public void testSetTaskId() {
- _taskList.setTaskId("_taskid");
- verify(_taskList).setTaskId(_taskId);
- }
-
- @Test
- public void testGetType() {
- String result = _taskList.getType();
- assertEquals(_type, result);
-
- }
-
- @Test
- public void testSetType() {
- _taskList.setType(_type);
- verify(_taskList).setType(_type);
- }
-
- @Test
- public void testGetNfRole() {
- String result = _taskList.getNfRole();
- assertEquals(_nfRole, result);
-
- }
-
- @Test
- public void testSetNfRole() {
- _taskList.setType(_nfRole);
- verify(_taskList).setType(_nfRole);
- }
-
- @Test
- public void testGetSubscriptionServiceType() {
- String result = _taskList.getSubscriptionServiceType();
- assertEquals(_subscriptionServiceType, result);
-
- }
-
- @Test
- public void testSetSubscriptionServiceType() {
- _taskList.setSubscriptionServiceType(_subscriptionServiceType);
- verify(_taskList).setSubscriptionServiceType(_subscriptionServiceType);
- }
-
- @Test
- public void testGetOriginalRequestId() {
- String result = _taskList.getOriginalRequestId();
- assertEquals(_originalRequestId, result);
-
- }
-
- @Test
- public void testSetOriginalRequestId() {
- _taskList.setOriginalRequestId(_originalRequestId);
- verify(_taskList).setOriginalRequestId(_originalRequestId);
- }
-
- @Test
- public void testGetOriginalRequestorId() {
- String result = _taskList.getOriginalRequestorId();
- assertEquals(_originalRequestorId, result);
-
- }
-
- @Test
- public void testSetOriginalRequestorId() {
- _taskList.setOriginalRequestorId(_originalRequestorId);
- verify(_taskList).setOriginalRequestorId(_originalRequestorId);
- }
-
- @Test
- public void testGetErrorSource() {
- String result = _taskList.getErrorSource();
- assertEquals(_errorSource, result);
-
- }
-
- @Test
- public void testSetErrorSource() {
- _taskList.setErrorSource(_errorSource);
- verify(_taskList).setErrorSource(_errorSource);
- }
-
- @Test
- public void testGetErrorCode() {
- String result = _taskList.getErrorCode();
- assertEquals(_errorCode, result);
-
- }
-
- @Test
- public void testSetErrorCode() {
- _taskList.setErrorCode(_errorCode);
- verify(_taskList).setErrorCode(_errorCode);
- }
-
- @Test
- public void testGetErrorMessage() {
- String result = _taskList.getErrorMessage();
- assertEquals(_errorMessage, result);
-
- }
-
- @Test
- public void testSetErrorMessage() {
- _taskList.setErrorMessage(_errorMessage);
- verify(_taskList).setErrorMessage(_errorMessage);
- }
-
- @Test
- public void testGetBuildingBlockName() {
- String result = _taskList.getBuildingBlockName();
- assertEquals(_buildingBlockName, result);
-
- }
-
- @Test
- public void testSetBuildingBlockName() {
- _taskList.setBuildingBlockName(_buildingBlockName);
- verify(_taskList).setBuildingBlockName(_buildingBlockName);
- }
-
- @Test
- public void testGetBuildingBlockStep() {
- String result = _taskList.getBuildingBlockStep();
- assertEquals(_buildingBlockStep, result);
-
- }
-
- @Test
- public void testSetBuildingBlockStep() {
- _taskList.setBuildingBlockStep(_buildingBlockStep);
- verify(_taskList).setBuildingBlockStep(_buildingBlockStep);
- }
-
- @Test
- public void testGetValidResponses() {
-
- JSONArray result = _taskList.getValidResponses();
- assertEquals(_validResponses, result);
-
- }
-
- @Test
- public void testSetValidResponses() {
- _taskList.setValidResponses(_validResponses);
- verify(_taskList).setValidResponses(_validResponses);
- }
-
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskRequestReferenceTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskRequestReferenceTest.java
deleted file mode 100644
index ec45592704..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskRequestReferenceTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TaskRequestReference;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class TaskRequestReferenceTest {
-
- TaskRequestReference _taskRequestReference;
-
- protected String _taskId;
- public TaskRequestReferenceTest() {
- }
-
- @Before
- public void setUp() {
- _taskRequestReference = mock(TaskRequestReference.class);
- _taskId = "taskid";
-
- when(_taskRequestReference.getTaskId()).thenReturn(_taskId);
- }
-
- @After
- public void tearDown() {
- _taskRequestReference = null;
- }
-
- /**
- * Test getTaskRequestReference
- */
- @Test
- public void taskGetRequestReference() {
- String result = _taskRequestReference.getTaskId();
- assertEquals(_taskId, result);
- }
-
- /**
- * Test setTaskRequestReference
- */
- @Test
- public void testSetRequestInfo() {
- _taskRequestReference.setTaskId(_taskId);
- verify(_taskRequestReference).setTaskId(_taskId);
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariableValueTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariableValueTest.java
deleted file mode 100644
index b593036556..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariableValueTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TaskVariableValue;
-
-public class TaskVariableValueTest {
- TaskVariableValue _taskVariableValue;
- protected String _name;
- protected String _value;
- protected String _operator;
-
- public TaskVariableValueTest() {
- }
-
- @Before
- public void setUp() {
- _taskVariableValue = mock(TaskVariableValue.class);
- _name = "name";
- _value = "value";
- _operator = "operator";
- when(_taskVariableValue.getName()).thenReturn(_name);
- when(_taskVariableValue.getValue()).thenReturn(_value);
- when(_taskVariableValue.getOperator()).thenReturn(_operator);
- }
-
- @After
- public void tearDown() {
- _taskVariableValue = null;
- }
-
- /**
- * Test of getName method
- */
- @Test
- public void testGetName() {
- _taskVariableValue.setName(_name);
- assertEquals(_taskVariableValue.getName(),_name);
-
- }
-
- /**
- * Test setName
- */
- @Test
- public void testSetName() {
- _taskVariableValue.setName(_name);
- verify(_taskVariableValue).setName(_name);
- }
-
- /**
- * Test of getName method
- */
- @Test
- public void testGetValue() {
- _taskVariableValue.setValue(_value);
- assertEquals(_taskVariableValue.getValue(),_value);
-
- }
-
- /**
- * Test setName
- */
- @Test
- public void testSetValue() {
- _taskVariableValue.setValue(_value);
- verify(_taskVariableValue).setValue(_value);
- }
-
- /**
- * Test of getName method
- */
- @Test
- public void testGetOperator() {
- _taskVariableValue.setOperator(_operator);
- assertEquals(_taskVariableValue.getOperator(),_operator);
-
- }
-
- /**
- * Test setName
- */
- @Test
- public void testSetRequestDetails() {
- _taskVariableValue.setOperator(_operator);
- verify(_taskVariableValue).setOperator(_operator);
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariablesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariablesTest.java
deleted file mode 100644
index b08729b0ff..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TaskVariablesTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TaskVariableValue;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TaskVariables;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.List;
-
-public class TaskVariablesTest {
-
- TaskVariables _taskVariables;
- private List<TaskVariableValue> _taskVariableValueList;
-
- public TaskVariablesTest() {
- }
-
- @SuppressWarnings("unchecked")
- @Before
- public void setUp() {
- _taskVariables = mock(TaskVariables.class);
- _taskVariableValueList = mock(List.class);
- when(_taskVariables.getTaskVariables()).thenReturn(_taskVariableValueList);
- }
-
- @After
- public void tearDown() {
- _taskVariables = null;
- }
-
- @Test
- public void testGetTaskVariables() {
- List<TaskVariableValue> result = _taskVariables.getTaskVariables();
- assertEquals(_taskVariableValueList, result);
-
- }
-
- @Test
- public void testSetTaskVariables() {
- _taskVariables.setTaskVariables(_taskVariableValueList);
- verify(_taskVariables).setTaskVariables(_taskVariableValueList);
-
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksGetResponseTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksGetResponseTest.java
deleted file mode 100644
index eeb745d3bf..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksGetResponseTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TaskList;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TasksGetResponse;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.List;
-
-public class TasksGetResponseTest {
-
- TasksGetResponse _tasksGetResponse;
- private List<TaskList> _taskList;
-
- public TasksGetResponseTest() {
- }
-
- @SuppressWarnings("unchecked")
- @Before
- public void setUp() {
- _tasksGetResponse = mock(TasksGetResponse.class);
- _taskList = mock(List.class);
- when(_tasksGetResponse.getTaskList()).thenReturn(_taskList);
- }
-
- @After
- public void tearDown() {
- _tasksGetResponse = null;
- }
-
- @Test
- public void testGetTaskList() {
- List<TaskList> result = _tasksGetResponse.getTaskList();
- assertEquals(_taskList, result);
-
- }
-
- @Test
- public void testSetTaskList() {
- _tasksGetResponse.setTaskList(_taskList);
- verify(_tasksGetResponse).setTaskList(_taskList);
-
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksRequestTest.java
deleted file mode 100644
index 8bfdb645d7..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/TasksRequestTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-import static org.junit.Assert.assertTrue;
-import org.junit.Before;
-import org.junit.Test;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.RequestDetails;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.TasksRequest;
-
-
-public class TasksRequestTest {
- TasksRequest _tasksRequest;
- private RequestDetails _requestDetails;
-
- public TasksRequestTest() {
- }
-
- @Before
- public void setUp() {
- _tasksRequest = mock(TasksRequest.class);
- _requestDetails = new RequestDetails();
- when(_tasksRequest.getRequestDetails()).thenReturn(_requestDetails);
- }
-
- @After
- public void tearDown() {
- _tasksRequest = null;
- }
-
- /**
- * Test of getRequestDetails method
- */
- @Test
- public void testGetRequestDetails() {
- _tasksRequest.setRequestDetails(_requestDetails);
- assertTrue(_tasksRequest.getRequestDetails().equals(_requestDetails));
-
- }
-
- /**
- * Test setRequestDetails
- */
- @Test
- public void testSetRequestDetails() {
- _tasksRequest.setRequestDetails(_requestDetails);
- verify(_tasksRequest).setRequestDetails(_requestDetails);
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/ValueTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/ValueTest.java
deleted file mode 100644
index 41b43c06d8..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/ValueTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.Value;
-
-public class ValueTest {
- Value _valueInstance;
- protected String _value;
-
- public ValueTest() {
- }
-
- @Before
- public void setUp() {
- _valueInstance = mock(Value.class);
- _value = "_value";
- when(_valueInstance.getValue()).thenReturn(_value);
- }
-
- @After
- public void tearDown() {
- _valueInstance = null;
- }
-
- /**
- * Test of getValue method
- */
- @Test
- public void testGetValue() {
- _valueInstance.setValue(_value);
- assertEquals(_valueInstance.getValue(),_value);
-
- }
-
- /**
- * Test setValue
- */
- @Test
- public void testSetValue() {
- _valueInstance.setValue(_value);
- verify(_valueInstance).setValue(_value);
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/VariablesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/VariablesTest.java
deleted file mode 100644
index fdfd5a16bc..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/taskbeans/VariablesTest.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.openecomp.mso.apihandlerinfra.taskbeans;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.Variables;
-import org.openecomp.mso.apihandlerinfra.tasksbeans.Value;
-
-public class VariablesTest {
-
- Variables _variables;
- protected Value _source;
- protected Value _responseValue;
- protected Value _requestorId;
-
- @Before
- public void setUp() {
- _variables = mock(Variables.class);
- _source = mock(Value.class);
- _responseValue = mock(Value.class);
- _requestorId = mock(Value.class);
-
- when(_variables.getSource()).thenReturn(_source);
- when(_variables.getRequestorId()).thenReturn(_requestorId);
- when(_variables.getResponseValue()).thenReturn(_responseValue);
-
- }
-
- @After
- public void tearDown() {
- _variables = null;
- _source = null;
- _responseValue = null;
- _requestorId = null;
- }
-
- @Test
- public void testGetSource() {
- _variables.setSource(_source);
- assertTrue(_variables.getSource().equals(_source));
- }
-
- @Test
- public void testSetSource(){
- _variables.setSource(_source);
- verify(_variables).setSource(_source);
- }
-
- @Test
- public void testGetResponseValue() {
- _variables.setResponseValue(_responseValue);
- assertTrue(_variables.getResponseValue().equals(_responseValue));
- }
-
- @Test
- public void testSetResponseValue(){
- _variables.setResponseValue(_responseValue);
- verify(_variables).setResponseValue(_responseValue);
- }
-
- @Test
- public void testGetRequestorId() {
- _variables.setRequestorId(_requestorId);
- assertTrue(_variables.getRequestorId().equals(_requestorId));
- }
-
- @Test
- public void testSetRequestorId(){
- _variables.setRequestorId(_requestorId);
- verify(_variables).setRequestorId(_requestorId);
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
deleted file mode 100644
index 30db50c9b9..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudOrchestrationTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.CharEncoding;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.MsoException;
-import org.openecomp.mso.apihandlerinfra.Status;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.Action;
-import org.openecomp.mso.requestsdb.InfraActiveRequests;
-import org.openecomp.mso.requestsdb.RequestsDatabase;
-
-public class CloudOrchestrationTest {
-
- @Test
- public void testCreateOpEnvObjectMapperError() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- Response response = co.createOperationEnvironment(null, null);
- String body = response.getEntity().toString();
-
- assertTrue(body.contains("Mapping of request to JSON object failed."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testCreateOpEnvError() throws IOException {
- String request = "{\"requestDetails\":{\"requestInfo\":{\"resourceType\":\"operationalEnvironment\",\"instanceName\": \"myOpEnv\",\"source\": \"VID\",\"requestorId\": \"az2017\"},"
- + " \"requestParameters\": {\"tenantContext\": \"Test\",\"workloadContext\": \"ECOMP_E2E-IST\"}}}";
- CloudOrchestration co = new CloudOrchestration();
- Response response = co.createOperationEnvironment(request, null);
- String body = response.getEntity().toString();
-
- assertTrue(body.contains("Error parsing request."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testCreateOpEnvReqRecord() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/ECOMPOperationEnvironmentCreate.json"), CharEncoding.UTF_8);
- Response response = co.createOperationEnvironment(request, null);
- assertEquals(500, response.getStatus());
- }
-
- @Test
- public void testCreateOperationalEnvironment() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- co.setRequestsDatabase(reqDB);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/ECOMPOperationEnvironmentCreate.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(new HashMap<String, String>(), "myOpEnv", "create")).thenReturn(null);
- doNothing().when(tenantIsolationRequest).createRequestRecord(Status.IN_PROGRESS, Action.create);
-
- Response response = co.createOperationEnvironment(request, null);
- assertEquals(200, response.getStatus());
- }
-
- @Test
- public void testCreateVNFDuplicateCheck() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- Response res = Response.status(409).entity("already has a request being worked with a status of").build();
-
- co.setRequestsDatabase(reqDB);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/VNFOperationEnvironmentCreate.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(new InfraActiveRequests());
- doNothing().when(tenantIsolationRequest).createRequestRecord(Status.FAILED, Action.create);
- when(tenantIsolationRequest.buildServiceErrorResponse(any(Integer.class), any(MsoException.class), any(String.class), any(String.class), any(List.class))).thenReturn(res);
-
- Response response = co.createOperationEnvironment(request, null);
- assertEquals(409, response.getStatus());
- }
-
- @Test
- public void testCreateVNF() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- TenantIsolationRunnable thread = mock(TenantIsolationRunnable.class);
-
- co.setRequestsDatabase(reqDB);
- co.setThread(thread);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/VNFOperationEnvironmentCreate.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(null);
- doNothing().when(tenantIsolationRequest).createRequestRecord(Status.IN_PROGRESS, Action.create);
- doNothing().when(thread).run();
-
- Response response = co.createOperationEnvironment(request, null);
- assertEquals(200, response.getStatus());
- }
-
- @Test
- public void testActivate() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- TenantIsolationRunnable thread = mock(TenantIsolationRunnable.class);
-
- co.setRequestsDatabase(reqDB);
- co.setThread(thread);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/ActivateOperationEnvironment.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(null);
- doNothing().when(tenantIsolationRequest).createRequestRecord(Status.IN_PROGRESS, Action.activate);
- doNothing().when(thread).run();
-
- Response response = co.activateOperationEnvironment(request, null, "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(200, response.getStatus());
- }
-
- @Test
- public void testDeactivate() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- TenantIsolationRunnable thread = mock(TenantIsolationRunnable.class);
-
- co.setRequestsDatabase(reqDB);
- co.setThread(thread);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/DeactivateOperationEnvironment.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(null);
- doNothing().when(tenantIsolationRequest).createRequestRecord(Status.IN_PROGRESS, Action.deactivate);
- doNothing().when(thread).run();
-
- Response response = co.activateOperationEnvironment(request, null, "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(200, response.getStatus());
- }
-
- @Ignore // 1802 merge
- @Test
- public void testDeactivateThreadException() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- TenantIsolationRunnable thread = mock(TenantIsolationRunnable.class);
- Response res = Response.status(500).entity("Failed creating a Thread").build();
-
- co.setRequestsDatabase(reqDB);
- co.setThread(thread);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/DeactivateOperationEnvironment.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(null);
- doNothing().when(tenantIsolationRequest).createRequestRecord(Status.IN_PROGRESS, Action.deactivate);
- doThrow(Exception.class).when(thread).run();
- when(tenantIsolationRequest.buildServiceErrorResponse(any(Integer.class), any(MsoException.class), any(String.class), any(String.class), any(List.class))).thenReturn(res);
-
- Response response = co.activateOperationEnvironment(request, null, "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(500, response.getStatus());
- }
-
- @Test
- public void testDeactivateDupCheck() throws IOException {
- CloudOrchestration co = new CloudOrchestration();
- TenantIsolationRequest tenantIsolationRequest = mock(TenantIsolationRequest.class);
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- Response res = Response.status(409).entity("Failed creating a Thread").build();
-
- co.setRequestsDatabase(reqDB);
- co.setTenantIsolationRequest(tenantIsolationRequest);
- String request = IOUtils.toString(ClassLoader.class.getResourceAsStream ("/DeactivateOperationEnvironment.json"), CharEncoding.UTF_8);
- when(reqDB.checkInstanceNameDuplicate(null, "myVnfOpEnv", "operationalEnvironment")).thenReturn(null);
- when(reqDB.checkVnfIdStatus(null)).thenReturn(new InfraActiveRequests());
- when(tenantIsolationRequest.buildServiceErrorResponse(any(Integer.class), any(MsoException.class), any(String.class), any(String.class), any(List.class))).thenReturn(res);
-
- Response response = co.deactivateOperationEnvironment(request, null, "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(409, response.getStatus());
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
deleted file mode 100644
index 3e19489f5d..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/CloudResourcesOrchestrationTest.java
+++ /dev/null
@@ -1,333 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-import java.sql.Timestamp;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.core.Response;
-
-import org.jboss.resteasy.spi.ResteasyUriInfo;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.openecomp.mso.requestsdb.InfraActiveRequests;
-import org.openecomp.mso.requestsdb.RequestsDatabase;
-
-public class CloudResourcesOrchestrationTest {
-
- private String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"VID\",\"requestorId\":\"zz9999\" } } }";
-
- @Test
- public void testUnlockFailObjectMapping() {
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- Response response = cor.unlockOrchestrationRequest(null, null, null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Mapping of request to JSON object failed."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testUnlockFailObjectMapping2() {
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- Response response = cor.unlockOrchestrationRequest(null, "requestId", null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Mapping of request to JSON object failed."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testParseOrchestrationError1() {
- String requestJSON = "{\"requestDetails\": null }";
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Error parsing request."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testParseOrchestrationError2() {
- String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"\",\"requestorId\":\"zz9999\" } } }";
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Error parsing request."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testParseOrchestrationError3() {
- String requestJSON = "{\"requestDetails\":{\"requestInfo\":{\"source\":\"VID\",\"requestorId\":\"\" } } }";
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Error parsing request."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testGetInfraActiveRequestNull() {
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getRequestFromInfraActive("requestId")).thenReturn(null);
-
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Orchestration RequestId requestId is not found in DB"));
- assertEquals(404, response.getStatus());
- }
-
- @Test
- public void testUnlockError() {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvironmentId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("IN_PROGRESS");
-
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getRequestFromInfraActive("requestId")).thenReturn(iar);
- when(reqDB.updateInfraStatus("requestId", "UNLOCKED", "APIH")).thenReturn(1);
-
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- assertEquals(404, response.getStatus());
- }
-
- @Test
- public void testUnlock() throws ParseException {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvironmentId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("IN_PROGRESS");
-
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- Date date = dateFormat.parse("23/09/2007");
- long time = date.getTime();
- iar.setStartTime(new Timestamp(time));
-
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getRequestFromInfraActive("requestId")).thenReturn(iar);
- when(reqDB.updateInfraStatus("requestId", "UNLOCKED", "APIH")).thenReturn(1);
-
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- assertEquals(204, response.getStatus());
- }
-
- @Test
- public void testUnlockComplete() throws ParseException {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvironmentId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("COMPLETE");
-
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- Date date = dateFormat.parse("23/09/2007");
- long time = date.getTime();
- iar.setStartTime(new Timestamp(time));
-
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getRequestFromInfraActive("requestId")).thenReturn(iar);
- when(reqDB.updateInfraStatus("requestId", "UNLOCKED", "APIH")).thenReturn(1);
-
- Response response = cor.unlockOrchestrationRequest(requestJSON, "requestId", null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Orchestration RequestId requestId has a status of COMPLETE and can not be unlocked"));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testGetOperationalEnvFilter() {
- ResteasyUriInfo uriInfo = new ResteasyUriInfo("", "requestId=89c56827-1c78-4827-bc4d-6afcdb37a51f", "");
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getRequestFromInfraActive("89c56827-1c78-4827-bc4d-6afcdb37a51f")).thenReturn(null);
-
- Response response = cor.getOperationEnvironmentStatusFilter(uriInfo, null);
- String body = response.getEntity().toString();
-
- assertTrue(body.contains("Orchestration RequestId 89c56827-1c78-4827-bc4d-6afcdb37a51f is not found in DB"));
- assertEquals(204, response.getStatus());
- }
-
- @Test
- public void testGetOperationalEnvFilterException() {
- ResteasyUriInfo uriInfo = new ResteasyUriInfo("", "requestId=89c56827-1c78-4827-bc4d-6afcdb37a51f", "");
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
-
- Response response = cor.getOperationEnvironmentStatusFilter(uriInfo, null);
- assertEquals(404, response.getStatus());
- }
-
- @Test
- public void testGetOperationalEnvSuccess() throws ParseException {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvironmentId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("COMPLETE");
-
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- Date date = dateFormat.parse("23/09/2007");
- long time = date.getTime();
- iar.setStartTime(new Timestamp(time));
-
- ResteasyUriInfo uriInfo = new ResteasyUriInfo("", "requestId=89c56827-1c78-4827-bc4d-6afcdb37a51f", "");
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getRequestFromInfraActive("89c56827-1c78-4827-bc4d-6afcdb37a51f")).thenReturn(iar);
-
- Response response = cor.getOperationEnvironmentStatusFilter(uriInfo, null);
- assertEquals(200, response.getStatus());
- }
-
- @Test
- public void testGetOperationalEnvFilterSuccess() throws ParseException {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvironmentId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("COMPLETE");
- iar.setStatusMessage("status Message");
- iar.setProgress(20L);
-
- DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- Date date = dateFormat.parse("23/09/2007");
- long time = date.getTime();
- iar.setStartTime(new Timestamp(time));
- iar.setEndTime(new Timestamp(time));
-
- List<InfraActiveRequests> requests = new ArrayList<>();
- requests.add(iar);
-
- Map<String, String> map = new HashMap<>();
- map.put("operationalEnvironmentName", "myVnfOpEnv");
-
- ResteasyUriInfo uriInfo = new ResteasyUriInfo("", "operationalEnvironmentName=myVnfOpEnv&requestorId=test", "");
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getCloudOrchestrationFiltersFromInfraActive(map)).thenReturn(requests);
-
- Response response = cor.getOperationEnvironmentStatusFilter(uriInfo, null);
- assertEquals(200, response.getStatus());
- }
-
- @Ignore // 1802 merge
- @Test
- public void testGetOperationalEnvFilterException1() throws ParseException {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvironmentId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("COMPLETE");
-
- List<InfraActiveRequests> requests = new ArrayList<>();
- requests.add(iar);
-
- Map<String, String> map = new HashMap<>();
- map.put("operationalEnvironmentName", "myVnfOpEnv");
-
- ResteasyUriInfo uriInfo = new ResteasyUriInfo("", "filter=operationalEnvironmentName:EQUALS:myVnfOpEnv", "");
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getCloudOrchestrationFiltersFromInfraActive(map)).thenReturn(requests);
-
- Response response = cor.getOperationEnvironmentStatusFilter(uriInfo, null);
- assertEquals(500, response.getStatus());
- }
-
- @Test
- public void testGetOperationalEnvFilterException2() throws ParseException {
- InfraActiveRequests iar = new InfraActiveRequests();
- iar.setRequestId("requestId");
- iar.setRequestScope("requestScope");
- iar.setRequestType("requestType");
- iar.setOperationalEnvId("operationalEnvId");
- iar.setOperationalEnvName("operationalEnvName");
- iar.setRequestorId("ma920e");
- iar.setRequestBody("");
- iar.setRequestStatus("COMPLETE");
-
- List<InfraActiveRequests> requests = new ArrayList<>();
- requests.add(iar);
-
- Map<String, String> map = new HashMap<>();
- map.put("operationalEnvironmentName", "myVnfOpEnv");
-
- ResteasyUriInfo uriInfo = new ResteasyUriInfo("", "operationalEnvironmentName=", "");
- CloudResourcesOrchestration cor = new CloudResourcesOrchestration();
- RequestsDatabase reqDB = mock(RequestsDatabase.class);
- cor.setRequestsDB(reqDB);
- when(reqDB.getCloudOrchestrationFiltersFromInfraActive(map)).thenReturn(requests);
-
- Response response = cor.getOperationEnvironmentStatusFilter(uriInfo, null);
- assertEquals(500, response.getStatus());
- assertTrue(response.getEntity().toString().contains("No valid operationalEnvironmentName value is specified"));
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
deleted file mode 100644
index c02557314d..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/ModelDistributionRequestTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.mock;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.http.HttpStatus;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-public class ModelDistributionRequestTest {
-
- private static final String requestJSON = "{\"status\": \"DISTRIBUTION_COMPLETE_ERROR\", \"errorReason\": \"Distribution failed in AAI\" }";
-
- @Test
- public void testUpdateModelDistributionStatus() {
- final Response okResponse = Response.status(HttpStatus.SC_OK).build();
-
- try {
- ModelDistributionRequest mdr = Mockito.mock(ModelDistributionRequest.class);
- Mockito.when(mdr.updateModelDistributionStatus(requestJSON, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff")).thenReturn(okResponse);
- Response resp = mdr.updateModelDistributionStatus(requestJSON, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
- }
- }
-
- @Test
- public void testObjectMapperError() {
- ModelDistributionRequest request = new ModelDistributionRequest();
- Response response = request.updateModelDistributionStatus(null, null, null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Mapping of request to JSON object failed."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testParseError1() {
- String requestErrorJSON = "{\"errorReason\": \"Distribution failed in AAI\" }";
-
- ModelDistributionRequest request = new ModelDistributionRequest();
- Response response = request.updateModelDistributionStatus(requestErrorJSON, null, null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Error parsing request."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testParseError2() {
- String requestErrorJSON = "{\"status\": \"DISTRIBUTION_COMPLETE_ERROR\"}";
-
- ModelDistributionRequest request = new ModelDistributionRequest();
- Response response = request.updateModelDistributionStatus(requestErrorJSON, null, null);
- String body = response.getEntity().toString();
- assertTrue(body.contains("Error parsing request."));
- assertEquals(400, response.getStatus());
- }
-
- @Test
- public void testSuccess() {
- ModelDistributionRequest request = new ModelDistributionRequest();
- TenantIsolationRunnable thread = mock(TenantIsolationRunnable.class);
- request.setThread(thread);
-
- Response response = request.updateModelDistributionStatus(requestJSON, null, null);
-
- assertEquals(200, response.getStatus());
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
deleted file mode 100644
index 3b8bf3f19e..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AAIClientHelperTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.helpers;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.doThrow;
-
-
-import org.openecomp.mso.apihandlerinfra.tenantisolation.exceptions.AAIClientCallFailed;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.mock.MockTest;
-import org.openecomp.mso.client.aai.AAIResourcesClient;
-import org.openecomp.mso.client.aai.entities.uri.AAIResourceUri;
-import org.openecomp.mso.client.aai.objects.AAIOperationalEnvironment;
-
-
-public class AAIClientHelperTest extends MockTest {
-
- @Mock private AAIResourcesClient aaiResourceClientMock;
- private AAIClientHelper clientHelper;
-
- @Before
- public void testSetUp() {
- MockitoAnnotations.initMocks(this);
- AAIClientHelper aaiHelper = new AAIClientHelper();
- clientHelper = spy(aaiHelper);
- when(clientHelper.getClient()).thenReturn(aaiResourceClientMock);
- }
-
- @Test
- public void testGetAaiOperationalEnvironmentSuccess() throws Exception {
- clientHelper.getAaiOperationalEnvironment("123");
- verify(aaiResourceClientMock, times(1)).get(any(AAIResourceUri.class));
- }
-
- @Test(expected = AAIClientCallFailed.class)
- public void testGetAaiOperationalEnvironmentRainyDay() throws Exception {
- when(aaiResourceClientMock.get(any(AAIResourceUri.class))).thenThrow(new RuntimeException());
- clientHelper.getAaiOperationalEnvironment("123");
- }
-
- @Test
- public void testCreateOperationalEnvironmentSuccess() throws Exception {
- AAIOperationalEnvironment env = AAIClientObjectBuilder.createAAIOperationalEnvironment("123", "Test Env", "ECOMP", "ACTIVE", "Test", "PVT");
- clientHelper.createOperationalEnvironment(env);
- verify(aaiResourceClientMock, times(1)).create(any(AAIResourceUri.class), eq(env));
- }
-
- @Test(expected = AAIClientCallFailed.class)
- public void testCreateOperationalEnvironmentRainyDay() throws Exception {
- AAIOperationalEnvironment env = AAIClientObjectBuilder.createAAIOperationalEnvironment("123", "Test Env", "ECOMP", "ACTIVE", "Test", "PVT");
- doThrow(RuntimeException.class).when(aaiResourceClientMock).create(any(AAIResourceUri.class), eq(env));
- clientHelper.createOperationalEnvironment(env);
- }
-
- @Test
- public void testCreateRelationshipSuccess() throws Exception {
- clientHelper.createRelationship("VOE-001", "MEOE-002");
- verify(aaiResourceClientMock, times(1)).connect(any(AAIResourceUri.class), any(AAIResourceUri.class));
- }
-
- @Test(expected = AAIClientCallFailed.class)
- public void testCreateRelationshipRainyDay() throws Exception {
- doThrow(RuntimeException.class).when(aaiResourceClientMock).connect(any(AAIResourceUri.class), any(AAIResourceUri.class));
- clientHelper.createRelationship("VOE-001", "MEOE-002");
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AsdcClientHelperTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AsdcClientHelperTest.java
deleted file mode 100644
index fbeb448227..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/helpers/AsdcClientHelperTest.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.helpers;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.Constants;
-import org.openecomp.mso.apihandlerinfra.MsoPropertiesUtils;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-import org.openecomp.mso.rest.RESTClient;
-import org.openecomp.mso.rest.RESTConfig;
-
-import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
-import com.github.tomakehurst.wiremock.junit.WireMockRule;
-
-public class AsdcClientHelperTest {
-
- MsoJavaProperties properties = MsoPropertiesUtils.loadMsoProperties();
- AsdcClientHelper asdcClientUtils = new AsdcClientHelper(properties);
-
- String serviceModelVersionId = "TEST_uuid1";
- String operationalEnvironmentId = "TEST_operationalEnvironmentId";
- String workloadContext = "TEST_workloadContext";
-
- @Rule
- public final WireMockRule wireMockRule = new WireMockRule(WireMockConfiguration.wireMockConfig().port(28090)); //.extensions(transformerArray));
-
- @BeforeClass
- public static void setUp() throws Exception {
- MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- msoPropertiesFactory.removeAllMsoProperties();
- msoPropertiesFactory.initializeMsoProperties(Constants.MSO_PROP_APIHANDLER_INFRA, "src/test/resources/mso.apihandler-infra.properties");
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void getPropertiesTest() {
-
- String asdcInstanceId = asdcClientUtils.getAsdcInstanceId();
- Assert.assertEquals("Asdc InstanceId - " , "test", asdcInstanceId);
-
- String asdcEndpoint = asdcClientUtils.getAsdcEndpoint();
- Assert.assertEquals("Asdc Endpoint - " , "http://localhost:28090", asdcEndpoint);
-
- String userid = asdcClientUtils.getAsdcUserId();
- Assert.assertEquals("userid - " , "cs0008", userid);
-
- }
-
- @Test
- public void buildUriBuilderTest() {
-
- try {
- String url = asdcClientUtils.buildUriBuilder(serviceModelVersionId, operationalEnvironmentId);
- assertEquals("http://localhost:28090/sdc/v1/catalog/services/TEST_uuid1/distribution/TEST_operationalEnvironmentId/activate", url);
-
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
-
- }
- }
-
- @Test
- public void buildJsonWorkloadContextTest() {
-
- try {
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
- assertEquals("{\"workloadContext\":\"TEST_workloadContext\"}", jsonPayload);
-
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
-
- }
- }
-
- @Test
- public void setRestClientTest() {
-
- try {
- String url = asdcClientUtils.buildUriBuilder(serviceModelVersionId, operationalEnvironmentId);
- RESTConfig config = new RESTConfig(url);
- RESTClient client = asdcClientUtils.setRestClient(config);
- LinkedHashMap<String, List<String>> headers = client.getHeaders();
- assertEquals("[cs0008]", headers.get("USER_ID").toString());
-
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
-
- }
- }
-
- @Test
- public void enhanceJsonResponseTest_Success() {
-
- try {
- // build success response data
- JSONObject asdcResponseJsonObj = new JSONObject();
- asdcResponseJsonObj.put("distributionId", "TEST_distributionId");
-
- int statusCode = 202;
- asdcResponseJsonObj = asdcClientUtils.enhanceJsonResponse(asdcResponseJsonObj, statusCode);
-
- assertEquals("202", asdcResponseJsonObj.getString("statusCode"));
- assertEquals("", asdcResponseJsonObj.getString("messageId"));
- assertEquals("Success", asdcResponseJsonObj.getString("message"));
- assertEquals("TEST_distributionId", asdcResponseJsonObj.getString("distributionId"));
-
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
-
- }
- }
-
- @Test
- public void enhanceJsonResponseTest_Error() {
-
- try {
-
- // build error response data
- JSONObject jsonMessages = new JSONObject();
- jsonMessages.put("messageId", "SVC4675");
- jsonMessages.put("text", "Error: Service state is invalid for this action.");
- JSONObject jsonServException = new JSONObject();
- jsonServException.put("serviceException", jsonMessages);
- JSONObject jsonErrorRequest = new JSONObject();
- jsonErrorRequest.put("requestError", jsonServException);
-
- String responseData = jsonErrorRequest.toString();
-
- JSONObject asdcResponseJsonObj = new JSONObject(responseData);
- int statusCode = 409;
- asdcResponseJsonObj = asdcClientUtils.enhanceJsonResponse(asdcResponseJsonObj, statusCode);
-
- assertEquals("409", asdcResponseJsonObj.getString("statusCode"));
- assertEquals("SVC4675", asdcResponseJsonObj.getString("messageId"));
- assertEquals("Error: Service state is invalid for this action.", asdcResponseJsonObj.getString("message"));
-
-
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
-
- }
- }
-
- @Test
- public void enhanceJsonResponseTest_Error_policyException() {
-
- try {
-
- // build error response data
- JSONObject jsonMessages = new JSONObject();
- jsonMessages.put("messageId", "POL5003");
- jsonMessages.put("text", "Error: Not authorized to use the API.");
- JSONObject jsonServException = new JSONObject();
- jsonServException.put("policyException", jsonMessages);
- JSONObject jsonErrorRequest = new JSONObject();
- jsonErrorRequest.put("requestError", jsonServException);
-
- String responseData = jsonErrorRequest.toString();
-
- JSONObject asdcResponseJsonObj = new JSONObject(responseData);
- int statusCode = 403;
- asdcResponseJsonObj = asdcClientUtils.enhanceJsonResponse(asdcResponseJsonObj, statusCode);
-
- assertEquals("403", asdcResponseJsonObj.getString("statusCode"));
- assertEquals("POL5003", asdcResponseJsonObj.getString("messageId"));
- assertEquals("Error: Not authorized to use the API.", asdcResponseJsonObj.getString("message"));
-
-
- } catch (Exception e) {
- fail("Exception caught: " + e.getMessage());
-
- }
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/AaiStubResponse.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/AaiStubResponse.java
deleted file mode 100644
index b89da737f7..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/AaiStubResponse.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.mock;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.*;
-
-import javax.ws.rs.core.MediaType;
-
-public class AaiStubResponse {
-
- public static String DEFAULT_ERROR_RESPONSE = "{ \"requestError\":{ \"serviceException\" : {\"messageId\": \"500\",\"text\": \"Test error message!\"}}}";
-
- public static void setupAllMocks() {}
-
- public static void MockGetRequest(String link, int returnCode, String response) {
- stubFor(get(urlPathEqualTo(link))
- .willReturn(aResponse()
- .withHeader("Content-Type", MediaType.APPLICATION_JSON)
- .withHeader("Accept", MediaType.APPLICATION_JSON)
- .withStatus(returnCode)
- .withBody(response)));
- }
-
- public static void MockPutRequest(String link, int returnCode, String response) {
- stubFor(put(urlPathEqualTo(link))
- .willReturn(aResponse()
- .withStatus(returnCode)
- .withHeader("Content-Type", MediaType.APPLICATION_JSON)
- .withBody(response)));
- }
-
- public static void MockPostRequest(String link, int returnCode) {
- stubFor(post(urlPathEqualTo(link))
- .willReturn(aResponse()
- .withHeader("Content-Type", MediaType.APPLICATION_JSON)
- .withHeader("X-HTTP-Method-Override", "PATCH")
- .withStatus(returnCode)));
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/MockTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/MockTest.java
deleted file mode 100644
index 36cab4fa61..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/mock/MockTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.mock;
-
-import java.io.File;
-import java.nio.file.Files;
-
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.openecomp.mso.apihandlerinfra.Constants;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-
-import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
-import com.github.tomakehurst.wiremock.junit.WireMockRule;
-
-public class MockTest {
-
- @Rule
- public final WireMockRule wireMockRule;
-
- public MockTest() {
- wireMockRule = new WireMockRule(WireMockConfiguration.wireMockConfig().port(28090)); //.extensions(transformerArray));
- }
-
- @BeforeClass
- public static void setUp() throws Exception {
- MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- msoPropertiesFactory.removeAllMsoProperties();
- msoPropertiesFactory.initializeMsoProperties(Constants.MSO_PROP_APIHANDLER_INFRA, "src/test/resources/mso.apihandler-infra.properties");
- }
-
- public String getFileContentsAsString(String fileName) {
-
- String content = "";
- try {
- ClassLoader classLoader = this.getClass().getClassLoader();
- File file = new File(classLoader.getResource(fileName).getFile());
- content = new String(Files.readAllBytes(file.toPath()));
- }
- catch(Exception e) {
- e.printStackTrace();
- System.out.println("Exception encountered reading " + fileName + ". Error: " + e.getMessage() + ". Make sure to specify the correct path.");
- }
- return content;
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java
deleted file mode 100644
index 49fea2a8d9..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfOperationalEnvironmentTest.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.process;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.mso.apihandlerinfra.Constants;
-import org.openecomp.mso.apihandlerinfra.MsoPropertiesUtils;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.helpers.AAIClientHelper;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.helpers.AsdcClientHelper;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.Manifest;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RecoveryAction;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestDetails;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestParameters;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.ServiceModelList;
-import org.openecomp.mso.client.aai.entities.AAIResultWrapper;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-import org.openecomp.mso.requestsdb.OperationalEnvDistributionStatusDb;
-import org.openecomp.mso.requestsdb.OperationalEnvServiceModelStatusDb;
-import org.openecomp.mso.requestsdb.RequestsDBHelper;
-import org.openecomp.mso.rest.APIResponse;
-import org.openecomp.mso.rest.RESTClient;
-import org.openecomp.mso.rest.RESTConfig;
-
-public class ActivateVnfOperationalEnvironmentTest {
-
- MsoJavaProperties properties = MsoPropertiesUtils.loadMsoProperties();
- AsdcClientHelper asdcClientUtils = new AsdcClientHelper(properties);
-
- String requestId = "TEST_requestId";
- String operationalEnvironmentId = "TEST_operationalEnvironmentId";
- CloudOrchestrationRequest request = new CloudOrchestrationRequest();
- String workloadContext = "TEST_workloadContext";
- String recoveryAction = "RETRY";
- String serviceModelVersionId = "TEST_serviceModelVersionId";
- int retryCount = 3;
- String distributionId = "TEST_distributionId";
-
- @BeforeClass
- public static void setUp() throws Exception {
- MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- msoPropertiesFactory.removeAllMsoProperties();
- msoPropertiesFactory.initializeMsoProperties(Constants.MSO_PROP_APIHANDLER_INFRA, "src/test/resources/mso.apihandler-infra.properties");
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
- @Test
- public void getAAIClientHelperTest() throws Exception {
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfOperationalEnvironment activateVnf = new ActivateVnfOperationalEnvironment(request, requestId);
- AAIClientHelper aaiHelper = activateVnf.getAaiHelper();
-
- Assert.assertNotNull(aaiHelper);
-
- }
-
- @Test
- public void getAAIOperationalEnvironmentTest() throws Exception {
-
- // prepare return data
- JSONObject aaiJsonResponse = new JSONObject();
- aaiJsonResponse.put("operational-environment-id", "testASDCDistributionId");
- aaiJsonResponse.put("operational-environment-name", "testASDCDistributionIName");
- aaiJsonResponse.put("operational-environment-type", "VNF");
- aaiJsonResponse.put("operational-environment-status", "ACTIVE");
- aaiJsonResponse.put("tenant-context", "Test");
- aaiJsonResponse.put("workload-context", "PVT");
- aaiJsonResponse.put("resource-version", "1505228226913");
- String mockGetResponseJson = aaiJsonResponse.toString();
-
- AAIResultWrapper aaiREsultWrapperObj = new AAIResultWrapper(mockGetResponseJson);
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- AAIClientHelper aaiClientHelperMock = Mockito.mock(AAIClientHelper.class);
-
- ActivateVnfOperationalEnvironment activateVnfMock = Mockito.mock(ActivateVnfOperationalEnvironment.class);
- ActivateVnfOperationalEnvironment activateVnf = new ActivateVnfOperationalEnvironment(request, requestId);
-
- Mockito.when(aaiClientHelperMock.getAaiOperationalEnvironment(operationalEnvironmentId)).thenReturn(aaiREsultWrapperObj);
-
- activateVnfMock = spy(activateVnf);
- activateVnfMock.setAaiHelper(aaiClientHelperMock);
- activateVnfMock.getAAIOperationalEnvironment(operationalEnvironmentId);
-
- verify(activateVnfMock, times(1)).getAaiHelper();
- verify(aaiClientHelperMock, times(1)).getAaiOperationalEnvironment( any(String.class) );
-
- }
-
- @Test
- public void processActivateASDCRequestTest() throws Exception {
-
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
- String distributionId = "TEST_distributionId";
-
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("statusCode", "202");
- jsonObject.put("message", "Success");
- jsonObject.put("distributionId", distributionId);
-
- List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>();
- ServiceModelList serviceModelList1 = new ServiceModelList();
- serviceModelList1.setRecoveryAction(RecoveryAction.retry);
- serviceModelList1.setServiceModelVersionId(serviceModelVersionId);
- serviceModelVersionIdList.add(serviceModelList1);
-
- ActivateVnfOperationalEnvironment activate = new ActivateVnfOperationalEnvironment(request, requestId);
- ActivateVnfOperationalEnvironment activateVnfMock = spy(activate);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- AsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);
- RESTConfig configMock = Mockito.mock(RESTConfig.class);
- RESTClient clientMock = Mockito.mock(RESTClient.class);
- APIResponse apiResponseMock = Mockito.mock(APIResponse.class);
-
- activateVnfMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfMock.setAsdcClientHelper(asdcClientHelperMock);
-
- Mockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);
- Mockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);
- Mockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);
- Mockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);
-
- activateVnfMock.processActivateASDCRequest(requestId, operationalEnvironmentId, serviceModelVersionIdList, workloadContext);
-
- verify(serviceModelDb, times(1)).insertOperationalEnvServiceModelStatus(requestId, operationalEnvironmentId, serviceModelVersionId, "SENT", "RETRY", retryCount, workloadContext);
-
- }
-
- @Test
- public void executionTest() throws Exception {
-
- // prepare request detail
- List<ServiceModelList> serviceModelVersionIdList = new ArrayList<ServiceModelList>();
- ServiceModelList serviceModelList1 = new ServiceModelList();
- serviceModelList1.setRecoveryAction(RecoveryAction.retry);
- serviceModelList1.setServiceModelVersionId(serviceModelVersionId);
- serviceModelVersionIdList.add(serviceModelList1);
-
- RequestDetails requestDetails = new RequestDetails();
- RequestParameters requestParameters = new RequestParameters();
- Manifest manifest = new Manifest();
- manifest.setServiceModelList(serviceModelVersionIdList);
- requestParameters.setManifest(manifest);
- requestParameters.setWorkloadContext(workloadContext);
- requestDetails.setRequestParameters(requestParameters);
-
- // prepare aai return data
- JSONObject aaiJsonResponse = new JSONObject();
- aaiJsonResponse.put("operational-environment-id", "testASDCDistributionId");
- aaiJsonResponse.put("operational-environment-name", "testASDCDistributionIName");
- aaiJsonResponse.put("operational-environment-type", "VNF");
- aaiJsonResponse.put("operational-environment-status", "ACTIVE");
- aaiJsonResponse.put("tenant-context", "Test");
- aaiJsonResponse.put("workload-context", workloadContext);
- aaiJsonResponse.put("resource-version", "1505228226913");
- String mockGetResponseJson = aaiJsonResponse.toString();
- AAIResultWrapper aaiREsultWrapperObj = new AAIResultWrapper(mockGetResponseJson);
-
- // prepare asdc return data
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
-
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("statusCode", "202");
- jsonObject.put("message", "Success");
- jsonObject.put("distributionId", distributionId);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);
- RESTConfig configMock = Mockito.mock(RESTConfig.class);
- RESTClient clientMock = Mockito.mock(RESTClient.class);
- APIResponse apiResponseMock = Mockito.mock(APIResponse.class);
-
- Mockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);
- Mockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);
- Mockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);
-
- AAIClientHelper aaiClientHelperMock = Mockito.mock(AAIClientHelper.class);
- Mockito.when(aaiClientHelperMock.getAaiOperationalEnvironment(operationalEnvironmentId)).thenReturn(aaiREsultWrapperObj);
- Mockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);
-
- doNothing().when(serviceModelDb).insertOperationalEnvServiceModelStatus(requestId, operationalEnvironmentId, serviceModelVersionId, "SENT", recoveryAction, retryCount, workloadContext);
- doNothing().when(distributionDb).insertOperationalEnvDistributionStatus(distributionId, operationalEnvironmentId, serviceModelVersionId, "SENT", requestId);
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- request.setRequestDetails(requestDetails);
- ActivateVnfOperationalEnvironment activate = new ActivateVnfOperationalEnvironment(request, requestId);
- ActivateVnfOperationalEnvironment activateVnfMock = spy(activate);
- activateVnfMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfMock.setRequestsDBHelper(dbUtils);
- activateVnfMock.setAsdcClientHelper(asdcClientHelperMock);
- activateVnfMock.setAaiHelper(aaiClientHelperMock);
-
- activateVnfMock.execute();
-
- verify(serviceModelDb, times(1)).insertOperationalEnvServiceModelStatus(requestId, operationalEnvironmentId, serviceModelVersionId, "SENT", recoveryAction, retryCount, workloadContext);
- verify(distributionDb, times(1)).insertOperationalEnvDistributionStatus(distributionId, operationalEnvironmentId, serviceModelVersionId, "SENT", requestId);
-
-
- }
-
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java
deleted file mode 100644
index 535d67e776..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/ActivateVnfStatusOperationalEnvironmentTest.java
+++ /dev/null
@@ -1,670 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.process;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.mso.apihandlerinfra.Constants;
-import org.openecomp.mso.apihandlerinfra.MsoPropertiesUtils;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.helpers.AsdcClientHelper;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.Distribution;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.DistributionStatus;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.Status;
-import org.openecomp.mso.properties.MsoJavaProperties;
-import org.openecomp.mso.properties.MsoPropertiesFactory;
-import org.openecomp.mso.requestsdb.OperationalEnvDistributionStatus;
-import org.openecomp.mso.requestsdb.OperationalEnvDistributionStatusDb;
-import org.openecomp.mso.requestsdb.OperationalEnvServiceModelStatus;
-import org.openecomp.mso.requestsdb.OperationalEnvServiceModelStatusDb;
-import org.openecomp.mso.requestsdb.RequestsDBHelper;
-import org.openecomp.mso.rest.APIResponse;
-import org.openecomp.mso.rest.RESTClient;
-import org.openecomp.mso.rest.RESTConfig;
-
-public class ActivateVnfStatusOperationalEnvironmentTest {
-
- MsoJavaProperties properties = MsoPropertiesUtils.loadMsoProperties();
- AsdcClientHelper asdcClientUtils = new AsdcClientHelper(properties);
-
- String requestId = "TEST_requestId";
- String operationalEnvironmentId = "TEST_operationalEnvironmentId";
- CloudOrchestrationRequest request = new CloudOrchestrationRequest();
- String workloadContext = "TEST_workloadContext";
- String recoveryAction = "RETRY";
- String serviceModelVersionId = "TEST_serviceModelVersionId";
- int retryCount = 3;
- String asdcDistributionId = "TEST_distributionId";
-
- @BeforeClass
- public static void setUp() throws Exception {
- MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
- msoPropertiesFactory.removeAllMsoProperties();
- msoPropertiesFactory.initializeMsoProperties(Constants.MSO_PROP_APIHANDLER_INFRA, "src/test/resources/mso.apihandler-infra.properties");
- }
-
- @After
- public void tearDown() throws Exception {
-
- }
-
-
- @Ignore // 1802 merge
- @Test
- public void checkOrUpdateOverallStatusTest_Ok() throws Exception {
-
- int retryCount = 0;
-
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = spy(new ActivateVnfStatusOperationalEnvironment(request, requestId));
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper requestDb = mock(RequestsDBHelper.class);
-
- // Prepare data
- OperationalEnvServiceModelStatus modelStatus = new OperationalEnvServiceModelStatus();
- modelStatus.setWorkloadContext(workloadContext);
- modelStatus.setRecoveryAction(recoveryAction);
- modelStatus.setOperationalEnvId(operationalEnvironmentId);
- modelStatus.setRetryCount(retryCount);
- modelStatus.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());
-
- OperationalEnvServiceModelStatus modelStatus1 = new OperationalEnvServiceModelStatus();
- modelStatus1.setWorkloadContext(workloadContext);
- modelStatus1.setRecoveryAction(recoveryAction);
- modelStatus1.setOperationalEnvId(operationalEnvironmentId);
- modelStatus1.setRetryCount(retryCount);
- modelStatus1.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());
-
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(modelStatus);
- queryServiceModelResponseList.add(modelStatus1);
-
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
- doNothing().when(requestDb).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- activateVnfStatus.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatus.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatus.setRequestsDBHelper(requestDb);
- activateVnfStatus.checkOrUpdateOverallStatus(requestId, operationalEnvironmentId);
-
- verify(requestDb, times(0)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
- verify(requestDb, times(1)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- }
-
- @Test
- public void checkOrUpdateOverallStatusTest_Error() throws Exception {
-
-
- int retryCount = 0; // no more retry
-
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = spy(new ActivateVnfStatusOperationalEnvironment(request, requestId));
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper requestDb = mock(RequestsDBHelper.class);
-
- // Prepare data
- OperationalEnvServiceModelStatus modelStatus = new OperationalEnvServiceModelStatus();
- modelStatus.setWorkloadContext(workloadContext);
- modelStatus.setRecoveryAction(recoveryAction);
- modelStatus.setOperationalEnvId(operationalEnvironmentId);
- modelStatus.setRetryCount(retryCount);
- modelStatus.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString());
-
- OperationalEnvServiceModelStatus modelStatus1 = new OperationalEnvServiceModelStatus();
- modelStatus1.setWorkloadContext(workloadContext);
- modelStatus1.setRecoveryAction(recoveryAction);
- modelStatus1.setOperationalEnvId(operationalEnvironmentId);
- modelStatus1.setRetryCount(retryCount);
- modelStatus1.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());
-
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(modelStatus);
- queryServiceModelResponseList.add(modelStatus1);
-
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
- doNothing().when(requestDb).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- activateVnfStatus.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatus.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatus.setRequestsDBHelper(requestDb);
- activateVnfStatus.checkOrUpdateOverallStatus(requestId, operationalEnvironmentId);
-
- verify(requestDb, times(0)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- verify(requestDb, times(1)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
-
- }
-
- @Test
- public void checkOrUpdateOverallStatusTest_Waiting() throws Exception {
-
- int retryCount = 2; // 2 more retry
-
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = spy(new ActivateVnfStatusOperationalEnvironment(request, requestId));
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper requestDb = mock(RequestsDBHelper.class);
-
- OperationalEnvServiceModelStatus modelStatus1 = spy(new OperationalEnvServiceModelStatus());
- modelStatus1.setWorkloadContext(workloadContext);
- modelStatus1.setRecoveryAction(recoveryAction);
- modelStatus1.setOperationalEnvId(operationalEnvironmentId);
- modelStatus1.setRetryCount(0);
- modelStatus1.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());
-
- OperationalEnvServiceModelStatus modelStatus2 = spy(new OperationalEnvServiceModelStatus());
- modelStatus2.setWorkloadContext(workloadContext);
- modelStatus2.setRecoveryAction(recoveryAction);
- modelStatus2.setOperationalEnvId(operationalEnvironmentId);
- modelStatus2.setRetryCount(retryCount);
- modelStatus2.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString());
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(modelStatus1);
- queryServiceModelResponseList.add(modelStatus2);
-
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
- doNothing().when(requestDb).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- activateVnfStatus.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatus.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatus.setRequestsDBHelper(requestDb);
- activateVnfStatus.checkOrUpdateOverallStatus(requestId, operationalEnvironmentId);
-
- verify(requestDb, times(0)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- verify(requestDb, times(0)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
-
- }
-
- @Test
- public void executionTest() throws Exception {
-
- // Prepare db query mock response data
- OperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();
- operEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);
- operEnvDistStatusObj.setDistributionId(asdcDistributionId);
- operEnvDistStatusObj.setOperationalEnvId( operationalEnvironmentId);
- operEnvDistStatusObj.setDistributionIdStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());
- operEnvDistStatusObj.setRequestId(requestId);
-
- // ServiceModelStatus - getOperationalEnvServiceModelStatus
- OperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();
- operEnvServiceModelStatusObj.setRequestId(requestId);
- operEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(DistributionStatus.DISTRIBUTION_COMPLETE_OK.toString());
- operEnvServiceModelStatusObj.setRecoveryAction(recoveryAction);
- operEnvServiceModelStatusObj.setRetryCount(retryCount);
- operEnvServiceModelStatusObj.setWorkloadContext(workloadContext);
- operEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(operEnvServiceModelStatusObj);
-
- // prepare distribution obj
- Distribution distribution = new Distribution();
- distribution.setStatus(Status.DISTRIBUTION_COMPLETE_OK);
- request.setDistribution(distribution);
- request.setDistributionId(asdcDistributionId);
-
- // prepare asdc return data
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
-
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("statusCode", "202");
- jsonObject.put("message", "Success");
- jsonObject.put("distributionId", asdcDistributionId);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);
- RESTConfig configMock = Mockito.mock(RESTConfig.class);
- RESTClient clientMock = Mockito.mock(RESTClient.class);
- APIResponse apiResponseMock = Mockito.mock(APIResponse.class);
-
- Mockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);
- Mockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);
- Mockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);
- Mockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);
-
- Mockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
-
- int row = 1;
- Mockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);
- Mockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);
- activateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatusMock.setRequestsDBHelper(dbUtils);
- activateVnfStatusMock.setAsdcClientHelper(asdcClientHelperMock);
-
- activateVnfStatusMock.execute();
-
- verify(distributionDb, times(1)).updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId);
- verify(serviceModelDb, times(1)).updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0);
-
-
- }
-
- @Test
- public void executionTest_ERROR_Status_And_RETRY() throws Exception {
-
- int retryCnt = 3;
- String distributionStatus = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
- String recoverAction = "RETRY";
-
- // Prepare db query mock response data
- OperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();
- operEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);
- operEnvDistStatusObj.setDistributionId(asdcDistributionId);
- operEnvDistStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvDistStatusObj.setDistributionIdStatus(distributionStatus);
- operEnvDistStatusObj.setRequestId(requestId);
-
- // ServiceModelStatus - getOperationalEnvServiceModelStatus
- OperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();
- operEnvServiceModelStatusObj.setRequestId(requestId);
- operEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(distributionStatus);
- operEnvServiceModelStatusObj.setRecoveryAction(recoverAction);
- operEnvServiceModelStatusObj.setRetryCount(retryCnt);
- operEnvServiceModelStatusObj.setWorkloadContext(workloadContext);
- operEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(operEnvServiceModelStatusObj);
-
- // prepare distribution obj
- Distribution distribution = new Distribution();
- distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
- request.setDistribution(distribution);
- request.setDistributionId(asdcDistributionId);
-
- // prepare asdc return data
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
-
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("statusCode", "202");
- jsonObject.put("message", "Success");
- jsonObject.put("distributionId", asdcDistributionId);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);
- RESTConfig configMock = Mockito.mock(RESTConfig.class);
- RESTClient clientMock = Mockito.mock(RESTClient.class);
- APIResponse apiResponseMock = Mockito.mock(APIResponse.class);
-
- Mockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);
- Mockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);
- Mockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);
- Mockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);
-
- Mockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
-
- int row = 1;
- Mockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);
- Mockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);
- activateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatusMock.setRequestsDBHelper(dbUtils);
- activateVnfStatusMock.setAsdcClientHelper(asdcClientHelperMock);
-
- activateVnfStatusMock.execute();
-
- // waiting
- verify(dbUtils, times(0)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- verify(dbUtils, times(0)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
- assertEquals(false, activateVnfStatusMock.isSuccess());
-
- }
-
- @Test
- public void executionTest_ERROR_Status_And_RETRY_And_RetryZero() throws Exception {
-
- int retryCnt = 0;
- String distributionStatus = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
- String recoverAction = "RETRY";
-
- // Prepare db query mock response data
- OperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();
- operEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);
- operEnvDistStatusObj.setDistributionId(asdcDistributionId);
- operEnvDistStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvDistStatusObj.setDistributionIdStatus(distributionStatus);
- operEnvDistStatusObj.setRequestId(requestId);
-
- // ServiceModelStatus - getOperationalEnvServiceModelStatus
- OperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();
- operEnvServiceModelStatusObj.setRequestId(requestId);
- operEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(distributionStatus);
- operEnvServiceModelStatusObj.setRecoveryAction(recoverAction);
- operEnvServiceModelStatusObj.setRetryCount(retryCnt);
- operEnvServiceModelStatusObj.setWorkloadContext(workloadContext);
- operEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(operEnvServiceModelStatusObj);
-
- // prepare distribution obj
- Distribution distribution = new Distribution();
- distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
- request.setDistribution(distribution);
- request.setDistributionId(asdcDistributionId);
-
- // prepare asdc return data
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
-
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("statusCode", "202");
- jsonObject.put("message", "Success");
- jsonObject.put("distributionId", asdcDistributionId);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);
- RESTConfig configMock = Mockito.mock(RESTConfig.class);
- RESTClient clientMock = Mockito.mock(RESTClient.class);
- APIResponse apiResponseMock = Mockito.mock(APIResponse.class);
-
- Mockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);
- Mockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);
- Mockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonObject, 202)).thenReturn(jsonObject);
- Mockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonObject);
-
- Mockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
-
- int row = 1;
- Mockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);
- Mockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);
- activateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatusMock.setRequestsDBHelper(dbUtils);
- activateVnfStatusMock.setAsdcClientHelper(asdcClientHelperMock);
-
- activateVnfStatusMock.execute();
-
- // waiting
- verify(dbUtils, times(0)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- verify(dbUtils, times(1)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
- assertEquals(false, activateVnfStatusMock.isSuccess());
-
- }
-
- @Test
- public void executionTest_ERROR_Status_And_RETRY_And_ErrorAsdc() throws Exception {
-
- int retryCnt = 3;
- String distributionStatus = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
- String recoverAction = "RETRY";
-
- // Prepare db query mock response data
- OperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();
- operEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);
- operEnvDistStatusObj.setDistributionId(asdcDistributionId);
- operEnvDistStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvDistStatusObj.setDistributionIdStatus(distributionStatus);
- operEnvDistStatusObj.setRequestId(requestId);
-
- // ServiceModelStatus - getOperationalEnvServiceModelStatus
- OperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();
- operEnvServiceModelStatusObj.setRequestId(requestId);
- operEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(distributionStatus);
- operEnvServiceModelStatusObj.setRecoveryAction(recoverAction);
- operEnvServiceModelStatusObj.setRetryCount(retryCnt);
- operEnvServiceModelStatusObj.setWorkloadContext(workloadContext);
- operEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(operEnvServiceModelStatusObj);
-
- // prepare distribution obj
- Distribution distribution = new Distribution();
- distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
- request.setDistribution(distribution);
- request.setDistributionId(asdcDistributionId);
-
- // prepare asdc return data
- String jsonPayload = asdcClientUtils.buildJsonWorkloadContext(workloadContext);
-
- // ERROR in asdc
- JSONObject jsonMessages = new JSONObject();
- jsonMessages.put("statusCode", "409");
- jsonMessages.put("message", "Undefined Error Message!");
- jsonMessages.put("messageId", "SVC4675");
- jsonMessages.put("text", "Error: Service state is invalid for this action.");
- JSONObject jsonServException = new JSONObject();
- jsonServException.put("serviceException", jsonMessages);
- JSONObject jsonErrorRequest = new JSONObject();
- jsonErrorRequest.put("requestError", jsonServException);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AsdcClientHelper asdcClientHelperMock = Mockito.mock(AsdcClientHelper.class);
- RESTConfig configMock = Mockito.mock(RESTConfig.class);
- RESTClient clientMock = Mockito.mock(RESTClient.class);
- APIResponse apiResponseMock = Mockito.mock(APIResponse.class);
-
- Mockito.when(asdcClientHelperMock.setRestClient(configMock)).thenReturn(clientMock);
- Mockito.when(asdcClientHelperMock.setHttpPostResponse(clientMock, jsonPayload)).thenReturn(apiResponseMock);
- Mockito.when(asdcClientHelperMock.enhanceJsonResponse(jsonMessages, 202)).thenReturn(jsonMessages);
- Mockito.when(asdcClientHelperMock.postActivateOperationalEnvironment(serviceModelVersionId, operationalEnvironmentId, workloadContext)).thenReturn(jsonMessages);
-
- Mockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
-
- int row = 1;
- Mockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);
- Mockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);
- activateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatusMock.setRequestsDBHelper(dbUtils);
- activateVnfStatusMock.setAsdcClientHelper(asdcClientHelperMock);
-
- activateVnfStatusMock.execute();
-
- // waiting
- verify(dbUtils, times(0)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- verify(dbUtils, times(1)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
- assertEquals(false, activateVnfStatusMock.isSuccess());
-
- }
-
- @Test
- public void executionTest_ERROR_Status_And_SKIP() throws Exception {
-
- int retryCnt = 3;
- String distributionStatus = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
- String recoverAction = "SKIP";
-
- // Prepare db query mock response data
- OperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();
- operEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);
- operEnvDistStatusObj.setDistributionId(asdcDistributionId);
- operEnvDistStatusObj.setOperationalEnvId( operationalEnvironmentId);
- operEnvDistStatusObj.setDistributionIdStatus(distributionStatus);
- operEnvDistStatusObj.setRequestId(requestId);
-
- // ServiceModelStatus - getOperationalEnvServiceModelStatus
- OperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();
- operEnvServiceModelStatusObj.setRequestId(requestId);
- operEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(distributionStatus);
- operEnvServiceModelStatusObj.setRecoveryAction(recoverAction);
- operEnvServiceModelStatusObj.setRetryCount(retryCnt);
- operEnvServiceModelStatusObj.setWorkloadContext(workloadContext);
- operEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(operEnvServiceModelStatusObj);
-
- // prepare distribution obj
- Distribution distribution = new Distribution();
- distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
- request.setDistribution(distribution);
- request.setDistributionId(asdcDistributionId);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
-
- Mockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
-
- int row = 1;
- Mockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);
- Mockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);
- activateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatusMock.setRequestsDBHelper(dbUtils);
-
- activateVnfStatusMock.execute();
-
- // waiting
- verify(dbUtils, times(0)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- verify(dbUtils, times(0)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
- assertEquals(false, activateVnfStatusMock.isSuccess());
-
- }
-
- @Test
- public void executionTest_ERROR_Status_And_ABORT() throws Exception {
-
- int retryCnt = 3;
- String distributionStatus = DistributionStatus.DISTRIBUTION_COMPLETE_ERROR.toString();
- String recoverAction = "ABORT";
-
- // Prepare db query mock response data
- OperationalEnvDistributionStatus operEnvDistStatusObj = new OperationalEnvDistributionStatus();
- operEnvDistStatusObj.setServiceModelVersionId(serviceModelVersionId);
- operEnvDistStatusObj.setDistributionId(asdcDistributionId);
- operEnvDistStatusObj.setOperationalEnvId( operationalEnvironmentId);
- operEnvDistStatusObj.setDistributionIdStatus(distributionStatus);
- operEnvDistStatusObj.setRequestId(requestId);
-
- // ServiceModelStatus - getOperationalEnvServiceModelStatus
- OperationalEnvServiceModelStatus operEnvServiceModelStatusObj = new OperationalEnvServiceModelStatus();
- operEnvServiceModelStatusObj.setRequestId(requestId);
- operEnvServiceModelStatusObj.setOperationalEnvId(operationalEnvironmentId);
- operEnvServiceModelStatusObj.setServiceModelVersionDistrStatus(distributionStatus);
- operEnvServiceModelStatusObj.setRecoveryAction(recoverAction);
- operEnvServiceModelStatusObj.setRetryCount(retryCnt);
- operEnvServiceModelStatusObj.setWorkloadContext(workloadContext);
- operEnvServiceModelStatusObj.setServiceModelVersionId(serviceModelVersionId);
- List<OperationalEnvServiceModelStatus> queryServiceModelResponseList = new ArrayList<OperationalEnvServiceModelStatus>();
- queryServiceModelResponseList.add(operEnvServiceModelStatusObj);
-
- // prepare distribution obj
- Distribution distribution = new Distribution();
- distribution.setStatus(Status.DISTRIBUTION_COMPLETE_ERROR);
- request.setDistribution(distribution);
- request.setDistributionId(asdcDistributionId);
-
- // Mockito mock
- OperationalEnvDistributionStatusDb distributionDb = Mockito.mock(OperationalEnvDistributionStatusDb.class);
- OperationalEnvServiceModelStatusDb serviceModelDb = Mockito.mock(OperationalEnvServiceModelStatusDb.class);
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
-
- Mockito.when(distributionDb.getOperationalEnvDistributionStatus(asdcDistributionId)).thenReturn(operEnvDistStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvServiceModelStatus(operationalEnvironmentId, serviceModelVersionId)).thenReturn(operEnvServiceModelStatusObj);
- Mockito.when(serviceModelDb.getOperationalEnvIdStatus(operationalEnvironmentId, requestId)).thenReturn(queryServiceModelResponseList);
-
- int row = 1;
- Mockito.when(distributionDb.updateOperationalEnvDistributionStatus(distribution.getStatus().toString(), asdcDistributionId, operationalEnvironmentId, serviceModelVersionId)).thenReturn(row);
- Mockito.when(serviceModelDb.updateOperationalEnvRetryCountStatus(operationalEnvironmentId, serviceModelVersionId, distribution.getStatus().toString(), 0)).thenReturn(row);
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
-
- request.setOperationalEnvironmentId(operationalEnvironmentId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatus = new ActivateVnfStatusOperationalEnvironment(request, requestId);
- ActivateVnfStatusOperationalEnvironment activateVnfStatusMock = spy(activateVnfStatus);
- activateVnfStatusMock.setOperationalEnvDistributionStatusDb(distributionDb);
- activateVnfStatusMock.setOperationalEnvServiceModelStatusDb(serviceModelDb);
- activateVnfStatusMock.setRequestsDBHelper(dbUtils);
- activateVnfStatusMock.execute();
-
- assertEquals(false, activateVnfStatusMock.isSuccess());
-
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
deleted file mode 100644
index e7b9db0657..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateEcompOperationalEnvironmentTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.process;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.dmaap.DmaapOperationalEnvClient;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.helpers.AAIClientHelper;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.OperationalEnvironment;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestDetails;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestInfo;
-import org.openecomp.mso.apihandlerinfra.tenantisolationbeans.RequestParameters;
-import org.openecomp.mso.client.aai.objects.AAIOperationalEnvironment;
-import org.openecomp.mso.requestsdb.RequestsDBHelper;
-
-public class CreateEcompOperationalEnvironmentTest {
-
- @Mock private AAIClientHelper mockAaiClientHelper;
- @Mock private DmaapOperationalEnvClient mockDmaapClient;
- @Mock private RequestsDBHelper mockRequestsDBHelper;
-
- private CloudOrchestrationRequest request;
- private CreateEcompOperationalEnvironment spyProcess;
-
- public CreateEcompOperationalEnvironmentTest() {
- super();
- }
-
- @Before
- public void testSetUp() {
- MockitoAnnotations.initMocks(this);
- request = getCloudOrchestrationRequest();
- CreateEcompOperationalEnvironment process = new CreateEcompOperationalEnvironment(request, "123");
- spyProcess = spy(process);
- when(spyProcess.getAaiHelper()).thenReturn(mockAaiClientHelper);
- when(spyProcess.getDmaapClient()).thenReturn(mockDmaapClient);
- when(spyProcess.getRequestDb()).thenReturn(mockRequestsDBHelper);
- }
-
- public CloudOrchestrationRequest getCloudOrchestrationRequest() {
- CloudOrchestrationRequest cor = new CloudOrchestrationRequest();
- RequestDetails reqDetails = new RequestDetails();
- RequestInfo reqInfo = new RequestInfo();
- RequestParameters reqParams = new RequestParameters();
- reqParams.setTenantContext("TEST");
- reqParams.setWorkloadContext("ECOMP_TEST");
- reqParams.setOperationalEnvironmentType(OperationalEnvironment.ECOMP);
- reqInfo.setInstanceName("TEST_ECOMP_ENVIRONMENT");
- reqDetails.setRequestInfo(reqInfo);
- reqDetails.setRequestParameters(reqParams);
- cor.setRequestDetails(reqDetails);
- return cor;
- }
-
- @Test
- public void testProcess() throws Exception {
- spyProcess.execute();
- verify(mockAaiClientHelper, times(1)).createOperationalEnvironment(any(AAIOperationalEnvironment.class));
- verify(mockDmaapClient, times(1)).dmaapPublishOperationalEnvRequest(any(String.class), any(String.class), any(String.class), any(String.class), any(String.class), any(String.class) );
- verify(mockRequestsDBHelper, times(1)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
deleted file mode 100644
index ad8a5ba245..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironmentTest.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.process;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.when;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.util.List;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.MockitoAnnotations;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.client.aai.objects.AAIOperationalEnvironment;
-import org.openecomp.mso.client.grm.beans.Property;
-import org.openecomp.mso.client.grm.beans.ServiceEndPointList;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-public class CreateVnfOperationalEnvironmentTest {
-
- private ObjectMapper mapper = new ObjectMapper();
- private CloudOrchestrationRequest request;
- private ServiceEndPointList serviceEndpoints;
- private CreateVnfOperationalEnvironment spyProcess;
-
- @Before
- public void testSetUp() throws Exception {
- MockitoAnnotations.initMocks(this);
- String jsonRequest = getFileContentsAsString("__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json");
- request = mapper.readValue(jsonRequest, CloudOrchestrationRequest.class);
- String jsonServiceEndpoints = getFileContentsAsString("__files/vnfoperenv/endpoints.json");
- serviceEndpoints = mapper.readValue(jsonServiceEndpoints, ServiceEndPointList.class);
- CreateVnfOperationalEnvironment process = new CreateVnfOperationalEnvironment(request, "9876543210");
- spyProcess = spy(process);
- }
-
-
- @Test
- public void testGetEcompManagingEnvironmentId() throws Exception {
- when(spyProcess.getRequest()).thenReturn(request);
- assertEquals("ff305d54-75b4-431b-adb2-eb6b9e5ff000", spyProcess.getEcompManagingEnvironmentId());
- }
-
- @Test
- public void testGetTenantContext() throws Exception {
- when(spyProcess.getRequest()).thenReturn(request);
- assertEquals("Test", spyProcess.getTenantContext());
- }
-
- @Test
- public void testGetEnvironmentName() throws Exception {
- List<Property> props = serviceEndpoints.getServiceEndPointList().get(0).getProperties();
- assertEquals("DEV", spyProcess.getEnvironmentName(props));
- }
-
- @Test
- public void testBuildServiceNameForVnf() throws Exception {
- when(spyProcess.getRequest()).thenReturn(request);
- assertEquals("Test.VNF_E2E-IST.Inventory", spyProcess.buildServiceNameForVnf("TEST.ECOMP_PSL.Inventory"));
- }
-
- @Test
- public void testGetSearchKey() {
- AAIOperationalEnvironment ecompEnv = new AAIOperationalEnvironment();
- ecompEnv.setTenantContext("Test");
- ecompEnv.setWorkloadContext("ECOMPL_PSL");
- assertEquals("Test.ECOMPL_PSL.*", spyProcess.getSearchKey(ecompEnv));
- }
-
- public String getFileContentsAsString(String fileName) {
- String content = "";
- try {
- ClassLoader classLoader = this.getClass().getClassLoader();
- File file = new File(classLoader.getResource(fileName).getFile());
- content = new String(Files.readAllBytes(file.toPath()));
- }
- catch(Exception e) {
- e.printStackTrace();
- System.out.println("Exception encountered reading " + fileName + ". Error: " + e.getMessage());
- }
- return content;
- }
-
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
deleted file mode 100644
index ee07a53f74..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolation/process/DeactivateVnfOperationalEnvironmentTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolation.process;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doNothing;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.util.Optional;
-
-import org.junit.Test;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestrationRequest;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.helpers.AAIClientHelper;
-import org.openecomp.mso.client.aai.entities.AAIResultWrapper;
-import org.openecomp.mso.client.aai.objects.AAIOperationalEnvironment;
-import org.openecomp.mso.requestsdb.RequestsDBHelper;
-
-public class DeactivateVnfOperationalEnvironmentTest {
-
- @Test
- public void testDeactivateOperationalEnvironment() throws Exception {
- String operationlEnvironmentId = "ff3514e3-5a33-55df-13ab-12abad84e7ff";
- CloudOrchestrationRequest request = new CloudOrchestrationRequest();
- request.setOperationalEnvironmentId(operationlEnvironmentId);
- request.setRequestDetails(null);
-
- DeactivateVnfOperationalEnvironment deactivate = spy(new DeactivateVnfOperationalEnvironment(request, "ff3514e3-5a33-55df-13ab-12abad84e7fe"));
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AAIClientHelper helper = mock(AAIClientHelper.class);
- AAIResultWrapper wrapper = mock(AAIResultWrapper.class);
- AAIOperationalEnvironment operationalEnv = new AAIOperationalEnvironment();
- operationalEnv.setOperationalEnvironmentStatus("ACTIVE");
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- when(helper.getAaiOperationalEnvironment(any(String.class))).thenReturn(wrapper);
- when(wrapper.asBean(AAIOperationalEnvironment.class)).thenReturn(Optional.of((AAIOperationalEnvironment)operationalEnv));
-
- deactivate.setRequestsDBHelper(dbUtils);
- deactivate.setAaiHelper(helper);
- deactivate.execute();
-
- verify(dbUtils, times(1)).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- }
-
- @Test
- public void testDeactivateInvalidStatus() throws Exception {
- String operationlEnvironmentId = "ff3514e3-5a33-55df-13ab-12abad84e7ff";
- CloudOrchestrationRequest request = new CloudOrchestrationRequest();
- request.setOperationalEnvironmentId(operationlEnvironmentId);
- request.setRequestDetails(null);
-
- DeactivateVnfOperationalEnvironment deactivate = spy(new DeactivateVnfOperationalEnvironment(request, "ff3514e3-5a33-55df-13ab-12abad84e7fe"));
- RequestsDBHelper dbUtils = mock(RequestsDBHelper.class);
- AAIClientHelper helper = mock(AAIClientHelper.class);
- AAIResultWrapper wrapper = mock(AAIResultWrapper.class);
- AAIOperationalEnvironment operationalEnv = new AAIOperationalEnvironment();
- operationalEnv.setOperationalEnvironmentStatus("SUCCESS");
-
- doNothing().when(dbUtils).updateInfraSuccessCompletion(any(String.class), any(String.class), any(String.class));
- when(helper.getAaiOperationalEnvironment(any(String.class))).thenReturn(wrapper);
- when(wrapper.asBean(AAIOperationalEnvironment.class)).thenReturn(Optional.of((AAIOperationalEnvironment)operationalEnv));
-
- deactivate.setRequestsDBHelper(dbUtils);
- deactivate.setAaiHelper(helper);
- deactivate.execute();
-
- verify(dbUtils, times(1)).updateInfraFailureCompletion(any(String.class), any(String.class), any(String.class));
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/CloudOrchestrationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/CloudOrchestrationTest.java
deleted file mode 100644
index 74ff9078b5..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/tenantisolationbeans/CloudOrchestrationTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * 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.openecomp.mso.apihandlerinfra.tenantisolationbeans;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.http.HttpStatus;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.mso.apihandler.common.ValidationException;
-import org.openecomp.mso.apihandlerinfra.tenantisolation.CloudOrchestration;
-
-import com.fasterxml.jackson.core.JsonParseException;
-import com.fasterxml.jackson.databind.JsonMappingException;
-
-public class CloudOrchestrationTest {
-
- private static final String requestJSONCreate = "{\"requestDetails\": {\"requestInfo\": {\"resourceType\": \"operationalEnvironment\",\"instanceName\": "
- + "\"myOpEnv\",\"source\": \"VID\",\"requestorId\": \"az2017\"},\"requestParameters\": {\"operationalEnvironmentType\": \"ECOMP\", "
- + "\"tenantContext\": \"Test\",\"workloadContext\": \"ECOMP_E2E-IST\"}}} ";
-
- private static final String requestJsonActivate = "{\"requestDetails\": {\"requestInfo\": {\"resourceType\": \"operationalEnvironment\","
- + "\"instanceName\": \"myVnfOpEnv\",\"source\": \"VID\",\"requestorId\": \"az2017\"},"
- + "\"relatedInstanceList\": [{\"relatedInstance\": {\"resourceType\": \"operationalEnvironment\","
- + "\"instanceId\": \"ff305d54-75b4-431b-adb2-eb6b9e5ff000\",\"instanceName\": \"name\"}}],"
- + "\"requestParameters\": { \"operationalEnvironmentType\": \"VNF\",\"workloadContext\": \"VNF_E2E-IST\","
- + "\"manifest\": {\"serviceModelList\": [{\"serviceModelVersionId\": \"ff305d54-75b4-431b-adb2-eb6b9e5ff000\","
- + "\"recoveryAction\": \"abort\"},{\"serviceModelVersionId\": \"ff305d54-75b4-431b-adb2-eb6b9e5ff000\","
- + "\"recoveryAction\": \"retry\"}]} }}}";
-
- private static final String requestJsonDeactivate = "{\"requestDetails\": {\"requestInfo\": {\"resourceType\": \"operationalEnvironment\","
- + "\"source\": \"VID\",\"requestorId\": \"az2017\"},\"requestParameters\": "
- + "{\"operationalEnvironmentType\": \"VNF\"}}}";
-
- @Test
- public void testCreateOperationEnvironment()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String response = "{\"requestId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\","
- + "\"instanceId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\"}";
- final Response okResponse = Response.status(HttpStatus.SC_OK).entity(response).build();
-
- try {
- CloudOrchestration cor = Mockito.mock(CloudOrchestration.class);
- cor.createOperationEnvironment(requestJSONCreate, "v1");
- Mockito.when(cor.createOperationEnvironment(requestJSONCreate, "v1")).thenReturn(okResponse);
- Response resp = cor.createOperationEnvironment(requestJSONCreate, "v1");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testActivateOperationEnvironment()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String response = "{\"requestId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\","
- + "\"instanceId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\"}";
- final Response okResponse = Response.status(HttpStatus.SC_OK).entity(response).build();
-
- try {
- CloudOrchestration cor = Mockito.mock(CloudOrchestration.class);
- cor.activateOperationEnvironment(requestJsonActivate, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- Mockito.when(cor.activateOperationEnvironment(requestJsonActivate, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff")).thenReturn(okResponse);
- Response resp = cor.activateOperationEnvironment(requestJsonActivate, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-
- @Test
- public void testDeactivateOperationEnvironment()
- throws JsonParseException, JsonMappingException, IOException, ValidationException {
- final String response = "{\"requestId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\","
- + "\"instanceId\": \"ff3514e3-5a33-55df-13ab-12abad84e7ff\"}";
- final Response okResponse = Response.status(HttpStatus.SC_OK).entity(response).build();
-
- try {
- CloudOrchestration cor = Mockito.mock(CloudOrchestration.class);
- cor.deactivateOperationEnvironment(requestJsonDeactivate, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- Mockito.when(cor.deactivateOperationEnvironment(requestJsonDeactivate, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff")).thenReturn(okResponse);
- Response resp = cor.deactivateOperationEnvironment(requestJsonDeactivate, "v1", "ff3514e3-5a33-55df-13ab-12abad84e7ff");
- assertEquals(resp.getStatus(), HttpStatus.SC_OK);
- } catch (Exception e) {
-
- e.printStackTrace();
- }
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ApplyUpdatedConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ApplyUpdatedConfig.json
deleted file mode 100644
index bf43fa39a6..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ApplyUpdatedConfig.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "requestDetails": {
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "requestParameters": {
- "payload": "{\"request-parameters\":{\"host-ip-address\":\"10.10.10.10\"},\"configuration-parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/CompareModelRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/CompareModelRequest.json
new file mode 100644
index 0000000000..02a5bf71c5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/CompareModelRequest.json
@@ -0,0 +1,6 @@
+{
+ "globalSubscriberId": "60c3e96e-0970-4871-b6e0-3b6de7561519",
+ "serviceType": "vnf",
+ "modelInvariantIdTarget": "60c3e96e-0970-4871-b6e0-3b6de1234567",
+ "modelVersionIdTarget": "modelVersionIdTarget"
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/DeleteRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/DeleteRequest.json
new file mode 100644
index 0000000000..6626200eaf
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/DeleteRequest.json
@@ -0,0 +1,4 @@
+{
+ "globalSubscriberId":"299392392",
+ "serviceType":"VoLTE"
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/Request.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/Request.json
new file mode 100644
index 0000000000..c5114970b1
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/Request.json
@@ -0,0 +1,81 @@
+{
+ "service":{
+ "name":"so_test4",
+ "description":"so_test2",
+ "serviceInvariantUuid":"60c3e96e-0970-4871-b6e0-3b6de7561519",
+ "serviceUuid":"592f9437-a9c0-4303-b9f6-c445bb7e9814",
+ "globalSubscriberId":"123457",
+ "serviceType":"voLTE",
+ "parameters":{
+ "resources":[
+ {
+ "resourceName":"vIMS",
+ "resourceInvariantUuid":"60c3e96e-0970-4871-b6e0-3b6de7561516",
+ "resourceUuid":"60c3e96e-0970-4871-b6e0-3b6de7561512",
+ "parameters":{
+ "locationConstraints":[
+ {
+ "vnfProfileId":"zte-vBAS-1.0",
+ "locationConstraints":{
+ "vimId":"4050083f-465f-4838-af1e-47a545222ad0"
+ }
+ },
+ {
+ "vnfProfileId":"zte-vMME-1.0",
+ "locationConstraints":{
+ "vimId":"4050083f-465f-4838-af1e-47a545222ad0"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "resourceName":"vEPC",
+ "resourceInvariantUuid":"61c3e96e-0970-4871-b6e0-3b6de7561516",
+ "resourceUuid":"62c3e96e-0970-4871-b6e0-3b6de7561512",
+ "parameters":{
+ "locationConstraints":[
+ {
+ "vnfProfileId":"zte-CSCF-1.0",
+ "locationConstraints":{
+ "vimId":"4050083f-465f-4838-af1e-47a545222ad1"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "resourceName":"underlayvpn",
+ "resourceInvariantUuid":"60c3e96e-0970-4871-b6e0-3b6de7561513",
+ "resourceUuid":"60c3e96e-0970-4871-b6e0-3b6de7561514",
+ "parameters":{
+ "locationConstraints":[
+
+ ]
+ }
+ },
+ {
+ "resourceName":"overlayvpn",
+ "resourceInvariantUuid":"60c3e96e-0970-4871-b6e0-3b6de7561517",
+ "resourceUuid":"60c3e96e-0970-4871-b6e0-3b6de7561518",
+ "parameters":{
+ "locationConstraints":[
+
+ ]
+ }
+ }
+ ],
+ "requestInputs":{
+ "externalDataNetworkName":"Flow_out_net",
+ "m6000_mng_ip":"181.18.20.2",
+ "externalCompanyFtpDataNetworkName":"Flow_out_net",
+ "externalPluginManageNetworkName":"plugin_net_2014",
+ "externalManageNetworkName":"mng_net_2017",
+ "sfc_data_network":"sfc_data_net_2016",
+ "NatIpRange":"210.1.1.10-210.1.1.20",
+ "location":"4050083f-465f-4838-af1e-47a545222ad0",
+ "sdncontroller":"9b9f02c0-298b-458a-bc9c-be3692e4f35e"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/ScaleRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/ScaleRequest.json
new file mode 100644
index 0000000000..2f1e84559c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/E2EServiceInstancesTest/ScaleRequest.json
@@ -0,0 +1,18 @@
+{
+ "service":{
+ "serviceType":"example-service-type",
+ "globalSubscriberId":"test_custormer",
+ "resources":[{
+ "resourceInstanceId":"ns111",
+ "scaleType":"SCALE_NS",
+ "scaleNsData":{
+ "scaleNsByStepsData":{
+ "numberOfSteps":"4",
+ "aspectId":"TIC_EDGE_HW",
+ "scalingDirection":"UP"
+ }
+ }
+ }],
+ "serviceInstanceName":"XXXX"
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql
new file mode 100644
index 0000000000..a5d38e6478
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/InfraActiveRequestsReset.sql
@@ -0,0 +1,15 @@
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, AIC_CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME) VALUES
+('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null),
+('00032ab7-na18-42e5-965d-8ea592502018', '00032ab7-fake-42e5-965d-8ea592502018', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"Infra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}}', null, 'APIH', null, null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_v10_011-4', 'xxxxxx', null, null, null, null),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null),
+('5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo": {"modelType": "vfModule","modelName": "test::base::module-0","modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671","modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671","modelVersion": "2","modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"},"cloudConfiguration": {"lcpCloudRegionId": "n6","tenantId": "0422ffb57ba042c0800a29dc85ca70f8"},"requestInfo": {"instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1","source": "VID","suppressRollback": false,"requestorId": "xxxxxx"},"relatedInstanceList": [{"relatedInstance": {"instanceId": "76fa8849-4c98-473f-b431-2590b192a653","modelInfo": {"modelType": "service","modelName": "Infra_v10_Service","modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671","modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671","modelVersion": "1.0"}}},{"relatedInstance": {"instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c","modelInfo": {"modelType": "vnf","modelName": "v10","modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671","modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671","modelVersion": "1.0","modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671","modelCustomizationName": "v10 1"}}}],"requestParameters": {"usePreload": true,"userParams": []}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null);
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, AIC_CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME) VALUES
+('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-n6-3100-0927-1', 'xxxxxx', null, null, null, null),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"Infra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null),('0017f68c-eb2d-45bb-b7c7-ec31b37dc350', null, 'createInstance', 'IN_PROGRESS', 'Error parsing request.
+ No valid instanceName is specified', null, '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID',
+ '1882938', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null,
+ '{"serviceInstanceId":"1882939","vnfInstanceId":"1882938","networkInstanceId":"1882937","volumeGroupInstanceId":"1882935","vfModuleInstanceId":"1882934","requestDetails":{"requestInfo":{"source":"VID","requestorId":"xxxxxx","instanceName":"testService9"},"requestParameters":{"aLaCarte":true,"autoBuildVfModules":false,"subscriptionServiceType":"test"},"modelInfo":{"modelInvariantId":"f7ce78bb-423b-11e7-93f8-0050569a7965","modelVersion":"1","modelVersionId":"10","modelType":"service","modelName":"serviceModel","modelInstanceName":"modelInstanceName","modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"}}}',
+ null, 'APIH', null, null, '1882935', null, '1882934', null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', '1882939', 'testService10', 'xxxxxx', 'test', null, null, null);
+COMMIT; \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdPreload.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdPreload.json
deleted file mode 100644
index f5457b186b..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdPreload.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": true,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdFormat.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdFormat.json
deleted file mode 100644
index e290764b30..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdFormat.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "test",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersion.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersion.json
deleted file mode 100644
index 3cbcafaef8..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersion.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/CloudConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfiguration.json
index 96316d8947..37c8b2e8bb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/CloudConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfiguration.json
@@ -1,39 +1,39 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2AutoBuildVfModulesTrue.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationConfig.json
index aeb4375c9b..9d1e1f5ae8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2AutoBuildVfModulesTrue.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationConfig.json
@@ -1,43 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "configuration",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyInstanceName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationNetwork.json
index ad8140c95d..ae3b8b5bb3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyInstanceName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationNetwork.json
@@ -1,43 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2AutoBuildVfModulesFalse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationVnf.json
index ad8140c95d..c35cd4f977 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2AutoBuildVfModulesFalse.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/CloudConfigurationVnf.json
@@ -1,43 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json
new file mode 100644
index 0000000000..47b2e309d3
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/DeactivateAndCloudDeleteCloudConfiguration.json
@@ -0,0 +1,11 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "az2016"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyCloudConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyCloudConfiguration.json
index cac9cd7941..66cf436d2d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyCloudConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyCloudConfiguration.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyLcpCloudConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyLcpCloudConfiguration.json
index 324f545e55..d6bd660c57 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyLcpCloudConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyLcpCloudConfiguration.json
@@ -1,41 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "suppressRollback": false,
+ "source": "VID"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyTenantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyTenantId.json
index 492bc10eb5..c010a45d40 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyTenantId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/EmptyTenantId.json
@@ -1,41 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "suppressRollback": false,
+ "source": "VID"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateCloudConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateCloudConfiguration.json
index f86b66edf1..18b785cae5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateCloudConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateCloudConfiguration.json
@@ -1,38 +1,38 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateCloudRegionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateCloudRegionId.json
index bb76d74aba..bd114f7ad8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateCloudRegionId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateCloudRegionId.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateTenantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateTenantId.json
index da3ba3f5da..686faf15c0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdateTenantId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/CloudConfiguration/InPlaceSoftwareUpdateTenantId.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ConfigurationModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ConfigurationModelVersionId.json
index 9a15751db6..6506a33dc7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ConfigurationModelVersionId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ConfigurationModelVersionId.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "configuration",
- "modelVersion": "2.0",
- "modelVersionId": ""
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "configuration",
+ "modelVersion": "2.0",
+ "modelVersionId": ""
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InvalidModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/InvalidModelInvariantId.json
index 7a7708e3a5..9bee294b0e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InvalidModelInvariantId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/InvalidModelInvariantId.json
@@ -1,43 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "test*",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "test*",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "instanceName": "test",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomization.json
index b3f5ee904a..9a983609aa 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomization.json
@@ -1,39 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelCustomizationName":"",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "cascadeDelete": false,
+ "rebuildVolumeGroups": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationId.json
index 37dd5b0bf7..8b327fbb9b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationId.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vfModule",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdUsingPreload.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationIdUsingPreload.json
index 471f980778..5d1b6b4747 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelCustomizationIdUsingPreload.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationIdUsingPreload.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelCustomizationName": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "usePreload": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelCustomizationName": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "usePreload": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionIdTest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationName.json
index 7665d1d9a9..74dc205d1e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionIdTest.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelCustomizationName.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": ""
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": ""
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInfoNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInfoNull.json
index e8a2f857fc..bbc8b7f9ef 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInfoNull.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInfoNull.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName" : "testV2aLaCarteFlag",
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "requestInfo": {
+ "instanceName" : "testV2aLaCarteFlag",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantId.json
index c8b6741f76..b974f3c9d6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantId.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "configuration",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "configuration",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdConfiguration.json
index b068614943..d42cc7e456 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdConfiguration.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "configuration",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "configuration",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdConfigurationDelete.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdConfigurationDelete.json
index b068614943..d42cc7e456 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdConfigurationDelete.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdConfigurationDelete.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "configuration",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "configuration",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdService.json
index 309222f3b8..edaf25bc3a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdService.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdService.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdVnf.json
index d5dab07852..a7076c34dd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdVnf.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelInvariantIdVnf.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelNameVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelNameVersionId.json
index 931ac31503..7b46671afe 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelNameVersionId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelNameVersionId.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelTypeNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelTypeNull.json
index e4d16cd132..6203060537 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelTypeNull.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelTypeNull.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionId.json
index d02de4cfdd..35300c221f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionId.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": ""
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": ""
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionIdCreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionIdCreate.json
index b6b845735f..2a57dc9306 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionIdCreate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionIdCreate.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": ""
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": ""
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionNetwork.json
index 56396eac23..06eb779a84 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionNetwork.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionNetwork.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "network",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "network",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionService.json
index bfe4c14375..767dc4f78c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionService.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionService.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdServiceCreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionServiceCreate.json
index 1628057fa0..f0eef84b95 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelInvariantIdServiceCreate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionServiceCreate.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionVfModule.json
index d669769c24..94ef050cfb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ModelVersionVfModule.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ModelVersionVfModule.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vfModule",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vfModule",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceModelNameEmptyOnActivate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ServiceModelNameEmptyOnActivate.json
index 06605ed840..7c33e25145 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceModelNameEmptyOnActivate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ServiceModelNameEmptyOnActivate.json
@@ -1,38 +1,38 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelCustomizationName":"",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceModelNameEmptyOnDelete.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ServiceModelNameEmptyOnDelete.json
index 06605ed840..7c33e25145 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceModelNameEmptyOnDelete.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ServiceModelNameEmptyOnDelete.json
@@ -1,38 +1,38 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelCustomizationName":"",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ValidModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ValidModelCustomizationId.json
index 90abd6444c..bca68504cb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ValidModelCustomizationId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ValidModelCustomizationId.json
@@ -1,66 +1,66 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "test",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
- "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- }
- }
- }
- ],
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "test",
+ "modelType": "vfModule",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
+ "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ }
+ }
+ }
+ ],
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ValidModelCustomizationIdService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ValidModelCustomizationIdService.json
index 7b9a1badb8..06ea217607 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ValidModelCustomizationIdService.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/ValidModelCustomizationIdService.json
@@ -1,66 +1,66 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "test",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
- "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- }
- }
- }
- ],
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "test",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
+ "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ }
+ }
+ }
+ ],
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VfModuleModelName.json
index b1c423fb73..839c58a5af 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VfModuleModelName.json
@@ -1,38 +1,38 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "",
+ "modelType": "vfModule",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationId.json
index 17ee433acf..3ed83a4642 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationId.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdEmpty.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationIdEmpty.json
index 2d11862ad9..a2d25594c0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdEmpty.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationIdEmpty.json
@@ -1,65 +1,65 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
- "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
- "modelCustomizationName": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
+ "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
+ "modelCustomizationName": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdPreload.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationIdPreload.json
index 221740c2ea..f6206f49ba 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdPreload.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationIdPreload.json
@@ -1,36 +1,36 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": true,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": true,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNameNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationNameNull.json
index 9f6fad164f..985ad376d8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNameNull.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationNameNull.json
@@ -1,38 +1,38 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationTest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationTest.json
index 80ff4137db..a8a4021694 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationTest.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/VnfModelCustomizationTest.json
@@ -1,39 +1,39 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelCustomizationName": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelNameVersionId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelCustomizationName": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelNameVersionId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2ModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v2ModelVersionId.json
index aa3835c04b..7863e67a5d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2ModelVersionId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v2ModelVersionId.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "configuration",
- "modelVersion": "2.0",
- "modelVersionId": ""
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "configuration",
+ "modelVersion": "2.0",
+ "modelVersionId": ""
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3UpdateNetworkBad.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v3UpdateNetworkBad.json
index 956d771c79..5feffd2f24 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3UpdateNetworkBad.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v3UpdateNetworkBad.json
@@ -13,7 +13,7 @@
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"source": "VID",
"suppressRollback": true,
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"relatedInstanceList": [
{
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModuleMissingModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v4CreateVfModuleMissingModelCustomizationId.json
index 2fd0e03ad3..c5539ac083 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModuleMissingModelCustomizationId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v4CreateVfModuleMissingModelCustomizationId.json
@@ -1,61 +1,61 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "Test",
- "modelVersion": "1"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "MSOTEST103a-vSAMP12_base_module-0",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
- "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
- "modelInfo": {
- "modelType": "volumeGroup"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "Test",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP12 1"
- }
- }
- }
- ],
- "requestParameters": {
- "usePreload": false,
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTEST103a-vSAMP12_base_module-0",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": false,
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModuleNoCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v4CreateVfModuleNoCustomizationId.json
index 9c892a4fc0..1ca749f66f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModuleNoCustomizationId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v4CreateVfModuleNoCustomizationId.json
@@ -1,61 +1,61 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "Test",
- "modelVersion": "1"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "MSOTEST103a-vSAMP12_base_module-0",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
- "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
- "modelInfo": {
- "modelType": "volumeGroup"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "Test",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP12 1"
- }
- }
- }
- ],
- "requestParameters": {
- "usePreload": true,
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTEST103a-vSAMP12_base_module-0",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorBadData.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ActivateModelVersionId.json
index bbd9ac855e..9b78da9be9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorBadData.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ActivateModelVersionId.json
@@ -1,34 +1,34 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
-
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateConfigurationBad.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5CreateConfigurationModelCustomizationId.json
index f046932f85..2e8e0dbebc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateConfigurationBad.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5CreateConfigurationModelCustomizationId.json
@@ -1,64 +1,64 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "destination",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "CONTRAIL30_BASIC",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "instanceName":"port_mirror_config_12345",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "destination",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorBadData.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5DeactivateModelInvariantId.json
index aaa3069b2c..4b80bb1e8f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorBadData.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5DeactivateModelInvariantId.json
@@ -1,34 +1,34 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
-
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ModelInvariantIdDisablePort.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ModelInvariantIdDisablePort.json
index f8f983a17e..6e1883edab 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ModelInvariantIdDisablePort.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ModelInvariantIdDisablePort.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "network",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "network",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ModelInvariantIdNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ModelInvariantIdNetwork.json
index f8f983a17e..6e1883edab 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ModelInvariantIdNetwork.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ModelInfo/v5ModelInvariantIdNetwork.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelName": "SDNW Service 1710",
- "modelType": "network",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelName": "SDNW Service 1710",
+ "modelType": "network",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyLineOfBusiness.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/EmptyLineOfBusiness.json
index 8c8ffab1b8..1ea66106e1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyLineOfBusiness.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/EmptyLineOfBusiness.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": ""
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": ""
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyPlatform.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/EmptyPlatformName.json
index 2827475ada..7cad18d85a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyPlatform.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/EmptyPlatformName.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": ""
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": ""
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/LineOfBusiness.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/OptionalLineOfBusiness.json
index 84ce00ce23..8e020e4b33 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/LineOfBusiness.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/OptionalLineOfBusiness.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Platform.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/Platform.json
index 85d13d032e..05112cabdc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Platform.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/Platform.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/PlatformAndLineOfBusiness.json
index 75f38914ce..994251db6b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/PlatformAndLineOfBusiness.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformTest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/PlatformTest.json
index f63a8aa8d5..746e5a333c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformTest.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/PlatformAndLineOfBusiness/PlatformTest.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "instanceName" : "testV2aLaCarteFlag",
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "instanceName" : "testV2aLaCarteFlag",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyOwningEntityId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyOwningEntityId.json
index eb1c72004a..9e527324ca 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyOwningEntityId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyOwningEntityId.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyOwningEntityName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyOwningEntityName.json
index 6525364bcf..cb1782c1e2 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyOwningEntityName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyOwningEntityName.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "oeName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyProject.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyProjectName.json
index bdef26340a..9be70d8fe7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyProject.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/EmptyProjectName.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": ""
- },
- "owningEntity": {
- "owningEntityId": "oeId",
- "owningEntityName": "oeName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": ""
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntity2.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/OptionalProject.json
index 4f2fb9877e..1372b1fadd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntity2.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/OptionalProject.json
@@ -1,40 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "owningEntity": {
- "owningEntityId": "oeId",
- "owningEntityName": "oeName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OwningEntity.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/OwningEntity.json
index 81ec46a7e5..4aee4df814 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OwningEntity.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/OwningEntity.json
@@ -1,39 +1,39 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntity.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ProjectAndOwningEntity.json
index ad80a16815..bffc179793 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntity.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ProjectAndOwningEntity.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "oeId",
- "owningEntityName": "oeName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ServiceAssignNoOE.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ServiceAssignNoOE.json
new file mode 100644
index 0000000000..817a44d346
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/ProjectAndOwningEntity/ServiceAssignNoOE.json
@@ -0,0 +1,115 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "testService",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "testService",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673Mow.module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673Mowmodule-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673Mowmodule-2",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InvalidInstanceName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/InvalidInstanceName.json
index 69b4866fe7..836a3e2737 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InvalidInstanceName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/InvalidInstanceName.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false,
- "instanceName" : "test*"
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName" : "test*"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstances.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstances.json
index 13f6a986fb..07d23fb3a5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstances.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstances.json
@@ -1,33 +1,33 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesId.json
index ee8bd91bfc..eb39deb7cb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesId.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesIdFormat.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesIdFormat.json
index 7a1e1260d3..2c459a827b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesIdFormat.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesIdFormat.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "test id",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "test id",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesInstanceId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesInstanceId.json
index 75539a7533..6d13a58134 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesInstanceId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesInstanceId.json
@@ -1,47 +1,47 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelCustomizationId.json
index efeb22c080..1758c73bb3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelCustomizationId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelCustomizationId.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInfo.json
index 0543aa998b..36438b3687 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInfo.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInfo.json
@@ -1,39 +1,39 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000"
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000"
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInvariantId.json
index 06baff7c1a..601caca996 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInvariantId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInvariantId.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInvariantIdFormat.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInvariantIdFormat.json
index 73156d0c2b..c28717a1f7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelInvariantIdFormat.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelInvariantIdFormat.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "a test",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "a test",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelName.json
index 20c0d8395e..41ab004ce3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelName.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelType.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelType.json
index ff9f5585d7..a64099effc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelType.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelType.json
@@ -1,45 +1,45 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelVersion.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelVersion.json
index d711102476..b0ccc8e050 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelVersion.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelVersion.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": ""
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": ""
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelVersionId.json
index e0d2948dda..103395eb77 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesModelVersionId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesModelVersionId.json
@@ -1,46 +1,46 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesNameFormat.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesNameFormat.json
index 206f325857..e121bb89d7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesNameFormat.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesNameFormat.json
@@ -1,47 +1,47 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceName": "format test",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "format test",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesServiceInstance.json
index e1b5f21b3e..8620232de8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesServiceInstance.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVfModule.json
index d59daaa1e5..7661411c11 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVfModule.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVfModule.json
@@ -1,33 +1,33 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVnfInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVnfInstance.json
index 542f4e7738..d55395af9b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVnfInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVnfInstance.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVnfInstanceId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVnfInstanceId.json
index 2be90cc906..4fcae49880 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesVnfInstanceId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/RelatedInstancesVnfInstanceId.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceNoRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceNoRelatedInstance.json
index e5fec3a23e..447876913d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceNoRelatedInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceNoRelatedInstance.json
@@ -1,23 +1,23 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelName": "test",
- "modelVersion": "test",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "test"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "requestParameters": {
- "aLaCarte": "true"
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelName": "test",
+ "modelVersion": "test",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "test"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "aLaCarte": "true"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleRelatedInstancesService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VfModuleRelatedInstancesService.json
index a1cab5ab01..9d7783bb8f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleRelatedInstancesService.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VfModuleRelatedInstancesService.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP13",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP13",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleRelatedInstancesVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VfModuleRelatedInstancesVnf.json
index 71d9e1e301..daff6e0884 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleRelatedInstancesVnf.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VfModuleRelatedInstancesVnf.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRelatedInstancesService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VnfRelatedInstancesService.json
index 26dae2bc51..4eda56abcd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRelatedInstancesService.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VnfRelatedInstancesService.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP13",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP13",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VolumeGroupRelatedInstances.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VolumeGroupRelatedInstances.json
index f5aa7f46e4..58b265284f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VolumeGroupRelatedInstances.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/VolumeGroupRelatedInstances.json
@@ -1,61 +1,61 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP13",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "volumeGroup",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP13",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3VolumeGroupBad.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v4RelatedInstancesNull.json
index 526be72895..9961344bcd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3VolumeGroupBad.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v4RelatedInstancesNull.json
@@ -18,7 +18,7 @@
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"source": "VID",
"suppressRollback": false,
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"requestParameters": {
"autoBuildVfModules": true
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorNoRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5ActivateNoRelatedInstance.json
index 1c39843749..e1db4831f4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorNoRelatedInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5ActivateNoRelatedInstance.json
@@ -1,20 +1,20 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoDestinationRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoDestinationRelatedInstance.json
index 85a2017f58..5f6174b331 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoDestinationRelatedInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoDestinationRelatedInstance.json
@@ -1,51 +1,51 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "CONTRAIL30_BASIC",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "instanceName":"port_mirror_config_12345",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoRelatedInstances.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoRelatedInstances.json
index 51f4a08816..21c0aa41fe 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoRelatedInstances.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoRelatedInstances.json
@@ -1,23 +1,23 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "CONTRAIL30_BASIC",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "instanceName":"port_mirror_config_12345",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoSourceRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoSourceRelatedInstance.json
index fc934b2214..e7dd7f414c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateNoSourceRelatedInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5CreateNoSourceRelatedInstance.json
@@ -1,51 +1,51 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "destination",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "CONTRAIL30_BASIC",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "instanceName":"port_mirror_config_12345",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "destination",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorNoRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5DeactivateNoRelatedInstance.json
index 1c39843749..e1db4831f4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorNoRelatedInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5DeactivateNoRelatedInstance.json
@@ -1,20 +1,20 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorNoConnectionPoint.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5EnablePortNoConnectionPoint.json
index 2e37674246..def72caf45 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorNoConnectionPoint.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5EnablePortNoConnectionPoint.json
@@ -1,31 +1,31 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ]
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorNoRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5EnablePortNoRelatedInstance.json
index c676cd6d54..cb8063a7cb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorNoRelatedInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v5EnablePortNoRelatedInstance.json
@@ -1,17 +1,17 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6AddRelationshipsBadData.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v6AddRelationshipsInstanceName.json
index fbaaafaf14..66fae38377 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6AddRelationshipsBadData.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v6AddRelationshipsInstanceName.json
@@ -9,7 +9,7 @@
},
"requestInfo": {
"source": "VID",
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"relatedInstanceList": [
{
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6VnfDeleteInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v6VnfDeleteInstance.json
index 13c93869e0..b1c9e65bba 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6VnfDeleteInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v6VnfDeleteInstance.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json
new file mode 100644
index 0000000000..99ca7fcfb0
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/v7CreateVnfNetworkCollection.json
@@ -0,0 +1,56 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "9a10143a-13e3-4f56-8661-6625e6bcc310",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "VF01032017",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "d752b40b-3e1f-4aac-95d0-9f257c74f442"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTEST103a",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "platform": {
+ "platformName": "platform"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "business"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "0fd90c0c-0e3a-46e2-abb5-4c4820d5985b",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "0fd90c0c-0e3a-46e2-abb5-4c4820d5985b",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "0fd90c0c-0e3a-46e2-abb5-4c4820d5985b",
+ "modelInfo": {
+ "modelType": "networkCollection"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false ,
+ "aLaCarte": false,
+ "subscriptionServiceType": "test"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyRequestorId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/EmptyRequestorId.json
index eb771a2479..17888adfa9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyRequestorId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/EmptyRequestorId.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySource.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/EmptySource.json
index c944b07bcc..3c9f54445b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySource.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/EmptySource.json
@@ -1,35 +1,35 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkProductFamilyId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/NetworkProductFamilyId.json
index 5943319efa..4e7afc432e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkProductFamilyId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/NetworkProductFamilyId.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "network",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "requestInfo": {
- "productFamilyId": "",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "requestInfo": {
+ "productFamilyId": "",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestInfo.json
index 37c12637dd..484f7bfc97 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestInfo.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestInfo.json
@@ -1,35 +1,35 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestInfoNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestInfoNull.json
index d1127c656a..9220d4dd22 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestInfoNull.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestInfoNull.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestorId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestorId.json
index cc5936b943..8562be02b8 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestorId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/RequestorId.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyId.json
index 733ce1d740..11d85a3397 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyId.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "requestInfo": {
- "productFamilyId": "",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "requestInfo": {
+ "productFamilyId": "",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyIdFlag.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyIdFlag.json
index 4c4905add0..76ae344a02 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyIdFlag.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyIdFlag.json
@@ -1,72 +1,72 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "volumeGroup",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "requestInfo": {
- "productFamilyId": "",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "volumeGroup",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "requestInfo": {
+ "productFamilyId": "",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyIdUpdate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyIdUpdate.json
index 733ce1d740..11d85a3397 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceProductFamilyIdUpdate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/ServiceProductFamilyIdUpdate.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "requestInfo": {
- "productFamilyId": "",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "requestInfo": {
+ "productFamilyId": "",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfProductFamilyId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/VnfProductFamilyId.json
index d47b47597c..f810473171 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfProductFamilyId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestInfo/VnfProductFamilyId.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "requestInfo": {
- "productFamilyId": "",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": true,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "requestInfo": {
+ "productFamilyId": "",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": true,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignCloudConfigVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignCloudConfigVnf.json
new file mode 100644
index 0000000000..9e571e6e37
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignCloudConfigVnf.json
@@ -0,0 +1,126 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "testModelName",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "testModelName",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673Mow",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673Mow",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673Mow",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673Mow",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignEmptyReqParameters.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignEmptyReqParameters.json
new file mode 100644
index 0000000000..1d1b4636db
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/AssignEmptyReqParameters.json
@@ -0,0 +1,31 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/Network.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/Network.json
new file mode 100644
index 0000000000..26bb2172f8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/Network.json
@@ -0,0 +1,133 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "networks": [{
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkCloudConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkCloudConfig.json
new file mode 100644
index 0000000000..6b32f3ebe3
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkCloudConfig.json
@@ -0,0 +1,138 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "networks": [{
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf970"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelCustomizationId.json
new file mode 100644
index 0000000000..1aa6094513
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelCustomizationId.json
@@ -0,0 +1,137 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "networks": [{
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelVersionId.json
new file mode 100644
index 0000000000..1fddf7970b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/NetworkModelVersionId.json
@@ -0,0 +1,137 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "networks": [{
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/ProductFamilyId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/ProductFamilyId.json
new file mode 100644
index 0000000000..f9a5ea9a01
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/ProductFamilyId.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParameters.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParameters.json
index e877dd140e..07de63cf0d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParameters.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParameters.json
@@ -1,38 +1,38 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ]
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteTrue.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParametersALaCarteTrue.json
index 931ac31503..7b46671afe 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteTrue.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParametersALaCarteTrue.json
@@ -1,37 +1,37 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParametersNull.json
index e70de00926..af80ed5d55 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersNull.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/RequestParametersNull.json
@@ -1,21 +1,21 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelCustomizationId.json
new file mode 100644
index 0000000000..01baeb841d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelCustomizationId.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelInfo.json
new file mode 100644
index 0000000000..4887c4b45b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelInfo.json
@@ -0,0 +1,120 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW--BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelVersionId.json
new file mode 100644
index 0000000000..8d3ed69863
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsModelVersionId.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL.._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatform.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatform.json
new file mode 100644
index 0000000000..f05fdb06ba
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatform.json
@@ -0,0 +1,127 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatformName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatformName.json
new file mode 100644
index 0000000000..4436baffe4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsPlatformName.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsVnfModelInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsVnfModelInfo.json
new file mode 100644
index 0000000000..e31523f99d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/UserParamsVnfModelInfo.json
@@ -0,0 +1,116 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelCustomizationId.json
new file mode 100644
index 0000000000..0cf4928581
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelCustomizationId.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL..vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelVersionId.json
new file mode 100644
index 0000000000..5362b439dc
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModuleModelVersionId.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModules.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModules.json
new file mode 100644
index 0000000000..ad1c02e37b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModules.json
@@ -0,0 +1,75 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModulesModelInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModulesModelInfo.json
new file mode 100644
index 0000000000..81904fe66a
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VfModulesModelInfo.json
@@ -0,0 +1,125 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelCustomizationId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelCustomizationId.json
new file mode 100644
index 0000000000..5b4097793c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelCustomizationId.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "2016-73_MOW-BV-L"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelVersionId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelVersionId.json
new file mode 100644
index 0000000000..b52be1f4c2
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfModelVersionId.json
@@ -0,0 +1,128 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRequestParameters.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfRequestParameters.json
index 43c72c5473..75d354b909 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRequestParameters.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/VnfRequestParameters.json
@@ -1,40 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "autoBuildVfModules": false,
- "usePreload": false,
- "cascadeDelete": false,
- "rebuildVolumeGroups": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "vnf",
+ "modelVersion": "2.0",
+ "modelCustomizationName":"",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "cascadeDelete": false,
+ "rebuildVolumeGroups": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2requestParametersALaCarteFalse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/v2requestParametersALaCarteFalse.json
index f63a8aa8d5..746e5a333c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2requestParametersALaCarteFalse.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/v2requestParametersALaCarteFalse.json
@@ -1,44 +1,44 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "instanceName" : "testV2aLaCarteFlag",
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : false,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "instanceName" : "testV2aLaCarteFlag",
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstanceALaCarte.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/v3DeleteServiceInstanceALaCarte.json
index 5a9320675e..8709f0299d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstanceALaCarte.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RequestParameters/v3DeleteServiceInstanceALaCarte.json
@@ -7,7 +7,7 @@
},
"requestInfo": {
"source": "VID",
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"requestParameters": {
"aLaCarte": true,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/AssignEmptySubscriberInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/AssignEmptySubscriberInfo.json
new file mode 100644
index 0000000000..2c2c87ee07
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/AssignEmptySubscriberInfo.json
@@ -0,0 +1,116 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyGlobalSubscriberId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptyGlobalSubscriberId.json
index 9f2c8b7ed7..efb56a8b44 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptyGlobalSubscriberId.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptyGlobalSubscriberId.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySubscriberInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptySubscriberInfo.json
index a0130347ec..ff35d945d0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySubscriberInfo.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptySubscriberInfo.json
@@ -1,32 +1,32 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySubscriptionServiceType.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptySubscriptionServiceType.json
index 47bd161741..ecb4c7c74a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/EmptySubscriptionServiceType.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SubscriberInfo/EmptySubscriptionServiceType.json
@@ -1,41 +1,42 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "randomStrings",
+ "owningEntityName": "randomStrings"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Project.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/InstanceIdHashMap.json
index 4f2fb9877e..1372b1fadd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Project.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/InstanceIdHashMap.json
@@ -1,40 +1,40 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "owningEntity": {
- "owningEntityId": "oeId",
- "owningEntityName": "oeName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkType.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/NetworkType.json
index 4ea0b65532..9bed4353b9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkType.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/NetworkType.json
@@ -1,43 +1,43 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "TestNetworkType",
- "modelType": "network",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "oeId",
- "owningEntityName": "oeName"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceAssign.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceAssign.json
new file mode 100644
index 0000000000..2d7ab4ae7c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceAssign.json
@@ -0,0 +1,130 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0b"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base__BV..module-0",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInPlaceSoftwareUpdate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceInPlaceSoftwareUpdate.json
index 1d6b9f5d6f..476b9367c1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInPlaceSoftwareUpdate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceInPlaceSoftwareUpdate.json
@@ -1,42 +1,42 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "requestInfo": {
+ "instanceName": "MSO_Dev_1802_VNF_10-9-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceUnassign.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceUnassign.json
new file mode 100644
index 0000000000..4f56e1b373
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/ServiceUnassign.json
@@ -0,0 +1,20 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "userParams": [
+ ]
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/UserParams.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/UserParams.json
index 0fc5355369..d7ece6c356 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/UserParams.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/UserParams.json
@@ -1,59 +1,59 @@
-{
- "requestDetails": {
- "modelInfo":{
- "modelType": "vfModule",
- "modelName": "vSAMP10aDEV::base::module-0",
- "modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671",
- "modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671",
- "modelVersion": "2",
- "modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"
- },
- "cloudConfiguration":{
- "lcpCloudRegionId": "mtn6",
- "tenantId": "0422ffb57ba042c0800a29dc85ca70f8"
- },
- "requestInfo":{
- "instanceName": "MSO-DEV-VF-1802-it3-pwt3-vSAMP10a-base-1002-RoutePrefixes",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "bs7527"
- },
- "relatedInstanceList": [{
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo":{
- "modelType": "service",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersion": "1.0"
- }
-
- }
- },{
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo":{
- "modelType": "vnf",
- "modelName": "vSAMP10a",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersion": "1.0",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671",
- "modelCustomizationName": "vSAMP10a 1"
- }
- }
- }],
- "requestParameters": {
- "usePreload": true,
- "controllerType": "appc",
- "userParams": [{
- "name": "vlc_sctp_b_route_prefixes",
- "value": [
- { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
- { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
- { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
- ]}
- ]}
- }
+{
+ "requestDetails": {
+ "modelInfo":{
+ "modelType": "vfModule",
+ "modelName": "vSAMP10aDEV::base::module-0",
+ "modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671",
+ "modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671",
+ "modelVersion": "2",
+ "modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration":{
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "0422ffb57ba042c0800a29dc85ca70f8"
+ },
+ "requestInfo":{
+ "instanceName": "MSO-DEV-VF-1802-it3-pwt3-vSAMP10a-base-1002-RoutePrefixes",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo":{
+ "modelType": "service",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersion": "1.0"
+ }
+
+ }
+ },{
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo":{
+ "modelType": "vnf",
+ "modelName": "vSAMP10a",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671",
+ "modelCustomizationName": "vSAMP10a 1"
+ }
+ }
+ }],
+ "requestParameters": {
+ "aLaCarte": true,
+ "usePreload": true,
+ "userParams": [{
+ "name": "vlc_sctp_b_route_prefixes",
+ "value": [
+ { "interface_route_table_routes_route_prefix": "107.239.41.163/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.164/32" },
+ { "interface_route_table_routes_route_prefix": "107.239.41.165/32" }
+ ]}
+ ]}
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VfModulesModelInfo.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VfModulesModelInfo.json
new file mode 100644
index 0000000000..44a50e91cb
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VfModulesModelInfo.json
@@ -0,0 +1,120 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersion": "10"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "{some project name}"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "VMX",
+ "aLaCarte": false,
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelName": "MOW vMX BV 1 Service",
+ "modelVersionId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams": [],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "2016-73_MOW-BV-L 0",
+ "modelName": "2016-73_MOW-BV-L",
+ "modelCustomizationId": "ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "platform": {
+ "platformName": "someValue"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "someValue"
+ },
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams": [
+ {
+ "instanceName": "someVnfInstanceName"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._base_BV..module-0",
+ "modelCustomizationId": "a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams": [
+ {
+ "vmx_int_net_len": "24",
+ "asn": "someValue"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8",
+ "modelType": "vfModule"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "100"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vRE_BV..module-1",
+ "modelCustomizationId": "72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vre_a_volume_size_0": "50"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelName": "201673MowBvL._vPFE_BV..module-2",
+ "modelCustomizationId": "da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams": [
+ {
+ "availability_zone_0": "mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0": "192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfActivate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VnfActivate.json
index b79a4e711c..92174781f1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfActivate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/VnfActivate.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "subscriptionServiceType": "test",
- "autoBuildVfModules": false,
- "usePreload": false,
- "cascadeDelete": false,
- "rebuildVolumeGroups": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "SDNW Service 1710",
+ "modelType": "service",
+ "modelVersion": "2.0",
+ "modelCustomizationName":"",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "test",
+ "modelNameVersionId": "test"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "test",
+ "autoBuildVfModules": false,
+ "usePreload": false,
+ "cascadeDelete": false,
+ "rebuildVolumeGroups": false,
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteNetwork.json
index 98610afe6e..af5be5cef9 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteNetwork.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteNetwork.json
@@ -9,7 +9,7 @@
},
"requestInfo": {
"source": "VID",
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
}
}
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteServiceInstance.json
index 4d1719f467..20b4b877fd 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteServiceInstance.json
@@ -12,7 +12,7 @@
},
"requestInfo": {
"source": "VID",
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"requestParameters": {
"aLaCarte": false,
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstanceBad.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteServiceInstanceALaCarte.json
index dcf47d0aa0..8709f0299d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3DeleteServiceInstanceBad.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3DeleteServiceInstanceALaCarte.json
@@ -5,16 +5,12 @@
"modelName": "Test",
"modelVersion": "1.0"
},
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
"requestInfo": {
"source": "VID",
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"requestParameters": {
- "aLaCarte": false,
+ "aLaCarte": true,
"userParams": [
{
"name": "someUserParam",
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3UpdateNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3UpdateNetwork.json
index 2aef2e7604..fb57ba60b6 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3UpdateNetwork.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3UpdateNetwork.json
@@ -14,12 +14,12 @@
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"source": "VID",
"suppressRollback": true,
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"relatedInstanceList": [
{
"relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
"modelInfo": {
"modelType": "service",
"modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3VnfCreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3VnfCreate.json
index 90fc84178c..8ce0fd1c06 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v3VnfCreate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v3VnfCreate.json
@@ -18,7 +18,7 @@
"productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
"source": "VID",
"suppressRollback": false,
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"relatedInstanceList": [
{
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v4CreateVfModule.json
index eb39ef12b9..0fa972b5fa 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v4CreateVfModule.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v4CreateVfModule.json
@@ -1,62 +1,62 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelCustomizationId": "856f9806-b01a-11e6-80f5-76304dec7eb7",
- "modelName": "Test",
- "modelVersion": "1"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "MSOTEST103a-vSAMP12_base_module-0",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
- "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
- "modelInfo": {
- "modelType": "volumeGroup"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "Test",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP12 1"
- }
- }
- }
- ],
- "requestParameters": {
- "usePreload": true,
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelCustomizationId": "856f9806-b01a-11e6-80f5-76304dec7eb7",
+ "modelName": "Test",
+ "modelVersion": "1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "MSOTEST103a-vSAMP12_base_module-0",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+ "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+ "modelInfo": {
+ "modelType": "volumeGroup"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP12 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5ActivateConfiguration.json
index 2fa9327c40..e17757ea54 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5ActivatePortMirrorConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5ActivateConfiguration.json
@@ -1,35 +1,35 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
-
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5CreateConfiguration.json
index ae0125224f..9822b1bfd0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5PortMirrorCreateConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5CreateConfiguration.json
@@ -1,65 +1,65 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "destination",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "CONTRAIL30_BASIC",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "instanceName":"port_mirror_config_12345",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "destination",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5DeactivateConfiguration.json
index 2fa9327c40..e17757ea54 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5DeactivatePortMirrorConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5DeactivateConfiguration.json
@@ -1,35 +1,35 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
-
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5EnableConfiguration.json
index da0b7b7cd7..e9a74025a1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5EnableConfiguration.json
@@ -1,40 +1,40 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "connectionPoint"
- }
- }
- }
- ]
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "connectionPoint"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5EnableService.json
index 1ee5e86e07..b8d2135de5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v5EnablePortMirrorService.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v5EnableService.json
@@ -1,41 +1,41 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "connectionPoint"
- }
- }
- }
- ]
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "connectionPoint"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6AddRelationships.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v6AddRelationships.json
index 4b1c47f324..a26cf90ec3 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6AddRelationships.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v6AddRelationships.json
@@ -9,7 +9,7 @@
},
"requestInfo": {
"source": "VID",
- "requestorId": "az2016"
+ "requestorId": "xxxxxx"
},
"relatedInstanceList": [
{
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6PortMirrorCreateConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v6CreateConfiguration.json
index 2df5b22c5f..8ea0f4c54a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v6PortMirrorCreateConfiguration.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/SuccessfulValidation/v6CreateConfiguration.json
@@ -1,66 +1,66 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceDirection": "source",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
- "instanceName": "vSAMP12",
- "instanceDirection": "destination",
- "modelInfo": {
- "modelType": "pnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "configuration",
+ "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "CONTRAIL30_BASIC",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1"
+ },
+ "requestInfo": {
+ "instanceName":"port_mirror_config_12345",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "aca51b0a-710d-4155-bc7c-7cef19d9a94e",
+ "instanceName": "vSAMP12",
+ "instanceDirection": "destination",
+ "modelInfo": {
+ "modelType": "pnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/AlaCarteRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/AlaCarteRequest.json
new file mode 100644
index 0000000000..0eaa37b1f8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/AlaCarteRequest.json
@@ -0,0 +1,36 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7fe",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
+ "modelName": "Test",
+ "modelVersion": "2.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "{some subscriber id}",
+ "subscriberName": "{some subscriber name}"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "MOG",
+ "aLaCarte": false,
+ "alaCarte": false,
+ "userParams": [
+ {
+ "name": "someUserParam",
+ "value": "someValue"
+ }
+ ]
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json
new file mode 100644
index 0000000000..124513de0d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/OrchestrationList.json
@@ -0,0 +1 @@
+{"requestList":[{"request":{"requestId":"00032ab7-3fb3-42e5-965d-8ea592502017","requestScope":"vfModule","requestType":"deleteInstance","requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID","suppressRollback":false},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}},"instanceReferences":{"serviceInstanceId":"e3b5744d-2ad1-4cdd-8390-c999a38829bc","vnfInstanceId":"b92f60c8-8de3-46c1-8dc1-e4390ac2b005","vfModuleInstanceId":"c7d527b1-7a91-49fd-b97d-1c8c0f4a7992"},"requestStatus":{"requestState":"COMPLETE","statusMessage":"Vf Module has been deleted successfully.","percentProgress":100}}},{"request":{"requestId":"00032ab7-na18-42e5-965d-8ea592502018","requestScope":"vfModule","requestType":"deleteInstance","requestDetails":{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID","suppressRollback":false},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}},"instanceReferences":{"serviceInstanceId":"e3b5744d-2ad1-4cdd-8390-c999a38829bc","vnfInstanceId":"b92f60c8-8de3-46c1-8dc1-e4390ac2b005","vfModuleInstanceId":"c7d527b1-7a91-49fd-b97d-1c8c0f4a7992"},"requestStatus":{"requestState":"PENDING","statusMessage":"Vf Module deletion pending.","percentProgress":0}}},{"request":{"requestId":"00093944-bf16-4373-ab9a-3adfe730ff2d","requestScope":"service","requestType":"createInstance","requestDetails":{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"MSOTADevInfra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}},"instanceReferences":{},"requestStatus":{"requestState":"FAILED","statusMessage":"Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.","percentProgress":100}}},{"request":{"requestId":"001619d2-a297-4a4b-a9f5-e2823c88458f","requestScope":"vfModule","requestType":"createInstance","instanceReferences":{},"requestStatus":{"requestState":"COMPLETE","statusMessage":"COMPLETED","percentProgress":100}}},{"request":{"requestId":"00164b9e-784d-48a8-8973-bbad6ef818ed","requestScope":"service","requestType":"createInstance","requestDetails":{"modelInfo":{"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelName":"MSO Test Network","modelVersion":"1.0","modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e"},"requestInfo":{"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}},"instanceReferences":{"serviceInstanceId":"b2f59173-b7e5-4e0f-8440-232fd601b865"},"requestStatus":{"requestState":"COMPLETE","statusMessage":"Service Instance was created successfully.","percentProgress":100}}},{"request":{"requestId":"00173cc9-5ce2-4673-a810-f87fefb2829e","requestScope":"service","requestType":"createInstance","requestDetails":{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}},"instanceReferences":{},"requestStatus":{"requestState":"FAILED","statusMessage":"Error parsing request. No valid instanceName is specified","percentProgress":100}}},{"request":{"requestId":"0017f68c-eb2d-45bb-b7c7-ec31b37dc349","requestScope":"configuration","requestType":"activateInstance","requestDetails":{"modelInfo":{"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelName":"MSOTADevInfra_Configuration_Service","modelVersion":"1.0","modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a"}}}],"cloudConfiguration":{"lcpCloudRegionId":"n6"},"requestParameters":{"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}},"instanceReferences":{"serviceInstanceId":"9e15a443-af65-4f05-9000-47ae495e937d"},"requestStatus":{"requestState":"UNLOCKED","percentProgress":20}}},{"request": {"requestId":"0017f68c-eb2d-45bb-b7c7-ec31b37dc350","requestScope":"service","requestType":"createInstance","requestStatus": {"requestState": "IN_PROGRESS", "statusMessage": "Error parsing request.\n\tNo valid instanceName is specified"}}}]} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/Request.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/Request.json
new file mode 100644
index 0000000000..29f6ee34e3
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequest/Request.json
@@ -0,0 +1,8 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequestHandler/SampleGetResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequestHandler/SampleGetResponse.json
new file mode 100644
index 0000000000..25b4ed81af
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/OrchestrationRequestHandler/SampleGetResponse.json
@@ -0,0 +1,22 @@
+{
+ "requestList": [
+ {
+ "request": {
+ "finishTime": "2017-12-22 19:21:25.0",
+ "instanceReferences": {
+ "serviceInstanceId": "24b7a73a-ae87-453b-8639-1495feabeac1"
+ },
+ "requestId": "000e480b-c55a-4116-a10b-51c312f46184",
+ "requestScope": "service",
+ "requestStatus": {
+ "percentProgress": 100,
+ "requestState": "FAILED",
+ "statusMessage": "Internal Error - Occured in CreateService createBandwidthConfigurationAAI",
+ "timeStamp": "2018-01-11 11:06:32.478"
+ },
+ "requestType": "Create",
+ "startTime": "2017-12-22 19:21:18.0"
+ }
+ }
+ ]
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Payload.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Payload.json
deleted file mode 100644
index 1d96d8250c..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Payload.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness2.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness2.json
deleted file mode 100644
index 84ce00ce23..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusiness2.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid.json
deleted file mode 100644
index 85d13d032e..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid2.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid2.json
deleted file mode 100644
index 84ce00ce23..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/PlatformAndLineOfBusinessInvalid2.json
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid.json
deleted file mode 100644
index 81ec46a7e5..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid2.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid2.json
deleted file mode 100644
index 4f2fb9877e..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ProjectAndOwningEntityInvalid2.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "owningEntity": {
- "owningEntityId": "oeId",
- "owningEntityName": "oeName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstanceId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstanceId.json
deleted file mode 100644
index 2be90cc906..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesServiceInstanceId.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesSetInstances.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesSetInstances.json
deleted file mode 100644
index 4513bf11b3..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesSetInstances.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "volumeGroup",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteNull.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteNull.json
deleted file mode 100644
index 178016db5b..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RequestParametersALaCarteNull.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AddRelationships.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AddRelationships.json
new file mode 100644
index 0000000000..63f0a805e7
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AddRelationships.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService33",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ApplyUpdatedConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ApplyUpdatedConfig.json
new file mode 100644
index 0000000000..25645ec9c8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ApplyUpdatedConfig.json
@@ -0,0 +1,12 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testApplyUpdatedConfig"
+ },
+ "requestParameters": {
+ "payload": "{\"request-parameters\":{\"host-ip-address\":\"10.10.10.10\"},\"configuration-parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/PlatformAndLineOfBusiness.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ConvertRequestFail.json
index 75f38914ce..3017e08d30 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/PlatformAndLineOfBusiness.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ConvertRequestFail.json
@@ -1,46 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationName": "test",
+ "test": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "test",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002672",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "f78914d9-423b-11e7-93f8-0050569a7967"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json
index 1e2ae2067f..58db9d4f76 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/InPlaceSoftwareUpdate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeactivateAndCloudDeleteVfModule.json
@@ -1,15 +1,18 @@
-{
- "requestDetails": {
- "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\"}"
- }
- }
-} \ No newline at end of file
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "az2016"
+ }
+ }
+}
+
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json
new file mode 100644
index 0000000000..d612dd9704
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVfModule.json
@@ -0,0 +1,32 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService40"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"vfModule",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnf.json
new file mode 100644
index 0000000000..9c34cc4666
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnf.json
@@ -0,0 +1,62 @@
+{
+ "vnfInstanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelVersionId": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-9",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnfV5.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnfV5.json
new file mode 100644
index 0000000000..1f5b7cb73b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVnfV5.json
@@ -0,0 +1,22 @@
+{
+ "requestDetails": {
+ "modelInfo":{
+ "modelType": "vnf",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelName": "vSAMP10a",
+ "modelVersion": "1.0",
+ "modelCustomizationName": "vSAMP10a 1"
+ },
+ "cloudConfiguration":{
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "0422ffb57ba042c0800a29dc85ca70f8"
+ },
+ "requestInfo":{
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters":{
+ "userParams": [] }
+
+ }
+ } \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVolumeGroup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVolumeGroup.json
new file mode 100644
index 0000000000..17e03ab97f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/DeleteVolumeGroup.json
@@ -0,0 +1,60 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService81"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"volumeGroup",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "b4ea86b4-253f-11e7-93ae-92361f002671"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate.json
new file mode 100644
index 0000000000..6d5275ecc8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate.json
@@ -0,0 +1,16 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "inPlaceSoftwareUpdateTest"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestParameters": {
+ "payload": "{\"request-parameters\":{\"host-ip-address\":\"10.10.10.10\"},\"configuration-parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate2.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate2.json
new file mode 100644
index 0000000000..46fe53c597
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/InPlaceSoftwareUpdate2.json
@@ -0,0 +1,16 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "bs7527",
+ "instanceName": "duplicateCheck123"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestParameters": {
+ "payload": "{\"request-parameters\":{\"host-ip-address\":\"10.10.10.10\"},\"configuration-parameters\":{\"name1\":\"value1\",\"name2\":\"value2\"}}"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/LegacyMacroServiceInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/LegacyMacroServiceInstance.json
new file mode 100644
index 0000000000..4028c80303
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/LegacyMacroServiceInstance.json
@@ -0,0 +1,74 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "282bdcd2-34ed-4665-9ab2-63455814531d",
+ "modelType": "service",
+ "modelName": "MOW_ADIG_test_BV_IST",
+ "modelVersion": "1.0",
+ "modelVersionId": "109a153e-325f-4df5-8161-edd91314daee",
+ "modelUuid": "109a153e-325f-4df5-8161-edd91314daee",
+ "modelInvariantUuid": "282bdcd2-34ed-4665-9ab2-63455814531d"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt25b",
+ "tenantId": "aefb697db6524ddebfe4915591b0a347"
+ },
+ "requestInfo": {
+ "productFamilyId": "testaaS",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "ss616y"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "test",
+ "userParams": [{
+ "name": "mow_adig_test_ist0_vnf_instance_name",
+ "value": "wswdc403me6"
+ },{
+ "name": "mow_adig_test_bv_ist0_bandwidth",
+ "value": "Gbps"
+ }, {
+ "name": "mow_adig_test_bv_ist0_vnf_config_template_version",
+ "value": "17.2"
+ }, {
+ "name": "mow_adig_test_ist0_vnf_config_template_version",
+ "value": "17.2"
+ }, {
+ "name": "mow_adig_test_bv_ist0_ASN",
+ "value": "2685"
+ }, {
+ "name": "mow_adig_test_bv_ist0_bandwidth_units",
+ "value": "Gbps"
+ }, {
+ "name": "mow_adig_test_bv_ist0_availability_zone_0",
+ "value": "mdt25b-kvm-az01"
+ }, {
+ "name": "mow_adig_test_bv_ist0_vnf_config_template",
+ "value": "17.2"
+ }, {
+ "name": "mow_adig_test_ist0_bandwidth_units",
+ "value": "Gbps"
+ }, {
+ "name": "mow_adig_test_bv_ist0_vnf_instance_name",
+ "value": "wswdc403me6"
+ }, {
+ "name": "mow_adig_test_bv_ist0_vnf_instance",
+ "value": "wswdc403me6"
+ }, {
+ "name": "mow_adig_test_bv_ist0_AIC_CLLI",
+ "value": "MTSNJA4LCP1"
+ }],
+ "aLaCarte": false
+ },
+ "project": {
+ "projectName": "GigaPower"
+ },
+ "owningEntity": {
+ "owningEntityId": "2811e2fb-005e-40de-990b-c0794f362399",
+ "owningEntityName": "PACKET-CORE"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/MacroServiceInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/MacroServiceInstance.json
new file mode 100644
index 0000000000..cd1db84831
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/MacroServiceInstance.json
@@ -0,0 +1,129 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "282bdcd2-34ed-4665-9ab2-63455814531d",
+ "modelType": "service",
+ "modelName": "MOW_ADIG_test_BV_IST",
+ "modelVersion": "1.0",
+ "modelVersionId": "109a153e-325f-4df5-8161-edd91314daee",
+ "modelUuid": "109a153e-325f-4df5-8161-edd91314daee",
+ "modelInvariantUuid": "282bdcd2-34ed-4665-9ab2-63455814531d"
+ },
+ "requestInfo": {
+ "productFamilyId": "testaaS",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "ss616y"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "test",
+ "userParams": [
+ {
+ "service": {
+ "modelInfo": {
+ "modelVersionId": "109a153e-325f-4df5-8161-edd91314daee",
+ "modelName": "MOW_ADIG_test_BV_IST",
+ "modelType": "service"
+ },
+ "instanceParams": [
+ {
+ "mow_adig_test_bv_ist0_bandwidth": "10",
+ "mow_adig_test_bv_ist0_ASN": "2685",
+ "mow_adig_test_bv_ist0_availability_zone_0": "mdt25b-kvm-az01",
+ "mow_adig_test_bv_ist0_AIC_CLLI": "MTSNJA4LCP1",
+ "mow_adig_test_bv_ist0_vnf_config_template_version": "17.2",
+ "mow_adig_test_bv_ist0_vnf_instance_name": "wswdc403me6",
+ "mow_adig_test_bv_ist0_bandwidth_units": "Gbps"
+ }
+ ],
+ "resources": {
+ "vnfs": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "MOW_ADIG_test_BV_IST 0",
+ "modelCustomizationId": "31d41ef2-0a3e-43bf-a4f0-0b1f31b1cbac",
+ "modelInvariantId": "33fb95d0-5f18-4dfb-8e7d-0c8ac8d743c5",
+ "modelVersionId": "bdf50902-4b07-4dcf-a2e2-ec6cfe568798",
+ "modelName": "MOW_ADIG_test_BV_IST",
+ "modelType": "service",
+ "modelVersion": "2.0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt25b",
+ "tenantId": "aefb697db6524ddebfe4915591b0a347"
+ },
+ "platform": {
+ "platformName": "AIC"
+ },
+ "lineOfBusiness": {},
+ "productFamilyId": "testaaS",
+ "instanceParams": [
+ {
+ "mow_adig_test_bv_ist0_vnf_config_template": "17.2",
+ "mow_adig_test_bv_ist0_vnf_instance": "wswdc403me6",
+ "mow_adig_test_bv_ist0_bandwidth": "Gbps"
+ }
+ ],
+ "vfModules": [
+ {
+ "modelInfo": {
+ "modelCustomizationName": "MowAdigtestBvIst..ADIG_vRE_BV_v2..module-1",
+ "modelCustomizationId": "34c57c2d-cf19-4926-9296-acde6a967f70",
+ "modelInvariantId": "f3093158-a609-41d5-a2fb-07dbc0ca8096",
+ "modelVersionId": "2507f79d-6e1b-413b-b2a8-c434113ff862",
+ "modelName": "MowAdigtestBvIst..ADIG_vRE_BV_v2..module-1",
+ "modelType": "service",
+ "modelVersion": "1"
+ },
+ "instanceParams": [
+ {
+ "mow_adig_test_ist0_vnf_config_template_version": "17.2",
+ "mow_adig_test_ist0_vnf_instance_name": "wswdc403me6",
+ "mow_adig_test_ist0_bandwidth_units": "Gbps"
+ }
+ ]
+ },
+ {
+ "modelInfo": {
+ "modelCustomizationName": "MowAdigtestBvIst..ADIG_base_test_BV_v2..module-0",
+ "modelCustomizationId": "f4a414c4-b71a-43ed-82be-51478d7e154f",
+ "modelInvariantId": "af867fdc-3808-4b62-ae76-bdb1b9ae7ee8",
+ "modelVersionId": "3fcf6cb6-2ef2-4154-99a6-06ce889c79f1",
+ "modelName": "MowAdigtestBvIst..ADIG_base_test_BV_v2..module-0",
+ "modelType": "service",
+ "modelVersion": "1"
+ },
+ "instanceParams": []
+ },
+ {
+ "modelInfo": {
+ "modelCustomizationName": "MowAdigtestBvIst..ADIG_vPFE_BV_v2..module-2",
+ "modelCustomizationId": "583c2280-23d9-4338-a607-69c238d4899d",
+ "modelInvariantId": "90c2be4f-cb6f-4e75-9c65-04fdc5c30cef",
+ "modelVersionId": "7c8a69e0-6612-4b7b-8e9c-fb8b9f31cb4f",
+ "modelName": "MowAdigtestBvIst..ADIG_vPFE_BV_v2..module-2",
+ "modelType": "service",
+ "modelVersion": "1"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "aLaCarte": false
+ },
+ "project": {
+ "projectName": "GigaPower"
+ },
+ "owningEntity": {
+ "owningEntityId": "2811e2fb-005e-40de-990b-c0794f362399",
+ "owningEntityName": "PACKET-CORE"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkModelName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreate.json
index dec16a46a8..1185651862 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/NetworkModelName.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreate.json
@@ -1,43 +1,45 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "",
- "modelType": "network",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "subscriptionServiceType": "MSO-dev-service-type",
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- },
- "project": {
- "projectName": "projectName"
- },
- "owningEntity": {
- "owningEntityId": "randomStrings",
- "owningEntityName": "randomStrings"
- }
- }
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "test1"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateAlternateInstanceName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateAlternateInstanceName.json
new file mode 100644
index 0000000000..c82724a520
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateAlternateInstanceName.json
@@ -0,0 +1,45 @@
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "test2"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiGrApi.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiGrApi.json
new file mode 100644
index 0000000000..63df0c3072
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiGrApi.json
@@ -0,0 +1,46 @@
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "test3"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "testApi": "GR_API",
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiIncorrect.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiIncorrect.json
new file mode 100644
index 0000000000..6a454d8f4f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiIncorrect.json
@@ -0,0 +1,46 @@
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "test4"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "testApi": "invalidTestApi",
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiVnfApi.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiVnfApi.json
new file mode 100644
index 0000000000..b12ace880a
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkCreateTestApiVnfApi.json
@@ -0,0 +1,46 @@
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "test5"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "testApi": "VNF_API",
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json
new file mode 100644
index 0000000000..993310d48f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstance.json
@@ -0,0 +1,45 @@
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "tested"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json
new file mode 100644
index 0000000000..cfd19ff0ca
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NetworkInstanceNoReqParams.json
@@ -0,0 +1,15 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "network"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "0422ffb57ba042c0800a29dc85ca70f8"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NoVnfResource.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NoVnfResource.json
new file mode 100644
index 0000000000..824ce21bba
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/NoVnfResource.json
@@ -0,0 +1,49 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationName": "test",
+ "modelCustomizationId": "ff5256d2-5a33-55df-13ab-12abad84e7ee"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-21",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002672",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "f78914d9-423b-11e7-93f8-0050569a7967"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/RemoveRelationships.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/RemoveRelationships.json
new file mode 100644
index 0000000000..30e4f95622
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/RemoveRelationships.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService34",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json
new file mode 100644
index 0000000000..967250a0da
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModule.json
@@ -0,0 +1,32 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService60"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"vfModule",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnf.json
new file mode 100644
index 0000000000..013b9f5722
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnf.json
@@ -0,0 +1,62 @@
+{
+ "vnfInstanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelVersionId": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-10",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfRecreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfRecreate.json
new file mode 100644
index 0000000000..688f99cc8e
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfRecreate.json
@@ -0,0 +1,62 @@
+{
+ "vnfInstanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7f0",
+ "modelName": "vSAMP12..base..module-23",
+ "modelVersion": "1",
+ "modelVersionId": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002674"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-13",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "bp896r",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceAssign.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceAssign.json
new file mode 100644
index 0000000000..7625bf7589
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceAssign.json
@@ -0,0 +1,134 @@
+{
+ "requestDetails":{
+ "modelInfo":{
+ "modelType":"service",
+ "modelInvariantId":"5d48acb5-097d-4982-aeb2-f4a3bd87d31b",
+ "modelVersionId":"3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelName":"MOW vMX BV 1 Service",
+ "modelVersion":"10.0"
+ },
+ "cloudConfiguration":{
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"88a6ca3ee0394ade9403f075db23167e"
+ },
+ "owningEntity":{
+ "owningEntityId":"038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName":"PACKET CORE"
+ },
+ "project":{
+ "projectName":"{some project name}"
+ },
+ "subscriberInfo":{
+ "globalSubscriberId":"{some subscriber id}"
+ },
+ "requestInfo":{
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "source":"VID",
+ "suppressRollback":true,
+ "requestorId":"xxxxxx"
+ },
+ "requestParameters":{
+ "subscriptionServiceType":"VMX",
+ "aLaCarte":false,
+ "userParams":[
+ {
+ "service":{
+ "modelInfo":{
+ "modelType":"service",
+ "modelName":"MOW",
+ "modelVersionId":"3c40d244-808e-42ca-b09a-256d83d19d0a",
+ "modelCustomizationId": "3c40d244-808e-42ca-b09a-256d83d19d0a"
+ },
+ "instanceParams":[
+
+ ],
+ "resources":{
+ "vnfs":[
+ {
+ "modelInfo":{
+ "modelType":"vnf",
+ "modelName":"2016-73_MOW",
+ "modelVersionId":"7f40c192-f63c-463e-ba94-286933b895f8",
+ "modelCustomizationName":"2016-73_MOW",
+ "modelCustomizationId":"ab153b6e-c364-44c0-bef6-1f2982117f04"
+ },
+ "cloudConfiguration":{
+ "lcpCloudRegionId":"mdt1",
+ "tenantId":"88a6ca3ee0394ade9403f075db23167e"
+ },
+ "platform":{
+ "platformName":"test"
+ },
+ "lineOfBusiness":{
+ "lineOfBusinessName":"someValue"
+ },
+ "productFamilyId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "instanceParams":[
+
+ ],
+ "vfModules":[
+ {
+ "modelInfo":{
+ "modelType":"vfModule",
+ "modelName":"201673MowtestBvL",
+ "modelVersionId":"4c75f813-fa91-45a4-89d0-790ff5f1ae79",
+ "modelCustomizationId":"a25e8e8c-58b8-4eec-810c-97dcc1f5cb7f"
+ },
+ "instanceParams":[
+ {
+ "vmx_int_net_len":"24"
+ }
+ ]
+ },
+ {
+ "modelInfo":{
+ "modelType":"vfModule",
+ "modelName":"201673Mowtest",
+ "modelVersionId":"56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+ "modelCustomizationId":"72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams":[
+ {
+ "availability_zone_0":"mtpocdv-kvm-az01",
+ "vre_a_volume_size_0":"100"
+ }
+ ]
+ },
+ {
+ "modelInfo":{
+ "modelType":"vfModule",
+ "modelName":"201673Mowtest",
+ "modelVersionId":"56e2b103-637c-4d1a-adc8-3a7f4a6c3240",
+ "modelCustomizationId":"72d9d1cd-f46d-447a-abdb-451d6fb05fa8"
+ },
+ "instanceParams":[
+ {
+ "availability_zone_0":"mtpocdv-kvm-az01",
+ "vre_a_volume_size_0":"50"
+ }
+ ]
+ },
+ {
+ "modelInfo":{
+ "modelType":"vfModule",
+ "modelName":"201673Mowtest",
+ "modelVersionId":"f555558f-d538-4876-8ffa-b102650fad64",
+ "modelCustomizationId":"da4d4327-fb7d-4311-ac7a-be7ba60cf969"
+ },
+ "instanceParams":[
+ {
+ "availability_zone_0":"mtpocdv-kvm-az01",
+ "vmx_vpfe_int_ip_0":"192.168.0.16"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstance.json
new file mode 100644
index 0000000000..ce1a4e3309
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstance.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrue.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrue.json
new file mode 100644
index 0000000000..69bffdbf5f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrue.json
@@ -0,0 +1,31 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService7"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7967",
+ "modelVersion":"1",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrueNoRecipe.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrueNoRecipe.json
new file mode 100644
index 0000000000..d42f260c77
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceALaCarteTrueNoRecipe.json
@@ -0,0 +1,32 @@
+{
+ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService7"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "testApi": "VNF_API",
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"100",
+ "modelVersionId":"100",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json
new file mode 100644
index 0000000000..d675c79f06
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivate.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService2",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1.0",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivatePort.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivatePort.json
new file mode 100644
index 0000000000..d0493b9961
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceActivatePort.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService31",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceBadGateway.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceBadGateway.json
new file mode 100644
index 0000000000..427dde39b9
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceBadGateway.json
@@ -0,0 +1,31 @@
+{ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "test",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService63"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"1",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivate.json
new file mode 100644
index 0000000000..65a950f95b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivate.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService3",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1.0",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivatePort.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivatePort.json
new file mode 100644
index 0000000000..3029ec5403
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDeactivatePort.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService32",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDefault.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDefault.json
new file mode 100644
index 0000000000..848313d94b
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDefault.json
@@ -0,0 +1,32 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService9"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"1",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel",
+ "modelInstanceName":"modelInstanceName",
+ "modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDelete.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDelete.json
new file mode 100644
index 0000000000..5468befe45
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDelete.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService4",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1.0",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDisablePort.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDisablePort.json
new file mode 100644
index 0000000000..b4c9ea070f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDisablePort.json
@@ -0,0 +1,70 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService30",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"configuration",
+ "modelName":"serviceModel"
+ },
+ "cloudConfiguration": {
+ "tenantId": "d88c0bd297524867b8b0a597b95b7b2a",
+ "lcpCloudRegionId": "au7tx"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelInfo": {
+ "modelType": "connectionPoint"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDuplicates.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDuplicates.json
new file mode 100644
index 0000000000..5331e05aea
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceDuplicates.json
@@ -0,0 +1,31 @@
+{ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "test",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService10"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7967",
+ "modelVersion":"1",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEmpty.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEmpty.json
new file mode 100644
index 0000000000..516d509b42
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEmpty.json
@@ -0,0 +1,31 @@
+{ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "test",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService3"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"1",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEnablePort.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEnablePort.json
new file mode 100644
index 0000000000..a0d16bd569
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceEnablePort.json
@@ -0,0 +1,66 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService6",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceMacro.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceMacro.json
new file mode 100644
index 0000000000..a57ca506ec
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceMacro.json
@@ -0,0 +1,34 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelInvariantId": "2077f51f-320f-47d2-8a80-f80da39228ec",
+ "modelType": "service",
+ "modelName": "OAM Net IST 1806",
+ "modelVersion": "2.0",
+ "modelVersionId": "15a772d0-077a-4758-ac50-9e7e00d811ab",
+ "modelUuid": "15a772d0-077a-4758-ac50-9e7e00d811ab",
+ "modelInvariantUuid": "2077f51f-320f-47d2-8a80-f80da39228ec"
+ },
+ "requestInfo": {
+ "productFamilyId": "vHNPaas",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "pa2396"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "21014aa2-526b-11e6-beb8-9e71128cae77"
+ },
+ "cloudConfiguration": {
+ "tenantId": "d88c0bd297524867b8b0a597b95b7b2a",
+ "lcpCloudRegionId": "au7tx"
+ },
+ "requestParameters": {
+ "subscriptionServiceType": "test",
+ "aLaCarte": false
+ },
+ "owningEntity": {
+ "owningEntityId": "2811e2fb-005e-40de-990b-c0794f362399",
+ "owningEntityName": "PACKET-CORE"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceNoRecipe.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceNoRecipe.json
new file mode 100644
index 0000000000..a97bfaac03
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceNoRecipe.json
@@ -0,0 +1,31 @@
+{
+ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService8"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "testApi": "VNF_API",
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceParseFail.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceParseFail.json
new file mode 100644
index 0000000000..775c18a7a6
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceParseFail.json
@@ -0,0 +1,65 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService21"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePortConfiguration.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePortConfiguration.json
new file mode 100644
index 0000000000..ab89f7a4de
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePortConfiguration.json
@@ -0,0 +1,65 @@
+{ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "f7ce78bb-423b-11e7-93f8-0050569a7970",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService5",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion": "1",
+ "modelVersionId":"1",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "cisco",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "APCON",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceName": "G10",
+ "modelInfo": {
+ "modelType": "pnf"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev7.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev7.json
new file mode 100644
index 0000000000..04263e80a5
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev7.json
@@ -0,0 +1,32 @@
+{
+ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7990",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testServicePrev7",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"1.0",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel",
+ "modelInstanceName":"modelInstanceName",
+ "modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev8.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev8.json
new file mode 100644
index 0000000000..f339e1b13c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstancePrev8.json
@@ -0,0 +1,32 @@
+{
+ "serviceInstanceId":"f7ce78bb-423b-11e7-93f8-0050569a7999",
+ "vnfInstanceId":"188293",
+ "networkInstanceId":"188297",
+ "volumeGroupInstanceId":"188935",
+ "vfModuleInstanceId":"182934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService1234",
+ "productFamilyId": "test"
+ },
+ "requestParameters": {
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"1.0",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel",
+ "modelInstanceName":"modelInstanceName",
+ "modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceStatusError.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceStatusError.json
new file mode 100644
index 0000000000..de3e38ca8d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceStatusError.json
@@ -0,0 +1,31 @@
+{ "serviceInstanceId":"1882940",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "configurationId": "test",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService1"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7965",
+ "modelVersion":"1",
+ "modelVersionId":"10",
+ "modelType":"service",
+ "modelName":"serviceModel"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceRequestExpected.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceRequestExpected.json
new file mode 100644
index 0000000000..45775cd805
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceRequestExpected.json
@@ -0,0 +1,72 @@
+{
+ "variables": {
+ "bpmnRequest": {
+ "value": "{\"requestDetails\":{\"modelInfo\":{\"modelInvariantId\":\"f7ce78bb-423b-11e7-93f8-0050569a7965\",\"modelType\":\"service\",\"modelName\":\"serviceModel\",\"modelVersion\":\"1\",\"modelVersionId\":\"10\",\"modelUuid\":\"10\",\"modelInvariantUuid\":\"f7ce78bb-423b-11e7-93f8-0050569a7965\"},\"requestInfo\":{\"source\":\"VID\",\"instanceName\":\"testService9\",\"suppressRollback\":false,\"requestorId\":\"xxxxxx\"},\"subscriberInfo\":{\"globalSubscriberId\":\"MSO_1610_dev\",\"subscriberName\":\"MSO_1610_dev\"},\"requestParameters\":{\"alaCarte\":true,\"subscriptionServiceType\":\"test\",\"aLaCarte\":true,\"autoBuildVfModules\":false}},\"serviceInstanceId\":\"1882939\",\"vnfInstanceId\":\"1882938\",\"networkInstanceId\":\"1882937\",\"volumeGroupInstanceId\":\"1882935\",\"vfModuleInstanceId\":\"1882934\"}",
+ "type": "String"
+ },
+ "requestId": {
+ "value": "c2d5adfc-a4ce-4764-b25a-ce7988c0d5e7",
+ "type": "String"
+ },
+ "mso-request-id": {
+ "value": "c2d5adfc-a4ce-4764-b25a-ce7988c0d5e7",
+ "type": "String"
+ },
+ "isBaseVfModule": {
+ "value": false,
+ "type": "Boolean"
+ },
+ "recipeTimeout": {
+ "value": 180,
+ "type": "Integer"
+ },
+ "requestAction": {
+ "value": "createInstance",
+ "type": "String"
+ },
+ "serviceInstanceId": {
+ "value": "1882939",
+ "type": "String"
+ },
+ "vnfId": {
+ "value": "1882938",
+ "type": "String"
+ },
+ "vfModuleId": {
+ "value": "1882934",
+ "type": "String"
+ },
+ "volumeGroupId": {
+ "value": "1882935",
+ "type": "String"
+ },
+ "networkId": {
+ "value": "1882937",
+ "type": "String"
+ },
+ "configurationId": {
+ "value": "",
+ "type": "String"
+ },
+ "serviceType": {
+ "value": "",
+ "type": "String"
+ },
+ "vnfType": {
+ "value": "",
+ "type": "String"
+ },
+ "vfModuleType": {
+ "value": "",
+ "type": "String"
+ },
+ "networkType": {
+ "value": "",
+ "type": "String"
+ },
+ "host": {
+ "value": "localhost",
+ "type": "String"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceUnassign.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceUnassign.json
new file mode 100644
index 0000000000..a06524d996
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceUnassign.json
@@ -0,0 +1,21 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService200"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "userParams": [
+ ]
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateNetwork.json
new file mode 100644
index 0000000000..ba4763639d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateNetwork.json
@@ -0,0 +1,45 @@
+{
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "modelInfo": {
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelName": "TestNetworkType",
+ "modelType": "network",
+ "modelVersion": "2.0",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelCustomizationId": "3bdbb104-476c-483e-9f8b-c095b3d308ac"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false,
+ "instanceName": "tested2"
+ },
+ "requestParameters": {
+ "aLaCarte" : true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "MSO-dev-service-type",
+ "userParams": [
+ {
+ "name": "aic_zone",
+ "value": "mtn6"
+ }
+ ]
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "owningEntity": {
+ "owningEntityId": "oeId",
+ "owningEntityName": "oeName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json
new file mode 100644
index 0000000000..c3039a59f0
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVfModule.json
@@ -0,0 +1,60 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService70"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"vfModule",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "b4ea86b4-253f-11e7-93ae-92361f002671"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ]
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json
new file mode 100644
index 0000000000..ec2916f0da
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVnf.json
@@ -0,0 +1,62 @@
+{
+ "vnfInstanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelVersionId": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-8",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVolumeGroup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVolumeGroup.json
new file mode 100644
index 0000000000..4c2962fc4f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/UpdateVolumeGroup.json
@@ -0,0 +1,60 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService50"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"volumeGroup",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "b4ea86b4-253f-11e7-93ae-92361f002671"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInstance.json
new file mode 100644
index 0000000000..2b8d4df3d4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInstance.json
@@ -0,0 +1,32 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"vfModule",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRelatedInstancesInstanceDirection.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInvalid.json
index 9570528931..ed77f9b9fb 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfRelatedInstancesInstanceDirection.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleInvalid.json
@@ -1,50 +1,61 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "configuration",
- "modelInvariantId": "2a0bc52d-f32b-4849-b6d8-9bb4b0e3220a",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3ff",
- "modelName": "CONTRAIL30_BASIC",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1"
- },
- "requestInfo": {
- "instanceName":"port_mirror_config_12345",
- "source": "VID",
- "requestorId": "az2016"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- }
- }
-}
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService62"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"2",
+ "modelVersionId":"f7ce78bb-423b-11e7-93f8-0050569a7969",
+ "modelType":"vfModule",
+ "modelName":"serviceModel"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ]
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoMatchingModelUUID.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoMatchingModelUUID.json
new file mode 100644
index 0000000000..86854cbd98
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoMatchingModelUUID.json
@@ -0,0 +1,60 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "zz9999",
+ "instanceName": "testvfModule"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"2",
+ "modelType":"vfModule",
+ "modelName":"serviceModel"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "tested",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "tested",
+ "modelName": "vSAMP12",
+ "modelVersion": "2.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ]
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelCustomization.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelCustomization.json
new file mode 100644
index 0000000000..a6b2b0bd2f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelCustomization.json
@@ -0,0 +1,61 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService61"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "8b1df54faa3b49078e3416e21370a3ba"
+ },
+ "requestParameters": {
+ "aLaCarte": false,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"2",
+ "modelVersionId":"066de97e-253e-11e7-93ae-92361f002672",
+ "modelType":"vfModule",
+ "modelName":"serviceModel"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b",
+ "modelCustomizationName": "test"
+ }
+ }
+ }
+ ]
+ }
+}
+
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelType.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelType.json
new file mode 100644
index 0000000000..09fc8f69ff
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleNoModelType.json
@@ -0,0 +1,20 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "zz9999",
+ "instanceName": "testVfModule2"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a79",
+ "modelVersion":"1",
+ "modelName":"serviceModel"
+ }
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleWithRelatedInstances.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleWithRelatedInstances.json
new file mode 100644
index 0000000000..99f23732c8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VfModuleWithRelatedInstances.json
@@ -0,0 +1,54 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "vSAMP10aDEV::base::module-0",
+ "modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671",
+ "modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671",
+ "modelVersion": "2",
+ "modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "0422ffb57ba042c0800a29dc85ca70f8"
+ },
+ "requestInfo": {
+ "instanceName": "MSO-DEV-VF-1806BB-vSAMP10a-base-it2-1",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "7a88cbeb-0ec8-4765-a271-4f9e90c3da7b",
+ "modelInfo": {
+ "modelType": "service",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "cbba721b-4803-4df7-9347-307c9a955426",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelName": "vSAMP10a",
+ "modelVersionId": "d40be095-940e-4738-a72a-59aa9eb5671e",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671",
+ "modelCustomizationName": "vSAMP10a 1"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "usePreload": true,
+ "userParams": []
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfCreateDefault.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfCreateDefault.json
new file mode 100644
index 0000000000..8f8b614139
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfCreateDefault.json
@@ -0,0 +1,47 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelName": "vSAMP10a",
+ "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
+ "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671",
+ "modelCustomizationName": "vSAMP10a 1"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mtn6",
+ "tenantId": "0422ffb57ba042c0800a29dc85ca70f8"
+ },
+ "requestInfo": {
+ "instanceName": "MSO-DEV-VNF-1802-BB-vSAMP10a-3-6-1",
+ "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "xxxxxx"
+ },
+ "platform": {
+ "platformName": "vSAMP10a 1XX1 Replace Platform"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "vSAMP10a-That_Work 1XX1 Replace LLC"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "49585b36-2b5a-443a-8b10-c75d34bb5e46",
+ "modelInfo": {
+ "modelType": "service",
+ "modelName": "MSOTADevInfra_vSAMP10a_Service",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
+ "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "autoBuildVfModules": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleVnfInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithServiceRelatedInstance.json
index a650c7d475..f6d2f4dd5f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleVnfInstance.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithServiceRelatedInstance.json
@@ -1,48 +1,48 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vfModule",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4",
- "modelCustomizationName": "test"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff001",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0",
- "modelCustomizationName": "test"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationName": "test"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002672",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "f78914d9-423b-11e7-93f8-0050569a7967"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesInstanceDirection.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithServiceRelatedInstanceFail.json
index 75f38914ce..bbca6d95ab 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/RelatedInstancesInstanceDirection.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithServiceRelatedInstanceFail.json
@@ -1,46 +1,47 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12..base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "facf4d08-2f6d-4d32-889c-b495c06a5be4"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mdt1",
- "tenantId": "88a6ca3ee0394ade9403f075db23167e"
- },
- "requestInfo": {
- "instanceName": "VNFTEST-7",
- "source": "VID",
- "suppressRollback": true,
- "requestorId": "bp896r",
- "productFamilyId": "FamilyID"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "userParams": []
- },
- "platform": {
- "platformName": "platformName"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "lobName"
- }
- }
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "test",
+ "modelVersionId": "f78914d9-423b-11e7-93f8-0050569a796l",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithVnfRelatedInstance.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithVnfRelatedInstance.json
new file mode 100644
index 0000000000..f8813b0ea7
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VnfWithVnfRelatedInstance.json
@@ -0,0 +1,62 @@
+{
+ "vnfInstanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+ "modelName": "vSAMP12..base..module-0",
+ "modelVersion": "1",
+ "modelVersionId": "1",
+ "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestInfo": {
+ "instanceName": "VNFTEST-7",
+ "source": "VID",
+ "suppressRollback": true,
+ "requestorId": "xxxxxx",
+ "productFamilyId": "FamilyID"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "aLaCarte": true,
+ "userParams": []
+ },
+ "platform": {
+ "platformName": "platformName"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "lobName"
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VolumeGroup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VolumeGroup.json
new file mode 100644
index 0000000000..6ad8d93f0f
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/VolumeGroup.json
@@ -0,0 +1,60 @@
+{
+ "serviceInstanceId":"1882939",
+ "vnfInstanceId":"1882938",
+ "networkInstanceId":"1882937",
+ "volumeGroupInstanceId":"1882935",
+ "vfModuleInstanceId":"1882934",
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService80"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "mdt1",
+ "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"1",
+ "modelVersionId":"test",
+ "modelType":"volumeGroup",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "b4ea86b4-253f-11e7-93ae-92361f002671"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceDirection": "source",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+ "modelName": "vSAMP12",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "b0ed83ec-b7b4-4c70-91c2-63feeaf8609b"
+ }
+ }
+ }
+ ]
+ }
+}
+ \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/userParams.txt b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/userParams.txt
new file mode 100644
index 0000000000..23a4e3e9e1
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/userParams.txt
@@ -0,0 +1,37 @@
+[{
+ name=mow_adig_test_ist0_vnf_instance_name,
+ value=wswdc403me6
+},{
+ name=mow_adig_test_bv_ist0_bandwidth,
+ value=Gbps
+}, {
+ name=mow_adig_test_bv_ist0_vnf_config_template_version,
+ value=17.2
+}, {
+ name=mow_adig_test_ist0_vnf_config_template_version,
+ value=17.2
+}, {
+ name=mow_adig_test_bv_ist0_ASN,
+ value=2685
+}, {
+ name=mow_adig_test_bv_ist0_bandwidth_units,
+ value=Gbps
+}, {
+ name=mow_adig_test_bv_ist0_availability_zone_0,
+ value=mdt25b-kvm-az01
+}, {
+ name=mow_adig_test_bv_ist0_vnf_config_template,
+ value=17.2
+}, {
+ name=mow_adig_test_ist0_bandwidth_units,
+ value=Gbps
+}, {
+ name=mow_adig_test_bv_ist0_vnf_instance_name,
+ value=wswdc403me6
+}, {
+ name=mow_adig_test_bv_ist0_vnf_instance,
+ value=wswdc403me6
+}, {
+ name=mow_adig_test_bv_ist0_AIC_CLLI,
+ value=MTSNJA4LCP1
+}] \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Source.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Source.json
deleted file mode 100644
index 9f7c420bc7..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Source.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "requestDetails": {
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671",
- "modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671",
- "modelName": "vSAMP10a",
- "modelVersion": "1.0",
- "modelCustomizationName": "vSAMP10a 1",
- "modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "requestInfo": {
- "instanceName": "MSO_Dev_1802_VNF_10-9-1",
- "productFamilyId": "06f76284-8710-11e6-ae22-56b6b6499611",
- "suppressRollback": false,
- "requestorId": "md5621"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "c44dd5dc-849b-4691-b3c4-111c33140389",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671",
- "modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671",
- "modelName": "MSOTADevInfra_vSAMP10a_Service",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "autoBuildVfModules": false,
- "payload": "{\"existing-software-version\": \"3.1\",\"new-software-version\": \"3.2\", \"operations-timeout\": \"3600\"}"
- }
- }
-}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ActivateOperationEnvironment.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ActivateOperationEnvironment.json
index 0acd26d77f..051ab02ae7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ActivateOperationEnvironment.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ActivateOperationEnvironment.json
@@ -1,33 +1,33 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "instanceName": "myVnfOpEnv",
- "source": "VID",
- "requestorId": "az2017"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "resourceType": "operationalEnvironment",
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceName": "name"
- }
- }
- ],
- "requestParameters": {
- "operationalEnvironmentType": "VNF",
- "workloadContext": "VNF_E2E-IST",
- "manifest": {
- "serviceModelList": [{
- "serviceModelVersionId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "recoveryAction": "abort"
- },
- {
- "serviceModelVersionId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "recoveryAction": "retry"
- }]
- }
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "instanceName": "myVnfOpEnv",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "resourceType": "operationalEnvironment",
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "name"
+ }
+ }
+ ],
+ "requestParameters": {
+ "operationalEnvironmentType": "VNF",
+ "workloadContext": "VNF_E2E-IST",
+ "manifest": {
+ "serviceModelList": [{
+ "serviceModelVersionId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "recoveryAction": "abort"
+ },
+ {
+ "serviceModelVersionId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "recoveryAction": "retry"
+ }]
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ActivateOperationEnvironmentInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ActivateOperationEnvironmentInvalid.json
index 60d5d9198a..4613727dbc 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ActivateOperationEnvironmentInvalid.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ActivateOperationEnvironmentInvalid.json
@@ -1,23 +1,23 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "instanceName": "myVnfOpEnv",
- "source": "VID",
- "requestorId": "az2017"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "resourceType": "operationalEnvironment",
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceName": "name"
- }
- }
- ],
- "requestParameters": {
- "operationalEnvironmentType": "VNF",
- "workloadContext": "VNF_E2E-IST"
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "instanceName": "myVnfOpEnv",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "resourceType": "operationalEnvironment",
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "name"
+ }
+ }
+ ],
+ "requestParameters": {
+ "operationalEnvironmentType": "VNF",
+ "workloadContext": "VNF_E2E-IST"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/DeactivateOperationEnvironment.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/DeactivateOperationEnvironment.json
index f3c3535423..c605fe53e0 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/DeactivateOperationEnvironment.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/DeactivateOperationEnvironment.json
@@ -1,12 +1,12 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "source": "VID",
- "requestorId": "az2017"
- },
- "requestParameters": {
- "operationalEnvironmentType": "VNF"
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "operationalEnvironmentType": "VNF"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/DeactivateOperationEnvironmentInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/DeactivateOperationEnvironmentInvalid.json
index 998f5654aa..4fb330cb5b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/DeactivateOperationEnvironmentInvalid.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/DeactivateOperationEnvironmentInvalid.json
@@ -1,12 +1,12 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "source": "VID",
- "requestorId": "az2017"
- },
- "requestParameters": {
- "operationalEnvironmentType": "ECOMP"
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "operationalEnvironmentType": "ECOMP"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ECOMPOperationEnvironmentCreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ECOMPOperationEnvironmentCreate.json
index f1589003f4..97fdc669f4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ECOMPOperationEnvironmentCreate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/ECOMPOperationEnvironmentCreate.json
@@ -1,15 +1,15 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "instanceName": "myOpEnv",
- "source": "VID",
- "requestorId": "az2017"
- },
- "requestParameters": {
- "operationalEnvironmentType": "ECOMP",
- "tenantContext": "Test",
- "workloadContext": "ECOMP_E2E-IST"
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "instanceName": "myOpEnv",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "operationalEnvironmentType": "ECOMP",
+ "tenantContext": "Test",
+ "workloadContext": "ECOMP_E2E-IST"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VNFOperationEnvironmentCreate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/VNFOperationEnvironmentCreate.json
index f8585bcef2..b3ccd7d2ff 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VNFOperationEnvironmentCreate.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/VNFOperationEnvironmentCreate.json
@@ -1,24 +1,24 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "instanceName": "myVnfOpEnv",
- "source": "VID",
- "requestorId": "az2017"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "resourceType": "operationalEnvironment",
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "instanceName": "name"
- }
- }
- ],
- "requestParameters": {
- "operationalEnvironmentType": "VNF",
- "tenantContext": "Test",
- "workloadContext": "VNF_E2E-IST"
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "instanceName": "myVnfOpEnv",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "resourceType": "operationalEnvironment",
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "name"
+ }
+ }
+ ],
+ "requestParameters": {
+ "operationalEnvironmentType": "VNF",
+ "tenantContext": "Test",
+ "workloadContext": "VNF_E2E-IST"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VNFOperationEnvironmentCreateInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/VNFOperationEnvironmentCreateInvalid.json
index c61c095329..91ee50630a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VNFOperationEnvironmentCreateInvalid.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/TenantIsolation/VNFOperationEnvironmentCreateInvalid.json
@@ -1,15 +1,15 @@
-{
- "requestDetails": {
- "requestInfo": {
- "resourceType": "operationalEnvironment",
- "instanceName": "myVnfOpEnv",
- "source": "VID",
- "requestorId": "az2017"
- },
- "requestParameters": {
- "operationalEnvironmentType": "VNF",
- "tenantContext": "Test",
- "workloadContext": "VNF_E2E-IST"
- }
- }
+{
+ "requestDetails": {
+ "requestInfo": {
+ "resourceType": "operationalEnvironment",
+ "instanceName": "myVnfOpEnv",
+ "source": "VID",
+ "requestorId": "xxxxxx"
+ },
+ "requestParameters": {
+ "operationalEnvironmentType": "VNF",
+ "tenantContext": "Test",
+ "workloadContext": "VNF_E2E-IST"
+ }
+ }
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmpty.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmpty.json
deleted file mode 100644
index f25a759cd6..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmpty.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnDelete.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnDelete.json
deleted file mode 100644
index f25a759cd6..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnDelete.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnUpdate.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnUpdate.json
deleted file mode 100644
index 0bfa74fa1c..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VfModuleModelNameEmptyOnUpdate.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelType": "service",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdValid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdValid.json
deleted file mode 100644
index 2d11862ad9..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationIdValid.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
- "modelNameVersionId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7",
- "modelCustomizationName": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- },
- {
- "relatedInstance": {
- "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
- "modelName": "vSAMP12",
- "modelVersion": "1.0"
- }
- }
- }
- ],
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationName.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationName.json
deleted file mode 100644
index d7cef6a7a6..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationName.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationName": "",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNotValid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNotValid.json
deleted file mode 100644
index 3503ee845d..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/VnfModelCustomizationNotValid.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelName": "SDNW Service 1710",
- "modelType": "vnf",
- "modelVersion": "2.0",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelCustomizationName": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNErrorResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNErrorResponse.json
new file mode 100644
index 0000000000..e63e233bb9
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNErrorResponse.json
@@ -0,0 +1,7 @@
+{
+ "response":"\n{\"requestReferences\":{\"instanceId\":\"MACRO REQUEST ON action\",\"requestId\": \"111\"}}\n\t\t\t",
+ "message":"Error",
+ "processInstanceID":"8878ccf8-1efc-11e8-b332-0050569a141e",
+ "variables":null,
+ "messageCode":505
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNResponse.json
new file mode 100644
index 0000000000..3285e0fed9
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AVPNBPMNResponse.json
@@ -0,0 +1,7 @@
+{
+ "response":"\n{\"requestReferences\":{\"instanceId\":\"MACRO REQUEST ON action\",\"requestId\": \"111\"}}\n\t\t\t",
+ "message":"Success",
+ "processInstanceID":"8878ccf8-1efc-11e8-b332-0050569a141e",
+ "variables":null,
+ "messageCode":202
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AsyncProcessResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AsyncProcessResponse.json
new file mode 100644
index 0000000000..b548e52c8c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/AsyncProcessResponse.json
@@ -0,0 +1,6 @@
+{
+ "requestReferences": {
+ "instanceId": "1882939",
+ "requestId": "da101014-8747-4034-8535-8fb73e490434"
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/BPMNResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/BPMNResponse.json
new file mode 100644
index 0000000000..67c9005d56
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/BPMNResponse.json
@@ -0,0 +1,7 @@
+{
+ "response":"\n{\n\t\"serviceInstanceRequestReference\": {\n\t\t\"serviceInstanceId\": \"\",\n\t\t\"requestId\": \"\"\n\t}\n}\n\t\t\t",
+ "message":"Success",
+ "processInstanceID":"8878ccf8-1efc-11e8-b332-0050569a141e",
+ "variables":null,
+ "messageCode":202
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/ErrorBPEL.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/ErrorBPEL.json
new file mode 100644
index 0000000000..53d60a3db4
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/ErrorBPEL.json
@@ -0,0 +1 @@
+{ "response": "<xml>xml</xml>","messageCode": 2000,"message": "Request Failed due to BPEL error","processInstanceID":null,"variables":null} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskResponse.json
new file mode 100644
index 0000000000..18fb828a57
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskResponse.json
@@ -0,0 +1,48 @@
+[
+ {
+ "id": "TaskId300",
+ "name": "My Task 300",
+ "assignee": "assignee1",
+ "created": "2018-01-09T01:32:02.750+0000",
+ "due": null,
+ "followUp": null,
+ "delegationState": "PENDING",
+ "description": "This have to be done very urgent",
+ "executionId": null,
+ "owner": "owner1",
+ "parentTaskId": null,
+ "priority": 30,
+ "processDefinitionId": null,
+ "processInstanceId": null,
+ "taskDefinitionKey": null,
+ "caseExecutionId": null,
+ "caseInstanceId": "aCaseInstanceId",
+ "caseDefinitionId": null,
+ "suspended": false,
+ "formKey": null,
+ "tenantId": null
+ },
+ {
+ "id": "b5fa707a-f55a-11e7-a796-005056856d52",
+ "name": "Manual Handling User Task",
+ "assignee": null,
+ "created": "2018-01-09T16:32:40.704+0000",
+ "due": null,
+ "followUp": null,
+ "delegationState": null,
+ "description": null,
+ "executionId": "b5d02c31-f55a-11e7-a796-005056856d52",
+ "owner": null,
+ "parentTaskId": null,
+ "priority": 50,
+ "processDefinitionId": "ManualHandling:62:1694eb4e-f4ac-11e7-bf39-005056856d52",
+ "processInstanceId": "b5d02c31-f55a-11e7-a796-005056856d52",
+ "taskDefinitionKey": "ManualHandlingUserTask",
+ "caseExecutionId": null,
+ "caseInstanceId": null,
+ "caseDefinitionId": null,
+ "suspended": false,
+ "formKey": null,
+ "tenantId": null
+ }
+]
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskVariablesResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskVariablesResponse.json
new file mode 100644
index 0000000000..d5a26d714c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/GetTaskVariablesResponse.json
@@ -0,0 +1,109 @@
+{
+ "subscriptionServiceType": {
+ "type": "String",
+ "value": "PORT-MIRROR",
+ "valueInfo": {}
+ },
+ "currentActivity": {
+ "type": "String",
+ "value": "UpdateConfigurationState",
+ "valueInfo": {}
+ },
+ "validResponses": {
+ "type": "String",
+ "value": "rollback, skip, manual, abort",
+ "valueInfo": {}
+ },
+ "serviceType": {
+ "type": "String",
+ "value": "PORT-MIRROR",
+ "valueInfo": {}
+ },
+ "msoRequestId": {
+ "type": "String",
+ "value": "4f6fe9ac-800c-4540-a93e-10d179fa1b0a",
+ "valueInfo": {}
+ },
+ "vnfType": {
+ "type": "String",
+ "value": "VPROBE",
+ "valueInfo": {}
+ },
+ "originalRequestorId": {
+ "type": "String",
+ "value": "VID",
+ "valueInfo": {}
+ },
+ "errorSource": {
+ "type": "String",
+ "value": "SDNO",
+ "valueInfo": {}
+ },
+ "errorText": {
+ "type": "String",
+ "value": "SDN-O exception: failed with message FAIL - AnsibleOperations exception: Failed : HTTP error code : 400 - Error Msg : no node list provided and no inventory file found",
+ "valueInfo": {}
+ },
+ "taskId": {
+ "type": "String",
+ "value": "b5fa707a-f55a-11e7-a796-005056856d52",
+ "valueInfo": {}
+ },
+ "nfRole": {
+ "type": "String",
+ "value": "VPROBE",
+ "valueInfo": {}
+ },"updateRequestResponse": {
+ "type": "String",
+ "value": "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Body><ns2:updateInfraRequestResponse xmlns:ns2=\"http://org.onap.so/requestsdb\"/></soap:Body></soap:Envelope>",
+ "valueInfo": {}
+ },
+ "failedActivity": {
+ "type": "String",
+ "value": "SDNO",
+ "valueInfo": {}
+ },
+ "originalRequestId": {
+ "type": "String",
+ "value": "4f6fe9ac-800c-4540-a93e-10d179fa1b0a",
+ "valueInfo": {}
+ },"errorMessage": {
+ "type": "String",
+ "value": "SDN-O exception: failed with message FAIL - AnsibleOperations exception: Failed : HTTP error code : 400 - Error Msg : no node list provided and no inventory file found",
+ "valueInfo": {}
+ },"workStep": {
+ "type": "String",
+ "value": "Configurationactivate SDNO Post-Check",
+ "valueInfo": {}
+ },
+ "URN_log_debug_asyncQueryAAICustomer": {
+ "type": "String",
+ "value": "true",
+ "valueInfo": {}
+ },
+ "URN_mso_workflow_default_aai_v11_l3_network_uri": {
+ "type": "String",
+ "value": "/aai/v11/network/l3-networks/l3-network",
+ "valueInfo": {}
+ },"errorCode": {
+ "type": "String",
+ "value": "1002",
+ "valueInfo": {}
+ },"vnfName": {
+ "type": "Null",
+ "value": null,
+ "valueInfo": {}
+ },"buildingBlockName": {
+ "type": "String",
+ "value": "UpdateConfigurationState",
+ "valueInfo": {}
+ },"buildingBlockStep": {
+ "type": "String",
+ "value": "Configurationactivate SDNO Post-Check",
+ "valueInfo": {}
+ },"type": {
+ "type": "String",
+ "value": "fallout",
+ "valueInfo": {}
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/SuccessfulResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/SuccessfulResponse.json
new file mode 100644
index 0000000000..bcbaa86101
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/SuccessfulResponse.json
@@ -0,0 +1,4 @@
+{
+ "response":"success",
+ "message":"success"
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponse.json
new file mode 100644
index 0000000000..8c706b7b5c
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponse.json
@@ -0,0 +1,7 @@
+{
+ "response": "{\"requestReferences\": {\"instanceId\": \"1882939\"}}",
+ "messageCode": "1",
+ "message": "Success",
+ "processInstanceID": "1",
+ "variables": "null"
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid.json
new file mode 100644
index 0000000000..2d9e3ddef8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid.json
@@ -0,0 +1,7 @@
+{
+ "response":"<aetgt:WorkflowException xmlns:aetgt=\"http://org.onap/so/workflow/schema/v1\"><aetgt:ErrorMessage>Exception in create execution list 500 </aetgt:ErrorMessage><aetgt:ErrorCode>7000</aetgt:ErrorCode></aetgt:WorkflowException>",
+ "message":"Fail",
+ "processInstanceID":"4b33ca85-5860-11e8-ae53-0a580ae94342",
+ "variables":null,
+ "messageCode":500
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid2.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid2.json
new file mode 100644
index 0000000000..f821d11549
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/Camunda/TestResponseInvalid2.json
@@ -0,0 +1,7 @@
+{
+ "response": "{\"instanceId\": \"1882939\"}",
+ "messageCode": "1",
+ "message": "test",
+ "processInstanceID": "1",
+ "variables": "null"
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/mockGetAAIOperEnvIdResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/mockGetAAIOperEnvIdResponse.json
index defe3ac670..74a1bc866a 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/mockGetAAIOperEnvIdResponse.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/mockGetAAIOperEnvIdResponse.json
@@ -1,10 +1,10 @@
-{
- "operational-environment-id": "testASDCDistributionId",
- "operational-environment-name": "testASDCDistributionIName",
- "operational-environment-type": "VNF",
- "operational-environment-status": "ACTIVE",
- "tenant-context": "Test",
- "workload-context": "PVT",
- "resource-version": "1505228226913",
- "relationship-list": []
+{
+ "operational-environment-id": "testASDCDistributionId",
+ "operational-environment-name": "testASDCDistributionIName",
+ "operational-environment-type": "VNF",
+ "operational-environment-status": "ACTIVE",
+ "tenant-context": "Test",
+ "workload-context": "PVT",
+ "resource-version": "1505228226913",
+ "relationship-list": []
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/operationalEnvironmentInvalid.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/operationalEnvironmentInvalid.json
index 5fc454b61a..d99b70e65f 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/operationalEnvironmentInvalid.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/aai/operationalEnvironmentInvalid.json
@@ -1,9 +1,9 @@
-{
- "operational-environment-id": "EMOE-001",
- "operational-environment-name": "Test Managing ECOMP Environment",
- "operational-environment-type": "ECOMP",
- "operational-environment-status": "SUCCESS",
- "tenant-context": "Test",
- "workload-context": "PVT",
- "resource-version": "1505228226913"
+{
+ "operational-environment-id": "EMOE-001",
+ "operational-environment-name": "Test Managing ECOMP Environment",
+ "operational-environment-type": "ECOMP",
+ "operational-environment-status": "SUCCESS",
+ "tenant-context": "Test",
+ "workload-context": "PVT",
+ "resource-version": "1505228226913"
} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json
index 8785efe5d7..8902031961 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/createVnfOperationalEnvironmentRequest.json
@@ -5,7 +5,7 @@
"resourceType": "operationalEnvironment",
"instanceName": "myVnfOpEnv",
"source": "VID",
- "requestorId": "az2017"
+ "requestorId": "xxxxxx"
},
"relatedInstanceList": [
{
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/endpoints.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/endpoints.json
index 20947540b4..7e92c21c9e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/endpoints.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/vnfoperenv/endpoints.json
@@ -7,7 +7,7 @@
"minor": 0,
"patch": "0"
},
- "hostAddress": "135.144.120.218",
+ "hostAddress": "192.168.120.218",
"listenPort": "32004",
"latitude": "37.7022",
"longitude": "121.9358",
@@ -54,7 +54,7 @@
"minor": 0,
"patch": "0"
},
- "hostAddress": "135.144.120.22",
+ "hostAddress": "192.168.120.22",
"listenPort": "32004",
"latitude": "1.0",
"longitude": "1.0",
@@ -101,7 +101,7 @@
"minor": 0,
"patch": "0"
},
- "hostAddress": "135.144.120.218",
+ "hostAddress": "192.168.120.218",
"listenPort": "32002",
"latitude": "1.0",
"longitude": "1.0",
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
new file mode 100644
index 0000000000..4f565a8c2d
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/application-test.yaml
@@ -0,0 +1,124 @@
+# will be used as entry in DB to say SITE OFF/ON for healthcheck
+
+server:
+ port: 8080
+ tomcat:
+ max-threads: 50
+ssl-enable: false
+
+apih-healthcheck-urn: /ecomp/mso/healthcheck,/ecomp/mso/homing/healthcheck,/ecomp/mso/infra/healthcheck,/asdc/healthcheck,/dbadapters/healthcheck,/ecomp/mso/catalog/v2/healthcheck
+jra-healthcheck-urn: /networks/rest/healthcheck,/adapters/rest/healthcheck,/vnfs/rest/healthcheck,/tenants/rest/healthcheck,/appc/rest/healthcheck,/workflows/messages/healthcheck
+camunda-healthcheck-urn: /mso/healthcheck
+
+apih-nodehealthcheck-urn: /ecomp/mso/infra/nodehealthcheck
+jra-nodehealthcheck-urn: /adapters/rest/nodehealthcheck
+camunda-nodehealthcheck-urn: /mso/nodehealthcheck
+
+
+
+mso:
+ logPath: logs
+ site-name: mtanj
+ catalog:
+ db:
+ spring:
+ endpoint: "http://localhost:"
+ db:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ config:
+ path: /src/main/resources/
+ infra:
+ default:
+ alacarte:
+ orchestrationUri: /mso/async/services/ALaCarteOrchestrator
+ recipeTimeout: 180
+ testApi: GR_API
+ service:
+ macro:
+ default:
+ testApi: GR_API
+ versions:
+ apiMinorVersion: 0
+ apiPatchVersion: 0
+ camundaURL: http://localhost:${wiremock.server.port}/
+ camundaAuth: F8E9452B55DDE4CCE77547B0E748105C54CF5EF1351B4E2CBAABF2981EFE776D
+ async:
+ core-pool-size: 50
+ max-pool-size: 50
+ queue-capacity: 500
+ sdc:
+ client:
+ auth: F3473596C526938329DF877495B494DC374D1C4198ED3AD305EA3ADCBBDA1862
+ activate:
+ instanceid: test
+ userid: cs0008
+ endpoint: http://localhost:${wiremock.server.port}
+ msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+ tenant:
+ isolation:
+ retry:
+ count: 3
+ aai:
+ endpoint: http://localhost:${wiremock.server.port}
+ auth: 26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764
+ grm:
+ endpoint: http://localhost:${wiremock.server.port}
+ username: gmruser
+ password: test
+ so:
+ operational-environment:
+ dmaap:
+ username: testuser
+ password: VjR5NDcxSzA=
+ host: http://localhost:${wiremock.server.port}
+ publisher:
+ topic: test.operationalEnvironmentEvent
+
+
+spring:
+ datasource:
+ url: jdbc:mariadb://localhost:3307/catalogdb
+ username: root
+ password: password
+ driver-class-name: org.mariadb.jdbc.Driver
+ initialize: true
+ initialization-mode: never
+ jpa:
+ generate-ddl: false
+ show-sql: false
+ hibernate:
+ ddl-auto: none
+ naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+ enable-lazy-load-no-trans: true
+ database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+ jersey:
+ type: filter
+ security:
+ usercredentials:
+ -
+ username: test
+ password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+ role: InfraPortal-Client
+request:
+ datasource:
+ url: jdbc:mariadb://localhost:3307/requestdb
+ username: root
+ password: password
+ driver-class-name: org.mariadb.jdbc.Driver
+ intialize: false
+
+mariaDB4j:
+ dataDir:
+ port: 3307
+ databaseName: catalogdb
+ databaseName2: requestdb
+#Actuator
+management:
+ context-path: /manage
+ endpoints:
+ enabled-by-default: false
+ endpoint:
+ info:
+ enabled: true
+ health:
+ enabled: true \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
new file mode 100644
index 0000000000..54984eeabb
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/data.sql
@@ -0,0 +1,291 @@
+
+--Changes here should also be made in InfraActiveRequestsReset.sql to be re-inserted after tests
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, AIC_CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME) VALUES
+('00032ab7-3fb3-42e5-965d-8ea592502017', '00032ab7-3fb3-42e5-965d-8ea592502016', 'deleteInstance', 'COMPLETE', 'Vf Module has been deleted successfully.', '100', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null),
+('00032ab7-na18-42e5-965d-8ea592502018', '00032ab7-fake-42e5-965d-8ea592502018', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null),
+('00093944-bf16-4373-ab9a-3adfe730ff2d', null, 'createInstance', 'FAILED', 'Error: Locked instance - This service (MSODEV_1707_SI_v10_011-4) already has a request being worked with a status of IN_PROGRESS (RequestId - 278e83b1-4f9f-450e-9e7d-3700a6ed22f4). The existing request must finish or be cleaned up before proceeding.', '100', '2017-07-11 18:33:26', '2017-07-11 18:33:26', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelInvariantId":"9647dfc4-2083-11e7-93ae-92361f002671","modelType":"service","modelName":"Infra_v10_Service","modelVersion":"1.0","modelVersionId":"5df8b6de-2083-11e7-93ae-92361f002671"},"requestInfo":{"source":"VID","instanceName":"MSODEV_1707_SI_v10_011-4","suppressRollback":false,"requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true}}', null, 'APIH', null, null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', null, 'MSODEV_1707_SI_v10_011-4', 'xxxxxx', null, null, null, null),
+('001619d2-a297-4a4b-a9f5-e2823c88458f', '001619d2-a297-4a4b-a9f5-e2823c88458f', 'CREATE_VF_MODULE', 'COMPLETE', 'COMPLETED', '100', '2016-07-01 14:11:42', '2017-05-02 16:03:34', 'PORTAL', null, 'test-vscp', 'elena_test21', null, null, '381b9ff6c75e4625b7a4182f90fc68d3', null, null, null, '{"requestDetails": {"modelInfo":{"modelType":"vfModule","modelName":"test::base::module-0"},"requestInfo":{"source":"VID"},"cloudConfiguration":{"tenantId":"6accefef3cb442ff9e644d589fb04107","lcpCloudRegionId":"n6"}}}', 'NONE', 'RDBTEST', '2016-07-01 14:11:42', 'VNF', null, null, null, 'MODULENAME1', 'moduleModelName', 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb', 'mtn9', null, null, null, null, null, 'vfModule', 'createInstance', null, null, null, null, null, null, null),
+('5ffbabd6-b793-4377-a1ab-082670fbc7ac', '5ffbabd6-b793-4377-a1ab-082670fbc7ac', 'deleteInstance', 'PENDING', 'Vf Module deletion pending.', '0', '2016-12-22 18:59:54', '2016-12-22 19:00:28', 'VID', 'b92f60c8-8de3-46c1-8dc1-e4390ac2b005', null, null, null, null, '6accefef3cb442ff9e644d589fb04107', null, null, null, '{"requestDetails": {"modelInfo": {"modelType": "vfModule","modelName": "test::base::module-0","modelVersionId": "20c4431c-246d-11e7-93ae-92361f002671","modelInvariantId": "78ca26d0-246d-11e7-93ae-92361f002671","modelVersion": "2","modelCustomizationId": "cb82ffd8-252a-11e7-93ae-92361f002671"},"cloudConfiguration": {"lcpCloudRegionId": "n6","tenantId": "0422ffb57ba042c0800a29dc85ca70f8"},"requestInfo": {"instanceName": "MSO-DEV-VF-1806BB-v10-base-it2-1","source": "VID","suppressRollback": false,"requestorId": "xxxxxx"},"relatedInstanceList": [{"relatedInstance": {"instanceId": "76fa8849-4c98-473f-b431-2590b192a653","modelInfo": {"modelType": "service","modelName": "Infra_v10_Service","modelVersionId": "5df8b6de-2083-11e7-93ae-92361f002671","modelInvariantId": "9647dfc4-2083-11e7-93ae-92361f002671","modelVersion": "1.0"}}},{"relatedInstance": {"instanceId": "d57970e1-5075-48a5-ac5e-75f2d6e10f4c","modelInfo": {"modelType": "vnf","modelName": "v10","modelVersionId": "ff2ae348-214a-11e7-93ae-92361f002671","modelInvariantId": "2fff5b20-214b-11e7-93ae-92361f002671","modelVersion": "1.0","modelCustomizationId": "68dc9a92-214c-11e7-93ae-92361f002671","modelCustomizationName": "v10 1"}}}],"requestParameters": {"usePreload": true,"userParams": []}}}', null, 'BPMN', '2016-12-22 19:00:28', null, null, null, 'c7d527b1-7a91-49fd-b97d-1c8c0f4a7992', null, 'test::base::module-0', null, 'n6', null, null, null, null, null, 'vfModule', 'deleteInstance', 'e3b5744d-2ad1-4cdd-8390-c999a38829bc', null, null, null, null, null, null);
+INSERT INTO requestdb.infra_active_requests(REQUEST_ID, CLIENT_REQUEST_ID, ACTION, REQUEST_STATUS, STATUS_MESSAGE, PROGRESS, START_TIME, END_TIME, SOURCE, VNF_ID, VNF_NAME, VNF_TYPE, SERVICE_TYPE, AIC_NODE_CLLI, TENANT_ID, PROV_STATUS, VNF_PARAMS, VNF_OUTPUTS, REQUEST_BODY, RESPONSE_BODY, LAST_MODIFIED_BY, MODIFY_TIME, REQUEST_TYPE, VOLUME_GROUP_ID, VOLUME_GROUP_NAME, VF_MODULE_ID, VF_MODULE_NAME, VF_MODULE_MODEL_NAME, AAI_SERVICE_ID, AIC_CLOUD_REGION, CALLBACK_URL, CORRELATOR, NETWORK_ID, NETWORK_NAME, NETWORK_TYPE, REQUEST_SCOPE, REQUEST_ACTION, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, REQUESTOR_ID, CONFIGURATION_ID, CONFIGURATION_NAME, OPERATIONAL_ENV_ID, OPERATIONAL_ENV_NAME) VALUES
+('00164b9e-784d-48a8-8973-bbad6ef818ed', null, 'createInstance', 'COMPLETE', 'Service Instance was created successfully.', '100', '2017-09-28 12:45:51', '2017-09-28 12:45:53', 'VID', null, null, null, null, null, '19123c2924c648eb8e42a3c1f14b7682', null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"52b49b5d-3086-4ffd-b5e6-1b1e5e7e062f","modelType":"service","modelNameVersionId":null,"modelName":"MSO Test Network","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"aed5a5b7-20d3-44f7-90a3-ddbd16f14d1e","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":"DEV-n6-3100-0927-1","suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":null,"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"},"cloudConfiguration":{"aicNodeClli":null,"tenantId":"19123c2924c648eb8e42a3c1f14b7682","lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":"MSO-dev-service-type","userParams":[{"name":"someUserParam","value":"someValue"}],"aLaCarte":true,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'CreateGenericALaCarteServiceInstance', '2017-09-28 12:45:52', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'service', 'createInstance', 'b2f59173-b7e5-4e0f-8440-232fd601b865', 'DEV-n6-3100-0927-1', 'xxxxxx', null, null, null, null),
+('00173cc9-5ce2-4673-a810-f87fefb2829e', null, 'createInstance', 'FAILED', 'Error parsing request. No valid instanceName is specified', '100', '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID', null, null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null, '{"modelInfo":{"modelInvariantId":"ff6163d4-7214-459e-9f76-507b4eb00f51","modelType":"service","modelName":"ConstraintsSrvcVID","modelVersion":"2.0","modelVersionId":"722d256c-a374-4fba-a14f-a59b76bb7656"},"requestInfo":{"productFamilyId":"LRSI-OSPF","source":"VID","requestorId":"xxxxxx"},"subscriberInfo":{"globalSubscriberId":"a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb"},"cloudConfiguration":{"tenantId":"a259ae7b7c3f493cb3d91f95a7c18149","lcpCloudRegionId":"mtn16"},"requestParameters":{"subscriptionServiceType":"Mobility","userParams":[{"name":"neutronport6_name","value":"8"},{"name":"neutronnet5_network_name","value":"8"},{"name":"contrailv2vlansubinterface3_name","value":"false"}]}}', null, 'APIH', null, null, null, null, null, null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', null, null, null, null, null, null, null),
+('0017f68c-eb2d-45bb-b7c7-ec31b37dc349', null, 'activateInstance', 'UNLOCKED', null, '20', '2017-09-26 16:09:29', null, 'VID', null, null, null, null, null, null, null, null, null, '{"modelInfo":{"modelCustomizationName":null,"modelInvariantId":"1587cf0e-f12f-478d-8530-5c55ac578c39","modelType":"configuration","modelNameVersionId":null,"modelName":null,"modelVersion":null,"modelCustomizationUuid":null,"modelVersionId":"36a3a8ea-49a6-4ac8-b06c-89a545444455","modelCustomizationId":"68dc9a92-214c-11e7-93ae-92361f002671","modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"requestInfo":{"billingAccountNumber":null,"callbackUrl":null,"correlator":null,"orderNumber":null,"productFamilyId":null,"orderVersion":null,"source":"VID","instanceName":null,"suppressRollback":false,"requestorId":"xxxxxx"},"relatedInstanceList":[{"relatedInstance":{"instanceName":null,"instanceId":"9e15a443-af65-4f05-9000-47ae495e937d","modelInfo":{"modelCustomizationName":null,"modelInvariantId":"de19ae10-9a25-11e7-abc4-cec278b6b50a","modelType":"service","modelNameVersionId":null,"modelName":"Infra_Configuration_Service","modelVersion":"1.0","modelCustomizationUuid":null,"modelVersionId":"ee938612-9a25-11e7-abc4-cec278b6b50a","modelCustomizationId":null,"modelUuid":null,"modelInvariantUuid":null,"modelInstanceName":null},"instanceDirection":null}}],"subscriberInfo":null,"cloudConfiguration":{"aicNodeClli":null,"tenantId":null,"lcpCloudRegionId":"n6"},"requestParameters":{"subscriptionServiceType":null,"userParams":[],"aLaCarte":false,"autoBuildVfModules":false,"cascadeDelete":false,"usePreload":true},"project":null,"owningEntity":null,"platform":null,"lineOfBusiness":null}', null, 'APIH', '2017-09-26 16:09:29', null, null, null, null, null, null, null, 'n6', null, null, null, null, null, 'configuration', 'activateInstance', '9e15a443-af65-4f05-9000-47ae495e937d', null, 'xxxxxx', '26ef7f15-57bb-48df-8170-e59edc26234c', null, null, null),('0017f68c-eb2d-45bb-b7c7-ec31b37dc350', null, 'createInstance', 'IN_PROGRESS', 'Error parsing request.
+ No valid instanceName is specified', null, '2017-04-14 21:08:46', '2017-04-14 21:08:46', 'VID',
+ '1882938', null, null, null, null, 'a259ae7b7c3f493cb3d91f95a7c18149', null, null, null,
+ '{"serviceInstanceId":"1882939","vnfInstanceId":"1882938","networkInstanceId":"1882937","volumeGroupInstanceId":"1882935","vfModuleInstanceId":"1882934","requestDetails":{"requestInfo":{"source":"VID","requestorId":"xxxxxx","instanceName":"testService9"},"requestParameters":{"aLaCarte":true,"autoBuildVfModules":false,"subscriptionServiceType":"test"},"modelInfo":{"modelInvariantId":"f7ce78bb-423b-11e7-93f8-0050569a7965","modelVersion":"1","modelVersionId":"10","modelType":"service","modelName":"serviceModel","modelInstanceName":"modelInstanceName","modelCustomizationId":"f7ce78bb-423b-11e7-93f8-0050569a796"},"subscriberInfo":{"globalSubscriberId":"MSO_1610_dev","subscriberName":"MSO_1610_dev"}}}',
+ null, 'APIH', null, null, '1882935', null, '1882934', null, null, null, 'mtn16', null, null, null, null, null, 'service', 'createInstance', '1882939', 'testService10', 'xxxxxx', 'test', null, null, null);
+
+
+INSERT INTO requestdb.site_status(SITE_NAME, STATUS, CREATION_TIMESTAMP) VALUES
+('testSite', 0, '2017-11-30 15:48:09');
+
+
+
+INSERT INTO requestdb.activate_operational_env_service_model_distribution_status(OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID, SERVICE_MOD_VER_FINAL_DISTR_STATUS, RECOVERY_ACTION, RETRY_COUNT_LEFT, WORKLOAD_CONTEXT, CREATE_TIME, MODIFY_TIME) VALUES
+ ('1dfe7154-eae0-44f2-8e7a-8e5e7882e55d', '37305814-4949-45ce-ae24-c378c7ed07d1', '483646fe-36cc-4e90-895a-c472f6da3f74', 'DISTRIBUTION_COMPLETE_OK', 'RETRY', 0, 'VNF_D2D', '2018-02-02 18:44:27', '2018-02-02 18:45:06'),
+ ('1dfe7154-eae0-44f2-8e7a-8e5e7882e55d', '7bfa2197-8cbb-4080-b369-56c4d53c4573', '483646fe-36cc-4e90-895a-c472f6da3f74', 'DISTRIBUTION_COMPLETE_OK', 'SKIP', 0, 'VNF_D2D', '2018-02-02 18:44:27', '2018-02-02 18:44:56');
+
+INSERT INTO requestdb.activate_operational_env_per_distributionid_status(DISTRIBUTION_ID, DISTRIBUTION_ID_STATUS, DISTRIBUTION_ID_ERROR_REASON, CREATE_TIME, MODIFY_TIME, OPERATIONAL_ENV_ID, SERVICE_MODEL_VERSION_ID, REQUEST_ID) VALUES
+ ('TEST_distributionId', 'DISTRIBUTION_COMPLETE_OK', NULL, '2018-02-02 18:44:27', '2018-02-02 18:44:56', '1dfe7154-eae0-44f2-8e7a-8e5e7882e55d', '7bfa2197-8cbb-4080-b369-56c4d53c4573', '483646fe-36cc-4e90-895a-c472f6da3f74'),
+ ('TEST_distributionId_2', 'DISTRIBUTION_COMPLETE_OK', NULL, '2018-02-02 18:44:27', '2018-02-02 18:45:06', '1dfe7154-eae0-44f2-8e7a-8e5e7882e55d', '37305814-4949-45ce-ae24-c378c7ed07d1', '483646fe-36cc-4e90-895a-c472f6da3f74');
+
+
+INSERT INTO requestdb.watchdog_distributionid_status(DISTRIBUTION_ID, DISTRIBUTION_ID_STATUS, CREATE_TIME, MODIFY_TIME) VALUES
+('1533c4bd-a3e3-493f-a16d-28c20614415e', '', '2017-11-30 15:48:09', '2017-11-30 15:48:09'),
+('55429711-809b-4a3b-9ee5-5120d46d9de0', '', '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
+('67f0b2d1-9013-4b2b-9914-bbe2288284fb', '', '2017-11-30 15:54:39', '2017-11-30 15:54:39');
+
+
+
+INSERT INTO requestdb.watchdog_per_component_distribution_status(DISTRIBUTION_ID, COMPONENT_NAME, COMPONENT_DISTRIBUTION_STATUS, CREATE_TIME, MODIFY_TIME) VALUES
+('1533c4bd-a3e3-493f-a16d-28c20614415e', 'MSO', 'COMPONENT_DONE_OK', '2017-11-30 15:48:09', '2017-11-30 15:48:09'),
+('55429711-809b-4a3b-9ee5-5120d46d9de0', 'MSO', 'COMPONENT_DONE_ERROR', '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
+('67f0b2d1-9013-4b2b-9914-bbe2288284fb', 'MSO', 'COMPONENT_DONE_OK', '2017-11-30 15:54:39', '2017-11-30 15:54:39');
+
+
+INSERT INTO requestdb.watchdog_service_mod_ver_id_lookup(DISTRIBUTION_ID, SERVICE_MODEL_VERSION_ID, CREATE_TIME, MODIFY_TIME) VALUES
+('1533c4bd-a3e3-493f-a16d-28c20614415e', '7e813ab5-88d3-4fcb-86c0-498c5d7eef9a', '2017-11-30 15:48:08', '2017-11-30 15:48:08'),
+('55429711-809b-4a3b-9ee5-5120d46d9de0', 'cc031e75-4442-4d1a-b774-8a2b434e0a50', '2017-11-30 16:35:36', '2017-11-30 16:35:36'),
+('67f0b2d1-9013-4b2b-9914-bbe2288284fb', 'eade1e9d-c1ec-4ef3-bc31-60570fba1573', '2017-11-30 15:54:39', '2017-11-30 15:54:39');
+
+use catalogdb;
+SET FOREIGN_KEY_CHECKS=0;
+
+INSERT INTO heat_files(ARTIFACT_UUID, NAME, VERSION, DESCRIPTION, BODY, ARTIFACT_CHECKSUM, CREATION_TIMESTAMP) VALUES
+('00535bdd-0878-4478-b95a-c575c742bfb0', 'nimbus-ethernet-gw', '1', 'created from csar', 'DEVICE=$dev\nBOOTPROTO=none\nNM_CONTROLLED=no\nIPADDR=$ip\nNETMASK=$netmask\nGATEWAY=$gateway\n', 'MANUAL RECORD', '2017-01-21 23:56:43');
+
+
+INSERT INTO tosca_csar(ARTIFACT_UUID, NAME, VERSION, DESCRIPTION, ARTIFACT_CHECKSUM, URL, CREATION_TIMESTAMP) VALUES
+('0513f839-459d-46b6-aa3d-2edfef89a079', 'service-Ciservicee3756aea561a-csar.csar', '1', 'TOSCA definition package of the asset', 'YTk1MmY2MGVlNzVhYTU4YjgzYjliMjNjMmM3NzU1NDc=', '/sdc/v1/catalog/services/Ciservicee3756aea561a/1.0/artifacts/service-Ciservicee3756aea561a-csar.csar', '2017-11-27 11:38:27');
+
+
+INSERT INTO service(MODEL_UUID, MODEL_NAME, MODEL_INVARIANT_UUID, MODEL_VERSION, DESCRIPTION, CREATION_TIMESTAMP, TOSCA_CSAR_ARTIFACT_UUID, SERVICE_TYPE, SERVICE_ROLE, ENVIRONMENT_CONTEXT, WORKLOAD_CONTEXT) VALUES
+('5df8b6de-2083-11e7-93ae-92361f002671', 'Infra_v10_Service', '9647dfc4-2083-11e7-93ae-92361f002671', '1.0', 'MSO aLaCarte Vfmodule with addon', '2017-04-14 13:42:39', '0513f839-459d-46b6-aa3d-2edfef89a079', 'NA', 'NA', 'Luna', 'Oxygen'),
+('5df8b6de-2083-11e7-93ae-92361f002672', 'Infra_v10_Service', '9647dfc4-2083-11e7-93ae-92361f002671', '2.0', 'MSO aLaCarte Vfmodule with addon', '2017-04-14 13:42:39', null, 'NA', 'NA', 'Luna', 'Oxygen'),
+('f78914d9-423b-11e7-93f8-0050569a7965', 'VID_DEFAULT', 'f7ce78bb-423b-11e7-93f8-0050569a7965', '2.0', 'Default service for VID to use for infra APIH orchestration1707MIGRATED1707MIGRATED', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:05:05', NULL),
+('f78914d9-423b-11e7-93f8-0050569a7966', 'ServiceInstanceTest', 'f7ce78bb-423b-11e7-93f8-0050569a7965', '1.0', 'ServiceInstance', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL),
+('f78914d9-423b-11e7-93f8-0050569a7967', 'VnfInstanceTest', 'f7ce78bb-423b-11e7-93f8-0050569a7967', '1', 'VnfInstance', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL),
+('f78914d9-423b-11e7-93f8-0050569a7968', 'VfModuleTest', 'f7ce78bb-423b-11e7-93f8-0050569a7968', '1', 'VfModule', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL),
+('f78914d9-423b-11e7-93f8-0050569a7969', 'NetworkInstanceTest', 'f7ce78bb-423b-11e7-93f8-0050569a7969', '1', 'NetworkInstance', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL),
+('f78914d9-423b-11e7-93f8-0050569a7970', 'SDN-ETHERNET-INTERNET', 'f7ce78bb-423b-11e7-93f8-0050569a7969', '1', 'NetworkInstance', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL),
+('5d48acb5-097d-4982-aeb2-f4a3bd87d31b', 'AssignInstance', '5d48acb5-097d-4982-aeb2-f4a3bd87d31b', '10.0', 'AssignInstance', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL),
+('ff3514e3-5a33-55df-13ab-12abad84e7ff', 'UnassignInstance', 'ff3514e3-5a33-55df-13ab-12abad84e7ff', '1.0', 'UnassignInstance', '2017-04-14 13:42:39', NULL, NULL, NULL, '2016-09-13 15:06:05', NULL);
+
+
+INSERT INTO service_recipe(ID, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, SERVICE_PARAM_XSD, RECIPE_TIMEOUT, SERVICE_TIMEOUT_INTERIM, CREATION_TIMESTAMP, SERVICE_MODEL_UUID) VALUES
+('1', 'createInstance', '1', 'Infra aLaCarte', '/mso/async/services/CreateGenericALaCarteServiceInstance', null, '180', '0', '2017-04-14 19:18:20', '5df8b6de-2083-11e7-93ae-92361f002671'),
+('10', 'createInstance', '1', 'VID_DEFAULT recipe to create service-instance if no custom BPMN flow is found', '/mso/async/services/CreateGenericALaCarteServiceInstance', NULL, '180', NULL, '2016-09-13 15:05:18', 'f78914d9-423b-11e7-93f8-0050569a7965'),
+('11', 'activateInstance', '1', 'Activate ServiceInstance', '/mso/async/services/ActivateInstance', NULL, '120', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7966'),
+('12', 'deactivateInstance', '1', 'Deactivate ServiceInstance', '/mso/async/services/DeactivateInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7966'),
+('13', 'deleteInstance', '1', 'Delete ServiceInstance', '/mso/async/services/DeleteInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7966'),
+('14', 'createInstance', '1', 'Create VnfInstance', '/mso/async/services/CreateVnfInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7967'),
+('15', 'replaceInstance', '1', 'Replace VnfInstance', '/mso/async/services/ReplaceVnfInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7967'),
+('16', 'updateInstance', '1', 'Update VnfInstance', '/mso/async/services/UpdateVnfInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7967'),
+('17', 'applyUpdatedConfig', '1', 'ApplyUpdatedConfig VnfInstance', '/mso/async/services/ApplyUpdatedConfig', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7967'),
+('18', 'deleteInstance', '1', 'Delete VnfInstance', '/mso/async/services/DeleteVnfInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7967'),
+('19', 'createInstance', '1', 'Create VfModule', '/mso/async/services/CreateVfModule', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7968'),
+('20', 'createInstance', '1', 'Create NetworkInstance', '/mso/async/services/CreateNetworkInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'f78914d9-423b-11e7-93f8-0050569a7969'),
+('36', 'assignInstance', '10.0', 'Assign ServiceInstance', '/mso/async/services/AssignServiceInstance', NULL, '180', NULL, '2016-09-13 15:06:18', '5d48acb5-097d-4982-aeb2-f4a3bd87d31b'),
+('37', 'unassignInstance', '1.0', 'Unassign ServiceInstance', '/mso/async/services/UnassignServiceInstance', NULL, '180', NULL, '2016-09-13 15:06:18', 'ff3514e3-5a33-55df-13ab-12abad84e7ff'),
+('41', 'createInstance', '1', 'Create ServiceRequest', '/mso/async/services/CreateMacroServiceNetworkVnf', null, '180', '0', '2017-04-14 19:18:20', '109a153e-325f-4df5-8161-edd91314daee');
+
+INSERT INTO heat_template(ARTIFACT_UUID, NAME, VERSION, DESCRIPTION, BODY, TIMEOUT_MINUTES, ARTIFACT_CHECKSUM, CREATION_TIMESTAMP) VALUES
+('ff874603-4222-11e7-9252-005056850d2e', 'module_mns_zrdm3frwl01exn_01_rgvm_1.yml', '1', 'created from csar', 'heat_template_version: 2013-05-23 description: heat template that creates TEST VNF parameters: TEST_server_name: type: string label: TEST server name description: TEST server name TEST_image_name: type: string label: image name description: TEST image name TEST_flavor_name: type: string label: TEST flavor name description: flavor name of TEST instance TEST_Role_net_name: type: string label: TEST network name description: TEST network name TEST_vnf_id: type: string label: TEST VNF Id description: TEST VNF Id resources:TEST: type: OS::Nova::Server properties: name: { get_param: TEST_server_name } image: { get_param: TEST_image_name } flavor: { get_param: TEST_flavor_name } networks: - port: { get_resource: TEST_port_0} metadata: vnf_id: {get_param: TEST_vnf_id} TEST_port_0: type: OS::Neutron::Port properties: network: { get_param: TEST_Role_net_name }', '60', 'MANUAL RECORD', '2017-01-21 23:26:56'),
+('ff87482f-4222-11e7-9252-005056850d2e', 'module_mns_zrdm3frwl01exn_01_rgvm_1.yml', '1', 'created from csar', 'heat_template_version: 2013-05-23 description: heat template that creates TEST VNF parameters: TEST_server_name: type: string label: TEST server name description: TEST server name TEST_image_name: type: string label: image name description: TEST image name TEST_flavor_name: type: string label: TEST flavor name description: flavor name of TEST instance TEST_Role_net_name: type: string label: TEST network name description: TEST network name TEST_vnf_id: type: string label: TEST VNF Id description: TEST VNF Id resources:TEST: type: OS::Nova::Server properties: name: { get_param: TEST_server_name } image: { get_param: TEST_image_name } flavor: { get_param: TEST_flavor_name } networks: - port: { get_resource: TEST_port_0} metadata: vnf_id: {get_param: TEST_vnf_id} TEST_port_0: type: OS::Neutron::Port properties: network: { get_param: TEST_Role_net_name }', '60', 'MANUAL RECORD', '2017-01-21 23:26:56'),
+('aa874603-4222-11e7-9252-005056850d2e', 'module_mns_zrdm3frwl01exn_01_rgvm_1.yml', '1', 'created from csar', 'heat_template_version: 2013-05-23 description: heat template that creates TEST VNF parameters: TEST_server_name: type: string label: TEST server name description: TEST server name TEST_image_name: type: string label: image name description: TEST image name TEST_flavor_name: type: string label: TEST flavor name description: flavor name of TEST instance TEST_Role_net_name: type: string label: TEST network name description: TEST network name TEST_vnf_id: type: string label: TEST VNF Id description: TEST VNF Id resources:TEST: type: OS::Nova::Server properties: name: { get_param: TEST_server_name } image: { get_param: TEST_image_name } flavor: { get_param: TEST_flavor_name } networks: - port: { get_resource: TEST_port_0} metadata: vnf_id: {get_param: TEST_vnf_id} TEST_port_0: type: OS::Neutron::Port properties: network: { get_param: TEST_Role_net_name }', '60', 'MANUAL RECORD', '2017-01-21 23:26:56');
+
+
+INSERT INTO heat_template_params(HEAT_TEMPLATE_ARTIFACT_UUID, PARAM_NAME, IS_REQUIRED, PARAM_TYPE, PARAM_ALIAS) VALUES
+('ff874603-4222-11e7-9252-005056850d2e', 'availability_zone_0', 1, 'string', ''),
+('ff874603-4222-11e7-9252-005056850d2e', 'exn_direct_net_fqdn', 1, 'string', ''),
+('ff874603-4222-11e7-9252-005056850d2e', 'exn_hsl_net_fqdn', 1, 'string', '');
+
+
+INSERT INTO heat_environment(ARTIFACT_UUID, NAME, VERSION, DESCRIPTION, BODY, ARTIFACT_CHECKSUM, CREATION_TIMESTAMP) VALUES
+('fefb1601-4222-11e7-9252-005056850d2e', 'module_nso.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n availability_zone_0: \"alln-zone-1\"\n nso_flavor_name: \"citeis.1vCPUx2GB\"\n nso_image_name: \"RHEL-6.8-BASE-20160912\"\n nso_name_0: \"zrdm3vamp01nso001\"\n nso_oam_ip_0: \"172.18.25.175\"\n nso_oam_net_gw: \"172.18.25.1\"\n nso_oam_net_mask: \"255.255.255.0\"\n nso_sec_grp_id: \"36f48d82-f099-4437-bfbc-70d9e5d420d1\"\n nso_srv_grp_id: \"e431c477-5bd1-476a-bfa9-e4ce16b8356b\"\n oam_net_id: \"nso_oam\"\n vf_module_id: \"145cd730797234b4a40aa99335abc143\"\n vnf_id: \"730797234b4a40aa99335157b02871cd\"\n vnf_name: \"Mobisupport\"\n', 'MWI2ODY0Yjc1NDJjNWU1NjdkMTAyMjVkNzFmZDU0MzA=', '2017-11-27 08:42:58'),
+('fefb1751-4333-11e7-9252-005056850d2e', 'module_nso.env', '2', 'Auto-generated HEAT Environment deployment artifact', 'parameters:\n availability_zone_0: \"alln-zone-1\"\n nso_flavor_name: \"citeis.1vCPUx2GB\"\n nso_image_name: \"RHEL-6.8-BASE-20160912\"\n nso_name_0: \"zrdm3vamp01nso001\"\n nso_oam_ip_0: \"172.18.25.175\"\n nso_oam_net_gw: \"172.18.25.1\"\n nso_oam_net_mask: \"255.255.255.0\"\n nso_sec_grp_id: \"36f48d82-f099-4437-bfbc-70d9e5d420d1\"\n nso_srv_grp_id: \"e431c477-5bd1-476a-bfa9-e4ce16b8356b\"\n oam_net_id: \"nso_oam\"\n vf_module_id: \"145cd730797234b4a40aa99335abc143\"\n vnf_id: \"730797234b4a40aa99335157b02871cd\"\n vnf_name: \"Mobisupport\"\n', 'MWI2ODY0Yjc1NDJjNWU1NjdkMTAyMjVkNzFmZDU0MzA=', '2017-11-27 08:42:58');
+
+INSERT INTO vnf_resource(ORCHESTRATION_MODE, DESCRIPTION, CREATION_TIMESTAMP, MODEL_UUID, AIC_VERSION_MIN, AIC_VERSION_MAX, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, TOSCA_NODE_TYPE, HEAT_TEMPLATE_ARTIFACT_UUID) VALUES
+('HEAT', '1607 v10 - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002672', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '2.0', 'v10', 'VF', null),
+('HEAT', '1607 v10 - inherent network', '2017-04-14 21:46:28', 'fe6478e4-ea33-3346-ac12-ab121484a3fe', '', '', 'ff5256d1-5a33-55df-13ab-12abad84e7ff', '2.0', 'v12', 'VF', null),
+('HEAT', '1607 v10 - inherent network', '2017-04-14 21:46:28', 'ff2ae348-214a-11e7-93ae-92361f002671', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'v10', 'VF', null),
+('HEAT', '1607 vSAMP10a - inherent network', '2017-04-14 21:46:28', 'fe6478e4-ea33-3346-ac12-ab121484a3fw', '', '', '2fff5b20-214b-11e7-93ae-92361f002671', '1.0', 'vSAMP10a', 'VF', null);
+
+INSERT INTO vnf_resource_customization(MODEL_CUSTOMIZATION_UUID, MODEL_INSTANCE_NAME, MIN_INSTANCES, MAX_INSTANCES, AVAILABILITY_ZONE_MAX_COUNT, NF_TYPE, NF_ROLE, NF_FUNCTION, NF_NAMING_CODE, CREATION_TIMESTAMP, VNF_RESOURCE_MODEL_UUID, MULTI_STAGE_DESIGN) VALUES
+('68dc9a92-214c-11e7-93ae-92361f002671', 'v10 1', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002671', null),
+('f78914d9-423b-11e7-93f8-0050569a7967', 'test', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'f78914d9-423b-11e7-93f8-0050569a7967', null),
+('68dc9a92-214c-11e7-93ae-92361f002672', 'test', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'ff2ae348-214a-11e7-93ae-92361f002672', null),
+('68dc9a92-214c-11e7-93ae-92361f002673', 'test', '0', '0', '0', 'vSAMP', 'vSAMP', 'vSAMP', 'vSAMP', '2017-05-26 15:08:24', 'fe6478e4-ea33-3346-ac12-ab121484a3fe', null),
+('68dc9a92-214c-11e7-93ae-92361f002674', 'test', '0', '0', '0', '', 'TEST', '', '', '2017-05-26 15:08:24', 'fe6478e4-ea33-3346-ac12-ab121484a3fw', null);
+
+
+
+INSERT INTO vf_module(MODEL_UUID, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, DESCRIPTION, IS_BASE, HEAT_TEMPLATE_ARTIFACT_UUID, VOL_HEAT_TEMPLATE_ARTIFACT_UUID, CREATION_TIMESTAMP, VNF_RESOURCE_MODEL_UUID) VALUES
+
+('20c4431c-246d-11e7-93ae-92361f002671', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'test::base::module-0', 'v10 DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
+('066de97e-253e-11e7-93ae-92361f002671', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'test::PCM::module-1', 'v10 DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671');
+
+
+INSERT INTO vf_module_customization(MODEL_CUSTOMIZATION_UUID, LABEL, INITIAL_COUNT, MIN_INSTANCES, MAX_INSTANCES, AVAILABILITY_ZONE_COUNT, HEAT_ENVIRONMENT_ARTIFACT_UUID, VOL_ENVIRONMENT_ARTIFACT_UUID, CREATION_TIMESTAMP, VF_MODULE_MODEL_UUID) VALUES
+('cb82ffd8-252a-11e7-93ae-92361f002671', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002671'),
+('b4ea86b4-253f-11e7-93ae-92361f002671', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002671');
+
+
+INSERT INTO vnf_res_custom_to_vf_module_custom(VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID, VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID, CREATION_TIMESTAMP) VALUES
+('68dc9a92-214c-11e7-93ae-92361f002671', 'cb82ffd8-252a-11e7-93ae-92361f002671', '2017-05-26 15:08:24'),
+('68dc9a92-214c-11e7-93ae-92361f002671', 'b4ea86b4-253f-11e7-93ae-92361f002671', '2017-05-26 15:08:24');
+
+INSERT INTO allotted_resource(MODEL_UUID, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, TOSCA_NODE_TYPE, SUBCATEGORY, DESCRIPTION, CREATION_TIMESTAMP) VALUES
+('f6b7d4c6-e8a4-46e2-81bc-31cad5072842', 'b7a1b78e-6b6b-4b36-9698-8c9530da14af', '1.0', 'Tunnel_Xconn', '', '', '', '2017-05-26 15:08:24');
+
+INSERT INTO allotted_resource_customization(MODEL_CUSTOMIZATION_UUID, MODEL_INSTANCE_NAME, PROVIDING_SERVICE_MODEL_INVARIANT_UUID, TARGET_NETWORK_ROLE, NF_TYPE, NF_ROLE, NF_FUNCTION, NF_NAMING_CODE, MIN_INSTANCES, MAX_INSTANCES, AR_MODEL_UUID, CREATION_TIMESTAMP) VALUES
+('367a8ba9-057a-4506-b106-fbae818597c6', 'Sec_Tunnel_Xconn 11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'f6b7d4c6-e8a4-46e2-81bc-31cad5072842', TIMESTAMP '2017-01-20 16:14:20.0');
+
+
+INSERT INTO network_resource(MODEL_UUID, MODEL_NAME, MODEL_INVARIANT_UUID, DESCRIPTION, HEAT_TEMPLATE_ARTIFACT_UUID, NEUTRON_NETWORK_TYPE, MODEL_VERSION, TOSCA_NODE_TYPE, AIC_VERSION_MIN, AIC_VERSION_MAX, ORCHESTRATION_MODE, CREATION_TIMESTAMP) VALUES
+('10b36f65-f4e6-4be6-ae49-9596dc1c47fc', 'CONTRAIL30_GNDIRECT', 'ce4ff476-9641-4e60-b4d5-b4abbec1271d', 'Contrail 30 GNDIRECT NW', 'aa874603-4222-11e7-9252-005056850d2e', 'BASIC', '1.0', '', '3.0', '', 'HEAT', '2017-01-17 20:35:05');
+
+INSERT INTO network_resource_customization(MODEL_CUSTOMIZATION_UUID, MODEL_INSTANCE_NAME, NETWORK_TECHNOLOGY, NETWORK_TYPE, NETWORK_ROLE, NETWORK_SCOPE, CREATION_TIMESTAMP, NETWORK_RESOURCE_MODEL_UUID) VALUES
+('3bdbb104-476c-483e-9f8b-c095b3d308ac', 'CONTRAIL30_GNDIRECT 9', '', '', '', '', '2017-04-19 14:28:32', '10b36f65-f4e6-4be6-ae49-9596dc1c47fc');
+
+--second service insert
+
+
+
+
+
+INSERT INTO vf_module(MODEL_UUID, MODEL_INVARIANT_UUID, MODEL_VERSION, MODEL_NAME, DESCRIPTION, IS_BASE, HEAT_TEMPLATE_ARTIFACT_UUID, VOL_HEAT_TEMPLATE_ARTIFACT_UUID, CREATION_TIMESTAMP, VNF_RESOURCE_MODEL_UUID) VALUES
+
+('20c4431c-246d-11e7-93ae-92361f002672', '78ca26d0-246d-11e7-93ae-92361f002671', '2', 'test::base::module-0', 'v10 DEV Base', '1', 'ff874603-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
+('066de97e-253e-11e7-93ae-92361f002672', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'test::PCM::module-1', 'v10 DEV PCM', '0', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002671'),
+('test', '64efd51a-2544-11e7-93ae-92361f002671', '2', 'test::PCM::module-1', 'v10 DEV PCM', '1', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002672'),
+('test1', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2', 'test::PCM::module-1', 'v10 DEV PCM', '1', 'ff87482f-4222-11e7-9252-005056850d2e', null, '2016-09-14 18:19:56', 'ff2ae348-214a-11e7-93ae-92361f002672');
+
+INSERT INTO vf_module_customization(MODEL_CUSTOMIZATION_UUID, LABEL, INITIAL_COUNT, MIN_INSTANCES, MAX_INSTANCES, AVAILABILITY_ZONE_COUNT, HEAT_ENVIRONMENT_ARTIFACT_UUID, VOL_ENVIRONMENT_ARTIFACT_UUID, CREATION_TIMESTAMP, VF_MODULE_MODEL_UUID) VALUES
+('cb82ffd8-252a-11e7-93ae-92361f002672', 'base', '1', '0', '0', '0', 'fefb1601-4222-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '20c4431c-246d-11e7-93ae-92361f002672'),
+('b4ea86b4-253f-11e7-93ae-92361f002672', 'PCM', '0', '0', '0', '0', 'fefb1751-4333-11e7-9252-005056850d2e', null, '2017-05-26 15:08:23', '066de97e-253e-11e7-93ae-92361f002672');
+
+
+INSERT INTO vnf_res_custom_to_vf_module_custom(VNF_RESOURCE_CUST_MODEL_CUSTOMIZATION_UUID, VF_MODULE_CUST_MODEL_CUSTOMIZATION_UUID, CREATION_TIMESTAMP) VALUES
+('68dc9a92-214c-11e7-93ae-92361f002672', 'cb82ffd8-252a-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
+('68dc9a92-214c-11e7-93ae-92361f002672', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24'),
+('68dc9a92-214c-11e7-93ae-92361f002673', 'b4ea86b4-253f-11e7-93ae-92361f002672', '2017-05-26 15:08:24');
+
+
+INSERT INTO vf_module_to_heat_files(VF_MODULE_MODEL_UUID, HEAT_FILES_ARTIFACT_UUID) VALUES
+('20c4431c-246d-11e7-93ae-92361f002671', '00535bdd-0878-4478-b95a-c575c742bfb0'),
+('066de97e-253e-11e7-93ae-92361f002671', '00535bdd-0878-4478-b95a-c575c742bfb0');
+
+
+insert into network_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
+('5df8b6de-2083-11e7-93ae-92361f002671', '3bdbb104-476c-483e-9f8b-c095b3d308ac'),
+('5df8b6de-2083-11e7-93ae-92361f002672', '3bdbb104-476c-483e-9f8b-c095b3d308ac');
+
+
+insert into vnf_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
+('5df8b6de-2083-11e7-93ae-92361f002671', '68dc9a92-214c-11e7-93ae-92361f002671'),
+('f78914d9-423b-11e7-93f8-0050569a7965', 'f78914d9-423b-11e7-93f8-0050569a7967'),
+('5df8b6de-2083-11e7-93ae-92361f002672', '68dc9a92-214c-11e7-93ae-92361f002672');
+
+insert into allotted_resource_customization_to_service(service_model_uuid, resource_model_customization_uuid) values
+('5df8b6de-2083-11e7-93ae-92361f002671', '367a8ba9-057a-4506-b106-fbae818597c6'),
+('5df8b6de-2083-11e7-93ae-92361f002672', '367a8ba9-057a-4506-b106-fbae818597c6');
+
+
+INSERT INTO vnf_recipe(ID, nf_role, ACTION, SERVICE_TYPE, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, VNF_PARAM_XSD, RECIPE_TIMEOUT, CREATION_TIMESTAMP, VF_MODULE_ID) VALUES
+('77', 'VID_DEFAULT', 'createInstance', '', '1', 'VID_DEFAULT recipe to create VNF if no custom BPMN flow is found', '/mso/async/services/CreateVnfInfra', '', '180', '2016-09-14 19:18:20', ''),
+('78', 'VID_DEFAULT', 'deleteInstance', '', '1', 'VID_DEFAULT recipe to delete VNF if no custom BPMN flow is found', '/mso/async/services/DeleteVnfInfra', '', '180', '2016-09-14 19:18:20', ''),
+('81', 'VID_DEFAULT', 'updateInstance', '', '1', 'VID_DEFAULT update', '/mso/async/services/UpdateVnfInfra', '', '180', '2017-07-28 18:19:39', ''),
+('85', 'VID_DEFAULT', 'replaceInstance', '', '1', 'VID_DEFAULT replace', '/mso/async/services/ReplaceVnfInfra', 'VID_DEFAULT', '180', '2017-07-28 18:19:45', ''),
+('10000', 'VID_DEFAULT', 'inPlaceSoftwareUpdate', '', '1', 'VID_DEFAULT inPlaceSoftwareUpdate', '/mso/async/services/VnfInPlaceUpdate', '', '180', '2017-10-25 18:19:45', ''),
+('10001', 'VID_DEFAULT', 'applyUpdatedConfig', '', '1', 'VID_DEFAULT applyUpdatedConfig', '/mso/async/services/VnfConfigUpdate', '', '180', '2017-10-25 18:19:45', ''),
+
+
+('13', 'CREATE', 'createInstance', 'VID_DEFAULT', '1', 'Create VnfInstance', '/mso/async/services/CreateVnf', '', '180', '2016-06-03 10:14:10', '1882934'),
+('14', 'REPLACE', 'replaceInstance', 'VID_DEFAULT', '1', 'Replace VnfInstance', '/mso/async/services/ReplaceVnf', '', '180', '2016-06-03 10:14:10', '1882934'),
+('15', 'UPDATE', 'updateInstance', 'VID_DEFAULT', '1', 'Update VnfInstance', '/mso/async/services/UpdateVnf', '', '180', '2016-06-03 10:14:10', '1882934'),
+('16', 'DEFAULT', 'applyUpdatedConfig', 'VID_DEFAULT', '1', 'Default VnfInstance', '/mso/async/services/DefaultVnfUri', '', '180', '2016-06-03 10:14:10', '1882934'),
+('17', 'DEFAULT', 'inPlaceSoftwareUpdate', 'VID_DEFAULT', '1', 'Default VnfInstance', '/mso/async/services/DefaultVnfUri', '', '180', '2016-06-03 10:14:10', '1882934'),
+('20', 'DELETE', 'deleteInstance', 'VID_DEFAULT', '1', 'Delete VnfInstance', '/mso/async/services/DeleteVnf', '', '180', '2016-06-03 10:14:10', '1882934'),
+('21', 'TEST', 'replaceInstance', 'VID_DEFAULT', '2', 'custom bpmn for vnf recreate', '/mso/async/services/RecreateInfraVce', '', '180', '2016-06-03 10:14:10', '1882934');
+
+INSERT INTO vnf_components(VNF_ID, COMPONENT_TYPE, HEAT_TEMPLATE_ID, HEAT_ENVIRONMENT_ID, CREATION_TIMESTAMP) VALUES
+('13961', 'VOLUME', '13843', '13961', '2016-05-19 20:22:02');
+
+INSERT INTO vnf_components_recipe(ID, VNF_TYPE, VNF_COMPONENT_TYPE, ACTION, SERVICE_TYPE, VERSION, DESCRIPTION, ORCHESTRATION_URI, VNF_COMPONENT_PARAM_XSD, RECIPE_TIMEOUT, CREATION_TIMESTAMP, VF_MODULE_MODEL_UUID) VALUES
+('5', '*', 'VOLUME_GROUP', 'CREATE', '', '1', 'Recipe Match All for VF Modules if no custom flow exists', '/mso/async/services/createCinderVolumeV1', '', '180', '2016-06-03 10:15:11', ''),
+('7', '*', 'VOLUME_GROUP', 'DELETE', '', '1', 'Recipe Match All for VF Modules if no custom flow exists', '/mso/async/services/deleteCinderVolumeV1', '', '180', '2016-06-03 10:15:11', ''),
+('9', '*', 'VOLUME_GROUP', 'UPDATE', '', '1', 'Recipe Match All for VF Modules if no custom flow exists', '/mso/async/services/updateCinderVolumeV1', '', '180', '2016-06-03 10:15:11', ''),
+('13', '', 'VOLUME_GROUP', 'DELETE_VF_MODULE_VOL', '', '1', 'Recipe Match All for VF Modules if no custom flow exists', '/mso/async/services/DeleteVfModuleVolume', '', '180', '2016-06-03 10:15:11', '*'),
+('15', '', 'VOLUME_GROUP', 'UPDATE_VF_MODULE_VOL', '', '1', 'Recipe Match All for VF Modules if no custom flow exists', '/mso/async/services/UpdateVfModuleVolume', '', '180', '2016-06-03 10:15:11', '*'),
+('16', 'volumeGroup', 'volumeGroup', 'createInstance', '', '1', 'VID_DEFAULT recipe to create volume-group if no custom BPMN flow is found', '/mso/async/services/CreateVfModuleVolumeInfraV1', '', '180', '2016-09-14 19:18:20', 'VID_DEFAULT'),
+('17', 'volumeGroup', 'volumeGroup', 'deleteInstance', '', '1', 'VID_DEFAULT recipe to delete volume-group if no custom BPMN flow is found', '/mso/async/services/DeleteVfModuleVolumeInfraV1', '', '180', '2016-09-14 19:18:20', 'VID_DEFAULT'),
+('18', 'volumeGroup', 'volumeGroup', 'updateInstance', '', '1', 'VID_DEFAULT recipe to update volume-group if no custom BPMN flow is found', '/mso/async/services/UpdateVfModuleVolumeInfraV1', '', '180', '2016-09-14 19:18:20', 'VID_DEFAULT'),
+('19', 'vfModule', 'vfModule', 'createInstance', '', '1', 'VID_DEFAULT recipe to create vf-module if no custom BPMN flow is found', '/mso/async/services/CreateVfModuleInfra', '', '180', '2016-09-14 19:18:20', '20c4431c-246d-11e7-93ae-92361f002672'),
+('20', 'vfModule', 'vfModule', 'deleteInstance', '', '1', 'VID_DEFAULT recipe to delete vf-module if no custom BPMN flow is found', '/mso/async/services/DeleteVfModuleInfra', '', '180', '2016-09-14 19:18:20', 'VID_DEFAULT'),
+('21', 'vfModule', 'vfModule', 'updateInstance', '', '1', 'VID_DEFAULT recipe to update vf-module if no custom BPMN flow is found', '/mso/async/services/UpdateVfModuleInfra', '', '180', '2016-09-14 19:18:20', 'VID_DEFAULT'),
+('25', 'vfModule', 'vfModule', 'replaceInstance', '', '1', 'VID_DEFAULT vfModule replace', '/mso/async/services/ReplaceVfModuleInfra', '', '180', '2017-07-28 18:25:06', 'VID_DEFAULT');
+
+
+INSERT INTO catalogdb.network_recipe(ID, MODEL_NAME, ACTION, DESCRIPTION, ORCHESTRATION_URI, NETWORK_PARAM_XSD, RECIPE_TIMEOUT, SERVICE_TYPE, CREATION_TIMESTAMP, VERSION_STR) VALUES
+('17', 'VID_DEFAULT', 'createInstance', 'VID_DEFAULT recipe to create network if no custom BPMN flow is found', '/mso/async/services/CreateNetworkInstance', '', '180', '', '2016-09-14 19:18:20', '1.0'),
+('18', 'VID_DEFAULT', 'updateInstance', 'VID_DEFAULT recipe to update network if no custom BPMN flow is found', '/mso/async/services/UpdateNetworkInstance', '', '180', '', '2016-09-14 19:18:20', '1.0'),
+('19', 'VID_DEFAULT', 'deleteInstance', 'VID_DEFAULT recipe to delete network if no custom BPMN flow is found', '/mso/async/services/DeleteNetworkInstance', '', '180', '', '2016-09-14 19:18:20', '1.0'),
+('14', 'tester', 'createInstance', '', '/mso/async/services/CreateNetwork', '', '180', '', '2017-09-22 18:47:31', '1'),
+('15', 'tester', 'updateInstance', '', '/mso/async/services/UpdateNetwork', '', '180', '', '2017-09-22 18:47:31', '1'),
+('16', 'tester', 'deleteInstance', '', '/mso/async/services/DeleteNetwork', '', '180', '', '2017-09-22 18:47:31', '1');
+
+INSERT INTO vnf_recipe (nf_role, ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT)
+VALUES
+('GR-API-DEFAULT', 'createInstance', '1', 'Gr api recipe to create vnf', '/mso/async/services/WorkflowActionBB', 180),
+('GR-API-DEFAULT', 'deleteInstance', '1', 'Gr api recipe to delete vnf', '/mso/async/services/WorkflowActionBB', 180),
+('GR-API-DEFAULT', 'updateInstance', '1', 'Gr api recipe to update vnf', '/mso/async/services/WorkflowActionBB', 180),
+('GR-API-DEFAULT', 'replaceInstance', '1', 'Gr api recipe to replace vnf', '/mso/async/services/WorkflowActionBB', 180),
+('GR-API-DEFAULT', 'inPlaceSoftwareUpdate', '1', 'Gr api recipe to do an in place software update', '/mso/async/services/VnfInPlaceUpdate', 180),
+('GR-API-DEFAULT', 'applyUpdatedConfig', '1', 'Gr api recipe to apply updated config', '/mso/async/services/VnfConfigUpdate', 180);
+
+UPDATE vnf_recipe
+SET nf_role = 'VNF-API-DEFAULT'
+WHERE nf_role = 'VID_DEFAULT';
+
+INSERT INTO service (MODEL_UUID, MODEL_NAME, MODEL_INVARIANT_UUID, MODEL_VERSION, DESCRIPTION)
+VALUES
+('d88da85c-d9e8-4f73-b837-3a72a431622b', 'GR-API-DEFAULT', '944862ae-bb65-4429-8330-a6c9170d6672', '1.0', 'Gr api service for VID to use for infra APIH orchestration');
+
+UPDATE service
+SET model_name = 'VNF-API-DEFAULT'
+WHERE model_name = 'VID_DEFAULT';
+
+INSERT INTO service_recipe (ACTION, VERSION_STR, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, SERVICE_MODEL_UUID)
+VALUES
+('activateInstance', '1.0', 'Gr api recipe to activate service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'),
+('createInstance', '1.0', 'Gr api recipe to create service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'),
+('deactivateInstance', '1.0', 'Gr api recipe to deactivate service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'),
+('deleteInstance', '1.0', 'Gr api recipe to delete service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'),
+('assignInstance', '1.0', 'Gr api recipe to assign service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b'),
+('unassignInstance', '1.0', 'Gr api recipe to unassign service-instance', '/mso/async/services/WorkflowActionBB', 180, 'd88da85c-d9e8-4f73-b837-3a72a431622b');
+
+INSERT INTO vnf_components_recipe (VNF_COMPONENT_TYPE, ACTION, VERSION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VF_MODULE_MODEL_UUID)
+VALUES
+('volumeGroup', 'createInstance', '1', 'Gr api recipe to create volume-group', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('volumeGroup', 'deleteInstance', '1', 'Gr api recipe to delete volume-group', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('volumeGroup', 'updateInstance', '1', 'Gr api recipe to update volume-group', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('vfModule', 'createInstance', '1', 'Gr api recipe to create vf-module', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('vfModule', 'deleteInstance', '1', 'Gr api recipe to delete vf-module', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('vfModule', 'updateInstance', '1', 'Gr api recipe to update vf-module', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('vfModule', 'replaceInstance', '1', 'Gr api recipe to replace vf-module', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT'),
+('vfModule', 'deactivateAndCloudDelete', '1', 'Gr api recipe to deactivateAndCloudDelete vf-module', '/mso/async/services/WorkflowActionBB', 180, 'GR-API-DEFAULT');
+
+UPDATE vnf_components_recipe
+SET vf_module_model_uuid = 'VNF-API-DEFAULT'
+WHERE vf_module_model_uuid = 'VID_DEFAULT';
+
+INSERT INTO network_recipe (MODEL_NAME, ACTION, DESCRIPTION, ORCHESTRATION_URI, RECIPE_TIMEOUT, VERSION_STR)
+VALUES
+('GR-API-DEFAULT', 'createInstance', 'Gr api recipe to create network', '/mso/async/services/WorkflowActionBB', 180, '1.0'),
+('GR-API-DEFAULT', 'updateInstance', 'Gr api recipe to update network', '/mso/async/services/WorkflowActionBB', 180, '1.0'),
+('GR-API-DEFAULT', 'deleteInstance', 'Gr api recipe to delete network', '/mso/async/services/WorkflowActionBB', 180, '1.0');
+
+UPDATE network_recipe
+SET model_name = 'VNF-API-DEFAULT'
+WHERE model_name = 'VID_DEFAULT'; \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/logback-test.xml b/mso-api-handlers/mso-api-handler-infra/src/test/resources/logback-test.xml
index 4609de0d77..1b3a7cc6da 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/logback-test.xml
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/logback-test.xml
@@ -1,28 +1,39 @@
<configuration >
-
+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
- <pattern>%d{MM/dd-HH:mm:ss.SSS}|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}||%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}||%X{Timer}|%msg%n</pattern>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n
+ </pattern>
</encoder>
</appender>
+ <appender name="test" class="org.onap.so.apihandlerinfra.TestAppender"/>
+
-
- <logger name="com.att.ecomp.audit" level="debug" additivity="false">
+ <logger name="AUDIT" level="info" additivity="false">
<appender-ref ref="STDOUT" />
+ <appender-ref ref = "test" />
</logger>
<logger name="com.att.eelf.metrics" level="info" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
- <logger name="com.att.eelf.error" level="debug" additivity="false">
+ <logger name="com.att.eelf.error" level="ERROR" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
- <root level="debug">
+ <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+
+ <logger name="com.att" level="${so.log.level:-DEBUG}" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+ <root level="WARN">
<appender-ref ref="STDOUT" />
</root>
-
+
+ <logger name="wiremock.org" level="ERROR" />
</configuration> \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/logging.properties b/mso-api-handlers/mso-api-handler-infra/src/test/resources/logging.properties
deleted file mode 100644
index 4941c55971..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/logging.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#register SLF4JBridgeHandler as handler for the j.u.l. root logger
-handlers = org.slf4j.bridge.SLF4JBridgeHandler
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/mso.apihandler-infra.properties b/mso-api-handlers/mso-api-handler-infra/src/test/resources/mso.apihandler-infra.properties
deleted file mode 100644
index bc07142254..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/mso.apihandler-infra.properties
+++ /dev/null
@@ -1,37 +0,0 @@
-# This is a chef generated properties file! Manual updates will be overridden next chef-client run, ensure desired changes are in mso-config chef cookbook or chef env file.
-bpelURL=http://mtanjv9mobp01-eth1-0.aic.cip.att.com:8080/
-bpelAuth=786864AA53D0DCD881AED1154230C0C3058D58B9339D2EFB6193A0F0D82530E1
-camundaURL=http://mtanjv9mobp01-eth1-0.aic.cip.att.com:8080
-camundaAuth=F8E9452B55DDE4CCE77547B0E748105C54CF5EF1351B4E2CBAABF2981EFE776D
-
-# controls what actions the infra API (APIH) allows sent in on REST request
-vnf.v1.ApiAllowableActions=
-vnf.v2.ApiAllowableActions=DELETE_VF_MODULE,UPDATE_VF_MODULE
-vnf.v3.ApiAllowableActions=CREATE_VF_MODULE,DELETE_VF_MODULE,UPDATE_VF_MODULE
-network.v1.ApiAllowableActions=DELETE,UPDATE
-network.v2.ApiAllowableActions=DELETE,UPDATE
-network.v3.ApiAllowableActions=CREATE,DELETE,UPDATE
-volume.v1.ApiAllowableActions=
-volume.v2.ApiAllowableActions=DELETE_VF_MODULE_VOL,UPDATE_VF_MODULE_VOL
-volume.v3.ApiAllowableActions=CREATE_VF_MODULE_VOL,DELETE_VF_MODULE_VOL,UPDATE_VF_MODULE_VOL
-mso.infra.default.alacarte.orchestrationUri=/mso/async/services/ALaCarteOrchestrator
-mso.infra.default.alacarte.recipeTimeout=180
-
-# Added these properties for Dmaap client for Tenant Isolation
-so.operational-environment.dmaap.username=m97898@mso.ecomp.att.com
-so.operational-environment.dmaap.password=VjR5NDcxSzA=
-so.operational-environment.dmaap.host=https://dcae-mrtr-ftl3.ecomp.cci.att.com:3905
-so.operational-environment.publisher.topic=com.att.ecomp.mso.operationalEnvironmentEvent
-
-# tenant isolation
-asdc.activate.instanceid=test
-asdc.activate.userid=cs0008
-mso.asdc.client.auth=F3473596C526938329DF877495B494DC374D1C4198ED3AD305EA3ADCBBDA1862
-mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7
-mso.tenant.isolation.retry.count=3
-asdc.endpoint=http://localhost:28090
-aai.auth=757A94191D685FD2092AC1490730A4FC
-aai.endpoint=http://localhost:28090
-grm.endpoint=http://localhost:28090
-grm.username=gmruser
-grm.password=cGFzc3dvcmQ=
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/org/openecomp/mso/client/asdc/create-ecompoe/ecomp-openv-request.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/org/onap/so/client/asdc/create-ecompoe/ecomp-openv-request.json
index a73302ef04..a73302ef04 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/org/openecomp/mso/client/asdc/create-ecompoe/ecomp-openv-request.json
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/org/onap/so/client/asdc/create-ecompoe/ecomp-openv-request.json
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
new file mode 100644
index 0000000000..3540110351
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
@@ -0,0 +1,993 @@
+--------START Catalog DB SCHEMA --------
+use catalogdb;
+
+create table `allotted_resource` (
+ `model_uuid` varchar(200) not null,
+ `model_invariant_uuid` varchar(200) not null,
+ `model_version` varchar(20) not null,
+ `model_name` varchar(200) not null,
+ `tosca_node_type` varchar(200) default null,
+ `subcategory` varchar(200) default null,
+ `description` varchar(1200) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`model_uuid`)
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `allotted_resource_customization` (
+ `model_customization_uuid` varchar(200) not null,
+ `model_instance_name` varchar(200) not null,
+ `providing_service_model_uuid` varchar(200) default null,
+ `providing_service_model_invariant_uuid` varchar(200) default null,
+ `providing_service_model_name` varchar(200) default null,
+ `target_network_role` varchar(200) default null,
+ `nf_type` varchar(200) default null,
+ `nf_role` varchar(200) default null,
+ `nf_function` varchar(200) default null,
+ `nf_naming_code` varchar(200) default null,
+ `min_instances` int(11) default null,
+ `max_instances` int(11) default null,
+ `ar_model_uuid` varchar(200) not null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`model_customization_uuid`),
+ key `fk_allotted_resource_customization__allotted_resource1_idx` (`ar_model_uuid`),
+ constraint `fk_allotted_resource_customization__allotted_resource1` foreign key (`ar_model_uuid`) references `allotted_resource` (`model_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `heat_environment` (
+ `artifact_uuid` varchar(200) not null,
+ `name` varchar(100) not null,
+ `version` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `body` longtext not null,
+ `artifact_checksum` varchar(200) not null default 'manual record',
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`artifact_uuid`)
+) engine=innodb default charset=latin1;
+
+
+
+create table `heat_files` (
+ `artifact_uuid` varchar(200) not null,
+ `name` varchar(200) not null,
+ `version` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `body` longtext not null,
+ `artifact_checksum` varchar(200) not null default 'manual record',
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`artifact_uuid`)
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `heat_template` (
+ `artifact_uuid` varchar(200) not null,
+ `name` varchar(200) not null,
+ `version` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `body` longtext not null,
+ `timeout_minutes` int(11) default null,
+ `artifact_checksum` varchar(200) not null default 'manual record',
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`artifact_uuid`)
+) engine=innodb default charset=latin1;
+
+
+
+create table `heat_nested_template` (
+ `parent_heat_template_uuid` varchar(200) not null,
+ `child_heat_template_uuid` varchar(200) not null,
+ `provider_resource_file` varchar(100) default null,
+ primary key (`parent_heat_template_uuid`,`child_heat_template_uuid`),
+ key `fk_heat_nested_template__heat_template2_idx` (`child_heat_template_uuid`),
+ constraint `fk_heat_nested_template__child_heat_temp_uuid__heat_template1` foreign key (`child_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
+ constraint `fk_heat_nested_template__parent_heat_temp_uuid__heat_template1` foreign key (`parent_heat_template_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `heat_template_params` (
+ `heat_template_artifact_uuid` varchar(200) not null,
+ `param_name` varchar(100) not null,
+ `is_required` bit(1) not null,
+ `param_type` varchar(20) default null,
+ `param_alias` varchar(45) default null,
+ primary key (`heat_template_artifact_uuid`,`param_name`),
+ constraint `fk_heat_template_params__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+create table `network_recipe` (
+ `id` int(11) not null auto_increment,
+ `model_name` varchar(20) not null,
+ `action` varchar(50) not null,
+ `description` varchar(1200) default null,
+ `orchestration_uri` varchar(256) not null,
+ `network_param_xsd` varchar(2048) default null,
+ `recipe_timeout` int(11) default null,
+ `service_type` varchar(45) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `version_str` varchar(20) not null,
+ primary key (`id`),
+ unique key `uk_rl4f296i0p8lyokxveaiwkayi` (`model_name`,`action`,`version_str`)
+) engine=innodb auto_increment=178 default charset=latin1;
+
+
+
+
+create table `temp_network_heat_template_lookup` (
+ `network_resource_model_name` varchar(200) not null,
+ `heat_template_artifact_uuid` varchar(200) not null,
+ `aic_version_min` varchar(20) not null,
+ `aic_version_max` varchar(20) default null,
+ primary key (`network_resource_model_name`),
+ key `fk_temp_network_heat_template_lookup__heat_template1_idx` (`heat_template_artifact_uuid`),
+ constraint `fk_temp_network_heat_template_lookup__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+create table `network_resource` (
+ `model_uuid` varchar(200) not null,
+ `model_name` varchar(200) not null,
+ `model_invariant_uuid` varchar(200) default null,
+ `description` varchar(1200) default null,
+ `heat_template_artifact_uuid` varchar(200) not null,
+ `neutron_network_type` varchar(20) default null,
+ `model_version` varchar(20) default null,
+ `tosca_node_type` varchar(200) default null,
+ `aic_version_min` varchar(20) not null,
+ `aic_version_max` varchar(20) default null,
+ `orchestration_mode` varchar(20) default 'heat',
+ `resource_category` varchar(20) default null,
+ `resource_sub_category` varchar(20) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`model_uuid`),
+ key `fk_network_resource__temp_network_heat_template_lookup1_idx` (`model_name`),
+ key `fk_network_resource__heat_template1_idx` (`heat_template_artifact_uuid`),
+ constraint `fk_network_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete no action on update cascade,
+ constraint `fk_network_resource__temp_network_heat_template_lookup__mod_nm1` foreign key (`model_name`) references `temp_network_heat_template_lookup` (`network_resource_model_name`) on delete no action on update no action
+) engine=innodb default charset=latin1;
+
+
+
+
+
+create table `network_resource_customization` (
+ `model_customization_uuid` varchar(200) not null,
+ `model_instance_name` varchar(200) not null,
+ `network_technology` varchar(45) default null,
+ `network_type` varchar(45) default null,
+ `network_role` varchar(200) default null,
+ `network_scope` varchar(45) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `network_resource_model_uuid` varchar(200) not null,
+ primary key (`model_customization_uuid`),
+ key `fk_network_resource_customization__network_resource1_idx` (`network_resource_model_uuid`),
+ constraint `fk_network_resource_customization__network_resource1` foreign key (`network_resource_model_uuid`) references `network_resource` (`model_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+
+
+create table `tosca_csar` (
+ `artifact_uuid` varchar(200) not null,
+ `name` varchar(200) not null,
+ `version` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `artifact_checksum` varchar(200) not null,
+ `url` varchar(200) not null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`artifact_uuid`)
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `service` (
+ `model_uuid` varchar(200) not null,
+ `model_name` varchar(200) not null,
+ `model_invariant_uuid` varchar(200) not null,
+ `model_version` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `tosca_csar_artifact_uuid` varchar(200) default null,
+ `service_type` varchar(200) default null,
+ `service_role` varchar(200) default null,
+ `environment_context` varchar(200) default null,
+ `workload_context` varchar(200) default null,
+ `service_category` varchar(200) default null,
+ primary key (`model_uuid`),
+ key `fk_service__tosca_csar1_idx` (`tosca_csar_artifact_uuid`),
+ constraint `fk_service__tosca_csar1` foreign key (`tosca_csar_artifact_uuid`) references `tosca_csar` (`artifact_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+create table `service_recipe` (
+ `id` int(11) not null auto_increment,
+ `action` varchar(50) not null,
+ `version_str` varchar(20) default null,
+ `description` varchar(1200) default null,
+ `orchestration_uri` varchar(256) not null,
+ `service_param_xsd` varchar(2048) default null,
+ `recipe_timeout` int(11) default null,
+ `service_timeout_interim` int(11) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `service_model_uuid` varchar(200) not null,
+ primary key (`id`),
+ unique key `uk_7fav5dkux2v8g9d2i5ymudlgc` (`service_model_uuid`,`action`),
+ key `fk_service_recipe__service1_idx` (`service_model_uuid`),
+ constraint `fk_service_recipe__service1` foreign key (`service_model_uuid`) references `service` (`model_uuid`) on delete cascade on update cascade
+) engine=innodb auto_increment=86 default charset=latin1;
+
+
+
+create table `vnf_resource` (
+ `orchestration_mode` varchar(20) not null default 'heat',
+ `description` varchar(1200) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `model_uuid` varchar(200) not null,
+ `aic_version_min` varchar(20) default null,
+ `aic_version_max` varchar(20) default null,
+ `model_invariant_uuid` varchar(200) default null,
+ `model_version` varchar(20) not null,
+ `model_name` varchar(200) default null,
+ `tosca_node_type` varchar(200) default null,
+ `resource_category` varchar(200) default null,
+ `resource_sub_category` varchar(200) default null,
+ `heat_template_artifact_uuid` varchar(200) default null,
+ primary key (`model_uuid`),
+ key `fk_vnf_resource__heat_template1` (`heat_template_artifact_uuid`),
+ constraint `fk_vnf_resource__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `vf_module` (
+ `model_uuid` varchar(200) not null,
+ `model_invariant_uuid` varchar(200) default null,
+ `model_version` varchar(20) not null,
+ `model_name` varchar(200) not null,
+ `description` varchar(1200) default null,
+ `is_base` int(11) not null,
+ `heat_template_artifact_uuid` varchar(200) default null,
+ `vol_heat_template_artifact_uuid` varchar(200) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `vnf_resource_model_uuid` varchar(200) not null,
+ primary key (`model_uuid`,`vnf_resource_model_uuid`),
+ key `fk_vf_module__vnf_resource1_idx` (`vnf_resource_model_uuid`),
+ key `fk_vf_module__heat_template_art_uuid__heat_template1_idx` (`heat_template_artifact_uuid`),
+ key `fk_vf_module__vol_heat_template_art_uuid__heat_template2_idx` (`vol_heat_template_artifact_uuid`),
+ constraint `fk_vf_module__heat_template_art_uuid__heat_template1` foreign key (`heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade,
+ constraint `fk_vf_module__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade,
+ constraint `fk_vf_module__vol_heat_template_art_uuid__heat_template2` foreign key (`vol_heat_template_artifact_uuid`) references `heat_template` (`artifact_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+/*!40101 set @saved_cs_client = @@character_set_client */;
+/*!40101 set character_set_client = utf8 */;
+create table `vf_module_customization` (
+ `model_customization_uuid` varchar(200) not null,
+ `label` varchar(200) default null,
+ `initial_count` int(11) default '0',
+ `min_instances` int(11) default '0',
+ `max_instances` int(11) default null,
+ `availability_zone_count` int(11) default null,
+ `heat_environment_artifact_uuid` varchar(200) default null,
+ `vol_environment_artifact_uuid` varchar(200) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `vf_module_model_uuid` varchar(200) not null,
+ primary key (`model_customization_uuid`),
+ key `fk_vf_module_customization__vf_module1_idx` (`vf_module_model_uuid`),
+ key `fk_vf_module_customization__heat_env__heat_environment1_idx` (`heat_environment_artifact_uuid`),
+ key `fk_vf_module_customization__vol_env__heat_environment2_idx` (`vol_environment_artifact_uuid`),
+ constraint `fk_vf_module_customization__heat_env__heat_environment1` foreign key (`heat_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade,
+ constraint `fk_vf_module_customization__vf_module1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade,
+ constraint `fk_vf_module_customization__vol_env__heat_environment2` foreign key (`vol_environment_artifact_uuid`) references `heat_environment` (`artifact_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+/*!40101 set character_set_client = @saved_cs_client */;
+
+--
+-- table structure for table `vf_module_to_heat_files`
+--
+
+
+/*!40101 set @saved_cs_client = @@character_set_client */;
+/*!40101 set character_set_client = utf8 */;
+create table `vf_module_to_heat_files` (
+ `vf_module_model_uuid` varchar(200) not null,
+ `heat_files_artifact_uuid` varchar(200) not null,
+ primary key (`vf_module_model_uuid`,`heat_files_artifact_uuid`),
+ key `fk_vf_module_to_heat_files__heat_files__artifact_uuid1_idx` (`heat_files_artifact_uuid`),
+ constraint `fk_vf_module_to_heat_files__heat_files__artifact_uuid1` foreign key (`heat_files_artifact_uuid`) references `heat_files` (`artifact_uuid`) on delete cascade on update cascade,
+ constraint `fk_vf_module_to_heat_files__vf_module__model_uuid1` foreign key (`vf_module_model_uuid`) references `vf_module` (`model_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1 comment='il fait ce qu''il dit';
+/*!40101 set character_set_client = @saved_cs_client */;
+
+--
+-- table structure for table `vnf_components`
+--
+
+
+/*!40101 set @saved_cs_client = @@character_set_client */;
+/*!40101 set character_set_client = utf8 */;
+create table `vnf_components` (
+ `vnf_id` int(11) not null,
+ `component_type` varchar(20) not null,
+ `heat_template_id` int(11) default null,
+ `heat_environment_id` int(11) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`vnf_id`,`component_type`)
+) engine=innodb default charset=latin1;
+/*!40101 set character_set_client = @saved_cs_client */;
+
+--
+-- table structure for table `vnf_components_recipe`
+--
+
+
+
+create table `vnf_components_recipe` (
+ `id` int(11) not null auto_increment,
+ `vnf_type` varchar(200) default null,
+ `vnf_component_type` varchar(45) not null,
+ `action` varchar(50) not null,
+ `service_type` varchar(45) default null,
+ `version` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `orchestration_uri` varchar(256) not null,
+ `vnf_component_param_xsd` varchar(2048) default null,
+ `recipe_timeout` int(11) default null,
+ `creation_timestamp` datetime default current_timestamp,
+ `vf_module_model_uuid` varchar(200) default null,
+ primary key (`id`),
+ unique key `uk_4dpdwddaaclhc11wxsb7h59ma` (`vf_module_model_uuid`,`vnf_component_type`,`action`,`version`)
+) engine=innodb auto_increment=26 default charset=latin1;
+
+
+
+
+create table `vnf_recipe` (
+ `id` int(11) not null auto_increment,
+ `nf_role` varchar(200) default null,
+ `action` varchar(50) not null,
+ `service_type` varchar(45) default null,
+ `version_str` varchar(20) not null,
+ `description` varchar(1200) default null,
+ `orchestration_uri` varchar(256) not null,
+ `vnf_param_xsd` varchar(2048) default null,
+ `recipe_timeout` int(11) default null,
+ `creation_timestamp` datetime default current_timestamp,
+ `vf_module_id` varchar(100) default null,
+ primary key (`id`),
+ unique key `uk_f3tvqau498vrifq3cr8qnigkr` (`vf_module_id`,`action`,`version_str`)
+) engine=innodb auto_increment=10006 default charset=latin1;
+
+
+
+
+
+
+
+
+create table `vnf_resource_customization` (
+ `model_customization_uuid` varchar(200) not null,
+ `model_instance_name` varchar(200) not null,
+ `min_instances` int(11) default null,
+ `max_instances` int(11) default null,
+ `availability_zone_max_count` int(11) default null,
+ `nf_type` varchar(200) default null,
+ `nf_role` varchar(200) default null,
+ `nf_function` varchar(200) default null,
+ `nf_naming_code` varchar(200) default null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ `vnf_resource_model_uuid` varchar(200) not null,
+ `multi_stage_design` varchar(20) default null,
+ primary key (`model_customization_uuid`),
+ key `fk_vnf_resource_customization__vnf_resource1_idx` (`vnf_resource_model_uuid`),
+ constraint `fk_vnf_resource_customization__vnf_resource1` foreign key (`vnf_resource_model_uuid`) references `vnf_resource` (`model_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+
+
+create table `vnf_res_custom_to_vf_module_custom` (
+ `vnf_resource_cust_model_customization_uuid` varchar(200) not null,
+ `vf_module_cust_model_customization_uuid` varchar(200) not null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`vnf_resource_cust_model_customization_uuid`,`vf_module_cust_model_customization_uuid`),
+ key `fk_vnf_res_custom_to_vf_module_custom__vf_module_customizat_idx` (`vf_module_cust_model_customization_uuid`),
+ constraint `fk_vnf_res_custom_to_vf_module_custom__vf_module_customization1` foreign key (`vf_module_cust_model_customization_uuid`) references `vf_module_customization` (`model_customization_uuid`) on delete cascade on update cascade,
+ constraint `fk_vnf_res_custom_to_vf_module_custom__vnf_resource_customiza1` foreign key (`vnf_resource_cust_model_customization_uuid`) references `vnf_resource_customization` (`model_customization_uuid`) on delete cascade on update cascade
+) engine=innodb default charset=latin1;
+
+
+create table if not exists `external_service_to_internal_model_mapping` (
+id int(11) not null,
+service_name varchar(200) not null,
+product_flavor varchar(200) null,
+subscription_service_type varchar(200) not null,
+service_model_uuid varchar(200) not null,
+primary key (id),
+unique index uk_external_service_to_internal_model_mapping
+(service_name asc, product_flavor asc, service_model_uuid asc));
+
+create table if not exists `collection_resource` (
+ model_uuid varchar(200) not null,
+ model_name varchar(200) not null,
+ model_invariant_uuid varchar(200) not null,
+ model_version varchar(20) not null,
+ tosca_node_type varchar(200) not null,
+ description varchar(200),
+ creation_timestamp datetime not null default current_timestamp,
+ primary key (`model_uuid`)
+)engine=innodb default charset=latin1;
+
+create table if not exists `collection_resource_customization` (
+ model_customization_uuid varchar(200) not null,
+ model_instance_name varchar(200) not null,
+ role varchar(200) NULL,
+ object_type varchar(200) not null,
+ function varchar(200) NULL,
+ collection_resource_type varchar(200) NULL,
+ creation_timestamp datetime not null default current_timestamp,
+ cr_model_uuid varchar(200) not null,
+ primary key (`model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+create table if not exists `instance_group` (
+ model_uuid varchar(200) not null,
+ model_name varchar(200) not null,
+ model_invariant_uuid varchar(200) not null,
+ model_version varchar(20) not null,
+ tosca_node_type varchar(200) NULL,
+ role varchar(200) not null,
+ object_type varchar(200) not null,
+ creation_timestamp datetime not null default current_timestamp,
+ cr_model_uuid varchar(200) not null,
+ instance_group_type varchar(200) not null,
+ primary key (`model_uuid`)
+)engine=innodb default charset=latin1;
+
+
+create table if not exists `collection_resource_instance_group_customization` (
+ `collection_resource_customization_model_uuid` varchar(200) not null,
+ `instance_group_model_uuid` varchar(200) not null,
+ `function` varchar(200) null,
+ `description` varchar(1200) null,
+ `subinterface_network_quantity` int(11) null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`collection_resource_customization_model_uuid`, `instance_group_model_uuid`),
+ index `fk_collection_resource_instance_group_customization__instan_idx` (`instance_group_model_uuid` asc),
+ constraint `fk_collection_resource_instance_group_customization__collecti1`
+ foreign key (`collection_resource_customization_model_uuid`)
+ references `collection_resource_customization` (`model_customization_uuid`)
+ on delete cascade
+ on update cascade,
+ constraint `fk_collection_resource_instance_group_customization__instance1`
+ foreign key (`instance_group_model_uuid`)
+ references `instance_group` (`model_uuid`)
+ on delete cascade
+ on update cascade)
+engine = innodb
+default character set = latin1;
+
+create table if not exists `vnfc_instance_group_customization` (
+ `vnf_resource_customization_model_uuid` varchar(200) not null,
+ `instance_group_model_uuid` varchar(200) not null,
+ `function` varchar(200) null,
+ `description` varchar(1200) null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`vnf_resource_customization_model_uuid`, `instance_group_model_uuid`),
+ index `fk_vnfc_instance_group_customization__instance_group1_idx` (`instance_group_model_uuid` asc),
+ constraint `fk_vnfc_instance_group_customization__vnf_resource_customizat1`
+ foreign key (`vnf_resource_customization_model_uuid`)
+ references `vnf_resource_customization` (`model_customization_uuid`)
+ on delete cascade
+ on update cascade,
+ constraint `fk_vnfc_instance_group_customization__instance_group1`
+ foreign key (`instance_group_model_uuid`)
+ references `instance_group` (`model_uuid`)
+ on delete cascade
+ on update cascade)
+engine = innodb
+default character set = latin1;
+
+ create table if not exists `configuration`
+ ( `model_uuid` varchar(200) not null,
+ `model_invariant_uuid` varchar(200) not null,
+ `model_version` varchar(20) not null,
+ `model_name` varchar(200) not null,
+ `tosca_node_type` varchar(200) not null,
+ `description` varchar(1200) null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`model_uuid`))
+ engine = innodb auto_increment = 20654
+ default character set = latin1;
+
+ create table if not exists `service_proxy` (
+ `model_uuid` varchar(200) not null,
+ `model_invariant_uuid` varchar(200) not null,
+ `model_version` varchar(20) not null,
+ `model_name` varchar(200) not null,
+ `description` varchar(1200) null,
+ `creation_timestamp` datetime not null default current_timestamp,
+ primary key (`model_uuid`))
+ engine = innodb auto_increment = 20654
+ default character set = latin1;
+
+create table if not exists `service_proxy_customization` (
+`model_customization_uuid` varchar(200) not null,
+`model_instance_name` varchar(200) not null,
+`tosca_node_type` varchar(200) not null,
+`source_service_model_uuid` varchar(200) not null,
+`creation_timestamp` datetime not null default current_timestamp,
+`service_proxy_model_uuid` varchar(200) not null,
+primary key (`model_customization_uuid`),
+index `fk_service_proxy_customization__service_proxy1_idx` (`service_proxy_model_uuid` asc),
+index `fk_service_proxy_customization__service1_idx` (`source_service_model_uuid` asc),
+constraint`fk_spr_customization__service_proxy_resource1`
+foreign key (`service_proxy_model_uuid`) references `service_proxy` (`model_uuid`)
+on delete cascade on update cascade,
+constraint `fk_service_proxy_resource_customization__service1`
+foreign key (`source_service_model_uuid`) references `service`
+(`model_uuid`) on delete cascade on update cascade)
+engine = innodb
+auto_increment = 20654
+default character set = latin1;
+
+create table if not exists `configuration_customization` (
+`model_customization_uuid` varchar(200) not null,
+`model_instance_name` varchar(200) not null,
+`configuration_type` varchar(200) null,
+`configuration_role` varchar(200) null,
+`configuration_function` varchar(200) null,
+`creation_timestamp` datetime not null default current_timestamp,
+`configuration_model_uuid` varchar(200) not null,
+`service_proxy_customization_model_customization_uuid` varchar(200) null,
+`configuration_customization_model_customization_uuid` varchar(200) null,
+primary key (`model_customization_uuid`),
+index `fk_configuration_customization__configuration_idx` (`configuration_model_uuid` asc),
+index `fk_configuration_customization__service_proxy_customization_idx`
+(`service_proxy_customization_model_customization_uuid` asc),
+index `fk_configuration_customization__configuration_customization_idx`
+(`configuration_customization_model_customization_uuid` asc),
+constraint `fk_configuration_resource_customization__configuration_resour1`
+foreign key (`configuration_model_uuid`) references `configuration` (`model_uuid`)
+on delete cascade on update cascade,
+constraint `fk_configuration_customization__service_proxy_customization1` foreign
+key (`service_proxy_customization_model_customization_uuid`) references
+`service_proxy_customization` (`model_customization_uuid`)
+on delete cascade on update cascade, constraint
+`fk_configuration_customization__configuration_customization1` foreign
+key (`configuration_customization_model_customization_uuid`) references
+`configuration_customization` (`model_customization_uuid`)
+on delete cascade on update cascade)
+engine = innodb
+auto_increment =20654
+default character set = latin1;
+
+
+create table `service_proxy_customization_to_service` (
+ `service_model_uuid` varchar(200) not null,
+ `resource_model_customization_uuid` varchar(200) not null,
+ primary key (`service_model_uuid`,`resource_model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+
+create table `configuration_customization_to_service` (
+ `service_model_uuid` varchar(200) not null,
+ `resource_model_customization_uuid` varchar(200) not null,
+ primary key (`service_model_uuid`,`resource_model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+
+create table if not exists `collection_resource_customization_to_service` (
+ `service_model_uuid` varchar(200) not null,
+ `resource_model_customization_uuid` varchar(200) not null,
+ primary key (`service_model_uuid`,`resource_model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+
+create table `network_resource_customization_to_service` (
+ `service_model_uuid` varchar(200) not null,
+ `resource_model_customization_uuid` varchar(200) not null,
+ primary key (`service_model_uuid`,`resource_model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+create table `vnf_resource_customization_to_service` (
+ `service_model_uuid` varchar(200) not null,
+ `resource_model_customization_uuid` varchar(200) not null,
+ primary key (`service_model_uuid`,`resource_model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+create table `allotted_resource_customization_to_service` (
+ `service_model_uuid` varchar(200) not null,
+ `resource_model_customization_uuid` varchar(200) not null,
+ primary key (`service_model_uuid`,`resource_model_customization_uuid`)
+)engine=innodb default charset=latin1;
+
+
+
+create table ar_recipe (
+ ID INT(11) not null auto_increment,
+ MODEL_NAME VARCHAR(200) NOT NULL,
+ `ACTION` VARCHAR(200) NOT NULL,
+ VERSION_STR VARCHAR(200) NOT NULL,
+ SERVICE_TYPE VARCHAR(200),
+ DESCRIPTION VARCHAR(200),
+ ORCHESTRATION_URI VARCHAR(200) NOT NULL,
+ AR_PARAM_XSD VARCHAR(200),
+ RECIPE_TIMEOUT INT(10),
+ CREATION_TIMESTAMP DATETIME NOT NULL default current_timestamp,
+ primary key (ID),
+ unique key `uk_ar_recipe` (`model_name`,`action`,`version_str`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+alter table collection_resource_customization
+add foreign key ( cr_model_uuid)
+references collection_resource(model_uuid)
+on delete cascade;
+
+alter table vnf_resource_customization
+add column
+instance_group_model_uuid varchar(200);
+
+alter table network_resource_customization
+add column
+instance_group_model_uuid varchar(200);
+
+
+alter table network_resource_customization
+add foreign key ( instance_group_model_uuid)
+references instance_group(model_uuid)
+on delete cascade;
+
+alter table collection_resource_customization_to_service
+add foreign key (service_model_uuid)
+references service(model_uuid)
+on delete cascade;
+
+alter table allotted_resource_customization_to_service
+add foreign key (service_model_uuid)
+references service(model_uuid)
+on delete cascade;
+
+
+alter table vnf_resource_customization_to_service
+add foreign key (service_model_uuid)
+references service(model_uuid)
+on delete cascade;
+
+
+alter table network_resource_customization_to_service
+add foreign key (service_model_uuid)
+references service(model_uuid)
+on delete cascade;
+
+
+alter table network_resource_customization_to_service
+add foreign key (resource_model_customization_uuid)
+references network_resource_customization(model_customization_uuid)
+on delete cascade;
+
+alter table vnf_resource_customization_to_service
+add foreign key (resource_model_customization_uuid)
+references vnf_resource_customization(model_customization_uuid)
+on delete cascade;
+
+alter table allotted_resource_customization_to_service
+add foreign key (resource_model_customization_uuid)
+references allotted_resource_customization(model_customization_uuid)
+on delete cascade;
+
+alter table collection_resource_customization_to_service
+add foreign key (resource_model_customization_uuid)
+references collection_resource_customization(model_customization_uuid)
+on delete cascade;
+
+
+create table if not exists `collection_network_resource_customization` (
+`model_customization_uuid` varchar(200) not null,
+`model_instance_name` varchar(200) not null,
+`network_technology` varchar(45) null,
+`network_type` varchar(45) null,
+`network_role` varchar(200) null,
+`network_scope` varchar(45) null,
+`creation_timestamp` datetime not null default current_timestamp,
+`network_resource_model_uuid` varchar(200) not null, `instance_group_model_uuid` varchar(200) null,
+`crc_model_customization_uuid` varchar(200) not null, primary key
+(`model_customization_uuid`, `crc_model_customization_uuid`),
+index `fk_collection_net_resource_customization__network_resource1_idx`
+(`network_resource_model_uuid` asc), index
+`fk_collection_net_resource_customization__instance_group1_idx`
+(`instance_group_model_uuid` asc), index
+`fk_col_net_res_customization__collection_res_customization_idx`
+(`crc_model_customization_uuid` asc), constraint
+`fk_collection_net_resource_customization__network_resource10` foreign
+key (`network_resource_model_uuid`) references
+`network_resource` (`model_uuid`) on delete cascade on
+update cascade, constraint
+`fk_collection_net_resource_customization__instance_group10` foreign key
+(`instance_group_model_uuid`) references `instance_group`
+(`model_uuid`) on delete cascade on update cascade, constraint
+`fk_collection_network_resource_customization__collection_reso1` foreign
+key (`crc_model_customization_uuid`) references
+`collection_resource_customization`
+(`model_customization_uuid`) on delete cascade on update cascade) engine
+= innodb default character set = latin1;
+
+CREATE TABLE IF NOT EXISTS `rainy_day_handler_macro` (
+`id` INT(11) NOT NULL AUTO_INCREMENT,
+`FLOW_NAME` VARCHAR(200) NOT NULL,
+`SERVICE_TYPE` VARCHAR(200) NOT NULL,
+`VNF_TYPE` VARCHAR(200) NOT NULL,
+`ERROR_CODE` VARCHAR(200) NOT NULL,
+`WORK_STEP` VARCHAR(200) NOT NULL,
+`POLICY` VARCHAR(200) NOT NULL,
+PRIMARY KEY (`id`))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `northbound_request_ref_lookup` (
+`id` INT(11) NOT NULL AUTO_INCREMENT,
+`REQUEST_SCOPE` VARCHAR(200) NOT NULL,
+`ACTION` VARCHAR(200) NOT NULL,
+`MACRO_ACTION` VARCHAR(200) NOT NULL,
+`IS_ALACARTE` TINYINT(1) NOT NULL DEFAULT 0,
+`IS_TOPLEVELFLOW` TINYINT(1) NOT NULL DEFAULT 0,
+`MIN_API_VERSION` DOUBLE NOT NULL,
+`MAX_API_VERSION` DOUBLE NULL,
+PRIMARY KEY (`id`),
+UNIQUE INDEX `UK_northbound_request_ref_lookup` (`MIN_API_VERSION` ASC, `REQUEST_SCOPE` ASC, `ACTION` ASC, `IS_ALACARTE` ASC))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `orchestration_flow_reference` (
+`id` INT(11) NOT NULL AUTO_INCREMENT,
+`COMPOSITE_ACTION` VARCHAR(200) NOT NULL,
+`SEQ_NO` INT(11) NOT NULL,
+`FLOW_NAME` VARCHAR(200) NOT NULL,
+`FLOW_VERSION` DOUBLE NOT NULL,
+`NB_REQ_REF_LOOKUP_ID` INT(11) NOT NULL,
+PRIMARY KEY (`id`),
+INDEX `fk_orchestration_flow_reference__northbound_req_ref_look_idx` (`NB_REQ_REF_LOOKUP_ID` ASC),
+UNIQUE INDEX `UK_orchestration_flow_reference` (`COMPOSITE_ACTION` ASC, `FLOW_NAME` ASC, `SEQ_NO` ASC, `NB_REQ_REF_LOOKUP_ID` ASC),
+CONSTRAINT `fk_orchestration_flow_reference__northbound_request_ref_look1`
+FOREIGN KEY (`NB_REQ_REF_LOOKUP_ID`) REFERENCES `northbound_request_ref_lookup` (`id`)
+ON DELETE CASCADE ON UPDATE CASCADE)
+ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
+
+--------START Request DB SCHEMA --------
+CREATE DATABASE requestdb;
+USE requestdb;
+
+
+CREATE TABLE `infra_active_requests` (
+ `REQUEST_ID` varchar(45) NOT NULL,
+ `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
+ `ACTION` varchar(45) DEFAULT NULL,
+ `REQUEST_STATUS` varchar(20) DEFAULT NULL,
+ `STATUS_MESSAGE` longtext DEFAULT NULL,
+ `PROGRESS` bigint(20) DEFAULT NULL,
+ `START_TIME` datetime DEFAULT NULL,
+ `END_TIME` datetime DEFAULT NULL,
+ `SOURCE` varchar(45) DEFAULT NULL,
+ `VNF_ID` varchar(45) DEFAULT NULL,
+ `VNF_NAME` varchar(80) DEFAULT NULL,
+ `VNF_TYPE` varchar(200) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
+ `TENANT_ID` varchar(45) DEFAULT NULL,
+ `PROV_STATUS` varchar(20) DEFAULT NULL,
+ `VNF_PARAMS` longtext,
+ `VNF_OUTPUTS` longtext,
+ `REQUEST_BODY` longtext,
+ `RESPONSE_BODY` longtext,
+ `LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
+ `MODIFY_TIME` datetime DEFAULT NULL,
+ `REQUEST_TYPE` varchar(20) DEFAULT NULL,
+ `VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
+ `VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
+ `VF_MODULE_ID` varchar(45) DEFAULT NULL,
+ `VF_MODULE_NAME` varchar(200) DEFAULT NULL,
+ `VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
+ `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
+ `AIC_CLOUD_REGION` varchar(11) DEFAULT NULL,
+ `CALLBACK_URL` varchar(200) DEFAULT NULL,
+ `CORRELATOR` varchar(80) DEFAULT NULL,
+ `NETWORK_ID` varchar(45) DEFAULT NULL,
+ `NETWORK_NAME` varchar(80) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(80) DEFAULT NULL,
+ `REQUEST_SCOPE` varchar(45) NOT NULL DEFAULT 'unknown',
+ `REQUEST_ACTION` varchar(45) NOT NULL DEFAULT 'unknown',
+ `SERVICE_INSTANCE_ID` varchar(45) DEFAULT NULL,
+ `SERVICE_INSTANCE_NAME` varchar(80) DEFAULT NULL,
+ `REQUESTOR_ID` varchar(50) DEFAULT NULL,
+ `CONFIGURATION_ID` varchar(45) DEFAULT NULL,
+ `CONFIGURATION_NAME` varchar(200) DEFAULT NULL,
+ `OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
+ `OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`REQUEST_ID`),
+ UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d5ak` (`CLIENT_REQUEST_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `archived_infra_requests` (
+ `REQUEST_ID` varchar(45) NOT NULL,
+ `CLIENT_REQUEST_ID` varchar(45) DEFAULT NULL,
+ `ACTION` varchar(45) DEFAULT NULL,
+ `REQUEST_STATUS` varchar(20) DEFAULT NULL,
+ `STATUS_MESSAGE` longtext DEFAULT NULL,
+ `PROGRESS` bigint(20) DEFAULT NULL,
+ `START_TIME` datetime DEFAULT NULL,
+ `END_TIME` datetime DEFAULT NULL,
+ `SOURCE` varchar(45) DEFAULT NULL,
+ `VNF_ID` varchar(45) DEFAULT NULL,
+ `VNF_NAME` varchar(80) DEFAULT NULL,
+ `VNF_TYPE` varchar(200) DEFAULT NULL,
+ `SERVICE_TYPE` varchar(45) DEFAULT NULL,
+ `AIC_NODE_CLLI` varchar(11) DEFAULT NULL,
+ `TENANT_ID` varchar(45) DEFAULT NULL,
+ `PROV_STATUS` varchar(20) DEFAULT NULL,
+ `VNF_PARAMS` longtext,
+ `VNF_OUTPUTS` longtext,
+ `REQUEST_BODY` longtext,
+ `RESPONSE_BODY` longtext,
+ `LAST_MODIFIED_BY` varchar(100) DEFAULT NULL,
+ `MODIFY_TIME` datetime DEFAULT NULL,
+ `REQUEST_TYPE` varchar(20) DEFAULT NULL,
+ `VOLUME_GROUP_ID` varchar(45) DEFAULT NULL,
+ `VOLUME_GROUP_NAME` varchar(45) DEFAULT NULL,
+ `VF_MODULE_ID` varchar(45) DEFAULT NULL,
+ `VF_MODULE_NAME` varchar(200) DEFAULT NULL,
+ `VF_MODULE_MODEL_NAME` varchar(200) DEFAULT NULL,
+ `AAI_SERVICE_ID` varchar(50) DEFAULT NULL,
+ `AIC_CLOUD_REGION` varchar(11) DEFAULT NULL,
+ `CALLBACK_URL` varchar(200) DEFAULT NULL,
+ `CORRELATOR` varchar(80) DEFAULT NULL,
+ `NETWORK_ID` varchar(45) DEFAULT NULL,
+ `NETWORK_NAME` varchar(80) DEFAULT NULL,
+ `NETWORK_TYPE` varchar(80) DEFAULT NULL,
+ `REQUEST_SCOPE` varchar(20) NOT NULL DEFAULT 'unknown',
+ `REQUEST_ACTION` varchar(45) NOT NULL DEFAULT 'unknown',
+ `SERVICE_INSTANCE_ID` varchar(45) DEFAULT NULL,
+ `SERVICE_INSTANCE_NAME` varchar(80) DEFAULT NULL,
+ `REQUESTOR_ID` varchar(50) DEFAULT NULL,
+ `CONFIGURATION_ID` varchar(45) DEFAULT NULL,
+ `CONFIGURATION_NAME` varchar(200) DEFAULT NULL,
+ `OPERATIONAL_ENV_ID` varchar(45) DEFAULT NULL,
+ `OPERATIONAL_ENV_NAME` varchar(200) DEFAULT NULL,
+ PRIMARY KEY (`REQUEST_ID`),
+ UNIQUE KEY `UK_bhu6w8p7wvur4pin0gjw2d59h` (`CLIENT_REQUEST_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `site_status` (
+ `SITE_NAME` varchar(255) NOT NULL,
+ `STATUS` bit(1) DEFAULT NULL,
+ `CREATION_TIMESTAMP` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`SITE_NAME`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `watchdog_distributionid_status` (
+ `DISTRIBUTION_ID` varchar(45) NOT NULL,
+ `DISTRIBUTION_ID_STATUS` varchar(45) DEFAULT NULL,
+ `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`DISTRIBUTION_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `watchdog_per_component_distribution_status` (
+ `DISTRIBUTION_ID` varchar(45) NOT NULL,
+ `COMPONENT_NAME` varchar(45) NOT NULL,
+ `COMPONENT_DISTRIBUTION_STATUS` varchar(45) DEFAULT NULL,
+ `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`DISTRIBUTION_ID`,`COMPONENT_NAME`),
+ CONSTRAINT `fk_watchdog_component_distribution_status_watchdog_distributi1` FOREIGN KEY (`DISTRIBUTION_ID`) REFERENCES `watchdog_distributionid_status` (`DISTRIBUTION_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `watchdog_service_mod_ver_id_lookup` (
+ `DISTRIBUTION_ID` varchar(45) NOT NULL,
+ `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
+ `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODIFY_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`DISTRIBUTION_ID`,`SERVICE_MODEL_VERSION_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `activate_operational_env_service_model_distribution_status` (
+ `OPERATIONAL_ENV_ID` varchar(45) NOT NULL,
+ `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
+ `REQUEST_ID` varchar(45) NOT NULL,
+ `SERVICE_MOD_VER_FINAL_DISTR_STATUS` varchar(45) DEFAULT NULL,
+ `RECOVERY_ACTION` varchar(30) DEFAULT NULL,
+ `RETRY_COUNT_LEFT` int(11) DEFAULT NULL,
+ `WORKLOAD_CONTEXT` varchar(80) NOT NULL,
+ `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ PRIMARY KEY (`OPERATIONAL_ENV_ID`,`SERVICE_MODEL_VERSION_ID`,`REQUEST_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE `activate_operational_env_per_distributionid_status` (
+ `DISTRIBUTION_ID` varchar(45) NOT NULL,
+ `DISTRIBUTION_ID_STATUS` varchar(45) DEFAULT NULL,
+ `DISTRIBUTION_ID_ERROR_REASON` varchar(250) DEFAULT NULL,
+ `CREATE_TIME` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `MODIFY_TIME` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
+ `OPERATIONAL_ENV_ID` varchar(45) NOT NULL,
+ `SERVICE_MODEL_VERSION_ID` varchar(45) NOT NULL,
+ `REQUEST_ID` varchar(45) NOT NULL,
+ PRIMARY KEY (`DISTRIBUTION_ID`),
+ KEY `fk_activate_op_env_per_distributionid_status__aoesmds1_idx` (`OPERATIONAL_ENV_ID`,`SERVICE_MODEL_VERSION_ID`,`REQUEST_ID`),
+ CONSTRAINT `fk_activate_op_env_per_distributionid_status__aoesmds1` FOREIGN KEY (`OPERATIONAL_ENV_ID`, `SERVICE_MODEL_VERSION_ID`, `REQUEST_ID`) REFERENCES `activate_operational_env_service_model_distribution_status` (`OPERATIONAL_ENV_ID`, `SERVICE_MODEL_VERSION_ID`, `REQUEST_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+create table operation_status (
+ SERVICE_ID varchar(255) not null,
+ OPERATION_ID varchar(255) not null,
+ SERVICE_NAME varchar(255),
+ OPERATION_TYPE varchar(255),
+ USER_ID varchar(255),
+ RESULT varchar(255),
+ OPERATION_CONTENT varchar(255),
+ PROGRESS varchar(255),
+ REASON varchar(255),
+ OPERATE_AT datetime NOT NULL,
+ FINISHED_AT datetime NOT NULL,
+ primary key (SERVICE_ID,OPERATION_ID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+create table resource_operation_status (
+ SERVICE_ID varchar(255) not null,
+ OPERATION_ID varchar(255) not null,
+ RESOURCE_TEMPLATE_UUID varchar(255) not null,
+ OPER_TYPE varchar(255),
+ RESOURCE_INSTANCE_ID varchar(255),
+ JOB_ID varchar(255),
+ STATUS varchar(255),
+ PROGRESS varchar(255),
+ ERROR_CODE varchar(255) ,
+ STATUS_DESCRIPOTION varchar(255) ,
+ primary key (SERVICE_ID,OPERATION_ID,RESOURCE_TEMPLATE_UUID)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+create table if not exists model_recipe (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_ID` INT(11),
+ `ACTION` VARCHAR(40),
+ `SCHEMA_VERSION` VARCHAR(40),
+ `DESCRIPTION` VARCHAR(40),
+ `ORCHESTRATION_URI` VARCHAR(20),
+ `MODEL_PARAM_XSD` VARCHAR(20),
+ `RECIPE_TIMEOUT` INT(11),
+ `CREATION_TIMESTAMP` datetime not null default current_timestamp,
+ PRIMARY KEY (`ID`),
+ CONSTRAINT uk1_model_recipe UNIQUE (`MODEL_ID`, `ACTION`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+create table if not exists model (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `MODEL_CUSTOMIZATION_ID` VARCHAR(40),
+ `MODEL_CUSTOMIZATION_NAME` VARCHAR(40),
+ `MODEL_INVARIANT_ID` VARCHAR(40),
+ `MODEL_NAME` VARCHAR(40),
+ `MODEL_TYPE` VARCHAR(20),
+ `MODEL_VERSION` VARCHAR(20),
+ `MODEL_VERSION_ID` VARCHAR(40),
+ `CREATION_TIMESTAMP` datetime not null default current_timestamp,
+ `RECIPE` INT(11),
+ PRIMARY KEY (`ID`),
+ CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
+ FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1; \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2VfModuleModelNameEmptyOnDelete.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2VfModuleModelNameEmptyOnDelete.json
deleted file mode 100644
index f25a759cd6..0000000000
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/v2VfModuleModelNameEmptyOnDelete.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "requestDetails": {
- "cloudConfiguration": {
- "lcpCloudRegionId": "mtn6",
- "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
- },
- "modelInfo": {
- "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
- "modelType": "vfModule",
- "modelVersion": "2.0",
- "modelCustomizationName":"",
- "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
- "modelCustomizationId": "test",
- "modelNameVersionId": "test"
- },
- "requestInfo": {
- "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
- "requestorId": "bp896r",
- "source": "VID",
- "suppressRollback": false
- },
- "requestParameters": {
- "aLaCarte" : true,
- "autoBuildVfModules": false,
- "usePreload": false,
- "userParams": [
- {
- "name": "aic_zone",
- "value": "mtn6"
- }
- ]
- },
- "subscriberInfo": {
- "globalSubscriberId": "MSO_1610_dev",
- "subscriberName": "MSO_1610_dev"
- }
- }
-} \ No newline at end of file