03461eaa124c67e0fac001a36330a3e9495cb5c7
[vid.git] / vid-webpack-master / src / app / shared / services / defaultDataServiceGenerator / default.data.generator.service.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 {DefaultDataGeneratorService} from './default.data.generator.service';
5 import {ServiceNodeTypes} from "../../models/ServiceNodeTypes";
6 import {VNFModel} from "../../models/vnfModel";
7
8 class MockAppStore<T> {}
9
10 describe('Default Data Generator Service', () => {
11   let injector;
12   let service: DefaultDataGeneratorService;
13   let httpMock: HttpTestingController;
14
15   beforeAll(done => (async () => {
16     TestBed.configureTestingModule({
17       imports: [HttpClientTestingModule],
18           providers: [DefaultDataGeneratorService,
19             {provide: NgRedux, useClass: MockAppStore}]
20     });
21     await TestBed.compileComponents();
22
23     injector = getTestBed();
24     service = injector.get(DefaultDataGeneratorService);
25     httpMock = injector.get(HttpTestingController);
26   })().then(done).catch(done.fail));
27
28   test('generateVFModule aLaCarte vf module object should missed data', () => {
29     const serviceHierarchy = generateServiceHierarchy();
30     const vnfUUID: string = 'VF_vGeraldine 0';
31     const vnfModuleUUID: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
32
33     let result = service.generateVFModule(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID], [], false, true);
34     expect(result.isMissingData).toBeTruthy();
35     expect(result.rollbackOnFailure).toBeTruthy();
36   });
37
38   test('generateVFModule should create vf module object', () => {
39     const serviceHierarchy = generateServiceHierarchy();
40     const vnfUUID: string = 'VF_vGeraldine 0';
41     const vnfModuleUUID: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
42
43     let result = service.generateVFModule(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID], [], false, false);
44
45     expect(result.modelInfo.modelType).toEqual('VFmodule');
46     expect(result.modelInfo.modelInvariantId).toEqual(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID].invariantUuid);
47     expect(result.modelInfo.modelVersionId).toEqual(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID].uuid);
48     expect(result.modelInfo.modelName).toEqual(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID].name);
49     expect(result.modelInfo.modelVersion).toEqual(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID].version);
50     expect(result.modelInfo.modelCustomizationId).toEqual(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID].customizationUuid);
51     expect(result.modelInfo.modelCustomizationName).toEqual(serviceHierarchy.vnfs[vnfUUID].vfModules[vnfModuleUUID].modelCustomizationName);
52     expect(result.sdncPreReload).toBeNull();
53     expect(result.isMissingData).toBeTruthy();
54     expect(result.instanceParams).toEqual([{}]);
55     expect(result.rollbackOnFailure).toBeNull();
56   });
57
58   test('generateVNFData should create vnf object', () => {
59     const serviceHierarchy = generateServiceHierarchy();
60     const vnfName: string = 'VF_vGeraldine 0';
61     const formValues = generateVNFFormValues();
62
63     let result = service.generateVNFData(serviceHierarchy, vnfName, formValues, false);
64
65     expect(result.productFamilyId).toEqual(formValues.productFamilyId);
66     expect(result.lcpCloudRegionId).toBeNull();
67     expect(result.tenantId).toBeNull();
68     expect(result.lineOfBusiness).toBeNull();
69     expect(result.platformName).toBeNull();
70     expect(result.modelInfo.modelType).toEqual('VF');
71     expect(result.modelInfo.modelInvariantId).toEqual(serviceHierarchy.vnfs[vnfName].invariantUuid);
72     expect(result.modelInfo.modelVersionId).toEqual(formValues.modelInfo.modelVersionId);
73     expect(result.modelInfo.modelName).toEqual(serviceHierarchy.vnfs[vnfName].name);
74     expect(result.modelInfo.modelVersion).toEqual(serviceHierarchy.vnfs[vnfName].version);
75     expect(result.modelInfo.modelCustomizationId).toEqual(serviceHierarchy.vnfs[vnfName].customizationUuid);
76     expect(result.modelInfo.modelUniqueId).toEqual(serviceHierarchy.vnfs[vnfName].customizationUuid);
77     expect(result.modelInfo.modelCustomizationName).toEqual(serviceHierarchy.vnfs[vnfName].modelCustomizationName);
78     expect(result.isMissingData).toBeTruthy();
79   });
80
81   describe('#updateDynamicInputsVnfDataFromModel', () => {
82     test('get vfModule instance params', () => {
83       let dynamicInputs = service.updateDynamicInputsVnfDataFromModel(ServiceNodeTypes.VFmodule, generateVFModule());
84       expect(dynamicInputs).toEqual([{
85         id: '2017488_pasqualevpe0_vnf_config_template_version',
86         type: 'string',
87         name: '2017488_pasqualevpe0_vnf_config_template_version',
88         value: '17.2',
89         isRequired: true,
90         description: 'VPE Software Version'
91       }, {
92         id: '2017488_pasqualevpe0_AIC_CLLI',
93         type: 'string',
94         name: '2017488_pasqualevpe0_AIC_CLLI',
95         value: 'ATLMY8GA',
96         isRequired: true,
97         description: 'AIC Site CLLI'
98       }]);
99
100       /*get vfModule with no instance params should return empty array*/
101       dynamicInputs = service.updateDynamicInputsVnfDataFromModel(ServiceNodeTypes.VFmodule, generateVFModule2);
102       expect(dynamicInputs).toEqual([]);
103
104       /*get vf instance params should be undefined*/
105       dynamicInputs = service.updateDynamicInputsVnfDataFromModel(ServiceNodeTypes.VF, generateVNF());
106       expect(dynamicInputs).toEqual([]);
107     });
108   });
109
110   describe('#createNewVfModuleTreeNode', () => {
111     test('createNewVfModuleTreeNode with isEcompGeneratedNaming instance name not fill - missing data true', () => {
112       const vnfModuleUUID: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
113       const vfModuleModel = generateServiceHierarchy().vnfs['VF_vGeraldine 0'].vfModules['vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0'];
114       const newVfModule = service.createNewVfModuleTreeNode(<any>{
115         instanceName: "",
116         instanceParams: {},
117         volumeGroupName: "",
118         isMissingData : false,
119         trackById: Math.random().toString()
120       }, vfModuleModel, vnfModuleUUID, false, [], "");
121       expect(newVfModule.name).toEqual('&lt;Automatically Assigned&gt;');
122       expect(newVfModule.missingData).toEqual(true);
123     });
124
125     test('createNewVfModuleTreeNode without isEcompGeneratedNaming missing data false', () => {
126       const vnfModuleUUID: string = 'vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0';
127       const vfModuleModel = generateServiceHierarchy().vnfs['VF_vGeraldine 0'].vfModules['vf_vgeraldine0..VfVgeraldine..base_vflorence..module-0'];
128       const newVfModule = service.createNewVfModuleTreeNode(<any>{
129         instanceName: "",
130         instanceParams: {},
131         volumeGroupName: "",
132         isMissingData : false,
133         trackById: Math.random().toString()
134       }, vfModuleModel, vnfModuleUUID, true, [], "");
135       expect(newVfModule.name).toEqual('&lt;Automatically Assigned&gt;');
136       expect(newVfModule.missingData).toEqual(false);
137     });
138   });
139
140   describe('#createNewVnfTreeNode', () => {
141     test('createNewVnfTreeNode with isEcompGeneratedNaming instance name not filled - missing data true', () => {
142       const vnfModel = generateServiceHierarchy().vnfs['VF_vGeraldine 0'];
143       const newVnf = service.createNewTreeNode({
144         uuid : '',
145         instanceName: "",
146         productFamilyId: "productFamilyId",
147         lcpCloudRegionId: "lcpCloudRegionId",
148         legacyRegion: "legacyRegion",
149         tenantId: "tenantId",
150         platformName: "platformName",
151         lineOfBusiness: "lineOfBusiness",
152         rollbackOnFailure: "rollbackOnFailure",
153         originalName : null,
154         vfModules: {},
155         isMissingData: false,
156         trackById: Math.random().toString(),
157         vnfStoreKey: "abc"
158       }, new VNFModel(vnfModel),'VF_vGeraldine 0', 'vnfs');
159       expect(newVnf.name).toEqual('VF_vGeraldine 0');
160       expect(newVnf.missingData).toEqual(true);
161     });
162
163     test('createNewVnfTreeNode with isEcompGeneratedNaming instance name filled - missing data false', () => {
164       const vnfModel = generateServiceHierarchy().vnfs['VF_vGeraldine 0'];
165       const newVnf = service.createNewTreeNode({
166         uuid : '',
167         instanceName: "instanceName",
168         productFamilyId: "productFamilyId",
169         lcpCloudRegionId: "lcpCloudRegionId",
170         legacyRegion: "legacyRegion",
171         tenantId: "tenantId",
172         platformName: "platformName",
173         lineOfBusiness: "lineOfBusiness",
174         rollbackOnFailure: "rollbackOnFailure",
175         originalName : null,
176         vfModules: {},
177         isMissingData: false,
178         trackById: Math.random().toString(),
179         vnfStoreKey: "abc"
180       }, vnfModel,'VF_vGeraldine 0', 'vnfs');
181       expect(newVnf.name).toEqual("instanceName");
182       expect(newVnf.missingData).toEqual(false);
183     });
184   });
185
186 });
187
188
189 function generateServiceHierarchy() {
190   return JSON.parse('{"service":{"uuid":"6e59c5de-f052-46fa-aa7e-2fca9d674c44","invariantUuid":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0","name":"ComplexService","version":"1.0","toscaModelURL":null,"category":"Emanuel","serviceType":"","serviceRole":"","description":"ComplexService","serviceEcompNaming":"true","instantiationType":"Macro","inputs":{}},"vnfs":{"VF_vGeraldine 0":{"uuid":"d6557200-ecf2-4641-8094-5393ae3aae60","invariantUuid":"4160458e-f648-4b30-a176-43881ffffe9e","description":"VSP_vGeraldine","name":"VF_vGeraldine","version":"2.0","customizationUuid":"91415b44-753d-494c-926a-456a9172bbb9","inputs":{},"commands":{},"properties":{"gpb2_Internal2_mac":"00:11:22:EF:AC:DF","sctp-b-ipv6-egress_src_start_port":"0","sctp-a-ipv6-egress_rule_application":"any","Internal2_allow_transit":"true","sctp-b-IPv6_ethertype":"IPv6","sctp-a-egress_rule_application":"any","sctp-b-ingress_action":"pass","sctp-b-ingress_rule_protocol":"icmp","ncb2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ipv6-ingress-src_start_port":"0.0","ncb1_Internal2_mac":"00:11:22:EF:AC:DF","fsb_volume_size_0":"320.0","sctp-b-egress_src_addresses":"local","sctp-a-ipv6-ingress_ethertype":"IPv4","sctp-a-ipv6-ingress-dst_start_port":"0","sctp-b-ipv6-ingress_rule_application":"any","domain_name":"default-domain","sctp-a-ingress_rule_protocol":"icmp","sctp-b-egress-src_start_port":"0.0","sctp-a-egress_src_addresses":"local","sctp-b-display_name":"epc-sctp-b-ipv4v6-sec-group","sctp-a-egress-src_start_port":"0.0","sctp-a-ingress_ethertype":"IPv4","sctp-b-ipv6-ingress-dst_end_port":"65535","sctp-b-dst_subnet_prefix_v6":"::","nf_naming":"{ecomp_generated_naming=true}","sctp-a-ipv6-ingress_src_subnet_prefix":"0.0.0.0","sctp-b-egress-dst_start_port":"0.0","ncb_flavor_name":"nv.c20r64d1","gpb1_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-egress_dst_subnet_prefix_len":"0.0","Internal2_net_cidr":"10.0.0.10","sctp-a-ingress-dst_start_port":"0.0","sctp-a-egress-dst_start_port":"0.0","fsb1_Internal2_mac":"00:11:22:EF:AC:DF","sctp-a-egress_ethertype":"IPv4","vlc_st_service_mode":"in-network-nat","sctp-a-ipv6-egress_ethertype":"IPv4","sctp-a-egress-src_end_port":"65535.0","sctp-b-ipv6-egress_rule_application":"any","sctp-b-egress_action":"pass","sctp-a-ingress-src_subnet_prefix_len":"0.0","sctp-b-ipv6-ingress-src_end_port":"65535.0","sctp-b-name":"epc-sctp-b-ipv4v6-sec-group","fsb2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-a-ipv6-ingress-src_start_port":"0.0","sctp-b-ipv6-egress_ethertype":"IPv4","Internal1_net_cidr":"10.0.0.10","sctp-a-egress_dst_subnet_prefix":"0.0.0.0","fsb_flavor_name":"nv.c20r64d1","sctp_rule_protocol":"132","sctp-b-ipv6-ingress_src_subnet_prefix_len":"0","sctp-a-ipv6-ingress_rule_application":"any","ecomp_generated_naming":"false","sctp-a-IPv6_ethertype":"IPv6","vlc2_Internal1_mac":"00:11:22:EF:AC:DF","vlc_st_virtualization_type":"virtual-machine","sctp-b-ingress-dst_start_port":"0.0","sctp-b-ingress-dst_end_port":"65535.0","sctp-a-ipv6-ingress-src_end_port":"65535.0","sctp-a-display_name":"epc-sctp-a-ipv4v6-sec-group","sctp-b-ingress_rule_application":"any","int2_sec_group_name":"int2-sec-group","vlc_flavor_name":"nd.c16r64d1","sctp-b-ipv6-egress_src_addresses":"local","vlc_st_interface_type_int1":"other1","sctp-b-egress-src_end_port":"65535.0","sctp-a-ipv6-egress-dst_start_port":"0","vlc_st_interface_type_int2":"other2","sctp-a-ipv6-egress_rule_protocol":"any","Internal2_shared":"false","sctp-a-ipv6-egress_dst_subnet_prefix_len":"0","Internal2_rpf":"disable","vlc1_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ipv6-egress_src_end_port":"65535","sctp-a-ipv6-egress_src_addresses":"local","sctp-a-ingress-dst_end_port":"65535.0","sctp-a-ipv6-egress_src_end_port":"65535","Internal1_forwarding_mode":"l2","Internal2_dhcp":"false","sctp-a-dst_subnet_prefix_v6":"::","pxe_image_name":"MME_PXE-Boot_16ACP04_GA.qcow2","vlc_st_interface_type_gtp":"other0","ncb1_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-src_subnet_prefix_v6":"::","sctp-a-egress_dst_subnet_prefix_len":"0.0","int1_sec_group_name":"int1-sec-group","Internal1_dhcp":"false","sctp-a-ipv6-egress_dst_end_port":"65535","Internal2_forwarding_mode":"l2","fsb2_Internal2_mac":"00:11:22:EF:AC:DF","sctp-b-egress_dst_subnet_prefix":"0.0.0.0","Internal1_net_cidr_len":"17","gpb2_Internal1_mac":"00:11:22:EF:AC:DF","sctp-b-ingress-src_subnet_prefix_len":"0.0","sctp-a-ingress_dst_addresses":"local","sctp-a-egress_action":"pass","fsb_volume_type_0":"SF-Default-SSD","ncb2_Internal2_mac":"00:11:22:EF:AC:DF","vlc_st_interface_type_sctp_a":"left","vlc_st_interface_type_sctp_b":"right","sctp-a-src_subnet_prefix_v6":"::","vlc_st_version":"2","sctp-b-egress_ethertype":"IPv4","sctp-a-ingress_rule_application":"any","gpb1_Internal2_mac":"00:11:22:EF:AC:DF","instance_ip_family_v6":"v6","sctp-a-ipv6-egress_src_start_port":"0","sctp-b-ingress-src_start_port":"0.0","sctp-b-ingress_dst_addresses":"local","fsb1_Internal1_mac":"00:11:22:EF:AC:DF","vlc_st_interface_type_oam":"management","multi_stage_design":"false","oam_sec_group_name":"oam-sec-group","Internal2_net_gateway":"10.0.0.10","sctp-a-ipv6-ingress-dst_end_port":"65535","sctp-b-ipv6-egress-dst_start_port":"0","Internal1_net_gateway":"10.0.0.10","sctp-b-ipv6-egress_rule_protocol":"any","gtp_sec_group_name":"gtp-sec-group","sctp-a-ipv6-egress_dst_subnet_prefix":"0.0.0.0","sctp-b-ipv6-egress_dst_subnet_prefix_len":"0","sctp-a-ipv6-ingress_dst_addresses":"local","sctp-a-egress_rule_protocol":"icmp","sctp-b-ipv6-egress_action":"pass","sctp-a-ipv6-egress_action":"pass","Internal1_shared":"false","sctp-b-ipv6-ingress_rule_protocol":"any","Internal2_net_cidr_len":"17","sctp-a-name":"epc-sctp-a-ipv4v6-sec-group","sctp-a-ingress-src_end_port":"65535.0","sctp-b-ipv6-ingress_src_subnet_prefix":"0.0.0.0","sctp-a-egress-dst_end_port":"65535.0","sctp-a-ingress_action":"pass","sctp-b-egress_rule_protocol":"icmp","sctp-b-ipv6-ingress_action":"pass","vlc_st_service_type":"firewall","sctp-b-ipv6-egress_dst_end_port":"65535","sctp-b-ipv6-ingress-dst_start_port":"0","vlc2_Internal2_mac":"00:11:22:EF:AC:DF","vlc_st_availability_zone":"true","fsb_volume_image_name_1":"MME_FSB2_16ACP04_GA.qcow2","sctp-b-ingress-src_subnet_prefix":"0.0.0.0","sctp-a-ipv6-ingress_src_subnet_prefix_len":"0","Internal1_allow_transit":"true","gpb_flavor_name":"nv.c20r64d1","availability_zone_max_count":"1","fsb_volume_image_name_0":"MME_FSB1_16ACP04_GA.qcow2","sctp-b-ipv6-ingress_dst_addresses":"local","sctp-b-ipv6-egress_dst_subnet_prefix":"0.0.0.0","sctp-b-ipv6-ingress_ethertype":"IPv4","vlc1_Internal2_mac":"00:11:22:EF:AC:DF","sctp-a-ingress-src_subnet_prefix":"0.0.0.0","sctp-a-ipv6-ingress_action":"pass","Internal1_rpf":"disable","sctp-b-ingress_ethertype":"IPv4","sctp-b-egress_rule_application":"any","sctp-b-ingress-src_end_port":"65535.0","sctp-a-ipv6-ingress_rule_protocol":"any","sctp-a-ingress-src_start_port":"0.0","sctp-b-egress-dst_end_port":"65535.0"},"type":"VF","modelCustomizationName":"VF_vGeraldine 0","vfModules":{"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":"VfVgeraldine..vflorence_vlc..module-1","version":"2","modelCustomizationName":"VfVgeraldine..vflorence_vlc..module-1","properties":{"minCountInstances":0,"maxCountInstances":null,"initialCount":0,"vfModuleLabel":"vflorence_vlc"},"inputs":{},"volumeGroupAllowed":false},"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":"VfVgeraldine..vflorence_gpb..module-2","version":"2","modelCustomizationName":"VfVgeraldine..vflorence_gpb..module-2","properties":{"minCountInstances":0,"maxCountInstances":null,"initialCount":0,"vfModuleLabel":"vflorence_gpb"},"inputs":{},"volumeGroupAllowed":false},"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":"VfVgeraldine..base_vflorence..module-0","version":"2","modelCustomizationName":"VfVgeraldine..base_vflorence..module-0","properties":{"minCountInstances":1,"maxCountInstances":1,"initialCount":1,"vfModuleLabel":"base_vflorence"},"inputs":{},"volumeGroupAllowed":true}},"volumeGroups":{"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":"VfVgeraldine..base_vflorence..module-0","version":"2","modelCustomizationName":"VfVgeraldine..base_vflorence..module-0","properties":{"minCountInstances":1,"maxCountInstances":1,"initialCount":1,"vfModuleLabel":"base_vflorence"},"inputs":{}}},"vfcInstanceGroups":{}}},"networks":{"ExtVL 0":{"uuid":"ddc3f20c-08b5-40fd-af72-c6d14636b986","invariantUuid":"379f816b-a7aa-422f-be30-17114ff50b7c","description":"ECOMP generic virtual link (network) base type for all other service-level and global networks","name":"ExtVL","version":"37.0","customizationUuid":"94fdd893-4a36-4d70-b16a-ec29c54c184f","inputs":{},"commands":{},"properties":{"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}}","exVL_naming":"{ecomp_generated_naming=true}","network_flows":"{is_network_policy=false, is_bound_to_vpn=false}","network_homing":"{ecomp_selected_instance_node_target=false}"},"type":"VL","modelCustomizationName":"ExtVL 0"}},"collectionResources":{},"configurations":{"Port Mirroring Configuration By Policy 0":{"uuid":"b4398538-e89d-4f13-b33d-ca323434ba50","invariantUuid":"6ef0ca40-f366-4897-951f-abd65d25f6f7","description":"A port mirroring configuration by policy object","name":"Port Mirroring Configuration By Policy","version":"27.0","customizationUuid":"3c3b7b8d-8669-4b3b-8664-61970041fad2","inputs":{},"commands":{},"properties":{},"type":"Configuration","modelCustomizationName":"Port Mirroring Configuration By Policy 0","sourceNodes":[],"collectorNodes":null,"configurationByPolicy":false}},"serviceProxies":{},"vfModules":{"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":"VfVgeraldine..vflorence_vlc..module-1","version":"2","modelCustomizationName":"VfVgeraldine..vflorence_vlc..module-1","properties":{"minCountInstances":0,"maxCountInstances":null,"initialCount":0,"vfModuleLabel":"vflorence_vlc"},"inputs":{},"volumeGroupAllowed":false},"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":"VfVgeraldine..vflorence_gpb..module-2","version":"2","modelCustomizationName":"VfVgeraldine..vflorence_gpb..module-2","properties":{"minCountInstances":0,"maxCountInstances":null,"initialCount":0,"vfModuleLabel":"vflorence_gpb"},"inputs":{},"volumeGroupAllowed":false},"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":"VfVgeraldine..base_vflorence..module-0","version":"2","modelCustomizationName":"VfVgeraldine..base_vflorence..module-0","properties":{"minCountInstances":1,"maxCountInstances":1,"initialCount":1,"vfModuleLabel":"base_vflorence"},"inputs":{},"volumeGroupAllowed":true}},"volumeGroups":{"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":"VfVgeraldine..base_vflorence..module-0","version":"2","modelCustomizationName":"VfVgeraldine..base_vflorence..module-0","properties":{"minCountInstances":1,"maxCountInstances":1,"initialCount":1,"vfModuleLabel":"base_vflorence"},"inputs":{}}},"pnfs":{}}');
191 }
192
193
194 function generateVNFFormValues() {
195   return JSON.parse('{"globalSubscriberId":"e433710f-9217-458d-a79d-1c7aff376d89","productFamilyId":"vTerrance","subscriptionServiceType":"TYLER SILVIA","lcpCloudRegionId":"hvf6","tenantId":"1178612d2b394be4834ad77f567c0af2","aicZoneId":"JAG1","projectName":"WATKINS","owningEntityId":"d61e6f2d-12fa-4cc2-91df-7c244011d6fc","rollbackOnFailure":"true","bulkSize":1,"instanceParams":[{}],"modelInfo":{"modelInvariantId":"e49fbd11-e60c-4a8e-b4bf-30fbe8f4fcc0","modelVersionId":"6e59c5de-f052-46fa-aa7e-2fca9d674c44","modelName":"ComplexService","modelVersion":"1.0"},"tenantName":"AIN Web Tool-15-D-SSPtestcustome","aicZoneName":"YUDFJULP-JAG1"}');
196 }
197
198 function generateVFModule() {
199   return {
200     'uuid': '25284168-24bb-4698-8cb4-3f509146eca5',
201     'invariantUuid': '7253ff5c-97f0-4b8b-937c-77aeb4d79aa1',
202     'customizationUuid': 'f7e7c365-60cf-49a9-9ebf-a1aa11b9d401',
203     'description': null,
204     'name': '2017488PasqualeVpe..PASQUALE_vRE_BV..module-1',
205     'version': '6',
206     'modelCustomizationName': '2017488PasqualeVpe..PASQUALE_vRE_BV..module-1',
207     'properties': {'minCountInstances': 0, 'maxCountInstances': null, 'initialCount': 0},
208     'commands': {},
209     'volumeGroupAllowed': true,
210     'inputs': {
211       '2017488_pasqualevpe0_vnf_config_template_version': {
212         'type': 'string',
213         'description': 'VPE Software Version',
214         'entry_schema': null,
215         'constraints': [],
216         'required': true,
217         'default': '17.2'
218       },
219       '2017488_pasqualevpe0_AIC_CLLI': {
220         'type': 'string',
221         'description': 'AIC Site CLLI',
222         'entry_schema': null,
223         'constraints': [],
224         'required': true,
225         'default': 'ATLMY8GA'
226       }
227     }
228   };
229 }
230
231 function generateVFModule2() {
232   return {
233     'uuid': '0a0dd9d4-31d3-4c3a-ae89-a02f383e6a9a',
234     'invariantUuid': 'eff8cc59-53a1-4101-aed7-8cf24ecf8339',
235     'customizationUuid': '3cd946bb-50e0-40d8-96d3-c9023520b557',
236     'description': null,
237     'name': '2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2',
238     'version': '6',
239     'modelCustomizationName': '2017488PasqualeVpe..PASQUALE_vPFE_BV..module-2',
240     'properties': {'minCountInstances': 0, 'maxCountInstances': null, 'initialCount': 0},
241     'commands': {},
242     'volumeGroupAllowed': true,
243     'inputs': {}
244   };
245 }
246
247 function generateVNF() {
248   return {
249     'uuid': '0903e1c0-8e03-4936-b5c2-260653b96413',
250     'invariantUuid': '00beb8f9-6d39-452f-816d-c709b9cbb87d',
251     'description': 'Name PASQUALE vPE Description The provider edge function for the PASQUALE service supported by the Junipers VMX product Category Router Vendor Juniper Vendor Release Code 17.2 Owners Mary Fragale. Updated 9-25 to use v8.0 of the Juniper Valid 2 VLM',
252     'name': '2017-388_PASQUALE-vPE',
253     'version': '1.0',
254     'customizationUuid': '280dec31-f16d-488b-9668-4aae55d6648a',
255     'inputs': {
256       'vnf_config_template_version': {
257         'type': 'string',
258         'description': 'VPE Software Version',
259         'entry_schema': null,
260         'constraints': [],
261         'required': true,
262         'default': '17.2'
263       },
264       'bandwidth_units': {
265         'type': 'string',
266         'description': 'Units of bandwidth',
267         'entry_schema': null,
268         'constraints': [],
269         'required': true,
270         'default': 'Gbps'
271       },
272       'bandwidth': {
273         'type': 'string',
274         'description': 'Requested VPE bandwidth',
275         'entry_schema': null,
276         'constraints': [],
277         'required': true,
278         'default': '10'
279       },
280       'AIC_CLLI': {
281         'type': 'string',
282         'description': 'AIC Site CLLI',
283         'entry_schema': null,
284         'constraints': [],
285         'required': true,
286         'default': 'ATLMY8GA'
287       },
288       'ASN': {
289         'type': 'string',
290         'description': 'AV/PE',
291         'entry_schema': null,
292         'constraints': [],
293         'required': true,
294         'default': 'AV_vPE'
295       },
296       'vnf_instance_name': {
297         'type': 'string',
298         'description': 'The hostname assigned to the vpe.',
299         'entry_schema': null,
300         'constraints': [],
301         'required': true,
302         'default': 'mtnj309me6'
303       }
304     },
305     'commands': {
306       'vnf_config_template_version': {
307         'displayName': 'vnf_config_template_version',
308         'command': 'get_input',
309         'inputName': '2017488_pasqualevpe0_vnf_config_template_version'
310       },
311       'bandwidth_units': {
312         'displayName': 'bandwidth_units',
313         'command': 'get_input',
314         'inputName': 'pasqualevpe0_bandwidth_units'
315       },
316       'bandwidth': {'displayName': 'bandwidth', 'command': 'get_input', 'inputName': 'pasqualevpe0_bandwidth'},
317       'AIC_CLLI': {'displayName': 'AIC_CLLI', 'command': 'get_input', 'inputName': '2017488_pasqualevpe0_AIC_CLLI'},
318       'ASN': {'displayName': 'ASN', 'command': 'get_input', 'inputName': '2017488_pasqualevpe0_ASN'},
319       'vnf_instance_name': {
320         'displayName': 'vnf_instance_name',
321         'command': 'get_input',
322         'inputName': '2017488_pasqualevpe0_vnf_instance_name'
323       }
324     },
325     'properties': {
326       'vmxvre_retype': 'RE-VMX',
327       'vnf_config_template_version': 'get_input:2017488_pasqualevpe0_vnf_config_template_version',
328       'sriov44_net_id': '48d399b3-11ee-48a8-94d2-f0ea94d6be8d',
329       'int_ctl_net_id': '2f323477-6936-4d01-ac53-d849430281d9',
330       'vmxvpfe_sriov41_0_port_mac': '00:11:22:EF:AC:DF',
331       'int_ctl_net_name': 'VMX-INTXI',
332       'vmx_int_ctl_prefix': '10.0.0.10',
333       'sriov43_net_id': 'da349ca1-6de9-4548-be88-2d88e99bfef5',
334       'sriov42_net_id': '760669ba-013d-4d9b-b0e7-4151fe2e6279',
335       'sriov41_net_id': '25ad52d5-c165-40f8-b3b0-ddfc2373280a',
336       'nf_type': 'vPE',
337       'vmxvpfe_int_ctl_ip_1': '10.0.0.10',
338       'is_AVPN_service': 'false',
339       'vmx_RSG_name': 'vREXI-affinity',
340       'vmx_int_ctl_forwarding': 'l2',
341       'vmxvre_oam_ip_0': '10.0.0.10',
342       'vmxvpfe_sriov44_0_port_mac': '00:11:22:EF:AC:DF',
343       'vmxvpfe_sriov41_0_port_vlanstrip': 'false',
344       'vmxvpfe_sriov42_0_port_vlanfilter': '4001',
345       'vmxvpfe_sriov44_0_port_unknownunicastallow': 'true',
346       'vmxvre_image_name_0': 'VRE-ENGINE_17.2-S2.1.qcow2',
347       'vmxvre_instance': '0',
348       'vmxvpfe_sriov43_0_port_mac': '00:11:22:EF:AC:DF',
349       'vmxvre_flavor_name': 'ns.c1r16d32.v5',
350       'vmxvpfe_volume_size_0': '40.0',
351       'vmxvpfe_sriov43_0_port_vlanfilter': '4001',
352       'nf_naming': '{ecomp_generated_naming=true}',
353       'nf_naming_code': 'Navneet',
354       'vmxvre_name_0': 'vREXI',
355       'vmxvpfe_sriov42_0_port_vlanstrip': 'false',
356       'vmxvpfe_volume_name_0': 'vPFEXI_FBVolume',
357       'vmx_RSG_id': 'bd89a33c-13c3-4a04-8fde-1a57eb123141',
358       'vmxvpfe_image_name_0': 'VPE_ROUTING-ENGINE_17.2R1-S2.1.qcow2',
359       'vmxvpfe_sriov43_0_port_unknownunicastallow': 'true',
360       'vmxvpfe_sriov44_0_port_unknownmulticastallow': 'true',
361       'vmxvre_console': 'vidconsole',
362       'vmxvpfe_sriov44_0_port_vlanfilter': '4001',
363       'vmxvpfe_sriov42_0_port_mac': '00:11:22:EF:AC:DF',
364       'vmxvpfe_volume_id_0': '47cede15-da2f-4397-a101-aa683220aff3',
365       'vmxvpfe_sriov42_0_port_unknownmulticastallow': 'true',
366       'vmxvpfe_sriov44_0_port_vlanstrip': 'false',
367       'vf_module_id': '123',
368       'nf_function': 'JAI',
369       'vmxvpfe_sriov43_0_port_unknownmulticastallow': 'true',
370       'vmxvre_int_ctl_ip_0': '10.0.0.10',
371       'AIC_CLLI': 'get_input:2017488_pasqualevpe0_AIC_CLLI',
372       'vnf_name': 'mtnj309me6vre',
373       'vmxvpfe_sriov41_0_port_unknownunicastallow': 'true',
374       'vmxvre_volume_type_1': 'HITACHI',
375       'vmxvpfe_sriov44_0_port_broadcastallow': 'true',
376       'vmxvre_volume_type_0': 'HITACHI',
377       'vmxvpfe_volume_type_0': 'HITACHI',
378       'vmxvpfe_sriov43_0_port_broadcastallow': 'true',
379       'bandwidth_units': 'get_input:pasqualevpe0_bandwidth_units',
380       'vnf_id': '123',
381       'vmxvre_oam_prefix': '24',
382       'availability_zone_0': 'mtpocfo-kvm-az01',
383       'ASN': 'get_input:2017488_pasqualevpe0_ASN',
384       'vmxvre_chassis_i2cid': '161',
385       'vmxvpfe_name_0': 'vPFEXI',
386       'bandwidth': 'get_input:pasqualevpe0_bandwidth',
387       'availability_zone_max_count': '1',
388       'vmxvre_volume_size_0': '45.0',
389       'vmxvre_volume_size_1': '50.0',
390       'vmxvpfe_sriov42_0_port_broadcastallow': 'true',
391       'vmxvre_oam_gateway': '10.0.0.10',
392       'vmxvre_volume_name_1': 'vREXI_FAVolume',
393       'vmxvre_ore_present': '0',
394       'vmxvre_volume_name_0': 'vREXI_FBVolume',
395       'vmxvre_type': '0',
396       'vnf_instance_name': 'get_input:2017488_pasqualevpe0_vnf_instance_name',
397       'vmxvpfe_sriov41_0_port_unknownmulticastallow': 'true',
398       'oam_net_id': 'b95eeb1d-d55d-4827-abb4-8ebb94941429',
399       'vmx_int_ctl_len': '24',
400       'vmxvpfe_sriov43_0_port_vlanstrip': 'false',
401       'vmxvpfe_sriov41_0_port_broadcastallow': 'true',
402       'vmxvre_volume_id_1': '6e86797e-03cd-4fdc-ba72-2957119c746d',
403       'vmxvpfe_sriov41_0_port_vlanfilter': '4001',
404       'nf_role': 'Testing',
405       'vmxvre_volume_id_0': 'f4eacb79-f687-4e9d-b760-21847c8bb15a',
406       'vmxvpfe_sriov42_0_port_unknownunicastallow': 'true',
407       'vmxvpfe_flavor_name': 'ns.c20r16d25.v5'
408     },
409     'type': 'VF',
410     'modelCustomizationName': '2017-388_PASQUALE-vPE 1',
411     'vfModules': {},
412     'volumeGroups': {}
413   };
414 }