remove FLAG_SETTING_DEFAULTS_IN_DRAWING_BOARD
[vid.git] / vid-webpack-master / src / app / shared / components / genericForm / formControlsServices / vfModuleGenerator / vfModule.control.generator.spec.ts
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 {BasicControlGenerator, SDN_C_PRE_LOAD} from "../basic.control.generator";
5 import {AaiService} from "../../../../services/aaiService/aai.service";
6 import {GenericFormService} from "../../generic-form.service";
7 import {FormBuilder} from "@angular/forms";
8 import {LogService} from "../../../../utils/log/log.service";
9 import {FormControlModel, ValidatorModel, ValidatorOptions} from "../../../../models/formControlModels/formControl.model";
10 import {FormControlNames, VfModuleControlGenerator} from "./vfModule.control.generator";
11 import {FeatureFlagsService} from "../../../../services/featureFlag/feature-flags.service";
12 import {VfModuleInstance} from "../../../../models/vfModuleInstance";
13 import {VfModule} from "../../../../models/vfModule";
14
15 class MockAppStore<T> {
16   getState() {
17     return {
18       "global": {
19         "name": null,
20         "flags": {
21           "FLAG_NETWORK_TO_ASYNC_INSTANTIATION": false,
22           "FLAG_SHOW_ASSIGNMENTS": true,
23           "FLAG_FABRIC_CONFIGURATION_ASSIGNMENTS": true,
24           "FLAG_SHOW_VERIFY_SERVICE": false,
25           "FLAG_SERVICE_MODEL_CACHE": true,
26           "FLAG_ADD_MSO_TESTAPI_FIELD": true
27         },
28         "type": "[FLAGS] Update"
29       },
30       "service": {
31         "serviceHierarchy": {
32           "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
33             "service": {
34               "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
35               "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
36               "name": "ComplexService",
37               "version": "1.0",
38               "toscaModelURL": null,
39               "category": "Emanuel",
40               "serviceType": "",
41               "serviceRole": "",
42               "description": "ComplexService",
43               "serviceEcompNaming": "false",
44               "instantiationType": "Macro",
45               "inputs": {}
46             },
47             "vnfs": {
48               "VF_vGeraldine 0": {
49                 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
50                 "invariantUuid": "4160458e-f648-4b30-a176-43881ffffe9e",
51                 "description": "VSP_vGeraldine",
52                 "name": "VF_vGeraldine",
53                 "version": "2.0",
54                 "customizationUuid": "91415b44-753d-494c-926a-456a9172bbb9",
55                 "inputs": {},
56                 "commands": {},
57                 "serviceEcompNaming" : "true",
58                 "properties": {
59                   "ecomp_generated_naming": "false",
60                   "max_instances": 10,
61                   "min_instances": 1,
62                   "gpb2_Internal2_mac": "00:11:22:EF:AC:DF",
63                   "sctp-b-ipv6-egress_src_start_port": "0",
64                   "sctp-a-ipv6-egress_rule_application": "any",
65                   "Internal2_allow_transit": "true",
66                   "sctp-b-IPv6_ethertype": "IPv6",
67                   "sctp-a-egress_rule_application": "any",
68                   "sctp-b-ingress_action": "pass",
69                   "sctp-b-ingress_rule_protocol": "icmp",
70                   "ncb2_Internal1_mac": "00:11:22:EF:AC:DF",
71                   "sctp-b-ipv6-ingress-src_start_port": "0.0",
72                   "ncb1_Internal2_mac": "00:11:22:EF:AC:DF",
73                   "fsb_volume_size_0": "320.0",
74                   "sctp-b-egress_src_addresses": "local",
75                   "sctp-a-ipv6-ingress_ethertype": "IPv4",
76                   "sctp-a-ipv6-ingress-dst_start_port": "0",
77                   "sctp-b-ipv6-ingress_rule_application": "any",
78                   "domain_name": "default-domain",
79                   "sctp-a-ingress_rule_protocol": "icmp",
80                   "sctp-b-egress-src_start_port": "0.0",
81                   "sctp-a-egress_src_addresses": "local",
82                   "sctp-b-display_name": "epc-sctp-b-ipv4v6-sec-group",
83                   "sctp-a-egress-src_start_port": "0.0",
84                   "sctp-a-ingress_ethertype": "IPv4",
85                   "sctp-b-ipv6-ingress-dst_end_port": "65535",
86                   "sctp-b-dst_subnet_prefix_v6": "::",
87                   "nf_naming": "{ecomp_generated_naming=true}",
88                   "sctp-a-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
89                   "sctp-b-egress-dst_start_port": "0.0",
90                   "ncb_flavor_name": "nv.c20r64d1",
91                   "gpb1_Internal1_mac": "00:11:22:EF:AC:DF",
92                   "sctp-b-egress_dst_subnet_prefix_len": "0.0",
93                   "Internal2_net_cidr": "10.0.0.10",
94                   "sctp-a-ingress-dst_start_port": "0.0",
95                   "sctp-a-egress-dst_start_port": "0.0",
96                   "fsb1_Internal2_mac": "00:11:22:EF:AC:DF",
97                   "sctp-a-egress_ethertype": "IPv4",
98                   "vlc_st_service_mode": "in-network-nat",
99                   "sctp-a-ipv6-egress_ethertype": "IPv4",
100                   "sctp-a-egress-src_end_port": "65535.0",
101                   "sctp-b-ipv6-egress_rule_application": "any",
102                   "sctp-b-egress_action": "pass",
103                   "sctp-a-ingress-src_subnet_prefix_len": "0.0",
104                   "sctp-b-ipv6-ingress-src_end_port": "65535.0",
105                   "sctp-b-name": "epc-sctp-b-ipv4v6-sec-group",
106                   "fsb2_Internal1_mac": "00:11:22:EF:AC:DF",
107                   "sctp-a-ipv6-ingress-src_start_port": "0.0",
108                   "sctp-b-ipv6-egress_ethertype": "IPv4",
109                   "Internal1_net_cidr": "10.0.0.10",
110                   "sctp-a-egress_dst_subnet_prefix": "0.0.0.0",
111                   "fsb_flavor_name": "nv.c20r64d1",
112                   "sctp_rule_protocol": "132",
113                   "sctp-b-ipv6-ingress_src_subnet_prefix_len": "0",
114                   "sctp-a-ipv6-ingress_rule_application": "any",
115                   "sctp-a-IPv6_ethertype": "IPv6",
116                   "vlc2_Internal1_mac": "00:11:22:EF:AC:DF",
117                   "vlc_st_virtualization_type": "virtual-machine",
118                   "sctp-b-ingress-dst_start_port": "0.0",
119                   "sctp-b-ingress-dst_end_port": "65535.0",
120                   "sctp-a-ipv6-ingress-src_end_port": "65535.0",
121                   "sctp-a-display_name": "epc-sctp-a-ipv4v6-sec-group",
122                   "sctp-b-ingress_rule_application": "any",
123                   "int2_sec_group_name": "int2-sec-group",
124                   "vlc_flavor_name": "nd.c16r64d1",
125                   "sctp-b-ipv6-egress_src_addresses": "local",
126                   "vlc_st_interface_type_int1": "other1",
127                   "sctp-b-egress-src_end_port": "65535.0",
128                   "sctp-a-ipv6-egress-dst_start_port": "0",
129                   "vlc_st_interface_type_int2": "other2",
130                   "sctp-a-ipv6-egress_rule_protocol": "any",
131                   "Internal2_shared": "false",
132                   "sctp-a-ipv6-egress_dst_subnet_prefix_len": "0",
133                   "Internal2_rpf": "disable",
134                   "vlc1_Internal1_mac": "00:11:22:EF:AC:DF",
135                   "sctp-b-ipv6-egress_src_end_port": "65535",
136                   "sctp-a-ipv6-egress_src_addresses": "local",
137                   "sctp-a-ingress-dst_end_port": "65535.0",
138                   "sctp-a-ipv6-egress_src_end_port": "65535",
139                   "Internal1_forwarding_mode": "l2",
140                   "Internal2_dhcp": "false",
141                   "sctp-a-dst_subnet_prefix_v6": "::",
142                   "pxe_image_name": "MME_PXE-Boot_16ACP04_GA.qcow2",
143                   "vlc_st_interface_type_gtp": "other0",
144                   "ncb1_Internal1_mac": "00:11:22:EF:AC:DF",
145                   "sctp-b-src_subnet_prefix_v6": "::",
146                   "sctp-a-egress_dst_subnet_prefix_len": "0.0",
147                   "int1_sec_group_name": "int1-sec-group",
148                   "Internal1_dhcp": "false",
149                   "sctp-a-ipv6-egress_dst_end_port": "65535",
150                   "Internal2_forwarding_mode": "l2",
151                   "fsb2_Internal2_mac": "00:11:22:EF:AC:DF",
152                   "sctp-b-egress_dst_subnet_prefix": "0.0.0.0",
153                   "Internal1_net_cidr_len": "17",
154                   "gpb2_Internal1_mac": "00:11:22:EF:AC:DF",
155                   "sctp-b-ingress-src_subnet_prefix_len": "0.0",
156                   "sctp-a-ingress_dst_addresses": "local",
157                   "sctp-a-egress_action": "pass",
158                   "fsb_volume_type_0": "SF-Default-SSD",
159                   "ncb2_Internal2_mac": "00:11:22:EF:AC:DF",
160                   "vlc_st_interface_type_sctp_a": "left",
161                   "vlc_st_interface_type_sctp_b": "right",
162                   "sctp-a-src_subnet_prefix_v6": "::",
163                   "vlc_st_version": "2",
164                   "sctp-b-egress_ethertype": "IPv4",
165                   "sctp-a-ingress_rule_application": "any",
166                   "gpb1_Internal2_mac": "00:11:22:EF:AC:DF",
167                   "instance_ip_family_v6": "v6",
168                   "sctp-a-ipv6-egress_src_start_port": "0",
169                   "sctp-b-ingress-src_start_port": "0.0",
170                   "sctp-b-ingress_dst_addresses": "local",
171                   "fsb1_Internal1_mac": "00:11:22:EF:AC:DF",
172                   "vlc_st_interface_type_oam": "management",
173                   "multi_stage_design": "true",
174                   "oam_sec_group_name": "oam-sec-group",
175                   "Internal2_net_gateway": "10.0.0.10",
176                   "sctp-a-ipv6-ingress-dst_end_port": "65535",
177                   "sctp-b-ipv6-egress-dst_start_port": "0",
178                   "Internal1_net_gateway": "10.0.0.10",
179                   "sctp-b-ipv6-egress_rule_protocol": "any",
180                   "gtp_sec_group_name": "gtp-sec-group",
181                   "sctp-a-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
182                   "sctp-b-ipv6-egress_dst_subnet_prefix_len": "0",
183                   "sctp-a-ipv6-ingress_dst_addresses": "local",
184                   "sctp-a-egress_rule_protocol": "icmp",
185                   "sctp-b-ipv6-egress_action": "pass",
186                   "sctp-a-ipv6-egress_action": "pass",
187                   "Internal1_shared": "false",
188                   "sctp-b-ipv6-ingress_rule_protocol": "any",
189                   "Internal2_net_cidr_len": "17",
190                   "sctp-a-name": "epc-sctp-a-ipv4v6-sec-group",
191                   "sctp-a-ingress-src_end_port": "65535.0",
192                   "sctp-b-ipv6-ingress_src_subnet_prefix": "0.0.0.0",
193                   "sctp-a-egress-dst_end_port": "65535.0",
194                   "sctp-a-ingress_action": "pass",
195                   "sctp-b-egress_rule_protocol": "icmp",
196                   "sctp-b-ipv6-ingress_action": "pass",
197                   "vlc_st_service_type": "firewall",
198                   "sctp-b-ipv6-egress_dst_end_port": "65535",
199                   "sctp-b-ipv6-ingress-dst_start_port": "0",
200                   "vlc2_Internal2_mac": "00:11:22:EF:AC:DF",
201                   "vlc_st_availability_zone": "true",
202                   "fsb_volume_image_name_1": "MME_FSB2_16ACP04_GA.qcow2",
203                   "sctp-b-ingress-src_subnet_prefix": "0.0.0.0",
204                   "sctp-a-ipv6-ingress_src_subnet_prefix_len": "0",
205                   "Internal1_allow_transit": "true",
206                   "gpb_flavor_name": "nv.c20r64d1",
207                   "availability_zone_max_count": "1",
208                   "fsb_volume_image_name_0": "MME_FSB1_16ACP04_GA.qcow2",
209                   "sctp-b-ipv6-ingress_dst_addresses": "local",
210                   "sctp-b-ipv6-egress_dst_subnet_prefix": "0.0.0.0",
211                   "sctp-b-ipv6-ingress_ethertype": "IPv4",
212                   "vlc1_Internal2_mac": "00:11:22:EF:AC:DF",
213                   "sctp-a-ingress-src_subnet_prefix": "0.0.0.0",
214                   "sctp-a-ipv6-ingress_action": "pass",
215                   "Internal1_rpf": "disable",
216                   "sctp-b-ingress_ethertype": "IPv4",
217                   "sctp-b-egress_rule_application": "any",
218                   "sctp-b-ingress-src_end_port": "65535.0",
219                   "sctp-a-ipv6-ingress_rule_protocol": "any",
220                   "sctp-a-ingress-src_start_port": "0.0",
221                   "sctp-b-egress-dst_end_port": "65535.0"
222                 },
223                 "type": "VF",
224                 "modelCustomizationName": "VF_vGeraldine 0",
225                 "vfModules": {
226                   "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
227                     "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
228                     "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
229                     "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
230                     "description": null,
231                     "name": "VfVgeraldine..vflorence_vlc..module-1",
232                     "version": "2",
233                     "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
234                     "properties": {
235                       "minCountInstances": 0,
236                       "maxCountInstances": null,
237                       "initialCount": 0,
238                       "vfModuleLabel": "vflorence_vlc"
239                     },
240                     "inputs": {},
241                     "volumeGroupAllowed": true
242                   },
243                   "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
244                     "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
245                     "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
246                     "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
247                     "description": null,
248                     "name": "VfVgeraldine..vflorence_gpb..module-2",
249                     "version": "2",
250                     "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
251                     "properties": {
252                       "minCountInstances": 0,
253                       "maxCountInstances": null,
254                       "initialCount": 0,
255                       "vfModuleLabel": "vflorence_gpb"
256                     },
257                     "inputs": {},
258                     "volumeGroupAllowed": false
259                   },
260                   "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
261                     "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
262                     "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
263                     "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
264                     "description": null,
265                     "name": "VfVgeraldine..base_vflorence..module-0",
266                     "version": "2",
267                     "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
268                     "properties": {
269                       "minCountInstances": 1,
270                       "maxCountInstances": 1,
271                       "initialCount": 1,
272                       "vfModuleLabel": "base_vflorence"
273                     },
274                     "inputs": {},
275                     "volumeGroupAllowed": true
276                   }
277                 },
278                 "volumeGroups": {
279                   "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
280                     "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
281                     "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
282                     "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
283                     "description": null,
284                     "name": "VfVgeraldine..base_vflorence..module-0",
285                     "version": "2",
286                     "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
287                     "properties": {
288                       "minCountInstances": 1,
289                       "maxCountInstances": 1,
290                       "initialCount": 1,
291                       "vfModuleLabel": "base_vflorence"
292                     },
293                     "inputs": {}
294                   }
295                 },
296                 "vfcInstanceGroups": {}
297               }
298             },
299             "networks": {
300               "ExtVL 0": {
301                 "uuid": "ddc3f20c-08b5-40fd-af72-c6d14636b986",
302                 "invariantUuid": "379f816b-a7aa-422f-be30-17114ff50b7c",
303                 "description": "ECOMP generic virtual link (network) base type for all other service-level and global networks",
304                 "name": "ExtVL",
305                 "version": "37.0",
306                 "customizationUuid": "94fdd893-4a36-4d70-b16a-ec29c54c184f",
307                 "inputs": {},
308                 "commands": {},
309                 "properties": {
310                   "ecomp_generated_naming": "false",
311                   "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}}",
312                   "exVL_naming": "{ecomp_generated_naming=true}",
313                   "network_flows": "{is_network_policy=false, is_bound_to_vpn=false}",
314                   "network_homing": "{ecomp_selected_instance_node_target=false}"
315                 },
316                 "type": "VL",
317                 "modelCustomizationName": "ExtVL 0"
318               }
319             },
320             "collectionResources": {},
321             "configurations": {
322               "Port Mirroring Configuration By Policy 0": {
323                 "uuid": "b4398538-e89d-4f13-b33d-ca323434ba50",
324                 "invariantUuid": "6ef0ca40-f366-4897-951f-abd65d25f6f7",
325                 "description": "A port mirroring configuration by policy object",
326                 "name": "Port Mirroring Configuration By Policy",
327                 "version": "27.0",
328                 "customizationUuid": "3c3b7b8d-8669-4b3b-8664-61970041fad2",
329                 "inputs": {},
330                 "commands": {},
331                 "properties": {},
332                 "type": "Configuration",
333                 "modelCustomizationName": "Port Mirroring Configuration By Policy 0",
334                 "sourceNodes": [],
335                 "collectorNodes": null,
336                 "configurationByPolicy": false
337               }
338             },
339             "serviceProxies": {},
340             "vfModules": {
341               "vf_vgeraldine0..VfVgeraldine..vflorence_vlc..module-1": {
342                 "uuid": "522159d5-d6e0-4c2a-aa44-5a542a12a830",
343                 "invariantUuid": "98a7c88b-b577-476a-90e4-e25a5871e02b",
344                 "customizationUuid": "55b1be94-671a-403e-a26c-667e9c47d091",
345                 "description": null,
346                 "name": "VfVgeraldine..vflorence_vlc..module-1",
347                 "version": "2",
348                 "modelCustomizationName": "VfVgeraldine..vflorence_vlc..module-1",
349                 "properties": {
350                   "minCountInstances": 0,
351                   "maxCountInstances": null,
352                   "initialCount": 0,
353                   "vfModuleLabel": "vflorence_vlc"
354                 },
355                 "inputs": {},
356                 "volumeGroupAllowed": true
357               },
358               "vf_vgeraldine0..VfVgeraldine..vflorence_gpb..module-2": {
359                 "uuid": "41708296-e443-4c71-953f-d9a010f059e1",
360                 "invariantUuid": "1cca90b8-3490-495e-87da-3f3e4c57d5b9",
361                 "customizationUuid": "6add59e0-7fe1-4bc4-af48-f8812422ae7c",
362                 "description": null,
363                 "name": "VfVgeraldine..vflorence_gpb..module-2",
364                 "version": "2",
365                 "modelCustomizationName": "VfVgeraldine..vflorence_gpb..module-2",
366                 "properties": {
367                   "minCountInstances": 0,
368                   "maxCountInstances": null,
369                   "initialCount": 0,
370                   "vfModuleLabel": "vflorence_gpb"
371                 },
372                 "inputs": {},
373                 "volumeGroupAllowed": false
374               },
375               "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
376                 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
377                 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
378                 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
379                 "description": null,
380                 "name": "VfVgeraldine..base_vflorence..module-0",
381                 "version": "2",
382                 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
383                 "properties": {
384                   "minCountInstances": 1,
385                   "maxCountInstances": 1,
386                   "initialCount": 1,
387                   "vfModuleLabel": "base_vflorence"
388                 },
389                 "inputs": {},
390                 "volumeGroupAllowed": true
391               }
392             },
393             "volumeGroups": {
394               "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
395                 "uuid": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
396                 "invariantUuid": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
397                 "customizationUuid": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
398                 "description": null,
399                 "name": "VfVgeraldine..base_vflorence..module-0",
400                 "version": "2",
401                 "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0",
402                 "properties": {
403                   "minCountInstances": 1,
404                   "maxCountInstances": 1,
405                   "initialCount": 1,
406                   "vfModuleLabel": "base_vflorence"
407                 },
408                 "inputs": {}
409               }
410             },
411             "pnfs": {}
412           }
413         },
414         "serviceInstance": {
415           "6e59c5de-f052-46fa-aa7e-2fca9d674c44": {
416             "networks": {},
417             "vnfs": {
418               "VF_vGeraldine 0": {
419                 "rollbackOnFailure": "true",
420                 "vfModules": {
421                   "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0": {
422                     "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo": {
423                       "isMissingData": false,
424                       "sdncPreReload": null,
425                       "modelInfo": {
426                         "modelType": "VFmodule",
427                         "modelInvariantId": "a6f9e51a-2b35-416a-ae15-15e58d61f36d",
428                         "modelVersionId": "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
429                         "modelName": "VfVgeraldine..base_vflorence..module-0",
430                         "modelVersion": "2",
431                         "modelCustomizationId": "f8c040f1-7e51-4a11-aca8-acf256cfd861",
432                         "modelCustomizationName": "VfVgeraldine..base_vflorence..module-0"
433                       },
434                       "instanceParams": [
435                         {}
436                       ],
437                       "trackById": "wmtm6sy2uj"
438                     }
439                   }
440                 },
441                 "isMissingData": true,
442                 "originalName": "VF_vGeraldine 0",
443                 "vnfStoreKey": "VF_vGeraldine 0",
444                 "trackById": "p3wk448m5do",
445                 "uuid": "d6557200-ecf2-4641-8094-5393ae3aae60",
446                 "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
447                 "lcpCloudRegionId": null,
448                 "tenantId": null,
449                 "lineOfBusiness": null,
450                 "platformName": null,
451                 "modelInfo": {
452                   "modelType": "VF",
453                   "modelInvariantId": "4160458e-f648-4b30-a176-43881ffffe9e",
454                   "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
455                   "modelName": "VF_vGeraldine",
456                   "modelVersion": "2.0",
457                   "modelCustomizationName": "VF_vGeraldine 0"
458                 }
459               }
460             },
461             "instanceParams": [
462               {}
463             ],
464             "validationCounter": 1,
465             "existingNames": {},
466             "existingVNFCounterMap": {
467               "d6557200-ecf2-4641-8094-5393ae3aae60": 1
468             },
469             "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
470             "subscriptionServiceType": "TYLER SILVIA",
471             "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
472             "productFamilyId": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
473             "lcpCloudRegionId": "hvf6",
474             "tenantId": "229bcdc6eaeb4ca59d55221141d01f8e",
475             "aicZoneId": "JAG1",
476             "projectName": "x1",
477             "rollbackOnFailure": "true",
478             "bulkSize": 1,
479             "modelInfo": {
480               "modelInvariantId": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
481               "modelVersionId": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
482               "modelName": "ComplexService",
483               "modelVersion": "1.0",
484               "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44"
485             },
486             "isALaCarte": false,
487             "name": "ComplexService",
488             "version": "1.0",
489             "description": "ComplexService",
490             "category": "Emanuel",
491             "uuid": "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
492             "invariantUuid": "e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0",
493             "serviceType": "",
494             "serviceRole": "",
495             "isEcompGeneratedNaming": true,
496             "isMultiStepDesign": false
497           }
498         },
499         "lcpRegionsAndTenants": {
500           "lcpRegionList": [
501             {
502               "id": "AAIAIC25",
503               "name": "AAIAIC25",
504               "isPermitted": true
505             },
506             {
507               "id": "hvf6",
508               "name": "hvf6",
509               "isPermitted": true
510             }
511           ],
512           "lcpRegionsTenantsMap": {
513             "AAIAIC25": [
514               {
515                 "id": "092eb9e8e4b7412e8787dd091bc58e86",
516                 "name": "USP-SIP-IC-24335-T-01",
517                 "isPermitted": true
518               }
519             ],
520             "hvf6": [
521               {
522                 "id": "bae71557c5bb4d5aac6743a4e5f1d054",
523                 "name": "AIN Web Tool-15-D-testalexandria",
524                 "isPermitted": true
525               },
526               {
527                 "id": "d0a3e3f2964542259d155a81c41aadc3",
528                 "name": "test-hvf6-09",
529                 "isPermitted": true
530               },
531               {
532                 "id": "fa45ca53c80b492fa8be5477cd84fc2b",
533                 "name": "ro-T112",
534                 "isPermitted": true
535               },
536               {
537                 "id": "cbb99fe4ada84631b7baf046b6fd2044",
538                 "name": "DN5242-Nov16-T3",
539                 "isPermitted": true
540               }
541             ]
542           }
543         },
544         "productFamilies": [
545           {
546             "id": "ebc3bc3d-62fd-4a3f-a037-f619df4ff034",
547             "name": "ERICA",
548             "isPermitted": true
549           },
550           {
551             "id": "17cc1042-527b-11e6-beb8-9e71128cae77",
552             "name": "IGNACIO",
553             "isPermitted": true
554           },
555           {
556             "id": "36b4733a-53f4-4cc8-8ff0-9172e5fc4b8e",
557             "name": "Christie",
558             "isPermitted": true
559           },
560           {
561             "id": "a4f6f2ae-9bf5-4ed7-b904-06b2099c4bd7",
562             "name": "Enhanced Services",
563             "isPermitted": true
564           },
565           {
566             "id": "vTerrance",
567             "name": "vTerrance",
568             "isPermitted": true
569           },
570           {
571             "id": "323d69d9-2efe-4r45-ay0a-89ea7ard4e6f",
572             "name": "vEsmeralda",
573             "isPermitted": true
574           },
575           {
576             "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
577             "name": "Emanuel",
578             "isPermitted": true
579           },
580           {
581             "id": "d8a6ed93-251c-47ca-adc9-86671fd19f4c",
582             "name": "BVOIP",
583             "isPermitted": true
584           },
585           {
586             "id": "db171b8f-115c-4992-a2e3-ee04cae357e0",
587             "name": "LINDSEY",
588             "isPermitted": true
589           },
590           {
591             "id": "LRSI-OSPF",
592             "name": "LRSI-OSPF",
593             "isPermitted": true
594           },
595           {
596             "id": "vRosemarie",
597             "name": "HNGATEWAY",
598             "isPermitted": true
599           },
600           {
601             "id": "vHNPaas",
602             "name": "WILKINS",
603             "isPermitted": true
604           },
605           {
606             "id": "e433710f-9217-458d-a79d-1c7aff376d89",
607             "name": "TYLER SILVIA",
608             "isPermitted": true
609           },
610           {
611             "id": "b6a3f28c-eebf-494c-a900-055cc7c874ce",
612             "name": "VROUTER",
613             "isPermitted": true
614           },
615           {
616             "id": "vMuriel",
617             "name": "vMuriel",
618             "isPermitted": true
619           },
620           {
621             "id": "0ee8c1bc-7cbd-4b0a-a1ac-e9999255abc1",
622             "name": "CARA Griffin",
623             "isPermitted": true
624           },
625           {
626             "id": "c7611ebe-c324-48f1-8085-94aef0c6ef3d",
627             "name": "DARREN MCGEE",
628             "isPermitted": true
629           },
630           {
631             "id": "e30755dc-5673-4b6b-9dcf-9abdd96b93d1",
632             "name": "Transport",
633             "isPermitted": true
634           },
635           {
636             "id": "vSalvatore",
637             "name": "vSalvatore",
638             "isPermitted": true
639           },
640           {
641             "id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
642             "name": "JOSEFINA",
643             "isPermitted": true
644           },
645           {
646             "id": "vHubbard",
647             "name": "vHubbard",
648             "isPermitted": true
649           },
650           {
651             "id": "12a96a9d-4b4c-4349-a950-fe1159602621",
652             "name": "DARREN MCGEE",
653             "isPermitted": true
654           }
655         ],
656         "serviceTypes": {
657           "e433710f-9217-458d-a79d-1c7aff376d89": [
658             {
659               "id": "0",
660               "name": "vRichardson",
661               "isPermitted": false
662             },
663             {
664               "id": "1",
665               "name": "TYLER SILVIA",
666               "isPermitted": true
667             },
668             {
669               "id": "2",
670               "name": "Emanuel",
671               "isPermitted": false
672             },
673             {
674               "id": "3",
675               "name": "vJamie",
676               "isPermitted": false
677             },
678             {
679               "id": "4",
680               "name": "vVoiceMail",
681               "isPermitted": false
682             },
683             {
684               "id": "5",
685               "name": "Kennedy",
686               "isPermitted": false
687             },
688             {
689               "id": "6",
690               "name": "vPorfirio",
691               "isPermitted": false
692             },
693             {
694               "id": "7",
695               "name": "vVM",
696               "isPermitted": false
697             },
698             {
699               "id": "8",
700               "name": "vOTA",
701               "isPermitted": false
702             },
703             {
704               "id": "9",
705               "name": "vFLORENCE",
706               "isPermitted": false
707             },
708             {
709               "id": "10",
710               "name": "vMNS",
711               "isPermitted": false
712             },
713             {
714               "id": "11",
715               "name": "vEsmeralda",
716               "isPermitted": false
717             },
718             {
719               "id": "12",
720               "name": "VPMS",
721               "isPermitted": false
722             },
723             {
724               "id": "13",
725               "name": "vWINIFRED",
726               "isPermitted": false
727             },
728             {
729               "id": "14",
730               "name": "SSD",
731               "isPermitted": false
732             },
733             {
734               "id": "15",
735               "name": "vMOG",
736               "isPermitted": false
737             },
738             {
739               "id": "16",
740               "name": "LINDSEY",
741               "isPermitted": false
742             },
743             {
744               "id": "17",
745               "name": "JOHANNA_SANTOS",
746               "isPermitted": false
747             },
748             {
749               "id": "18",
750               "name": "vCarroll",
751               "isPermitted": false
752             }
753           ]
754         },
755         "aicZones": [
756           {
757             "id": "NFT1",
758             "name": "NFTJSSSS-NFT1"
759           },
760           {
761             "id": "JAG1",
762             "name": "YUDFJULP-JAG1"
763           },
764           {
765             "id": "YYY1",
766             "name": "UUUAIAAI-YYY1"
767           },
768           {
769             "id": "AVT1",
770             "name": "AVTRFLHD-AVT1"
771           },
772           {
773             "id": "ATL34",
774             "name": "ATLSANAI-ATL34"
775           }
776         ],
777         "categoryParameters": {
778           "owningEntityList": [
779             {
780               "id": "aaa1",
781               "name": "aaa1"
782             },
783             {
784               "id": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
785               "name": "WayneHolland"
786             },
787             {
788               "id": "Melissa",
789               "name": "Melissa"
790             }
791           ],
792           "projectList": [
793             {
794               "id": "WATKINS",
795               "name": "WATKINS"
796             },
797             {
798               "id": "x1",
799               "name": "x1"
800             },
801             {
802               "id": "yyy1",
803               "name": "yyy1"
804             }
805           ],
806           "lineOfBusinessList": [
807             {
808               "id": "ONAP",
809               "name": "ONAP"
810             },
811             {
812               "id": "zzz1",
813               "name": "zzz1"
814             }
815           ],
816           "platformList": [
817             {
818               "id": "platform",
819               "name": "platform"
820             },
821             {
822               "id": "xxx1",
823               "name": "xxx1"
824             }
825           ]
826         },
827         "type": "[LCP_REGIONS_AND_TENANTS] Update",
828         "subscribers": [
829           {
830             "id": "CAR_2020_ER",
831             "name": "CAR_2020_ER",
832             "isPermitted": true
833           },
834           {
835             "id": "21014aa2-526b-11e6-beb8-9e71128cae77",
836             "name": "JULIO ERICKSON",
837             "isPermitted": false
838           },
839           {
840             "id": "DHV1707-TestSubscriber-2",
841             "name": "DALE BRIDGES",
842             "isPermitted": false
843           },
844           {
845             "id": "DHV1707-TestSubscriber-1",
846             "name": "LLOYD BRIDGES",
847             "isPermitted": false
848           },
849           {
850             "id": "jimmy-example",
851             "name": "JimmyExampleCust-20161102",
852             "isPermitted": false
853           },
854           {
855             "id": "jimmy-example2",
856             "name": "JimmyExampleCust-20161103",
857             "isPermitted": false
858           },
859           {
860             "id": "ERICA5779-TestSub-PWT-102",
861             "name": "ERICA5779-TestSub-PWT-102",
862             "isPermitted": false
863           },
864           {
865             "id": "ERICA5779-TestSub-PWT-101",
866             "name": "ERICA5779-TestSub-PWT-101",
867             "isPermitted": false
868           },
869           {
870             "id": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
871             "name": "Emanuel",
872             "isPermitted": false
873           },
874           {
875             "id": "ERICA5779-Subscriber-4",
876             "name": "ERICA5779-Subscriber-5",
877             "isPermitted": false
878           },
879           {
880             "id": "ERICA5779-TestSub-PWT-103",
881             "name": "ERICA5779-TestSub-PWT-103",
882             "isPermitted": false
883           },
884           {
885             "id": "ERICA5779-Subscriber-2",
886             "name": "ERICA5779-Subscriber-2",
887             "isPermitted": false
888           },
889           {
890             "id": "e433710f-9217-458d-a79d-1c7aff376d89",
891             "name": "SILVIA ROBBINS",
892             "isPermitted": true
893           },
894           {
895             "id": "ERICA5779-Subscriber-3",
896             "name": "ERICA5779-Subscriber-3",
897             "isPermitted": false
898           },
899           {
900             "id": "31739f3e-526b-11e6-beb8-9e71128cae77",
901             "name": "CRAIG/ROBERTS",
902             "isPermitted": false
903           }
904         ]
905       }
906     }
907   }
908 }
909
910 class MockFeatureFlagsService {}
911
912 describe('VFModule Control Generator', () => {
913   let injector;
914   let service: VfModuleControlGenerator;
915   let httpMock: HttpTestingController;
916
917   beforeAll(done => (async () => {
918     TestBed.configureTestingModule({
919       imports: [HttpClientTestingModule],
920       providers: [VfModuleControlGenerator,
921         GenericFormService,
922         BasicControlGenerator,
923         AaiService,
924         FormBuilder,
925         LogService,
926         {provide:FeatureFlagsService, useClass: MockFeatureFlagsService},
927         {provide: NgRedux, useClass: MockAppStore}]
928     });
929     await TestBed.compileComponents();
930
931     injector = getTestBed();
932     service = injector.get(VfModuleControlGenerator);
933     httpMock = injector.get(HttpTestingController);
934     jest.spyOn(console, 'error');
935
936   })().then(done).catch(done.fail));
937
938   test(' getMacroFormControls gets vnfStoreKey === null', () => {
939     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
940     const vnfStoreKey: string = null;
941     const vfModuleStoreKey: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
942     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
943     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vfModuleStoreKey, vfModuleUUID, true);
944
945     expect(controls).toEqual([]);
946     expect(console.error).toHaveBeenCalled();
947   });
948
949   test('getAlaCarteFormControls check for mandatory controls', () => {
950     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
951     const vnfStoreKey: string = 'VF_vGeraldine 0';
952     const vfModuleStoreKey: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
953     const uuidData: Object = {
954       modelId : "522159d5-d6e0-4c2a-aa44-5a542a12a830",
955       modelName :  "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
956       serviceId : "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
957       type : "VFmodule",
958       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
959       vnfStoreKey : "VF_vGeraldine 0"
960     };
961     const controls: FormControlModel[] = service.getAlaCarteFormControls(serviceId, vnfStoreKey, vfModuleStoreKey, uuidData, true);
962
963     const mandatoryControls : string[] = [
964       FormControlNames.INSTANCE_NAME,
965       FormControlNames.LCPCLOUD_REGION_ID,
966       FormControlNames.TENANT_ID,
967       FormControlNames.ROLLBACK_ON_FAILURE,
968     ];
969
970     for(let i = 0 ; i < mandatoryControls.length ; i++) {
971       let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
972       expect(requiredExist).toBeDefined();
973     }
974   });
975
976
977   const cases = [
978     [true, true, true, null, true, true],
979     [true, true, false, null, true, false], //Scenario to check that UI field doesn't appear.
980     [false, true, false, "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0_vol", true, true],
981     [false, true, true, "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0_vol", true, true],
982     [false, false, true, null, false, false],
983   ];
984
985   test.each(cases)('Given Ecomp Gen Name: %p and VG Name %p , ' +
986     'is A La Carte %p - expect the name value for VG to be %p , ' +
987     'VG Name should be defined: %p , and should the field be visible: %p',
988     (ecomGenName, vGName, isALaCarte, expectedName, shouldWeVerifyDefinitionOfField, isVisible) => {
989     const moduleName = "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0";
990     service.vfModuleModel = new VfModule();
991     service.vfModuleModel.name = moduleName;
992     service.vfModuleModel.volumeGroupAllowed = vGName;
993     let vnf : Object =  {isEcompGeneratedNaming: ecomGenName};
994     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
995     const vnfStoreKey: string = 'VF_vGeraldine 0';
996     const uuidData: Object = {
997       modelName :  moduleName,
998       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
999     };
1000     const vfModuleModel :VfModuleInstance = service.getVfModuleInstance(serviceId, vnfStoreKey, uuidData,true);
1001     let existingMatchingFieldInForm = buildVfModuleFormControlModel(vfModuleModel ,serviceId, vnf, isALaCarte);
1002       if (shouldWeVerifyDefinitionOfField) {
1003         expect(existingMatchingFieldInForm).toBeDefined();
1004         expect(existingMatchingFieldInForm.value).toEqual(expectedName);
1005         expect(existingMatchingFieldInForm.isVisible).toEqual(isVisible);
1006       } else {
1007         expect(existingMatchingFieldInForm).toBeUndefined();
1008       }
1009     });
1010
1011   let buildVfModuleFormControlModel = function(vfModuleModel :any, serviceId: string, vnf, isALaCarte) :FormControlModel {
1012     let controls: FormControlModel[] = service.pushInstanceAndVGToForm([], vfModuleModel, serviceId, vnf, isALaCarte);
1013     return controls.find(ctrl => ctrl.controlName === FormControlNames.VOLUME_GROUP_NAME);
1014   };
1015
1016   test('getMacroFormControls check for mandatory controls', () => {
1017     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1018     const vnfStoreKey: string = 'VF_vGeraldine 0';
1019     const uuidData: Object = {
1020       modelId : "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
1021       modelName :  "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
1022       serviceId : "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
1023       type : "VFmodule",
1024       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1025       vnfStoreKey : "VF_vGeraldine 0"
1026     };
1027     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vnfStoreKey, uuidData, true);
1028
1029     const mandatoryControls : string[] = [
1030       'instanceName'
1031     ];
1032
1033     for(let i = 0 ; i < mandatoryControls.length ; i++) {
1034       let requiredExist = controls.find(ctrl => ctrl.controlName === mandatoryControls[i]).validations.find(item => item.validatorName === 'required');
1035       expect(requiredExist).toBeDefined();
1036     }
1037   });
1038
1039   test(' getMacroFormControls gets null vnfStoreKey', () => {
1040     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1041     const vnfStoreKey: string = null;
1042     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
1043     const uuidData: Object = {};
1044     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vfModuleUUID, uuidData,true);
1045
1046     expect(controls).toEqual([]);
1047     expect(console.error).toHaveBeenCalled();
1048   });
1049
1050   test('getAlaCarteFormControls should return the correct order of controls', () => {
1051     const controls:FormControlModel[] = getAlaCarteFormControls();
1052
1053     const orderedControls : string[] = [
1054       FormControlNames.INSTANCE_NAME,
1055       FormControlNames.VOLUME_GROUP_NAME,
1056       FormControlNames.LCPCLOUD_REGION_ID,
1057       FormControlNames.LEGACY_REGION,
1058       FormControlNames.TENANT_ID,
1059       FormControlNames.ROLLBACK_ON_FAILURE,
1060       SDN_C_PRE_LOAD,
1061     ];
1062
1063     expect(controls.length).toEqual(7);
1064     for(let i = 0 ; i < orderedControls.length ; i++) {
1065      expect(controls[i].controlName).toEqual(orderedControls[i]);
1066     }
1067   });
1068
1069   function getAlaCarteFormControls():FormControlModel[] {
1070     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1071     const vnfStoreKey: string = 'VF_vGeraldine 0';
1072     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
1073     const uuidData: Object = {
1074       modelId: "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
1075       modelName: "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
1076       serviceId: "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
1077       type: "VFmodule",
1078       vFModuleStoreKey: "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1079       vnfStoreKey: "VF_vGeraldine 0"
1080     };
1081     const controls: FormControlModel[] = service.getAlaCarteFormControls(serviceId, vnfStoreKey, vfModuleUUID, uuidData, true);
1082     return controls;
1083   }
1084
1085   test('getAlaCarteFormControls responce with wrong order of controls', () => {
1086     const controls:FormControlModel[] = getAlaCarteFormControls();
1087
1088     const orderedControls : string[] = [
1089       FormControlNames.INSTANCE_NAME,
1090       FormControlNames.VOLUME_GROUP_NAME,
1091       FormControlNames.LCPCLOUD_REGION_ID,
1092       FormControlNames.TENANT_ID, // TENANT_ID must be after LEGACY_REGION
1093       FormControlNames.LEGACY_REGION,
1094       FormControlNames.ROLLBACK_ON_FAILURE,
1095       SDN_C_PRE_LOAD,
1096     ];
1097
1098     for(let i = 0 ; i < orderedControls.length ; i++) {
1099       if (controls[i].controlName === 'legacyRegion') {
1100         expect(orderedControls[i]).toEqual('tenantId');
1101       }
1102     }
1103   });
1104
1105   test('getMacroFormControls should return the correct order of controls', () => {
1106     const serviceId: string = "6e59c5de-f052-46fa-aa7e-2fca9d674c44";
1107     const vnfStoreKey: string = 'VF_vGeraldine 0';
1108     const vfModuleUUID: string = "522159d5-d6e0-4c2a-aa44-5a542a12a830";
1109     const uuidData: Object = {
1110       modelId : "a27f5cfc-7f12-4f99-af08-0af9c3885c87",
1111       modelName :  "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0",
1112       serviceId : "6e59c5de-f052-46fa-aa7e-2fca9d674c44",
1113       type : "VFmodule",
1114       vFModuleStoreKey : "vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0vmvzo",
1115       vnfStoreKey : "VF_vGeraldine 0"
1116     };
1117     const controls: FormControlModel[] = service.getMacroFormControls(serviceId, vnfStoreKey, vfModuleUUID, uuidData, true);
1118
1119     const orderedControls : string[] = [
1120       FormControlNames.INSTANCE_NAME,
1121       FormControlNames.VOLUME_GROUP_NAME
1122     ];
1123
1124     for(let i = 0 ; i < orderedControls.length ; i++) {
1125       expect(controls[i].controlName).toEqual(orderedControls[i]);
1126     }
1127   });
1128
1129   test.each`
1130     controllerName
1131     ${'instanceName'}
1132     ${'volumeGroupName'}
1133   `('getAlacartFormControls $controllerName control validator shall have the expected regex', ({controllerName}) => {
1134     const controls:FormControlModel[] = getAlaCarteFormControls();
1135
1136     const instanceNameControl: FormControlModel = <FormControlModel>controls.find(item => item.controlName == controllerName);
1137     const instanceNameValidator: ValidatorModel = instanceNameControl.validations.find(val => val.validatorName === ValidatorOptions.pattern);
1138     expect(instanceNameValidator.validatorArg).toEqual(/^[a-zA-Z0-9._-]*$/);
1139   });
1140
1141   test(' getAlaCarteFormControls gets null service', () => {
1142     const controls:FormControlModel[] = getAlaCarteFormControls();
1143     expect(controls.length).toEqual(7);
1144
1145     const orderedControls : string[] = [
1146       FormControlNames.INSTANCE_NAME,
1147       FormControlNames.VOLUME_GROUP_NAME,
1148       FormControlNames.LCPCLOUD_REGION_ID,
1149       FormControlNames.LEGACY_REGION,
1150       FormControlNames.TENANT_ID,
1151       FormControlNames.ROLLBACK_ON_FAILURE,
1152       SDN_C_PRE_LOAD,
1153     ];
1154
1155     for(let i = 0 ; i < orderedControls.length ; i++) {
1156       expect(controls[i].controlName).toEqual(orderedControls[i]);
1157     }
1158   });
1159 });
1160