1 import {getTestBed, TestBed} from '@angular/core/testing';
2 import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
3 import {NgRedux} from '@angular-redux/store';
4 import {FormControlNames} from "../service.control.generator";
5 import {BasicControlGenerator} from "../basic.control.generator";
6 import {AaiService} from "../../../../services/aaiService/aai.service";
7 import {GenericFormService} from "../../generic-form.service";
8 import {FormBuilder} from "@angular/forms";
13 } from "../../../../models/formControlModels/formControl.model";
14 import {LogService} from "../../../../utils/log/log.service";
15 import {VnfControlGenerator} from "./vnf.control.generator";
16 import {Observable} from "rxjs";
17 import {SelectOption} from "../../../../models/selectOption";
18 import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service";
20 class MockAppStore<T> {
26 "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
27 "FLAG_SHOW_ASSIGNMENTS": true,
28 "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
29 "FLAG_SHOW_VERIFY_SERVICE": false,
30 "FLAG_SERVICE_MODEL_CACHE": true,
31 "CREATE_INSTANCE_TEST": false,
32 "FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD": false,
33 "EMPTY_DRAWING_BOARD_TEST": false,
34 "FLAG_ADD_MSO_TESTAPI_FIELD": true
36 "type": "[FLAGS] Update"
40 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
42 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
43 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
44 "name": "ComplexService",
46 "toscaModelURL": null,
47 "category": "Emanuel",
50 "description": "ComplexService",
51 "serviceEcompNaming": "false",
52 "instantiationType": "Macro",
57 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
58 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
59 "description": "VSP_vGeraldine",
60 "name": "VF_vGeraldine",
62 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
68 "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
69 "sctp-b-ipv6-egress_src_start_port": "0",
70 "sctp-a-ipv6-egress_rule_application": "any",
71 "Internal2_allow_transit": "true",
72 "sctp-b-IPv6_ethertype": "IPv6",
73 "sctp-a-egress_rule_application": "any",
74 "sctp-b-ingress_action": "pass",
75 "sctp-b-ingress_rule_protocol": "icmp",
76 "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
77 "sctp-b-ipv6-ingress-src_start_port": "0.0",
78 "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
79 "fsb_volume_size_0": "320.0",
80 "sctp-b-egress_src_addresses": "local",
81 "sctp-a-ipv6-ingress_ethertype": "IPv4",
82 "sctp-a-ipv6-ingress-dst_start_port": "0",
83 "sctp-b-ipv6-ingress_rule_application": "any",
84 "domain_name": "default-domain",
85 "sctp-a-ingress_rule_protocol": "icmp",
86 "sctp-b-egress-src_start_port": "0.0",
87 "sctp-a-egress_src_addresses": "local",
88 "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
89 "sctp-a-egress-src_start_port": "0.0",
90 "sctp-a-ingress_ethertype": "IPv4",
91 "sctp-b-ipv6-ingress-dst_end_port": "65535",
92 "sctp-b-dst_subnet_prefix_v6": "::",
93 "nf_naming": "{ecomp_generated_naming=true}",
94 "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
95 "sctp-b-egress-dst_start_port": "0.0",
96 "ncb_flavor_name": "nv.c20r64d1",
97 "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
98 "sctp-b-egress_dst_subnet_prefix_len": "0.0",
99 "Internal2_net_cidr": "10.0.0.10",
100 "sctp-a-ingress-dst_start_port": "0.0",
101 "sctp-a-egress-dst_start_port": "0.0",
102 "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
103 "sctp-a-egress_ethertype": "IPv4",
104 "vlc_st_service_mode": "in-network-nat",
105 "sctp-a-ipv6-egress_ethertype": "IPv4",
106 "sctp-a-egress-src_end_port": "65535.0",
107 "sctp-b-ipv6-egress_rule_application": "any",
108 "sctp-b-egress_action": "pass",
109 "sctp-a-ingress-src_subnet_prefix_len": "0.0",
110 "sctp-b-ipv6-ingress-src_end_port": "65535.0",
111 "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
112 "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
113 "sctp-a-ipv6-ingress-src_start_port": "0.0",
114 "sctp-b-ipv6-egress_ethertype": "IPv4",
115 "Internal1_net_cidr": "10.0.0.10",
116 "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
117 "fsb_flavor_name": "nv.c20r64d1",
118 "sctp_rule_protocol": "132",
119 "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
120 "sctp-a-ipv6-ingress_rule_application": "any",
121 "ecomp_generated_naming": "false",
122 "sctp-a-IPv6_ethertype": "IPv6",
123 "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
124 "vlc_st_virtualization_type": "virtual-machine",
125 "sctp-b-ingress-dst_start_port": "0.0",
126 "sctp-b-ingress-dst_end_port": "65535.0",
127 "sctp-a-ipv6-ingress-src_end_port": "65535.0",
128 "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
129 "sctp-b-ingress_rule_application": "any",
130 "int2_sec_group_name": "int2-sec-group",
131 "vlc_flavor_name": "nd.c16r64d1",
132 "sctp-b-ipv6-egress_src_addresses": "local",
133 "vlc_st_interface_type_int1": "other1",
134 "sctp-b-egress-src_end_port": "65535.0",
135 "sctp-a-ipv6-egress-dst_start_port": "0",
136 "vlc_st_interface_type_int2": "other2",
137 "sctp-a-ipv6-egress_rule_protocol": "any",
138 "Internal2_shared": "false",
139 "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
140 "Internal2_rpf": "disable",
141 "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
142 "sctp-b-ipv6-egress_src_end_port": "65535",
143 "sctp-a-ipv6-egress_src_addresses": "local",
144 "sctp-a-ingress-dst_end_port": "65535.0",
145 "sctp-a-ipv6-egress_src_end_port": "65535",
146 "Internal1_forwarding_mode": "l2",
147 "Internal2_dhcp": "false",
148 "sctp-a-dst_subnet_prefix_v6": "::",
149 "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
150 "vlc_st_interface_type_gtp": "other0",
151 "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
152 "sctp-b-src_subnet_prefix_v6": "::",
153 "sctp-a-egress_dst_subnet_prefix_len": "0.0",
154 "int1_sec_group_name": "int1-sec-group",
155 "Internal1_dhcp": "false",
156 "sctp-a-ipv6-egress_dst_end_port": "65535",
157 "Internal2_forwarding_mode": "l2",
158 "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
159 "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
160 "Internal1_net_cidr_len": "17",
161 "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
162 "sctp-b-ingress-src_subnet_prefix_len": "0.0",
163 "sctp-a-ingress_dst_addresses": "local",
164 "sctp-a-egress_action": "pass",
165 "fsb_volume_type_0": "SF-Default-SSD",
166 "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
167 "vlc_st_interface_type_sctp_a": "left",
168 "vlc_st_interface_type_sctp_b": "right",
169 "sctp-a-src_subnet_prefix_v6": "::",
170 "vlc_st_version": "2",
171 "sctp-b-egress_ethertype": "IPv4",
172 "sctp-a-ingress_rule_application": "any",
173 "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
174 "instance_ip_family_v6": "v6",
175 "sctp-a-ipv6-egress_src_start_port": "0",
176 "sctp-b-ingress-src_start_port": "0.0",
177 "sctp-b-ingress_dst_addresses": "local",
178 "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
179 "vlc_st_interface_type_oam": "management",
180 "multi_stage_design": "true",
181 "oam_sec_group_name": "oam-sec-group",
182 "Internal2_net_gateway": "10.0.0.10",
183 "sctp-a-ipv6-ingress-dst_end_port": "65535",
184 "sctp-b-ipv6-egress-dst_start_port": "0",
185 "Internal1_net_gateway": "10.0.0.10",
186 "sctp-b-ipv6-egress_rule_protocol": "any",
187 "gtp_sec_group_name": "gtp-sec-group",
188 "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
189 "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
190 "sctp-a-ipv6-ingress_dst_addresses": "local",
191 "sctp-a-egress_rule_protocol": "icmp",
192 "sctp-b-ipv6-egress_action": "pass",
193 "sctp-a-ipv6-egress_action": "pass",
194 "Internal1_shared": "false",
195 "sctp-b-ipv6-ingress_rule_protocol": "any",
196 "Internal2_net_cidr_len": "17",
197 "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
198 "sctp-a-ingress-src_end_port": "65535.0",
199 "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
200 "sctp-a-egress-dst_end_port": "65535.0",
201 "sctp-a-ingress_action": "pass",
202 "sctp-b-egress_rule_protocol": "icmp",
203 "sctp-b-ipv6-ingress_action": "pass",
204 "vlc_st_service_type": "firewall",
205 "sctp-b-ipv6-egress_dst_end_port": "65535",
206 "sctp-b-ipv6-ingress-dst_start_port": "0",
207 "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
208 "vlc_st_availability_zone": "true",
209 "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
210 "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
211 "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
212 "Internal1_allow_transit": "true",
213 "gpb_flavor_name": "nv.c20r64d1",
214 "availability_zone_max_count": "1",
215 "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
216 "sctp-b-ipv6-ingress_dst_addresses": "local",
217 "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
218 "sctp-b-ipv6-ingress_ethertype": "IPv4",
219 "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
220 "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
221 "sctp-a-ipv6-ingress_action": "pass",
222 "Internal1_rpf": "disable",
223 "sctp-b-ingress_ethertype": "IPv4",
224 "sctp-b-egress_rule_application": "any",
225 "sctp-b-ingress-src_end_port": "65535.0",
226 "sctp-a-ipv6-ingress_rule_protocol": "any",
227 "sctp-a-ingress-src_start_port": "0.0",
228 "sctp-b-egress-dst_end_port": "65535.0"
231 "modelCustomizationName": "VF_vGeraldine 0",
233 "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
234 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
235 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
236 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
238 "name": "VfVgeraldine..vflorence_vlc..module-1",
240 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
242 "minCountInstances": 0,
243 "maxCountInstances": null,
245 "vfModuleLabel": "vflorence_vlc"
248 "volumeGroupAllowed": true
250 "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
251 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
252 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
253 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
255 "name": "VfVgeraldine..vflorence_gpb..module-2",
257 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
259 "minCountInstances": 0,
260 "maxCountInstances": null,
262 "vfModuleLabel": "vflorence_gpb"
265 "volumeGroupAllowed": false
267 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
268 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
269 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
270 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
272 "name": "VfVgeraldine..base_vflorence..module-0",
274 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
276 "minCountInstances": 1,
277 "maxCountInstances": 1,
279 "vfModuleLabel": "base_vflorence"
282 "volumeGroupAllowed": true
286 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
287 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
288 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
289 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
291 "name": "VfVgeraldine..base_vflorence..module-0",
293 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
295 "minCountInstances": 1,
296 "maxCountInstances": 1,
298 "vfModuleLabel": "base_vflorence"
303 "vfcInstanceGroups": {}
308 "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
309 "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
310 "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
313 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
317 "network_assignments": "{is_external_network=false, ipv4_subnet_default_assignment={min_subnets_count=1}, ecomp_generated_network_assignment=false, ipv6_subnet_default_assignment={min_subnets_count=1}}",
318 "exVL_naming": "{ecomp_generated_naming=true}",
319 "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
320 "network_homing": "{ecomp_selected_instance_node_target=false}"
323 "modelCustomizationName": "ExtVL 0"
326 "collectionResources": {},
328 "Port Mirroring Configuration By Policy 0": {
329 "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
330 "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
331 "description": "A port mirroring configuration by policy object",
332 "name": "Port Mirroring Configuration By Policy",
334 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
338 "type": "Configuration",
339 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
341 "collectorNodes": null,
342 "configurationByPolicy": false
345 "serviceProxies": {},
347 "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
348 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
349 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
350 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
352 "name": "VfVgeraldine..vflorence_vlc..module-1",
354 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
356 "minCountInstances": 0,
357 "maxCountInstances": null,
359 "vfModuleLabel": "vflorence_vlc"
362 "volumeGroupAllowed": true
364 "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
365 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
366 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
367 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
369 "name": "VfVgeraldine..vflorence_gpb..module-2",
371 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
373 "minCountInstances": 0,
374 "maxCountInstances": null,
376 "vfModuleLabel": "vflorence_gpb"
379 "volumeGroupAllowed": false
381 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
382 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
383 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
384 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
386 "name": "VfVgeraldine..base_vflorence..module-0",
388 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
390 "minCountInstances": 1,
391 "maxCountInstances": 1,
393 "vfModuleLabel": "base_vflorence"
396 "volumeGroupAllowed": true
400 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
401 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
402 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
403 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
405 "name": "VfVgeraldine..base_vflorence..module-0",
407 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
409 "minCountInstances": 1,
410 "maxCountInstances": 1,
412 "vfModuleLabel": "base_vflorence"
421 "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
424 "rollbackOnFailure": "true",
426 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
427 "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo": {
428 "isMissingData": false,
429 "sdncPreReload": null,
431 "modelType": "VFmodule",
432 "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
433 "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
434 "modelName": "VfVgeraldine..base_vflorence..module-0",
436 "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
437 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0"
442 "trackById": "wmtm6sy2uj"
446 "isMissingData": true,
447 "originalName": "VF_vGeraldine 0",
448 "vnfStoreKey": "VF_vGeraldine 0",
449 "trackById": "p3wk448m5do",
450 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
451 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
452 "lcpCloudRegionId": null,
454 "lineOfBusiness": null,
455 "platformName": null,
458 "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
459 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
460 "modelName": "VF_vGeraldine",
461 "modelVersion": "2.0",
462 "modelCustomizationName": "VF_vGeraldine 0"
469 "validationCounter": 1,
471 "existingVNFCounterMap": {
472 "d6557200-ecf2-4641-8094-5393ae3aae60": 1
474 "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
475 "subscriptionServiceType": "TYLER SILVIA",
476 "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
477 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
478 "lcpCloudRegionId": "hvf6",
479 "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
482 "rollbackOnFailure": "true",
485 "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
486 "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
487 "modelName": "ComplexService",
488 "modelVersion": "1.0",
489 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44"
492 "name": "ComplexService",
494 "description": "ComplexService",
495 "category": "Emanuel",
496 "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
497 "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
500 "isMultiStepDesign": false
503 "lcpRegionsAndTenants": {
516 "lcpRegionsTenantsMap": {
519 "id": "092eb9e8e4b7412e8787dd091bc58e86",
520 "name": "USP-SIP-IC-24335-T-01",
526 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
527 "name": "AIN Web Tool-15-D-testalexandria",
531 "id": "229bcdc6eaeb4ca59d55221141d01f8e",
532 "name": "AIN Web Tool-15-D-STTest2",
536 "id": "1178612d2b394be4834ad77f567c0af2",
537 "name": "AIN Web Tool-15-D-SSPtestcustome",
541 "id": "19c5ade915eb461e8af52fb2fd8cd1f2",
542 "name": "AIN Web Tool-15-D-UncheckedEcopm",
546 "id": "de007636e25249238447264a988a927b",
547 "name": "AIN Web Tool-15-D-dfsdf",
551 "id": "62f29b3613634ca6a3065cbe0e020c44",
552 "name": "AIN/SMS-16-D-Multiservices1",
556 "id": "649289e30d3244e0b48098114d63c2aa",
557 "name": "AIN Web Tool-15-D-SSPST66",
561 "id": "3f21eeea6c2c486bba31dab816c05a32",
562 "name": "AIN Web Tool-15-D-ASSPST47",
566 "id": "f60ce21d3ee6427586cff0d22b03b773",
567 "name": "CESAR-100-D-sspjg67246",
571 "id": "8774659e425f479895ae091bb5d46560",
572 "name": "CESAR-100-D-sspjg68359",
576 "id": "624eb554b0d147c19ff8885341760481",
577 "name": "AINWebTool-15-D-iftach",
581 "id": "214f55f5fc414c678059c383b03e4962",
582 "name": "CESAR-100-D-sspjg612401",
586 "id": "c90666c291664841bb98e4d981ff1db5",
587 "name": "CESAR-100-D-sspjg621340",
591 "id": "ce5b6bc5c7b348e1bf4b91ac9a174278",
592 "name": "sspjg621351cloned",
596 "id": "b386b768a3f24c8e953abbe0b3488c02",
597 "name": "AINWebTool-15-D-eteancomp",
601 "id": "dc6c4dbfd225474e9deaadd34968646c",
602 "name": "AINWebTool-15-T-SPFET",
606 "id": "02cb5030e9914aa4be120bd9ed1e19eb",
607 "name": "AINWebTool-15-X-eeweww",
611 "id": "f2f3830e4c984d45bcd00e1a04158a79",
612 "name": "CESAR-100-D-spjg61909",
616 "id": "05b91bd5137f4929878edd965755c06d",
617 "name": "CESAR-100-D-sspjg621512cloned",
621 "id": "7002fbe8482d4a989ddf445b1ce336e0",
622 "name": "AINWebTool-15-X-vdr",
626 "id": "4008522be43741dcb1f5422022a2aa0b",
627 "name": "AINWebTool-15-D-ssasa",
631 "id": "f44e2e96a1b6476abfda2fa407b00169",
632 "name": "AINWebTool-15-D-PFNPT",
636 "id": "b69a52bec8a84669a37a1e8b72708be7",
637 "name": "AINWebTool-15-X-vdre",
641 "id": "fac7d9fd56154caeb9332202dcf2969f",
642 "name": "AINWebTool-15-X-NONPODECOMP",
646 "id": "2d34d8396e194eb49969fd61ffbff961",
647 "name": "DN5242-Nov16-T5",
651 "id": "cb42a77ff45b48a8b8deb83bb64acc74",
656 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
661 "id": "4914ab0ab3a743e58f0eefdacc1dde77",
662 "name": "DN5242-Nov21-T1",
666 "id": "d0a3e3f2964542259d155a81c41aadc3",
667 "name": "test-hvf6-09",
671 "id": "cbb99fe4ada84631b7baf046b6fd2044",
672 "name": "DN5242-Nov16-T3",
680 "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
685 "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
690 "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
695 "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
696 "name": "Enhanced Services",
705 "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
706 "name": "vEsmeralda",
710 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
715 "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
720 "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
740 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
741 "name": "TYLER SILVIA",
745 "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
755 "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
756 "name": "CARA Griffin",
760 "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
761 "name": "DARREN MCGEE",
765 "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
771 "name": "vSalvatore",
775 "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
785 "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
786 "name": "DARREN MCGEE",
791 "e433710f-9217-458d-a79d-1c7aff376d89": [
794 "name": "vRichardson",
799 "name": "TYLER SILVIA",
814 "name": "vVoiceMail",
849 "name": "vEsmeralda",
879 "name": "JOHANNA_SANTOS",
892 "name": "NFTJSSSS-NFT1"
896 "name": "YUDFJULP-JAG1"
900 "name": "UUUAIAAI-YYY1"
904 "name": "VSDKYUTP-BAN1"
908 "name": "DKJSJDKA-DKJ1"
912 "name": "ASACMAMS-MCS1"
916 "name": "uioclli1-UIO1"
920 "name": "YGBIJNLQ-RAJ1"
924 "name": "opaclli1-OPA1"
928 "name": "ZXCVBNMA-SDE1"
932 "name": "FGHJUHIL-VEN2"
936 "name": "ORLDFLMA-ORL1"
940 "name": "JADECLLI-JAD1"
944 "name": "LWLWCANN-ZXL1"
948 "name": "CLKSKCKK-CKL1"
952 "name": "sdfclli1-SDF1"
956 "name": "RADICAL1-RAD1"
960 "name": "BHYJFGLN-KIT1"
964 "name": "INGERFGT-REL1"
968 "name": "CJALSDAC-JNL1"
972 "name": "OLKOLKLS-OLK1"
976 "name": "CHILLIWE-CHI1"
980 "name": "UUUAAAUU-UUU4"
984 "name": "TUFCLLI1-TUF1"
988 "name": "CKALDKSA-KJN1"
992 "name": "SNDGCA64-SAN1"
996 "name": "SCKSCKSK-SCK1"
1000 "name": "AOEEQQQD-HJH1"
1004 "name": "SDFQWHGD-HGD1"
1008 "name": "HYFLNBVT-KOR1"
1012 "name": "AICLOCID-ATL43"
1016 "name": "AICFTAAI-ATL54"
1020 "name": "CLLIAAII-ATL66"
1024 "name": "BNMLKUIK-VEL1"
1028 "name": "SANJITAT-ICC1"
1032 "name": "WSXEFBTH-MNT11"
1036 "name": "WSBHGTYL-DEF2"
1040 "name": "SDFQWGKL-MAD11"
1044 "name": "OLHOLHOL-OLG1"
1048 "name": "NGFVSJKO-GAR1"
1052 "name": "GNVLSCTL-SAN22"
1056 "name": "HRGHRGGS-HRG1"
1060 "name": "JCSJSCJS-JCS1"
1064 "name": "WSXEDECF-DHA12"
1068 "name": "AOEEWWWD-HJE1"
1072 "name": "NCANCANN-NCA1"
1076 "name": "iopclli1-IOP1"
1080 "name": "rtyclli1-RTY1"
1084 "name": "HIOUYTRQ-KAP1"
1088 "name": "ZENCLLI1-ZEN1"
1092 "name": "JAKHLASS-HKA1"
1096 "name": "CQKSCAKK-CQK1"
1100 "name": "UBEKQLPD-SAI1"
1104 "name": "ertclli1-ERT1"
1108 "name": "PLMKOIJU-IBB1"
1112 "name": "PLKINHYI-TIR2"
1116 "name": "CHASKCDS-HSD1"
1120 "name": "SDCTLFN1-SLF78"
1124 "name": "SDCTEEE4-SEE78"
1128 "name": "TOKYJPFA-SAN13"
1132 "name": "SDCTAAA1-SAA78"
1136 "name": "ATLDFGYC-LUC1"
1140 "name": "MEMATLAN-AMD13"
1144 "name": "TOROONXN-TOR1"
1148 "name": "QWECLLI1-QWE1"
1152 "name": "ZOGASTRO-ZOG1"
1156 "name": "CALIFORN-CAL33"
1160 "name": "SDIT1HHH-SHH78"
1164 "name": "LKJHGFDS-DSA1"
1168 "name": "CLGRABAD-CLG1"
1172 "name": "BNARAGBK-BNA1"
1176 "name": "CANTTCOC-ATL84"
1180 "name": "WBHGTYUI-APP1"
1184 "name": "RJNRBZAW-RJN1"
1188 "name": "SDCSHHH5-EHH78"
1192 "name": "PKGTESTF-mac10"
1196 "name": "SDCTGXB1-SXB78"
1200 "name": "SDCTAXG1-SAX78"
1204 "name": "SYDNAUBV-SYD1"
1208 "name": "TOKYJPFA-TOK1"
1212 "name": "KGMTNC20-KGM2"
1216 "name": "POIUYTGH-DCC1b"
1220 "name": "SDCTKKK1-SKK78"
1224 "name": "SDCTGGG1-SGG78"
1228 "name": "SDCTJJJ1-SJJ78"
1232 "name": "SDCTBXG1-SBX78"
1236 "name": "LARGIZON-LAG1"
1240 "name": "QAZXSWED-IAA1"
1244 "name": "PLMNJKIU-POI1"
1248 "name": "LARGIZON-LAG1a"
1252 "name": "PBLAPBAI-PBL1"
1256 "name": "LARGIZON-LAG1a"
1260 "name": "MNBVCXZM-MAR1"
1264 "name": "HSTNTX70-HST70"
1268 "name": "POIUYTGH-DCC1a"
1272 "name": "TOLDOH21-TOL1"
1276 "name": "LONEENCO-LON1"
1280 "name": "SDIT1JUB-SJU78"
1284 "name": "HSTNTX01-STN27"
1288 "name": "ss8126GT-SSW56"
1292 "name": "SDIT1BBB-SBB78"
1296 "name": "POIUYTGH-DCC3"
1300 "name": "GNVLSCTL-GNV1"
1304 "name": "WASHDCSW-WAS1"
1308 "name": "TORYONNZ-TOY1"
1312 "name": "STTLWA02-STT1"
1316 "name": "STTGGE62-STG1"
1320 "name": "SDCTLLL1-SLL78"
1324 "name": "SDIT1BUB-SBU78"
1328 "name": "ATLNGANW-ATL2"
1332 "name": "BOTHWAKY-BOT1"
1336 "name": "SNGPSIAU-SNG1"
1340 "name": "NYCMNY54-NYC1"
1344 "name": "LARGIZON-LAG1b"
1348 "name": "AMDFAA01-AMD15"
1352 "name": "SNANTXCA-SNA1"
1356 "name": "PLTNCA60-PLT1"
1360 "name": "TLPNXM18-TLP1"
1364 "name": "SAIT1DD6-SDD81"
1368 "name": "POIUYTGH-DCC1"
1372 "name": "POIUYTGH-DCC2"
1376 "name": "OKCBOK55-OKC1"
1380 "name": "PARSFRCG-PAR1"
1384 "name": "ABCEETES-TES36"
1388 "name": "PLMKOPIU-COM1"
1392 "name": "ATLNGTRE-ANI1"
1396 "name": "SDIT1BDG-SDG78"
1400 "name": "PKGTESTF-mac20"
1404 "name": "DSFBG123-DSF45"
1408 "name": "HSTNTX01-HST25"
1412 "name": "AUDIMA01-AMD18"
1416 "name": "SAIT9AA3-SAA80"
1420 "name": "SSIT2AA7-SSA56"
1424 "name": "SAIT1DD9-SDD82"
1428 "name": "JCVLFLBW-JCV1"
1432 "name": "WERTYUJK-SUL2"
1436 "name": "purelyde-PUR1"
1440 "name": "FDERT555-FDE55"
1444 "name": "LONEENCO-SITE"
1448 "name": "ATLNGAMA-ATL1"
1452 "name": "ZXCVBNMM-JUL1"
1456 "name": "TESAAISB-TAT34"
1460 "name": "CHKGH123-XCP12"
1464 "name": "poiuytre-RAI1"
1468 "name": "ATLNGAUP-HPO1"
1472 "name": "KJFDH123-KJF12"
1476 "name": "SAIT9CC3-SCC80"
1480 "name": "SAIT9AF8-SAA12"
1484 "name": "SAIT1AA9-SAA14"
1488 "name": "TTESSAAI-ATL35"
1492 "name": "CWYMOWBS-CWY1"
1496 "name": "TELEPAAI-ATL76"
1500 "name": "DSLFK242-DSL12"
1504 "name": "AAIATLTE-ATL53"
1508 "name": "SAIT9AA2-SAA11"
1512 "name": "TESSASCH-ATL62"
1516 "name": "ASDFGHJK-AUG1"
1520 "name": "POIUY123-POI22"
1524 "name": "SAIT1AA9-SAA13"
1528 "name": "BHYTFRF3-BHY17"
1532 "name": "HOSTPROF-LIS1"
1536 "name": "ZXCVBNMK-SIP1"
1540 "name": "TEESTAAI-ATL43"
1544 "name": "FORLOAAJ-ATL64"
1548 "name": "TESAAISA-TAT33"
1552 "name": "INDIPUNE-RAD10"
1556 "name": "BHYTFRY4-RTW5"
1560 "name": "KSJKKKKK-JGS1"
1564 "name": "TEESTAAI-ATL43"
1568 "name": "LEIWANGW-WAN1"
1572 "name": "ATLSANAB-ATL44"
1576 "name": "BHYTFRk4-RTD2"
1580 "name": "ORFLMANA-NIR1"
1584 "name": "SANAAIRE-ATL75"
1588 "name": "QWERTYUI-NUM1"
1592 "name": "MDTWNJ21-hvf32"
1596 "name": "BHYTFRZ6-RTZ4"
1600 "name": "ATLSANAC-ATL56"
1604 "name": "AMSTNLBW-AMS1"
1608 "name": "AMSTERNL-RCT1"
1612 "name": "ORFLMATT-JAN1"
1616 "name": "TESAAISA-ABC14"
1620 "name": "TESAAISD-TAT37"
1624 "name": "MICHIGAN-MIC54"
1628 "name": "ATLSANAI-ABC11"
1632 "name": "AMDOCS01-AMF11"
1636 "name": "ATLSANEW-ATL63"
1640 "name": "ATLSECIA-ABC12"
1644 "name": "MDTWNJ21-hvf20"
1648 "name": "AAITESAN-ABC15"
1652 "name": "AVTRFLHD-AVT1"
1656 "name": "ATLSANAI-ATL34"
1659 "categoryParameters": {
1660 "owningEntityList": [
1666 "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
1667 "name": "WayneHolland"
1688 "lineOfBusinessList": [
1709 "type": "[LCP_REGIONS_AND_TENANTS] Update",
1712 "id": "CAR_2020_ER",
1713 "name": "CAR_2020_ER",
1717 "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
1718 "name": "JULIO ERICKSON",
1719 "isPermitted": false
1722 "id": "DHV1707-TestSubscriber-2",
1723 "name": "DALE BRIDGES",
1724 "isPermitted": false
1727 "id": "DHV1707-TestSubscriber-1",
1728 "name": "LLOYD BRIDGES",
1729 "isPermitted": false
1732 "id": "jimmy-example",
1733 "name": "JimmyExampleCust-20161102",
1734 "isPermitted": false
1737 "id": "jimmy-example2",
1738 "name": "JimmyExampleCust-20161103",
1739 "isPermitted": false
1742 "id": "ERICA5779-TestSub-PWT-102",
1743 "name": "ERICA5779-TestSub-PWT-102",
1744 "isPermitted": false
1747 "id": "ERICA5779-TestSub-PWT-101",
1748 "name": "ERICA5779-TestSub-PWT-101",
1749 "isPermitted": false
1752 "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
1754 "isPermitted": false
1757 "id": "ERICA5779-Subscriber-4",
1758 "name": "ERICA5779-Subscriber-5",
1759 "isPermitted": false
1762 "id": "ERICA5779-TestSub-PWT-103",
1763 "name": "ERICA5779-TestSub-PWT-103",
1764 "isPermitted": false
1767 "id": "ERICA5779-Subscriber-2",
1768 "name": "ERICA5779-Subscriber-2",
1769 "isPermitted": false
1772 "id": "e433710f-9217-458d-a79d-1c7aff376d89",
1773 "name": "SILVIA ROBBINS",
1777 "id": "ERICA5779-Subscriber-3",
1778 "name": "ERICA5779-Subscriber-3",
1779 "isPermitted": false
1782 "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
1783 "name": "CRAIG/ROBERTS",
1784 "isPermitted": false
1792 class MockFeatureFlagsService {}
1794 describe('VNF Control Generator', () => {
1796 let service: VnfControlGenerator;
1797 let httpMock: HttpTestingController;
1800 beforeAll(done => (async () => {
1801 TestBed.configureTestingModule({
1802 imports: [HttpClientTestingModule],
1803 providers: [VnfControlGenerator,
1805 BasicControlGenerator,
1809 {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
1810 {provide: NgRedux, useClass: MockAppStore}]
1812 await TestBed.compileComponents();
1815 injector = getTestBed();
1816 service = injector.get(VnfControlGenerator);
1817 httpMock = injector.get(HttpTestingController);
1819 })().then(done).catch(done.fail));
1822 test('getMacroFormControls check for mandatory controls', () => {
1823 const serviceId : string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1824 const vnfName : string = "VF_vGeraldine 0";
1825 const vnfStoreKey : string = "VF_vGeraldine 0";
1826 const controls :FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vnfName, []);
1828 const mandatoryControls : string[] = [
1829 FormControlNames.INSTANCE_NAME,
1830 FormControlNames.LCPCLOUD_REGION_ID,
1831 FormControlNames.TENANT_ID,
1835 for(let i = 0 ; i < mandatoryControls.length ; i++){
1836 let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
1837 expect(requiredExist).toBeDefined();
1841 test('should provide empty array on getMacroFormControls when serviceId, vnfName and vnfStoreKey equals to null', () => {
1843 let vnfStoreKey = null;
1844 const serviceId = null;
1845 const vnfName : string = null;
1846 const result:FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vnfName, []);
1847 expect(result).toEqual([]);
1850 test('should provide empty array on getAlaCarteFormControls when serviceId, vnfName and vnfStoreKey equals to null', () => {
1851 let vnfStoreKey = null;
1852 const serviceId = null;
1853 const vnfName : string = null;
1854 const result:FormControlModel[] = service.getAlaCarteFormControls(serviceId, vnfStoreKey, vnfName, []);
1855 expect(result).toEqual([]);
1858 function getALaCarteFormControls(vnfStoreKey: string): FormControlModel[] {
1859 const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1860 const vnfName: string = "VF_vGeraldine 0";
1861 const controls: FormControlModel[] = service.getAlaCarteFormControls(serviceId, vnfStoreKey, vnfName, []);
1865 test('getMacroFormControls should return the correct order of controls', () => {
1866 const serviceId : string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1867 const vnfName : string = "VF_vGeraldine 0";
1868 const vnfStoreKey : string = null;
1869 const controls :FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vnfName, []);
1871 const controlsOrderNames = [
1872 FormControlNames.INSTANCE_NAME,
1873 FormControlNames.PRODUCT_FAMILY_ID,
1874 FormControlNames.LCPCLOUD_REGION_ID ,
1880 expect(controls.length).toEqual(7);
1881 for(let i = 0 ; i < controls.length ; i++){
1882 expect(controls[i].controlName).toEqual(controlsOrderNames[i]);
1886 test('getAlacartFormControls should return the correct order of controls', () => {
1887 const controls = getALaCarteFormControls(null);
1889 const controlsOrderNames = [
1890 FormControlNames.INSTANCE_NAME,
1891 FormControlNames.PRODUCT_FAMILY_ID,
1892 FormControlNames.LCPCLOUD_REGION_ID,
1897 'rollbackOnFailure'];
1898 expect(controls.length).toEqual(8);
1899 for(let i = 0 ; i < controls.length ; i++) {
1900 expect(controls[i].controlName).toEqual(controlsOrderNames[i]);
1905 test('getAlacartFormControls check for mandatory controls', () => {
1906 const controls = getALaCarteFormControls("VF_vGeraldine 0");
1907 const mandatoryControls : string[] = [
1908 FormControlNames.INSTANCE_NAME,
1909 FormControlNames.LCPCLOUD_REGION_ID,
1915 for(let i = 0 ; i < mandatoryControls.length ; i++){
1916 let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
1917 expect(requiredExist).toBeDefined();
1921 test('getAlacartFormControls instance name control validator shall have the expected regex', () => {
1922 const controls:FormControlModel[] = getALaCarteFormControls("VF_vGeraldine 0");
1924 const instanceNameControl: FormControlModel = <FormControlModel>controls.find(item => item.controlName === FormControlNames.INSTANCE_NAME);
1925 const instanceNameValidator: ValidatorModel = instanceNameControl.validations.find(val => val.validatorName === ValidatorOptions.pattern);
1926 expect(instanceNameValidator.validatorArg).toEqual(/^[a-zA-Z0-9._-]*$/);
1929 test('rollback should return observable of true, false', () => {
1930 let result : Observable<SelectOption[]> = service.getRollBackOnFailureOptions();
1931 result.subscribe((val)=>{
1932 expect(val).toEqual([
1933 new SelectOption({id: 'true', name: 'Rollback'}),
1934 new SelectOption({id: 'false', name: 'Don\'t Rollback'})