summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/resources
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-10-30 17:44:28 +0200
committerIttay Stern <ittay.stern@att.com>2019-10-31 12:13:49 +0200
commit9a5f618f84142930a9955fc555033c765d308186 (patch)
tree5b727f85e4288b13a304f0d93bb21bfd139cd40a /vid-app-common/src/test/resources
parent2faaef3c1c05fcef0cbcda7f77f6c173826e57b6 (diff)
Backend's vfModule upgrade: test refinement + code fix
Now using modelCustomizationName to map each module from existing service-model to target's service-model. Issue-ID: VID-603 Change-Id: Ie6a2584b6f9d0aa835e8f2ddff4a3ab9d80ef434 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-app-common/src/test/resources')
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule__payload_to_mso.json (renamed from vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule.json)0
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json92
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json6
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json54
-rw-r--r--vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__target_newest_service_model.json160
5 files changed, 217 insertions, 95 deletions
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule__payload_to_mso.json
index 103985c96..103985c96 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule__payload_to_mso.json
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json
deleted file mode 100644
index a31610d49..000000000
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/replace_vfmodule_fe_input.json
+++ /dev/null
@@ -1,92 +0,0 @@
-{
- "action": "None_Upgrade",
- "isDirty": true,
- "vnfs": {
- "Vf zolson5bpxmc02092017-VF 0": {
- "vfModules": {
- "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0": {
- "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0-?": {
- "instanceName": "replace_module",
- "instanceId": "5d49c3b1-fc90-4762-8c98-e800170baa55",
- "action": "None_Upgrade",
- "orchStatus": "Create",
- "provStatus": "Prov Status",
- "inMaint": false,
- "rollbackOnFailure": true,
- "lcpCloudRegionId": "regionOne",
- "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
- "modelInfo": {
- "modelInvariantId": "f7a867f2-596b-4f4a-a128-421e825a6190",
- "modelVersionId": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46",
- "modelName": "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0",
- "modelVersion": "1",
- "modelCustomizationId": "074c64d0-7e13-4bcc-8bdb-ea922331102d",
- "modelCustomizationName" : "VfZrdm5bpxmc02092017Vf..CORNELIUS_base..module-0",
- "uuid": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46"
- },
- "uuid": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46"
- }
- }
- },
- "uuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5",
- "productFamilyId": "bad955c3-29b2-4a27-932e-28e942cc6480",
- "lcpCloudRegionId": "regionOne",
- "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
- "lineOfBusiness": "ONAP",
- "platformName": "platform",
- "modelInfo": {
- "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7",
- "modelVersionId": "d326f424-2312-4dd6-b7fe-364fadbd1ef5",
- "modelName": "Vf zolson5bpxmc02092017-VF",
- "modelVersion": "1",
- "modelCustomizationId": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade",
- "modelCustomizationName": "Vf zolson5bpxmc02092017-VF 0",
- "uuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5"
- },
- "orchStatus": "Created",
- "inMaint": false,
- "rollbackOnFailure": true,
- "instanceId": "5c9c2896-1fe6-4055-b7ec-d0a01e5f9bf5",
- "instanceName": "vnf_of_replace_module",
- "action": "None_Upgrade",
- "legacyRegion": "some legacy region"
- }
- },
- "instanceParams": [],
- "validationCounter": 0,
- "existingNames": {
- "mcankinstancename": ""
- },
- "existingVNFCounterMap": {
- "d326f424-2312-4dd6-b7fe-364fadbd1ef5": 1
- },
- "existingVnfGroupCounterMap": {},
- "existingNetworksCounterMap": {},
- "networks": {},
- "vnfGroups": {},
- "bulkSize": 1,
- "instanceId": "e9993045-cc96-4f3f-bf9a-71b2a400a956",
- "instanceName": "service_of_replace_module",
- "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
- "subscriptionServiceType": "TYLER SILVIA",
- "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
- "productFamilyId": "bad955c3-29b2-4a27-932e-28e942cc6480",
- "lcpCloudRegionId": "regionOne",
- "tenantId": "0422ffb57ba042c0800a29dc85ca70f8",
- "aicZoneId": "NFT1",
- "projectName": "WATKINS",
- "rollbackOnFailure": true,
- "aicZoneName": "NFTJSSSS-NFT1",
- "owningEntityName": "WayneHolland",
- "tenantName": "tenant_name",
- "modelInfo": {
- "modelInvariantId": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b",
- "modelVersionId": "bad955c3-29b2-4a27-932e-28e942cc6480",
- "modelName": "Vf zolson5bpxmc02092017-Service",
- "modelVersion": "1",
- "uuid": "bad955c3-29b2-4a27-932e-28e942cc6480"
- },
- "isALaCarte": true,
- "orchStatus": "Active",
- "testApi": "GR_API"
-} \ No newline at end of file
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
index 477e47bb7..9571a2d13 100644
--- a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json
@@ -37,9 +37,9 @@
"instanceId": "b0732bed-3ddf-43cc-b193-7f18db84e476",
"orchStatus": "Active",
"productFamilyId": null,
- "lcpCloudRegionId": null,
- "tenantId": null,
- "cloudOwner": null,
+ "lcpCloudRegionId": "olson5a",
+ "tenantId": "7ff7b1a4fe954f71ab79d3160ec3eb08",
+ "cloudOwner": "irma-aic",
"modelInfo": {
"modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
"modelCustomizationId": "3f1f0fcb-8a88-4612-a794-3912613ed9e8",
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
new file mode 100644
index 000000000..a9a9eda7d
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__payload_to_mso.json
@@ -0,0 +1,54 @@
+{
+ "requestDetails": {
+ "requestInfo": {
+ "source": "VID",
+ "requestorId": "az2016",
+ "instanceName": "PST-VfMod-Replace-5-Vfmod",
+ "suppressRollback": true
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "6196ab1f-2349-4b32-9b6c-cffeb0ccc79c",
+ "modelInfo": {
+ "modelType": "service",
+ "modelName": "xbi test module replace",
+ "modelVersion": "2.0",
+ "modelVersionId": "d9a5b318-187e-476d-97f7-a15687a927a9",
+ "modelInvariantId": "b3a1a119-dede-4ed0-b077-2a617fa519a3"
+ }
+ }
+ }, {
+ "relatedInstance": {
+ "instanceId": "d520268f-7489-4662-be59-f81495b3a069",
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelName": "xbi test module replace",
+ "modelVersion": "2.0",
+ "modelVersionId": "b726207d-12ad-4245-90e0-bb9f71824b01",
+ "modelInvariantId": "5626a5ec-7dce-4cc1-b025-bdb7abb2f058",
+ "modelCustomizationId": "b2fea30c-3794-44c1-9d62-1103319a4c44",
+ "modelCustomizationName": "xbi test module replace 0"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "userParams": [],
+ "testApi": "VNF_API"
+ },
+ "modelInfo": {
+ "modelType": "vfModule",
+ "modelName": "XbiTestModuleReplace..base_ocg..module-0",
+ "modelVersion": "1",
+ "modelVersionId": "04b21d26-9780-4956-8329-b22b049329f4",
+ "modelInvariantId": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+ "modelCustomizationId": "51f9acf5-4ab3-4041-bb0d-b022e747dc6b",
+ "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "olson5a",
+ "cloudOwner": "irma-aic",
+ "tenantId": "7ff7b1a4fe954f71ab79d3160ec3eb08"
+ }
+ }
+}
diff --git a/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__target_newest_service_model.json b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__target_newest_service_model.json
new file mode 100644
index 000000000..6d2ec3a30
--- /dev/null
+++ b/vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__target_newest_service_model.json
@@ -0,0 +1,160 @@
+{
+ "service": {
+ "uuid": "d9a5b318-187e-476d-97f7-a15687a927a9",
+ "invariantUuid": "b3a1a119-dede-4ed0-b077-2a617fa519a3",
+ "name": "xbi test module replace",
+ "version": "2.0",
+ "toscaModelURL": null,
+ "category": "Emanuel",
+ "serviceType": "",
+ "serviceRole": "",
+ "description": "test module replacement feature",
+ "serviceEcompNaming": "true",
+ "instantiationType": "A-La-Carte",
+ "inputs": {},
+ "vidNotions": {
+ "instantiationUI": "legacy",
+ "modelCategory": "other",
+ "viewEditUI": "legacy",
+ "instantiationType": "ALaCarte"
+ }
+ },
+ "vnfs": {
+ "xbi test module replace 0": {
+ "uuid": "b726207d-12ad-4245-90e0-bb9f71824b01",
+ "invariantUuid": "5626a5ec-7dce-4cc1-b025-bdb7abb2f058",
+ "description": "VSP for testing module replacement feature",
+ "name": "xbi test module replace",
+ "version": "2.0",
+ "customizationUuid": "b2fea30c-3794-44c1-9d62-1103319a4c44",
+ "inputs": {},
+ "commands": {},
+ "properties": {},
+ "type": "VF",
+ "modelCustomizationName": "xbi test module replace 0",
+ "vfModules": {
+ "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
+ "uuid": "04b21d26-9780-4956-8329-b22b049329f4",
+ "invariantUuid": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+ "customizationUuid": "51f9acf5-4ab3-4041-bb0d-b022e747dc6b",
+ "description": null,
+ "name": "XbiTestModuleReplace..base_ocg..module-0",
+ "version": "1",
+ "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "base_ocg",
+ "baseModule": true
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": {
+ "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6",
+ "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d",
+ "customizationUuid": "73b88d25-b8e9-41bc-bba5-18c9b07750a3",
+ "description": null,
+ "name": "XbiTestModuleReplace..ocgmgr..module-1",
+ "version": "1",
+ "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "ocgmgr",
+ "baseModule": false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": {
+ "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6",
+ "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d",
+ "customizationUuid": "73b88d25-b8e9-41bc-bba5-18c9b07750a3",
+ "description": null,
+ "name": "XbiTestModuleReplace..ocgmgr..module-1",
+ "version": "1",
+ "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "ocgmgr",
+ "baseModule": false
+ },
+ "inputs": {}
+ }
+ },
+ "vfcInstanceGroups": {}
+ }
+ },
+ "networks": {},
+ "collectionResources": {},
+ "configurations": {},
+ "fabricConfigurations": {},
+ "serviceProxies": {},
+ "vfModules": {
+ "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": {
+ "uuid": "04b21d26-9780-4956-8329-b22b049329f4",
+ "invariantUuid": "d887658e-2a89-4baf-83e2-b189601a1a7c",
+ "customizationUuid": "51f9acf5-4ab3-4041-bb0d-b022e747dc6b",
+ "description": null,
+ "name": "XbiTestModuleReplace..base_ocg..module-0",
+ "version": "1",
+ "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0",
+ "properties": {
+ "minCountInstances": 1,
+ "maxCountInstances": 1,
+ "initialCount": 1,
+ "vfModuleLabel": "base_ocg",
+ "baseModule": true
+ },
+ "inputs": {},
+ "volumeGroupAllowed": false
+ },
+ "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": {
+ "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6",
+ "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d",
+ "customizationUuid": "73b88d25-b8e9-41bc-bba5-18c9b07750a3",
+ "description": null,
+ "name": "XbiTestModuleReplace..ocgmgr..module-1",
+ "version": "1",
+ "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "ocgmgr",
+ "baseModule": false
+ },
+ "inputs": {},
+ "volumeGroupAllowed": true
+ }
+ },
+ "volumeGroups": {
+ "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": {
+ "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6",
+ "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d",
+ "customizationUuid": "73b88d25-b8e9-41bc-bba5-18c9b07750a3",
+ "description": null,
+ "name": "XbiTestModuleReplace..ocgmgr..module-1",
+ "version": "1",
+ "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1",
+ "properties": {
+ "minCountInstances": 0,
+ "maxCountInstances": null,
+ "initialCount": 0,
+ "vfModuleLabel": "ocgmgr",
+ "baseModule": false
+ },
+ "inputs": {}
+ }
+ },
+ "pnfs": {},
+ "vnfGroups": {},
+ "vrfs": {}
+}