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