Merge "identify macro services without instantiation type in BE by feature flag"
[vid.git] / vid-webpack-master / src / app / shared / components / genericForm / formControlsServices / networkGenerator / network.control.generator.spec.ts
index 97c6ddf..14d1466 100644 (file)
@@ -23,16 +23,9 @@ class MockAppStore<T> {
       "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
       "FLAG_SHOW_ASSIGNMENTS": true,
       "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
-      "FLAG_UNASSIGN_SERVICE": true,
       "FLAG_SHOW_VERIFY_SERVICE": false,
-      "FLAG_COLLECTION_RESOURCE_SUPPORT": true,
-      "FLAG_DUPLICATE_VNF": true,
       "FLAG_SERVICE_MODEL_CACHE": true,
-      "CREATE_INSTANCE_TEST": false,
       "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
-      "FLAG_ASYNC_INSTANTIATION": true,
-      "FLAG_ASYNC_JOBS": true,
-      "EMPTY_DRAWING_BOARD_TEST": false,
       "FLAG_ADD_MSO_TESTAPI_FIELD": true
     },
     "type": "[FLAGS] Update"
@@ -55,11 +48,11 @@ class MockAppStore<T> {
           "inputs": {}
         },
         "vnfs": {
-          "VF_vMee 0": {
+          "VF_vGeraldine 0": {
             "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
             "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
-            "description": "VSP_vMee",
-            "name": "VF_vMee",
+            "description": "VSP_vGeraldine",
+            "name": "VF_vGeraldine",
             "version": "2.0",
             "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
             "inputs": {},
@@ -230,74 +223,74 @@ class MockAppStore<T> {
               "sctp-b-egress-dst_end_port": "65535.0"
             },
             "type": "VF",
-            "modelCustomizationName": "VF_vMee 0",
+            "modelCustomizationName": "VF_vGeraldine 0",
             "vfModules": {
-              "vf_vmee0..VfVmee..vmme_vlc..module-1": {
+              "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
                 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
                 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
                 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
                 "description": null,
-                "name": "VfVmee..vmme_vlc..module-1",
+                "name": "VfVgeraldine..vflorence_vlc..module-1",
                 "version": "2",
-                "modelCustomizationName": "VfVmee..vmme_vlc..module-1",
+                "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
                 "properties": {
                   "minCountInstances": 0,
                   "maxCountInstances": null,
                   "initialCount": 0,
-                  "vfModuleLabel": "vmme_vlc"
+                  "vfModuleLabel": "vflorence_vlc"
                 },
                 "inputs": {},
                 "volumeGroupAllowed": true
               },
-              "vf_vmee0..VfVmee..vmme_gpb..module-2": {
+              "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
                 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
                 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
                 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
                 "description": null,
-                "name": "VfVmee..vmme_gpb..module-2",
+                "name": "VfVgeraldine..vflorence_gpb..module-2",
                 "version": "2",
-                "modelCustomizationName": "VfVmee..vmme_gpb..module-2",
+                "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
                 "properties": {
                   "minCountInstances": 0,
                   "maxCountInstances": null,
                   "initialCount": 0,
-                  "vfModuleLabel": "vmme_gpb"
+                  "vfModuleLabel": "vflorence_gpb"
                 },
                 "inputs": {},
                 "volumeGroupAllowed": false
               },
-              "vf_vmee0..VfVmee..base_vmme..module-0": {
+              "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
                 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
                 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
                 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
                 "description": null,
-                "name": "VfVmee..base_vmme..module-0",
+                "name": "VfVgeraldine..base_vflorence..module-0",
                 "version": "2",
-                "modelCustomizationName": "VfVmee..base_vmme..module-0",
+                "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
                 "properties": {
                   "minCountInstances": 1,
                   "maxCountInstances": 1,
                   "initialCount": 1,
-                  "vfModuleLabel": "base_vmme"
+                  "vfModuleLabel": "base_vflorence"
                 },
                 "inputs": {},
                 "volumeGroupAllowed": true
               }
             },
             "volumeGroups": {
-              "vf_vmee0..VfVmee..base_vmme..module-0": {
+              "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
                 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
                 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
                 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
                 "description": null,
-                "name": "VfVmee..base_vmme..module-0",
+                "name": "VfVgeraldine..base_vflorence..module-0",
                 "version": "2",
-                "modelCustomizationName": "VfVmee..base_vmme..module-0",
+                "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
                 "properties": {
                   "minCountInstances": 1,
                   "maxCountInstances": 1,
                   "initialCount": 1,
-                  "vfModuleLabel": "base_vmme"
+                  "vfModuleLabel": "base_vflorence"
                 },
                 "inputs": {}
               }
@@ -345,7 +338,7 @@ class MockAppStore<T> {
             "modelCustomizationName": "ExtVL 0"
           }
         },
-        "collectionResource": {},
+        "collectionResources": {},
         "configurations": {
           "Port Mirroring Configuration By Policy 0": {
             "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
@@ -366,72 +359,72 @@ class MockAppStore<T> {
         },
         "serviceProxies": {},
         "vfModules": {
-          "vf_vmee0..VfVmee..vmme_vlc..module-1": {
+          "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
             "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
             "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
             "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
             "description": null,
-            "name": "VfVmee..vmme_vlc..module-1",
+            "name": "VfVgeraldine..vflorence_vlc..module-1",
             "version": "2",
-            "modelCustomizationName": "VfVmee..vmme_vlc..module-1",
+            "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
             "properties": {
               "minCountInstances": 0,
               "maxCountInstances": null,
               "initialCount": 0,
-              "vfModuleLabel": "vmme_vlc"
+              "vfModuleLabel": "vflorence_vlc"
             },
             "inputs": {},
             "volumeGroupAllowed": true
           },
-          "vf_vmee0..VfVmee..vmme_gpb..module-2": {
+          "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
             "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
             "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
             "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
             "description": null,
-            "name": "VfVmee..vmme_gpb..module-2",
+            "name": "VfVgeraldine..vflorence_gpb..module-2",
             "version": "2",
-            "modelCustomizationName": "VfVmee..vmme_gpb..module-2",
+            "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
             "properties": {
               "minCountInstances": 0,
               "maxCountInstances": null,
               "initialCount": 0,
-              "vfModuleLabel": "vmme_gpb"
+              "vfModuleLabel": "vflorence_gpb"
             },
             "inputs": {},
             "volumeGroupAllowed": false
           },
-          "vf_vmee0..VfVmee..base_vmme..module-0": {
+          "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
             "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
             "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
             "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
             "description": null,
-            "name": "VfVmee..base_vmme..module-0",
+            "name": "VfVgeraldine..base_vflorence..module-0",
             "version": "2",
-            "modelCustomizationName": "VfVmee..base_vmme..module-0",
+            "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
             "properties": {
               "minCountInstances": 1,
               "maxCountInstances": 1,
               "initialCount": 1,
-              "vfModuleLabel": "base_vmme"
+              "vfModuleLabel": "base_vflorence"
             },
             "inputs": {},
             "volumeGroupAllowed": true
           }
         },
         "volumeGroups": {
-          "vf_vmee0..VfVmee..base_vmme..module-0": {
+          "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
             "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
             "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
             "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
             "description": null,
-            "name": "VfVmee..base_vmme..module-0",
+            "name": "VfVgeraldine..base_vflorence..module-0",
             "version": "2",
-            "modelCustomizationName": "VfVmee..base_vmme..module-0",
+            "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
             "properties": {
               "minCountInstances": 1,
               "maxCountInstances": 1,
               "initialCount": 1,
-              "vfModuleLabel": "base_vmme"
+              "vfModuleLabel": "base_vflorence"
             },
             "inputs": {}
           }
@@ -443,21 +436,21 @@ class MockAppStore<T> {
       "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
         "networks" : {},
         "vnfs": {
-          "VF_vMee 0": {
+          "VF_vGeraldine 0": {
             "rollbackOnFailure": "true",
             "vfModules": {
-              "vf_vmee0..VfVmee..base_vmme..module-0": {
-                "vf_vmee0..VfVmee..base_vmme..module-0vmvzo": {
+              "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
+                "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo": {
                   "isMissingData": false,
                   "sdncPreReload": null,
                   "modelInfo": {
                     "modelType": "VFmodule",
                     "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
                     "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
-                    "modelName": "VfVmee..base_vmme..module-0",
+                    "modelName": "VfVgeraldine..base_vflorence..module-0",
                     "modelVersion": "2",
                     "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
-                    "modelCustomizationName": "VfVmee..base_vmme..module-0"
+                    "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0"
                   },
                   "instanceParams": [
                     {}
@@ -467,8 +460,8 @@ class MockAppStore<T> {
               }
             },
             "isMissingData": true,
-            "originalName": "VF_vMee 0",
-            "vnfStoreKey": "VF_vMee 0",
+            "originalName": "VF_vGeraldine 0",
+            "vnfStoreKey": "VF_vGeraldine 0",
             "trackById": "p3wk448m5do",
             "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
             "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
@@ -480,9 +473,9 @@ class MockAppStore<T> {
               "modelType": "VF",
               "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
               "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
-              "modelName": "VF_vMee",
+              "modelName": "VF_vGeraldine",
               "modelVersion": "2.0",
-              "modelCustomizationName": "VF_vMee 0"
+              "modelCustomizationName": "VF_vGeraldine 0"
             }
           }
         },
@@ -526,8 +519,8 @@ class MockAppStore<T> {
     "lcpRegionsAndTenants": {
       "lcpRegionList": [
         {
-          "id": "JANET25",
-          "name": "JANET25",
+          "id": "AAIAIC25",
+          "name": "AAIAIC25",
           "isPermitted": true
         },
         {
@@ -537,7 +530,7 @@ class MockAppStore<T> {
         }
         ],
       "lcpRegionsTenantsMap": {
-        "JANET25": [
+        "AAIAIC25": [
           {
             "id": "092eb9e8e4b7412e8787dd091bc58e86",
             "name": "USP-SIP-IC-24335-T-01",
@@ -701,7 +694,7 @@ class MockAppStore<T> {
     "productFamilies": [
       {
         "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
-        "name": "SCOTTIE",
+        "name": "ERICA",
         "isPermitted": true
       },
       {
@@ -726,7 +719,7 @@ class MockAppStore<T> {
       },
       {
         "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
-        "name": "vSCP",
+        "name": "vEsmeralda",
         "isPermitted": true
       },
       {
@@ -770,7 +763,7 @@ class MockAppStore<T> {
         "isPermitted": true
       },
       {
-        "id": "Cisneros",
+        "id": "vMuriel",
         "name": "vMuriel",
         "isPermitted": true
       },
@@ -796,7 +789,7 @@ class MockAppStore<T> {
       },
       {
         "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
-        "name": "Josefina",
+        "name": "JOSEFINA",
         "isPermitted": true
       },
       {
@@ -844,7 +837,7 @@ class MockAppStore<T> {
         },
         {
           "id": "6",
-          "name": "vSEGW",
+          "name": "vPorfirio",
           "isPermitted": false
         },
         {
@@ -859,7 +852,7 @@ class MockAppStore<T> {
         },
         {
           "id": "9",
-          "name": "vMME",
+          "name": "vFLORENCE",
           "isPermitted": false
         },
         {
@@ -869,7 +862,7 @@ class MockAppStore<T> {
         },
         {
           "id": "11",
-          "name": "vSCP",
+          "name": "vEsmeralda",
           "isPermitted": false
         },
         {
@@ -879,7 +872,7 @@ class MockAppStore<T> {
         },
         {
           "id": "13",
-          "name": "vMMSC",
+          "name": "vWINIFRED",
           "isPermitted": false
         },
         {
@@ -1611,8 +1604,8 @@ class MockAppStore<T> {
         "name": "QWERTYUI-NUM1"
       },
       {
-        "id": "MTN32",
-        "name": "MDTWNJ21-MTN32"
+        "id": "hvf32",
+        "name": "MDTWNJ21-hvf32"
       },
       {
         "id": "RTZ4",
@@ -1663,8 +1656,8 @@ class MockAppStore<T> {
         "name": "ATLSECIA-ABC12"
       },
       {
-        "id": "MTN20",
-        "name": "MDTWNJ21-MTN20"
+        "id": "hvf20",
+        "name": "MDTWNJ21-hvf20"
       },
       {
         "id": "ABC15",
@@ -1846,7 +1839,7 @@ describe('Network Control Generator', () => {
     const mandatoryControls : string[] = [
       FormControlNames.LCPCLOUD_REGION_ID,
       'tenantId',
-      'platformName'
+      'lineOfBusiness'
     ];
     for(let i = 0 ; i < mandatoryControls.length ; i++){
       let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
@@ -1967,7 +1960,6 @@ describe('Network Control Generator', () => {
       FormControlNames.INSTANCE_NAME,
       FormControlNames.LCPCLOUD_REGION_ID,
       'tenantId',
-      'platformName',
       'rollbackOnFailure'
     ];
     for(let i = 0 ; i < mandatoryControls.length ; i++){