summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/resources
diff options
context:
space:
mode:
authorPlummer, Brittany <brittany.plummer@att.com>2019-11-20 20:56:44 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-11-20 20:56:44 -0500
commitba40eeb0df65eba18fa150c8736f6cc084508d4b (patch)
treeb8f0b906a8677a22a931391ea9db2416fccfccb2 /mso-api-handlers/mso-api-handler-infra/src/test/resources
parentdf2db9f4a7c3fccc5f617792a057d8dbc6bf9d34 (diff)
vnf and vf module replace requests to make
Added cloudConfiguration when not sent in replace request Added robot test for vfModule request with no cloud config Started adding unit tests for ServiceInstances Added unit tests for BpmnRequestBuilder changes Added ServiceInstances tests to test replace without CloudConfig Removed unused wiremock stubbings from test Added check for replaceInstanceRetainAssignments action Added action to common package to fix failing robot tests Removed new test, updated existing vfModule replace Added jackson annotations to RequestError object Fixed failing unit tests apih common Issue-ID: SO-2523 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I9470a0a9c7e356ef98ceb7269e066e79e0afb074
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/resources')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json28
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json58
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json30
4 files changed, 124 insertions, 0 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json
new file mode 100644
index 0000000000..2004a82ed7
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/AAIEntityNotFoundResponse.json
@@ -0,0 +1,8 @@
+{
+ "requestError": {
+ "serviceException": {
+ "messageId": "SVC0001",
+ "text": "Generic Vnf Not Found In Inventory, VnfId: ff305d54-75b4-431b-adb2-eb6b9e5ff000"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json
new file mode 100644
index 0000000000..766d49bee8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVfModuleNoCloudConfig.json
@@ -0,0 +1,28 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "xxxxxx",
+ "instanceName": "testService60"
+ },
+ "requestParameters": {
+ "aLaCarte": true,
+ "autoBuildVfModules": false,
+ "subscriptionServiceType": "test"
+ },
+ "modelInfo":{
+ "modelInvariantId": "f7ce78bb-423b-11e7-93f8-0050569a7968",
+ "modelVersion":"2",
+ "modelVersionId":"78ca26d0-246d-11e7-93ae-92361f002671",
+ "modelType":"vfModule",
+ "modelName":"serviceModel",
+ "modelCustomizationId": "a7f1d08e-b02d-11e6-80f5-76304dec7eb7"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "MSO_1610_dev",
+ "subscriberName": "MSO_1610_dev"
+ }
+ }
+}
+
+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json
new file mode 100644
index 0000000000..46873588c0
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ReplaceVnfNoCloudConfig.json
@@ -0,0 +1,58 @@
+{
+ "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"
+ },
+ "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"
+ }
+ }
+}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json
new file mode 100644
index 0000000000..a0a4c14c10
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/__files/infra/VnfLookup.json
@@ -0,0 +1,30 @@
+[
+ {
+ "requestId":"b15f30dc-56b1-4a1a-aaf1-156c0d685142",
+ "action":"createInstance",
+ "requestStatus":"COMPLETE",
+ "statusMessage":"ALaCarte-Vnf-createInstance request was executed correctly.",
+ "flowStatus":"Successfully completed all Building Blocks",
+ "progress":100,
+ "startTime":"2019-11-11T19:28:56.000+0000",
+ "endTime":"2019-11-11T19:29:15.000+0000",
+ "source":"VID",
+ "vnfId":"5b20c24e-cabb-4725-8f88-57ca99a8ffe1",
+ "vnfName":"Robot_VNF_For_Volume_Group",
+ "vnfType":"Vf zrdm5bpxmc02092017-Service/Vf zrdm5bpxmc02092017-VF 0",
+ "tenantId":"0422ffb57ba042c0800a29dc85ca70f8",
+ "requestBody":"{\"requestDetails\": {\"relatedInstanceList\": [{\"relatedInstance\": {\"instanceId\": \"f5435110-b276-4920-9261-a18a5582d357\", \"modelInfo\": {\"modelVersionId\": \"bad955c3-29b2-4a27-932e-28e942cc6480\", \"modelVersion\": \"1\", \"modelName\": \"Vf zrdm5bpxmc02092017-Service\", \"modelInvariantId\": \"b16a9398-ffa3-4041-b78c-2956b8ad9c7b\", \"modelType\": \"service\"}}}], \"requestParameters\": {\"userParams\": [], \"enforceValidNfValues\": false, \"testApi\": \"GR_API\"}, \"lineOfBusiness\": {\"lineOfBusinessName\": \"vSAMP12_14-2XXX-Aug18-9001 - LOB\"}, \"requestInfo\": {\"source\": \"VID\", \"requestorId\": \"az2016\", \"instanceName\": \"Robot_VNF_For_Volume_Group\", \"suppressRollback\": false, \"productFamilyId\": \"06f76284-8710-11e6-ae22-56b6b6499611\"}, \"platform\": {\"platformName\": \"vSAMP12_14-2XXX-Aug18-9001 - Platform\"}, \"modelInfo\": {\"modelName\": \"Vf zrdm5bpxmc02092017-VF\", \"modelVersion\": \"1\", \"modelInvariantId\": \"23122c9b-dd7f-483f-bf0a-e069303db2f7\", \"modelType\": \"vnf\", \"modelCustomizationName\": \"Vf zrdm5bpxmc02092017-VF 0\", \"modelVersionId\": \"d326f424-2312-4dd6-b7fe-364fadbd1ef5\", \"modelCustomizationId\": \"96c23a4a-6887-4b2c-9cce-1e4ea35eaade\"}, \"cloudConfiguration\": {\"cloudOwner\": \"cloudOwner\", \"tenantId\": \"0422ffb57ba042c0800a29dc85ca70f8\", \"lcpCloudRegionId\": \"regionOne\"}}}",
+ "lastModifiedBy":"CamundaBPMN",
+ "modifyTime":"2019-11-11T19:29:15.000+0000",
+ "aicCloudRegion":"regionOne",
+ "serviceInstanceId":"f5435110-b276-4920-9261-a18a5582d357",
+ "requestScope":"vnf",
+ "requestAction":"createInstance",
+ "requestorId":"az2016",
+ "requestUrl":"http://192.168.99.100:9100/onap/so/infra/serviceInstantiation/v7/serviceInstances/f5435110-b276-4920-9261-a18a5582d357/vnfs",
+ "cloudApiRequests":[
+
+ ],
+ "requestURI":"b15f30dc-56b1-4a1a-aaf1-156c0d685142"
+ }
+]