Refactor codes for inst vnf ut
[vfc/gvnfm/vnflcm.git] / lcm / lcm / nf / tests / const.py
1 # Copyright (C) 2019 ZTE. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 import json
15
16 instantiate_grant_result = {
17     "vimConnections": [
18         {
19             "vimid": 'vim_1',
20             "accessInfo":
21             {
22                 "tenant": 'chinamobile'
23             }
24         },
25     ],
26     "vnfId": "413aa1fe-b4d1-11e8-8268-dff5aab95c63",
27     "vimAssets":
28     {
29         "computeResourceFlavours": [
30             {
31                 "resourceProviderId": "vgw",
32                 "vimFlavourId": "yui",
33                 "vimConnectionId": ""
34             },
35         ]
36     }
37 }
38
39
40 inst_req_data = {
41     "flavourId": "flavour_1",
42     "instantiationLevelId": "instantiationLevel_1",
43     "extVirtualLinks": [
44         {
45             "id": "extVirtualLink_1",
46             "vimConnectionId": "vimConnection_1",
47             "resourceProviderId": "resourceProvider_1",
48             "resourceId": "resource_1",
49             "resourceSubnetId": "resourceSubnet_1",
50             "extCps": [
51                 {
52                     "cpdId": "cpd_1",
53                     "cpConfig": [
54                         {
55                             "cpInstanceId": "cpInstance_1",
56                             "linkPortId": "linkPort_1",
57                             "cpProtocolData": [
58                                 {
59                                     "layerProtocol": "IP_OVER_ETHERNET",
60                                     "ipOverEthernet": {
61                                         "macAddress": "00:f3:43:20:a2:a3",
62                                         "ipAddresses": [
63                                             {
64                                                 "type": "IPV4",
65                                                 "fixedAddresses": ["192.168.104.2", ],
66                                                 "numDynamicAddresses": 0,
67                                                 "addressRange": None,
68                                                 "subnetId": "subnet_1",
69                                             }
70                                         ]
71                                     }
72                                 }
73                             ]
74                         }
75                     ]
76                 }
77             ],
78             "extLinkPorts": [
79                 {
80                     "id": "extLinkPort_1",
81                     "resourceHandle": {
82                         "vimConnectionId": "vimConnection_1",
83                         "resourceProviderId": "resourceProvider_1",
84                         "resourceId": "resource_1",
85                         "vimLevelResourceType": "vimLevelResourceType_1",
86                     }
87                 }
88             ]
89         }
90     ],
91     "extManagedVirtualLinks": [
92         {
93             "id": 'extManagedVirtualLink_1',
94             "virtualLinkDescId": 'virtualLinkDesc_1',
95             "vimConnectionId": 'vimConnection_1',
96             "resourceProviderId": 'resourceProvider_1',
97             "resourceId": 'resource_1',
98         }
99     ],
100     "vimConnectionInfo": [
101         {
102             "id": 'vimConnection_1',
103             "vimId": 'vim_1',
104             "vimType": 'vim',
105             "interfaceInfo": {
106                 "apiVersion": "apiVersion_1",
107                 "protocolType": "http"
108             },
109             "accessInfo": {
110                 "tenant": "tenant_vCPE",
111                 "username": "vCPE",
112                 "password": "vCPE_321",
113             },
114             "extra": None,
115         }
116     ],
117     "localizationLanguage": "en_US",
118     "additionalParams": {
119         "vimId": "vim_1",
120         "key1": "test1",
121         "key2": "test2",
122     }
123 }
124
125
126 vnfd_model_dict = {
127     'metadata': {
128         'vendor': u'zte',
129         'is_shared': False,
130         'description': '',
131         'domain_type': u'CN',
132         'version': u'v4.14.10',
133         'vmnumber_overquota_alarm': False,
134         'cross_dc': False,
135         'vnf_type': u'SSS',
136         'vnfd_version': u'V00000001',
137         'id': u'sss-vnf-template',
138         'name': u'sss-vnf-template'
139     },
140     'vdus': [
141         {
142             "vdu_id": "vdu1Id",
143             "description": "vdu description",
144             "properties": {
145                 "name": "vduinstname",
146                 "vdu_type": "OMP",
147                 "key_vdu": True,
148                 "support_scaling": True,
149                 "location_info": {
150                     "vimid": "vimid",
151                     "tenant": "tenantname",
152                     "availability_zone": "zone1",
153                     "host": "host1"
154                 },
155                 "local_affinity_antiaffinity_rule": [
156                     {
157                         "affinity_antiaffinity": "anti-affinity",
158                         "scope": "node"
159                     },
160                     {
161                         "affinity_antiaffinity": "affinity",
162                         "scope": "zone"
163                     }
164                 ],
165                 "inject_data_list": [
166                     {
167                         "file_name": "abc.xml",
168                         "file_data": "<a>xxx</a><b>ssss</b>"
169                     }
170                 ],
171                 "storage_policy": "HIGH",
172                 "template_id": "26",
173                 "manual_scale_select_vim": False,
174                 "watchdog": {
175                     "enabledelay": 600000,
176                     "action": "reset"
177                 },
178                 "is_predefined": False,
179                 "allow_scale_updown": False,
180                 "inject_network_address": True,
181                 "inner_hugepage_num": 100,
182                 "inner_hugepage_size": "2048",
183                 "action": "add"
184             },
185             "image_file": u'sss',
186             "local_storages": [
187                 "local_storage_id1",
188                 "local_storage_id2"
189             ],
190             "virtual_storages": [
191                 {
192                     "virtual_storage_id": "volume_storage1",
193                     "location": "/usr/data",
194                     "device": "/dev/hda1"
195                 }
196             ],
197             "dependencies": [
198                 "vdu1Id",
199                 "vduNId"
200             ],
201             "nfv_compute": {
202                 "num_cpus": 4,
203                 "mem_size": "1 GB",
204                 "cpu_frequency": "1GHz",
205                 "flavor_extra_specs": {
206                     "hw: cpu_policy": "shared",
207                     "hw: cpu_max_threads": 50,
208                     "hw: cpu_sockets": 10,
209                     "hw: cpu_max_sockets": 20,
210                     "hw: cpu_max_cores": 8,
211                     "hw: cpu_threads": 30,
212                     "hw: numa_mem.0": 12288,
213                     "hw: hugepage_num": 100,
214                     "hw: high_performance": "dvs_high",
215                     "hw: numa_nodes": 1,
216                     "hw: numa_cpus.0": "2,4,8",
217                     "hw: numa_pci": True,
218                     "hw: cpu_cores": 4,
219                     "pci_passthrough: alias": "ColetoCreek: 1",
220                     "hw: mem_page_size": "large",
221                     "hw: mem_paging_mechanism": "EPT"
222                 }
223             },
224             "vls": [
225                 "vlId1",
226             ],
227             "cps": [
228                 "cpId1",
229             ],
230             "scalable": {
231                 "min_instances": 1,
232                 "max_instances": 2,
233                 "default_instances": 1
234             },
235             "interfaces": {
236                 "Standard": {
237                     "create": {
238                         "implementation": "<implementationScript>",
239                         "inputs": {
240                             "param1Name": "value1",
241                             "paramNName": "valueN"
242                         }
243                     },
244                     "configure": {
245                         "implementation": "<implementationScript>",
246                         "inputs": {
247                             "param1Name": "value1",
248                             "paramNName": "valueN"
249                         }
250                     },
251                     "start": {
252                         "implementation": "<implementationScript>",
253                         "inputs": {
254                             "param1Name": "value1",
255                             "paramNName": "valueN"
256                         }
257                     },
258                     "stop": {
259                         "implementation": "<implementationScript>",
260                         "inputs": {
261                             "param1Name": "value1",
262                             "paramNName": "valueN"
263                         }
264                     },
265                     "delete": {
266                         "implementation": "<implementationScript>",
267                         "inputs": {
268                             "param1Name": "value1",
269                             "paramNName": "valueN"
270                         }
271                     }
272                 }
273             },
274             "artifacts": [
275             ]
276         }
277     ],
278     'volume_storages': [
279         {
280             "volume_storage_id": "volume_storage1",
281             "description": "",
282             "properties": {
283                 "size": "\"100 GB\"",
284                 "volume_id": "",
285                 "volume_name": "volumeStorage1",
286                 "custom_volume_type": "type1",
287                 "disk_type": "data",
288                 "delete_on_termination_vm": True,
289                 "location_info": {
290                     "vimid": "vimid_1",
291                     "tenant": "tenantname_1",
292                     "availability_zone": "zone1"
293                 },
294                 "is_predefined": False,
295                 "is_shared": False
296             },
297             "image_file": [
298                 "volume_image"
299             ]
300         }
301     ],
302     'policies': {
303         'scaling': {
304             'targets': {
305
306             },
307             'policy_id': u'policy_scale_sss-vnf-template',
308             'properties': {
309                 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
310             },
311             'description': ''
312         }
313     },
314     'image_files': [
315         {
316             'description': '',
317             'properties': {
318                 'name': u'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
319                 'checksum': '',
320                 'disk_format': u'VMDK',
321                 'file_url': u'./zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
322                 'container_type': 'vm',
323                 'version': '',
324                 'hypervisor_type': 'kvm'
325             },
326             'image_file_id': u'opencos_sss_omm_img_release_20150723-1-disk1'
327         },
328         {
329             'description': '',
330             'properties': {
331                 'name': u'sss.vmdk',
332                 'checksum': '',
333                 'disk_format': u'VMDK',
334                 'file_url': u'./zte-cn-sss-main-image/NE/sss.vmdk',
335                 'container_type': 'vm',
336                 'version': '',
337                 'hypervisor_type': 'kvm'
338             },
339             'image_file_id': u'sss'
340         }
341     ],
342     'vls': [
343         {
344             "vl_id": "vldId1",
345             "description": "",
346             "properties": {
347                 "name": "umac_241_control",
348                 "network_name": "umac_control",
349                 "is_predefined": False,
350                 "vendor": "zte",
351                 "netmask": "255.255.255.0",
352                 "mtu": 1500,
353                 "network_type": "vlan",
354                 "physical_network": "phynet01",
355                 "segmentation_id": "30",
356                 "vlan_transparent": False,
357                 "vds_name": "vds1",
358                 "cidr": "192.168.199.0/24",
359                 "ip_version": 4,
360                 "gateway_ip": "192.168.199.1",
361                 "dhcp_enabled": False,
362                 "dns_nameservers": [
363                     "192.168.0.4",
364                     "192.168.0.10"
365                 ],
366                 "start_ip": "192.168.199.2",
367                 "end_ip": "192.168.199.254",
368                 "host_routes": [
369                     {
370                         "destination": "10.43.26.0/24",
371                         "nexthop": "10.41.23.1"
372                     }
373                 ],
374                 "location_info": {
375                     "vimid": "vimid_1",
376                     "tenant": "tenantname_1"
377                 },
378                 "cloud_type": "IaaS"
379             },
380             "route_id": "router01",
381             "route_external": False
382         }
383     ],
384     'cps': [
385         {
386             "cp_id": "cpId1",
387             "description": "",
388             "properties": {
389                 "name": "",
390                 "mac_address": "00:d9:00:82:11:e1",
391                 "ip_address:": "192.168.1.21",
392                 "ip_range_start": "192.168.1.20",
393                 "ip_range_end": "192.168.1.29",
394                 "floating_ip_address": {
395                     "external_network": "extnet01",
396                     "ip_address": "10.43.53.23"
397                 },
398                 "service_ip_address": "192.168.1.23",
399                 "order": 1,
400                 "bandwidth": 1000,
401                 "vnic_type": "normal",
402                 "allowed_address_pairs": [
403                     {
404                         "ip": "192.168.1.13",
405                         "mac": "00:f3:43:20:a2:a3"
406                     }
407                 ],
408                 "bond": "none",
409                 "bond_index": 1,
410                 "macbond": "00:d9:00:82:11:d1",
411                 "sfc_encapsulation": "",
412                 "direction": "",
413                 "gateway_ip": "192.168.199.1",
414                 "netmask": "255.255.255.0",
415                 "interface_name": "fe-01-02",
416                 "is_virtual": False,
417                 "function": "control"
418             },
419             "vl_id": "vldId1",
420             "vdu_id": "vdu1Id"
421         }
422     ],
423     'local_storages': [
424
425     ],
426 }
427
428 # get_tenant_id
429 c1_data_get_tenant_id = {
430     "tenants": [
431         {
432             "id": "1",
433             "name": "chinamobile"
434         }
435     ]
436 }
437 c1_data_get_tenant_id_1 = {
438     "tenants": [
439         {
440             "id": "1",
441             "name": "tenantname"
442         }
443     ]
444 }
445
446
447 # create_volume
448 c2_data_create_volume = {
449     "id": "4bd3e9eb-cd8b-456a-8589-910836a0ab31",
450     "name": "volume1",
451     "returnCode": 1,
452     "vimId": "vim_volume_1",
453     "vimName": "vim_volume_1",
454     "tenantId": "vim_volume_1",
455     "volumeType": "123",
456     "availabilityZone": "availabilityZone",
457     "status": "availuable",
458     "createTime": "2015-12-02T06:39:40.000000",
459     "type": None,
460     "size": 40
461 }
462
463 # get_volume
464 c3_data_get_volume = {
465     "status": "available",
466     "name": "wangsong",
467     "attachments": [
468         {
469             "device": "/dev/vdc",
470             "serverId": "3030e666-528e-4954-88f5-cc21dab1262b",
471             "volumeId": "4bd3e9eb-cd8b-456a-8589-910836a0ab31",
472             "hostName": None,
473             "id": "4bd3e9eb-cd8b-456a-8589-910836a0ab31"
474         }
475     ],
476     "createTime": "2015-12-02T06:39:40.000000",
477     "type": None,
478     "id": "4bd3e9eb-cd8b-456a-8589-910836a0ab31",
479     "size": 40
480 }
481
482 # create_network
483 c4_data_create_network = {
484     "returnCode": 0,
485     "vimId": "11111",
486     "vimName": "11111",
487     "status": "ACTIVE",
488     "id": "3c9eebdbbfd345658269340b9ea6fb73",
489     "name": "net1",
490     "tenantId": "tenant1",
491     "networkName": "ommnet",
492     "shared": True,
493     "vlanTransparent": True,
494     "networkType": "vlan",
495     "segmentationId": 202,
496     "physicalNetwork": "physnet1",
497     "routerExternal": False
498 }
499
500 # create_subnet
501 c5_data_create_subnet = {
502     "returnCode": 0,
503     "vimId": "11111",
504     "vimName": "11111",
505     "status": " ACTIVE",
506     "id": "d62019d3-bc6e-4319-9c1d-6722fc136a23",
507     "tenantId": "tenant1",
508     "networkId": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
509     "networkName": "networkName",
510     "name": "subnet1",
511     "cidr": "10.43.35.0/24",
512     "ipVersion": 4,
513     "enableDhcp": 1,
514     "gatewayIp": "10.43.35.1",
515     "dnsNameservers": [],
516     "allocationPools": [
517         {
518             "start": "192.168.199.2",
519             "end": "192.168.199.254"
520         }
521     ],
522     "hostRoutes": []
523 }
524
525 # create_ports
526 c6_data_create_port = {
527     "returnCode": 0,
528     "vimId": "11111",
529     "vimName": "11111",
530     "status": " ACTIVE",
531     "id": " 872019d3-bc6e-4319-9c1d-6722fc136afg",
532     "tenantId": "tenant1",
533     "name": "subnet1",
534     "networkId": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
535     "networkName": "networkName",
536     "subnetId": "d62019d3-bc6e-4319-9c1d-6722fc136a23",
537     "subnetName": "subnet1",
538     "macAddress": "212.12.61.23",
539     "ip": "10.43.38.11",
540     "vnicType": "direct",
541     "securityGroups": ""
542 }
543
544 # create_flavor
545 c7_data_create_flavor = {
546     "returnCode": 0,
547     "vimId": "11111",
548     "vimName": "11111",
549     "id": "142019d3-bc6e-4319-9c1d-6722fc136afg",
550     "tenantId": "tenant1",
551     "name": "subnet1",
552     "vcpu": 5,
553     "memory": 2,
554     "disk": 40,
555     "ephemeral": 40,
556     "swap": 20,
557     "isPublic": True,
558     "extraSpecs": "testtt"
559 }
560
561 # list_image
562 c8_data_list_image = {
563     "vimid": "",
564     "vimname": "",
565     "images": [
566         {
567             "status": "active",
568             "id": "5e2757c1-f846-4727-915c-9a872553ed75",
569             "size": 862016,
570             "name": u'sss.vmdk'
571         }
572     ]
573 }
574
575 # create_vm
576 c9_data_create_vm = {
577     "returnCode": 1,
578     "id": "3c9eebdbbfd345658269340b9ea6fb73",
579     "name": "vm1",
580     "vimId": "11111",
581     "vimName": "11111",
582     "tenantId": "tenant1",
583     "boot": "boot_1",
584     "nicArray": "dfdf",
585     "volumeArray": "dfdf",
586     "availabilityZone": "fdvfdv",
587     "flavorId": "fdvfdv",
588     "metadata": "fdvfdv",
589     "securityGroups": "fdvfdv",
590     "serverGroup": "fdvfdv",
591     "status": "ACTIVE"
592 }
593
594 # get_vm
595 c10_data_get_vm = {
596     "returnCode": 1,
597     "id": "3c9eebdbbfd345658269340b9ea6fb73",
598     "name": "vm1",
599     "vimId": "11111",
600     "vimName": "11111",
601     "tenantId": "tenant1",
602     "status": "ACTIVE"
603 }
604
605 vnfdModel = {
606     "volume_storages": [
607         {
608             "volume_storage_id": "test",
609             "properties": {
610                 "location_info": {
611                     "vimid": "vim_1",
612                     "tenant": "chinamobile",
613                     "availability_zone": "test",
614                 },
615                 "volume_name": "test",
616                 "custom_volume_type": "test",
617                 "size_of_storage": "\"10 GB\"",
618             },
619             "image_file": "test",
620         },
621     ],
622     "vls": [
623         {
624             "vl_id": "test",
625             "properties": {
626                 "location_info": {
627                     "vimid": "test",
628                     "tenant": "chinamobile",
629                 },
630                 "vl_profile": {
631                     "networkName": "test",
632                     "networkType": "test",
633                     "physicalNetwork": "test",
634                     "vlanTransparent": "test",
635                     "segmentationId": "1",
636                     "cidr": "test",
637                     "dhcpEnabled": "test",
638                     "gatewayIp": "test",
639                     "startIp": "test",
640                     "endIp": "test",
641                 },
642                 "connectivity_type": {
643                     "layer_protocol": "ipv4",
644                 },
645                 "dns_nameservers": "test",
646                 "host_routes": "test",
647             },
648             "route_external": "test",
649         }
650     ],
651     "cps": [
652         {
653             "vdu_id": "test",
654             "cp_id": "cp1",
655             "networkId": "",  # TODO
656             "subnetId": "",  # TODO
657             "vl_id": "test",
658             "properties": {
659                 "name": "test",
660                 "mac_address": "test",
661                 "protocol_data": [
662                     {
663                         "address_data": {
664                             "l3_address_data": {
665                                 "fixed_ip_address": "test"
666                             },
667                         },
668                     },
669                 ],
670                 "vnic_type": "direct",
671                 "role": "root",
672                 "virtual_network_interface_requirements": [
673                     {
674                         "network_interface_requirements": {
675                             "interfaceType": '{"schemaVersion": "0", "schemaLocation":"", "platformId": "generic", "mandatory": false, "configurationValue": "SR-IOV"}'
676                         },
677                         "support_mandatory": False,
678                         "name": "SRIOV_Port",
679                         "description": "sriov"
680                     }
681                 ]
682             }
683         }
684     ],
685     "vdus": [
686         {
687             "vdu_id": "test",
688             "properties": {
689                 "location_info": {
690                     "vimid": "test",
691                     "tenant": "chinamobile",
692                     "availability_zone": "test",
693                     "vnfId": "",
694                     "vnfName": "",
695                     "cloudOwner": "",
696                     "cloudRegionId": "",
697                     "vduInfo": [
698                         {
699                             "vduName": "VDU_vbng_0",
700                             "flavorId": "12345",
701                             "directive": ""
702                         }
703                     ]
704                 },
705                 "name": "test",
706                 "inject_files": [],
707                 "user_data": "test",
708                 "meta_data": {},
709             },
710             "cps": [],
711             "type": "tosca.nodes.nfv.Vdu.Compute",
712             "virtual_compute": {
713                 "virtual_cpu": {
714                     "num_virtual_cpu": "16",
715                 },
716                 "virtual_memory": {
717                     "virtual_mem_size": "8000 MB",
718                     "vdu_memory_requirements": {
719                         "memoryPageSize": "8 MB",
720                     },
721                 },
722             },
723             "virtual_storages": [{
724                 "virtual_storage_id": "test",
725                 "type_of_storage": "ephemeral",
726                 "size_of_storage": "10 GB",
727             }],
728             "type": "tosca.nodes.nfv.Vdu.Compute",
729             "artifacts": [
730                 {
731                     "artifact_name": "sw_image",
732                     "file": "sss.vmdk",
733                 },
734             ],
735             "volume_storages": [
736                 {
737                     "volume_storage_id": "test",
738                 }
739             ],
740         },
741     ],
742     "image_files": [],
743     "routers": [],
744     "local_storages": [],
745     "vnf_exposed": {
746         "external_cps": [],
747         "forward_cps": []
748     },
749     "inputs": {
750         "pe1_id": {
751             "type": "string",
752             "description": "pe1_idofunderlayvpn"
753         },
754         "pe2_id": {
755             "type": "string",
756             "description": "pe2_idofunderlayvpn"
757         },
758         "serviceType": {
759             "type": "string",
760             "description": "serviceTypeofunderlayvpn"
761         },
762         "description": {
763             "type": "string",
764             "description": "descriptionofunderlayvpn"
765         },
766         "ac2_route": {
767             "type": "string",
768             "description": "ac2_routeofunderlayvpn"
769         },
770         "ac1_route": {
771             "type": "string",
772             "description": "ac1_routeofunderlayvpn"
773         },
774         "ac1_svlan": {
775             "type": "integer",
776             "description": "ac1_svlanofunderlayvpn"
777         },
778         "ac2_ip": {
779             "type": "string",
780             "description": "ac2_ipofunderlayvpn"
781         },
782         "ac1_ip": {
783             "type": "string",
784             "description": "ac1_ipofunderlayvpn"
785         },
786         "ac2_port": {
787             "type": "string",
788             "description": "ac2_portofunderlayvpn"
789         },
790         "topology": {
791             "type": "string",
792             "description": "topologyofunderlayvpn"
793         },
794         "technology": {
795             "type": "string",
796             "description": "technologyofunderlayvpn"
797         },
798         "ac1_port": {
799             "type": "string",
800             "description": "ac1_portofunderlayvpn"
801         },
802         "ac2_svlan": {
803             "type": "integer",
804             "description": "ac2_svlanofunderlayvpn"
805         },
806         "name": {
807             "type": "string",
808             "description": "Nameofunderlayervpn"
809         }
810     },
811     "metadata": {
812         "designer": "sdno",
813         "name": "underlayervpn",
814         "csarVersion": "1.0",
815         "csarType": "SSAR",
816         "csarProvider": "huawei",
817         "version": "1.0",
818         "type": "SSAR",
819         "id": "ns_underlayervpn_1_0"
820     }
821 }
822
823 vnfpackage_info = {
824     "imageInfo": [],
825     "csarId": "vOpenNAT",
826     "packageInfo": {
827         "csarName": "vOpenNAT.csar",
828         "vnfdModel": json.dumps(vnfdModel),
829         "vnfdProvider": "Intel",
830         "vnfdId": "openNAT_1.0",
831         "downloadUrl": "http://10.96.33.39:8806/static/catalog/vOpenNAT/vOpenNAT.csar",
832         "vnfVersion": "v1.0",
833         "vnfdVersion": "v1.0",
834         "vnfPackageId": "vOpenNAT"
835     }
836 }
837
838 # # vnfd_rawdata
839 # vnfd_rawdata = {
840 #     "rawData": {
841 #         "instance": {
842 #             "metadata": {
843 #                 "designer": "sdno",
844 #                 "name": "underlayervpn",
845 #                 "csarVersion": "1.0",
846 #                 "csarType": "SSAR",
847 #                 "csarProvider": "huawei",
848 #                 "version": "1.0",
849 #                 "type": "SSAR",
850 #                 "id": "ns_underlayervpn_1_0"
851 #             },
852 #             "nodes": [
853 #                 {
854 #                     "id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9",
855 #                     "type_name": "tosca.nodes.sdn.l3ac",
856 #                     "template_name": "ac2",
857 #                     "properties": {
858 #                         "ip": {
859 #                             "type_name": "string"
860 #                         },
861 #                         "route": {
862 #                             "type_name": "string"
863 #                         },
864 #                         "port": {
865 #                             "type_name": "string"
866 #                         },
867 #                         "svlan": {
868 #                             "type_name": "string"
869 #                         }
870 #                     },
871 #                     "interfaces": [
872 #                         {
873 #                             "name": "Standard",
874 #                             "type_name": "tosca.interfaces.node.lifecycle.Standard"
875 #                         }
876 #                     ],
877 #                     "capabilities": [
878 #                         {
879 #                             "name": "feature",
880 #                             "type_name": "tosca.capabilities.Node"
881 #                         },
882 #                         {
883 #                             "name": "ac",
884 #                             "type_name": "tosca.capabilities.sdn.ac"
885 #                         }
886 #                     ],
887 #                     "relationships": [
888 #                         {
889 #                             "target_node_id": "pe2_go3vo1ctxr1vlbl0ij8stbtj6",
890 #                             "target_capability_name": "feature"
891 #                         },
892 #                         {
893 #                             "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9",
894 #                             "target_capability_name": "feature"
895 #                         }
896 #                     ]
897 #                 },
898 #                 {
899 #                     "id": "ac1_jqows1ai0j0cmwk9jdvuknt97",
900 #                     "type_name": "tosca.nodes.sdn.l3ac",
901 #                     "template_name": "ac1",
902 #                     "properties": {
903 #                         "ip": {
904 #                             "type_name": "string"
905 #                         },
906 #                         "route": {
907 #                             "type_name": "string"
908 #                         },
909 #                         "port": {
910 #                             "type_name": "string"
911 #                         },
912 #                         "svlan": {
913 #                             "type_name": "string"
914 #                         }
915 #                     },
916 #                     "interfaces": [
917 #                         {
918 #                             "name": "Standard",
919 #                             "type_name": "tosca.interfaces.node.lifecycle.Standard"
920 #                         }
921 #                     ],
922 #                     "capabilities": [
923 #                         {
924 #                             "name": "feature",
925 #                             "type_name": "tosca.capabilities.Node"
926 #                         },
927 #                         {
928 #                             "name": "ac",
929 #                             "type_name": "tosca.capabilities.sdn.ac"
930 #                         }
931 #                     ],
932 #                     "relationships": [
933 #                         {
934 #                             "target_node_id": "pe1_e58ekps6m45g6w9egs9lue2j7",
935 #                             "target_capability_name": "feature"
936 #                         },
937 #                         {
938 #                             "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9",
939 #                             "target_capability_name": "feature"
940 #                         }
941 #                     ]
942 #                 },
943 #                 {
944 #                     "id": "vpn_ie0xim076f7cje67fvrrq9tg1",
945 #                     "type_name": "tosca.nodes.sdn.underlayVPN",
946 #                     "template_name": "vpn",
947 #                     "properties": {
948 #                         "serviceType": {
949 #                             "type_name": "string"
950 #                         },
951 #                         "description": {
952 #                             "type_name": "string"
953 #                         },
954 #                         "name": {
955 #                             "type_name": "string"
956 #                         },
957 #                         "topology": {
958 #                             "type_name": "string"
959 #                         }
960 #                     },
961 #                     "interfaces": [
962 #                         {
963 #                             "name": "Standard",
964 #                             "type_name": "tosca.interfaces.node.lifecycle.Standard"
965 #                         }
966 #                     ],
967 #                     "capabilities": [
968 #                         {
969 #                             "name": "feature",
970 #                             "type_name": "tosca.capabilities.Node"
971 #                         }
972 #                     ],
973 #                     "relationships": [
974 #                         {
975 #                             "target_node_id": "ac1_jqows1ai0j0cmwk9jdvuknt97",
976 #                             "target_capability_name": "feature"
977 #                         },
978 #                         {
979 #                             "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9",
980 #                             "target_capability_name": "feature"
981 #                         }
982 #                     ]
983 #                 },
984 #                 {
985 #                     "id": "pe1_e58ekps6m45g6w9egs9lue2j7",
986 #                     "type_name": "tosca.nodes.sdn.l3pe",
987 #                     "template_name": "pe1",
988 #                     "properties": {
989 #                         "id": {
990 #                             "type_name": "string"
991 #                         }
992 #                     },
993 #                     "interfaces": [
994 #                         {
995 #                             "name": "Standard",
996 #                             "type_name": "tosca.interfaces.node.lifecycle.Standard"
997 #                         }
998 #                     ],
999 #                     "capabilities": [
1000 #                         {
1001 #                             "name": "feature",
1002 #                             "type_name": "tosca.capabilities.Node"
1003 #                         },
1004 #                         {
1005 #                             "name": "pe",
1006 #                             "type_name": "tosca.capabilities.sdn.pe"
1007 #                         }
1008 #                     ]
1009 #                 },
1010 #                 {
1011 #                     "id": "pe2_go3vo1ctxr1vlbl0ij8stbtj6",
1012 #                     "type_name": "tosca.nodes.sdn.l3pe",
1013 #                     "template_name": "pe2",
1014 #                     "properties": {
1015 #                         "id": {
1016 #                             "type_name": "string"
1017 #                         }
1018 #                     },
1019 #                     "interfaces": [
1020 #                         {
1021 #                             "name": "Standard",
1022 #                             "type_name": "tosca.interfaces.node.lifecycle.Standard"
1023 #                         }
1024 #                     ],
1025 #                     "capabilities": [
1026 #                         {
1027 #                             "name": "feature",
1028 #                             "type_name": "tosca.capabilities.Node"
1029 #                         },
1030 #                         {
1031 #                             "name": "pe",
1032 #                             "type_name": "tosca.capabilities.sdn.pe"
1033 #                         }
1034 #                     ]
1035 #                 }
1036 #             ],
1037 #             "substitution": {
1038 #                 "node_type_name": "tosca.nodes.sdn.ext.NS.ns_underlayervpn"
1039 #             },
1040 #             "inputs": {
1041 #                 "ac2_ip": {
1042 #                     "type_name": "string",
1043 #                     "description": "ac2_ipofunderlayvpn"
1044 #                 },
1045 #                 "ac2_route": {
1046 #                     "type_name": "string",
1047 #                     "description": "ac2_routeofunderlayvpn"
1048 #                 },
1049 #                 "serviceType": {
1050 #                     "type_name": "string",
1051 #                     "description": "serviceTypeofunderlayvpn"
1052 #                 },
1053 #                 "description": {
1054 #                     "type_name": "string",
1055 #                     "description": "descriptionofunderlayvpn"
1056 #                 },
1057 #                 "pe2_id": {
1058 #                     "type_name": "string",
1059 #                     "description": "pe2_idofunderlayvpn"
1060 #                 },
1061 #                 "ac1_route": {
1062 #                     "type_name": "string",
1063 #                     "description": "ac1_routeofunderlayvpn"
1064 #                 },
1065 #                 "ac1_svlan": {
1066 #                     "type_name": "integer",
1067 #                     "description": "ac1_svlanofunderlayvpn"
1068 #                 },
1069 #                 "name": {
1070 #                     "type_name": "string",
1071 #                     "description": "Nameofunderlayervpn"
1072 #                 },
1073 #                 "ac1_ip": {
1074 #                     "type_name": "string",
1075 #                     "description": "ac1_ipofunderlayvpn"
1076 #                 },
1077 #                 "ac2_port": {
1078 #                     "type_name": "string",
1079 #                     "description": "ac2_portofunderlayvpn"
1080 #                 },
1081 #                 "pe1_id": {
1082 #                     "type_name": "string",
1083 #                     "description": "pe1_idofunderlayvpn"
1084 #                 },
1085 #                 "technology": {
1086 #                     "type_name": "string",
1087 #                     "description": "technologyofunderlayvpn"
1088 #                 },
1089 #                 "ac1_port": {
1090 #                     "type_name": "string",
1091 #                     "description": "ac1_portofunderlayvpn"
1092 #                 },
1093 #                 "ac2_svlan": {
1094 #                     "type_name": "integer",
1095 #                     "description": "ac2_svlanofunderlayvpn"
1096 #                 },
1097 #                 "topology": {
1098 #                     "type_name": "string",
1099 #                     "description": "topologyofunderlayvpn"
1100 #                 }
1101 #             }
1102 #         }
1103 #     }
1104 # }