Fix vfc-gvnfm-vnflcm/toscautils pep8 issues
[vfc/gvnfm/vnflcm.git] / lcm / lcm / pub / utils / toscautil.py
1 # Copyright 2016-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
15 import json
16
17
18 def safe_get(key_val, key):
19     return key_val[key] if key in key_val else ""
20
21
22 def find_node_name(node_id, node_list):
23     for node in node_list:
24         if node['id'] == node_id:
25             return node['template_name']
26     raise Exception('can not find node(%s).' % node_id)
27
28
29 def find_node_type(node_id, node_list):
30     for node in node_list:
31         if node['id'] == node_id:
32             return node['type_name']
33     raise Exception('can not find node(%s).' % node_id)
34
35
36 def find_related_node(node_id, src_json_model, requirement_name):
37     related_nodes = []
38     for model_tpl in safe_get(src_json_model, "node_templates"):
39         for rt in safe_get(model_tpl, 'requirement_templates'):
40             if safe_get(rt, 'name') == requirement_name and safe_get(rt, 'target_node_template_name') == node_id:
41                 related_nodes.append(model_tpl['name'])
42     return related_nodes
43
44
45 def convert_props(src_node, dest_node):
46     if 'properties' in src_node and src_node['properties']:
47         for prop_name, prop_info in src_node['properties'].items():
48             if 'value' in prop_info:
49                 dest_node['properties'][prop_name] = prop_info['value']
50
51
52 def convert_metadata(src_json):
53     return src_json['metadata'] if 'metadata' in src_json else {}
54
55
56 def convert_inputs(src_json):
57     inputs = {}
58     if 'inputs' in src_json:
59         src_inputs = src_json['inputs']
60         for param_name, param_info in src_inputs.items():
61             input_param = {}
62             if 'type_name' in param_info:
63                 input_param['type'] = param_info['type_name']
64             if 'description' in param_info:
65                 input_param['description'] = param_info['description']
66             if 'value' in param_info:
67                 input_param['value'] = param_info['value']
68             inputs[param_name] = input_param
69     return inputs
70
71
72 def convert_vnf_node(src_node, src_json_model):
73     vnf_node = {
74         'type': src_node['type_name'],
75         'vnf_id': src_node['template_name'],
76         'description': '',
77         'properties': {},
78         'dependencies': [],
79         'networks': []
80     }
81     convert_props(src_node, vnf_node)
82     for model_tpl in safe_get(src_json_model, "node_templates"):
83         if model_tpl['name'] != vnf_node['vnf_id']:
84             continue
85         vnf_node['dependencies'] = [
86             {
87                 'key_name': requirement['name'],
88                 'vl_id': requirement['target_node_template_name']
89             } for requirement in safe_get(model_tpl, 'requirement_templates')
90             if safe_get(requirement, 'target_capability_name') == 'virtual_linkable'
91         ]
92         vnf_node['networks'] = [requirement['target_node_template_name']
93                                 for requirement in safe_get(model_tpl, 'requirement_templates')
94                                 if safe_get(requirement, 'name') == 'dependency']
95     return vnf_node
96
97
98 def convert_pnf_node(src_node, src_json_model):
99     pnf_node = {'pnf_id': src_node['template_name'], 'description': '', 'properties': {}}
100     convert_props(src_node, pnf_node)
101     pnf_node['cps'] = find_related_node(src_node['id'], src_json_model, 'virtualbinding')
102     return pnf_node
103
104
105 def convert_vl_node(src_node, src_node_list):
106     vl_node = {'vl_id': src_node['template_name'], 'description': '', 'properties': {}}
107     convert_props(src_node, vl_node)
108     vl_node['route_id'] = ''
109     for relation in safe_get(src_node, 'relationships'):
110         if safe_get(relation, 'type_name').endswith('.VirtualLinksTo'):
111             vl_node['route_id'] = find_node_name(relation['target_node_id'], src_node_list)
112             break
113     vl_node['route_external'] = (src_node['type_name'].find('.RouteExternalVL') > 0)
114     return vl_node
115
116
117 def convert_cp_node(src_node, src_node_list, model_type='NSD'):
118     cp_node = {'cp_id': src_node['template_name'], 'description': '', 'properties': {}}
119     convert_props(src_node, cp_node)
120     src_relationships = src_node['relationships']
121     for relation in src_relationships:
122         if safe_get(relation, 'name') == 'virtualLink':
123             cp_node['vl_id'] = find_node_name(relation['target_node_id'], src_node_list)
124         elif safe_get(relation, 'name') == 'virtualbinding':
125             node_key = 'pnf_id' if model_type == 'NSD' else 'vdu_id'
126             cp_node[node_key] = find_node_name(relation['target_node_id'], src_node_list)
127     return cp_node
128
129
130 def convert_router_node(src_node, src_node_list):
131     router_node = {'router_id': src_node['template_name'], 'description': '', 'properties': {}}
132     convert_props(src_node, router_node)
133     for relation in src_node['relationships']:
134         if safe_get(relation, 'name') != 'external_virtual_link':
135             continue
136         router_node['external_vl_id'] = find_node_name(relation['target_node_id'], src_node_list)
137         router_node['external_ip_addresses'] = []
138         if 'properties' not in relation:
139             continue
140         for prop_name, prop_info in relation['properties'].items():
141             if prop_name == 'router_ip_address':
142                 router_node['external_ip_addresses'].append(prop_info['value'])
143         break
144     return router_node
145
146
147 def convert_fp_node(src_node, src_node_list, src_json_model):
148     fp_node = {
149         'fp_id': src_node['template_name'],
150         'description': '',
151         'properties': {},
152         'forwarder_list': []
153     }
154     convert_props(src_node, fp_node)
155     for relation in safe_get(src_node, 'relationships'):
156         if safe_get(relation, 'name') != 'forwarder':
157             continue
158         forwarder_point = {'type': 'vnf'}
159         target_node_type = find_node_type(relation['target_node_id'], src_node_list).upper()
160         if target_node_type.find('.CP.') >= 0 or target_node_type.endswith('.CP'):
161             forwarder_point['type'] = 'cp'
162         forwarder_point['node_name'] = find_node_name(relation['target_node_id'], src_node_list)
163         forwarder_point['capability'] = ''
164         if forwarder_point['type'] == 'vnf':
165             for node_tpl in src_json_model["node_templates"]:
166                 if fp_node['fp_id'] != node_tpl["name"]:
167                     continue
168                 for r_tpl in safe_get(node_tpl, "requirement_templates"):
169                     if safe_get(r_tpl, "target_node_template_name") != forwarder_point['node_name']:
170                         continue
171                     forwarder_point['capability'] = safe_get(r_tpl, "target_capability_name")
172                     break
173                 break
174         fp_node['forwarder_list'].append(forwarder_point)
175     return fp_node
176
177
178 def convert_vnffg_group(src_group, src_group_list, src_node_list):
179     vnffg = {
180         'vnffg_id': src_group['template_name'],
181         'description': '',
182         'properties': {},
183         'members': []
184     }
185     convert_props(src_group, vnffg)
186     for member_node_id in src_group['member_node_ids']:
187         vnffg['members'].append(find_node_name(member_node_id, src_node_list))
188     return vnffg
189
190
191 def convert_imagefile_node(src_node, src_node_list):
192     image_node = {
193         'image_file_id': src_node['template_name'],
194         'description': '',
195         'properties': {}
196     }
197     convert_props(src_node, image_node)
198     return image_node
199
200
201 def convert_localstorage_node(src_node, src_node_list):
202     localstorage_node = {
203         'local_storage_id': src_node['template_name'],
204         'description': '',
205         'properties': {}
206     }
207     convert_props(src_node, localstorage_node)
208     return localstorage_node
209
210
211 def convert_vdu_node(src_node, src_node_list, src_json_model):
212     vdu_node = {
213         'vdu_id': src_node['template_name'],
214         'description': '', 'properties': {},
215         'image_file': '',
216         'local_storages': [],
217         'dependencies': [],
218         'nfv_compute': {},
219         'vls': [],
220         'artifacts': []
221     }
222     convert_props(src_node, vdu_node)
223
224     for relation in src_node['relationships']:
225         r_id, r_name = safe_get(relation, 'target_node_id'), safe_get(relation, 'name')
226         if r_name == 'guest_os':
227             vdu_node['image_file'] = find_node_name(r_id, src_node_list)
228         elif r_name == 'local_storage':
229             vdu_node['local_storages'].append(find_node_name(r_id, src_node_list))
230         elif r_name.endswith('.AttachesTo'):
231             nt = find_node_type(r_id, src_node_list)
232             if nt.endswith('.BlockStorage.Local') or nt.endswith('.LocalStorage'):
233                 vdu_node['local_storages'].append(find_node_name(r_id, src_node_list))
234
235     for capability in src_node['capabilities']:
236         if capability['name'] != 'nfv_compute':
237             continue
238         for prop_name, prop_info in capability['properties'].items():
239             if 'value' in prop_info:
240                 vdu_node['nfv_compute'][prop_name] = prop_info['value']
241
242     vdu_node['cps'] = find_related_node(src_node['id'], src_json_model, 'virtualbinding')
243
244     for cp_node in vdu_node['cps']:
245         for src_cp_node in src_node_list:
246             if src_cp_node['template_name'] != cp_node:
247                 continue
248             for relation in safe_get(src_cp_node, 'relationships'):
249                 if relation['name'] != 'virtualLink':
250                     continue
251                 vl_node_name = find_node_name(relation['target_node_id'], src_node_list)
252                 if vl_node_name not in vdu_node['vls']:
253                     vdu_node['vls'].append(vl_node_name)
254
255     for item in safe_get(src_node, 'artifacts'):
256         artifact = {
257             'artifact_name': item['name'], 'type': item['type_name'],
258             'file': item['source_path']
259         }
260         vdu_node['artifacts'].append(artifact)
261
262     return vdu_node
263
264
265 def convert_exposed_node(src_json, src_nodes, exposed):
266     for item in safe_get(safe_get(src_json, 'substitution'), 'requirements'):
267         external_cps = {
268             'key_name': item['mapped_name'],
269             "cp_id": find_node_name(item['node_id'], src_nodes)
270         }
271         exposed['external_cps'].append(external_cps)
272     for item in safe_get(safe_get(src_json, 'substitution'), 'capabilities'):
273         forward_cps = {
274             'key_name': item['mapped_name'],
275             "cp_id": find_node_name(item['node_id'], src_nodes)
276         }
277         exposed['forward_cps'].append(forward_cps)
278
279
280 def convert_vnffgs(src_json_inst, src_nodes):
281     vnffgs = []
282     src_groups = safe_get(src_json_inst, 'groups')
283     for group in src_groups:
284         type_name = group['type_name'].upper()
285         if type_name.find('.VNFFG.') >= 0 or type_name.endswith('.VNFFG'):
286             vnffgs.append(convert_vnffg_group(group, src_groups, src_nodes))
287     return vnffgs
288
289
290 def convert_common(src_json, target_json):
291     if isinstance(src_json, (unicode, str)):
292         src_json_dict = json.loads(src_json)
293     else:
294         src_json_dict = src_json
295     src_json_inst = src_json_dict["instance"]
296     src_json_model = src_json_dict["model"] if "model" in src_json_dict else {}
297
298     target_json['metadata'] = convert_metadata(src_json_inst)
299     target_json['inputs'] = convert_inputs(src_json_inst)
300     target_json['vls'] = []
301     target_json['cps'] = []
302     target_json['routers'] = []
303
304     return src_json_inst, src_json_model
305
306
307 def convert_policy_node(src_json):
308     target_json = {
309         'name': src_json['template_name'],
310         'file_url': src_json['properties']['drl_file_url']['value']
311     }
312
313     return target_json
314
315
316 def convert_nsd_model(src_json):
317     target_json = {'vnfs': [], 'pnfs': [], 'fps': [], 'policies': []}
318     src_json_inst, src_json_model = convert_common(src_json, target_json)
319
320     src_nodes = src_json_inst['nodes']
321     for node in src_nodes:
322         type_name = node['type_name']
323         if type_name.find('.VNF.') > 0 or type_name.endswith('.VNF'):
324             target_json['vnfs'].append(convert_vnf_node(node, src_json_model))
325         elif type_name.find('.PNF.') > 0 or type_name.endswith('.PNF'):
326             target_json['pnfs'].append(convert_pnf_node(node, src_json_model))
327         elif type_name.find('.VL.') > 0 or type_name.endswith('.VL') \
328                 or node['type_name'].find('.RouteExternalVL') > 0:
329             target_json['vls'].append(convert_vl_node(node, src_nodes))
330         elif type_name.find('.CP.') > 0 or type_name.endswith('.CP'):
331             target_json['cps'].append(convert_cp_node(node, src_nodes))
332         elif type_name.find('.FP.') > 0 or type_name.endswith('.FP'):
333             target_json['fps'].append(convert_fp_node(node, src_nodes, src_json_model))
334         elif type_name.endswith('.Router'):
335             target_json['routers'].append(convert_router_node(node, src_nodes))
336         elif type_name.endswith('tosca.policies.Drools'):
337             target_json['policies'].append(convert_policy_node(node))
338
339     target_json['vnffgs'] = convert_vnffgs(src_json_inst, src_nodes)
340
341     target_json['ns_exposed'] = {'external_cps': [], 'forward_cps': []}
342     convert_exposed_node(src_json_inst, src_nodes, target_json['ns_exposed'])
343     return json.dumps(target_json)
344
345
346 def convert_vnfd_model(src_json):
347     target_json = {'image_files': [], 'local_storages': [], 'vdus': []}
348     src_json_inst, src_json_model = convert_common(src_json, target_json)
349     if "vnfdVersion" in src_json_inst.get("metadata", {}):
350         from . import toscautil_new
351         return toscautil_new.convert_vnfd_model(src_json)
352
353     src_nodes = src_json_inst['nodes']
354     for node in src_nodes:
355         type_name = node['type_name']
356         if type_name.endswith('.ImageFile'):
357             target_json['image_files'].append(convert_imagefile_node(node, src_nodes))
358         elif type_name.endswith('.BlockStorage.Local') or type_name.endswith('.LocalStorage'):
359             target_json['local_storages'].append(convert_localstorage_node(node, src_nodes))
360         elif type_name.find('.VDU.') > 0 or type_name.endswith('.VDU'):
361             target_json['vdus'].append(convert_vdu_node(node, src_nodes, src_json_model))
362         elif type_name.find('.VL.') > 0 or type_name.endswith('.VL') \
363                 or node['type_name'].find('.RouteExternalVL') > 0:
364             target_json['vls'].append(convert_vl_node(node, src_nodes))
365         elif type_name.find('.CP.') > 0 or type_name.endswith('.CP'):
366             target_json['cps'].append(convert_cp_node(node, src_nodes, 'VNFD'))
367         elif type_name.endswith('.Router'):
368             target_json['routers'].append(convert_router_node(node, src_nodes))
369
370     target_json['vnf_exposed'] = {'external_cps': [], 'forward_cps': []}
371     convert_exposed_node(src_json_inst, src_nodes, target_json['vnf_exposed'])
372     return json.dumps(target_json)
373
374
375 if __name__ == '__main__':
376     src_json = json.dumps(
377         {
378             "instance": {
379                 "metadata": {
380                     "vendor": "ZTE",
381                     "name": "VCPE_NS",
382                     "csarVersion": "v1.0",
383                     "csarType": "NSAR",
384                     "csarProvider": "ZTE",
385                     "version": 1,
386                     "invariant_id": "vcpe_ns_sff_1",
387                     "id": "VCPE_NS",
388                     "description": "vcpe_ns"
389                 },
390                 "policies:": [
391                     {
392                         "aaa:": {
393                             "type": "tosca.policies.Drools",
394                             "properties": {
395                                 "drl_file_url": "policies/abc.drl"
396                             }
397                         }
398                     }
399                 ],
400                 "nodes": [
401                     {
402                         "id": "policies",
403                         "type_name": "tosca.policies.Drools",
404                         "template_name": "aaa",
405                         "properties": {
406                             "drl_file_url": {
407                                 "type_name": "string",
408                                 "value": "policies/abc.drl"
409                             }
410                         }
411                     },
412                     {
413                         "id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
414                         "type_name": "tosca.nodes.nfv.ext.FP",
415                         "template_name": "path2",
416                         "properties": {
417                             "symmetric": {
418                                 "type_name": "boolean",
419                                 "value": False
420                             },
421                             "policy": {
422                                 "type_name": "tosca.datatypes.nfv.ext.FPPolicy",
423                                 "value": {
424                                     "type": "ACL",
425                                     "criteria": {
426                                         "dest_port_range": "1-100",
427                                         "ip_protocol": "tcp",
428                                         "source_ip_range": [
429                                             "119.1.1.1-119.1.1.10"
430                                         ],
431                                         "dest_ip_range": [
432                                             {
433                                                 "get_input": "NatIpRange"
434                                             }
435                                         ],
436                                         "dscp": 0,
437                                         "source_port_range": "1-100"
438                                     }
439                                 }
440                             }
441                         },
442                         "interfaces": [
443                             {
444                                 "name": "Standard",
445                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
446                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
447                                 "operations": [
448                                     {
449                                         "name": "create",
450                                         "description": "Standard lifecycle create operation."
451                                     },
452                                     {
453                                         "name": "stop",
454                                         "description": "Standard lifecycle stop operation."
455                                     },
456                                     {
457                                         "name": "start",
458                                         "description": "Standard lifecycle start operation."
459                                     },
460                                     {
461                                         "name": "delete",
462                                         "description": "Standard lifecycle delete operation."
463                                     },
464                                     {
465                                         "name": "configure",
466                                         "description": "Standard lifecycle configure operation."
467                                     }
468                                 ]
469                             }
470                         ],
471                         "capabilities": [
472                             {
473                                 "name": "feature",
474                                 "type_name": "tosca.capabilities.Node"
475                             }
476                         ],
477                         "relationships": [
478                             {
479                                 "name": "forwarder",
480                                 "source_requirement_index": 0,
481                                 "target_node_id": "m6000_data_out_qeukdtf6g87cnparxi51fa8s6"
482                             },
483                             {
484                                 "name": "forwarder",
485                                 "source_requirement_index": 1,
486                                 "target_node_id": "m600_tunnel_cp_imwfk5l48ljz0g9knc6d68hv5"
487                             },
488                             {
489                                 "name": "forwarder",
490                                 "source_requirement_index": 2,
491                                 "target_node_id": "VNAT_cfdljtspvkp234irka59wgab0",
492                                 "target_capability_name": "feature"
493                             }
494                         ]
495                     },
496                     {
497                         "id": "path1_bv53fblv26hawr8dj4fxe2rsd",
498                         "type_name": "tosca.nodes.nfv.ext.FP",
499                         "template_name": "path1",
500                         "properties": {
501                             "symmetric": {
502                                 "type_name": "boolean",
503                                 "value": True
504                             },
505                             "policy": {
506                                 "type_name": "tosca.datatypes.nfv.ext.FPPolicy",
507                                 "value": {
508                                     "type": "ACL",
509                                     "criteria": {
510                                         "dest_port_range": "1-100",
511                                         "ip_protocol": "tcp",
512                                         "source_ip_range": [
513                                             "1-100"
514                                         ],
515                                         "dest_ip_range": [
516                                             "1-100"
517                                         ],
518                                         "dscp": 4,
519                                         "source_port_range": "1-100"
520                                     }
521                                 }
522                             }
523                         },
524                         "interfaces": [
525                             {
526                                 "name": "Standard",
527                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
528                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
529                                 "operations": [
530                                     {
531                                         "name": "create",
532                                         "description": "Standard lifecycle create operation."
533                                     },
534                                     {
535                                         "name": "stop",
536                                         "description": "Standard lifecycle stop operation."
537                                     },
538                                     {
539                                         "name": "start",
540                                         "description": "Standard lifecycle start operation."
541                                     },
542                                     {
543                                         "name": "delete",
544                                         "description": "Standard lifecycle delete operation."
545                                     },
546                                     {
547                                         "name": "configure",
548                                         "description": "Standard lifecycle configure operation."
549                                     }
550                                 ]
551                             }
552                         ],
553                         "capabilities": [
554                             {
555                                 "name": "feature",
556                                 "type_name": "tosca.capabilities.Node"
557                             }
558                         ],
559                         "relationships": [
560                             {
561                                 "name": "forwarder",
562                                 "source_requirement_index": 0,
563                                 "target_node_id": "m6000_data_in_eldly5txw4frny3cc349uz3nc"
564                             },
565                             {
566                                 "name": "forwarder",
567                                 "source_requirement_index": 1,
568                                 "target_node_id": "m600_tunnel_cp_imwfk5l48ljz0g9knc6d68hv5"
569                             },
570                             {
571                                 "name": "forwarder",
572                                 "source_requirement_index": 2,
573                                 "target_node_id": "VFW_57z0ua89aiyl8ncvw7h7mjf34",
574                                 "target_capability_name": "feature"
575                             },
576                             {
577                                 "name": "forwarder",
578                                 "source_requirement_index": 3,
579                                 "target_node_id": "VNAT_cfdljtspvkp234irka59wgab0",
580                                 "target_capability_name": "feature"
581                             },
582                             {
583                                 "name": "forwarder",
584                                 "source_requirement_index": 4,
585                                 "target_node_id": "m600_tunnel_cp_imwfk5l48ljz0g9knc6d68hv5"
586                             },
587                             {
588                                 "name": "forwarder",
589                                 "source_requirement_index": 5,
590                                 "target_node_id": "m6000_data_out_qeukdtf6g87cnparxi51fa8s6"
591                             }
592                         ]
593                     },
594                     {
595                         "id": "m6000_data_out_qeukdtf6g87cnparxi51fa8s6",
596                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
597                         "template_name": "m6000_data_out",
598                         "properties": {
599                             "direction": {
600                                 "type_name": "string",
601                                 "value": "bidirectional"
602                             },
603                             "vnic_type": {
604                                 "type_name": "string",
605                                 "value": "normal"
606                             },
607                             "bandwidth": {
608                                 "type_name": "integer",
609                                 "value": 0
610                             },
611                             "mac_address": {
612                                 "type_name": "string",
613                                 "value": "11-22-33-22-11-44"
614                             },
615                             "interface_name": {
616                                 "type_name": "string",
617                                 "value": "xgei-0/4/1/5"
618                             },
619                             "ip_address": {
620                                 "type_name": "string",
621                                 "value": "176.1.1.2"
622                             },
623                             "order": {
624                                 "type_name": "integer",
625                                 "value": 0
626                             },
627                             "sfc_encapsulation": {
628                                 "type_name": "string",
629                                 "value": "mac"
630                             }
631                         },
632                         "interfaces": [
633                             {
634                                 "name": "Standard",
635                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
636                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
637                                 "operations": [
638                                     {
639                                         "name": "create",
640                                         "description": "Standard lifecycle create operation."
641                                     },
642                                     {
643                                         "name": "stop",
644                                         "description": "Standard lifecycle stop operation."
645                                     },
646                                     {
647                                         "name": "start",
648                                         "description": "Standard lifecycle start operation."
649                                     },
650                                     {
651                                         "name": "delete",
652                                         "description": "Standard lifecycle delete operation."
653                                     },
654                                     {
655                                         "name": "configure",
656                                         "description": "Standard lifecycle configure operation."
657                                     }
658                                 ]
659                             }
660                         ],
661                         "capabilities": [
662                             {
663                                 "name": "feature",
664                                 "type_name": "tosca.capabilities.Node"
665                             },
666                             {
667                                 "name": "forwarder",
668                                 "type_name": "tosca.capabilities.nfv.Forwarder"
669                             }
670                         ],
671                         "relationships": [
672                             {
673                                 "name": "virtualbinding",
674                                 "source_requirement_index": 0,
675                                 "target_node_id": "m6000_s_7qtzo5nuocyfmebc6kp9raq18",
676                                 "target_capability_name": "feature"
677                             },
678                             {
679                                 "name": "virtualLink",
680                                 "source_requirement_index": 1,
681                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
682                                 "target_capability_name": "feature"
683                             },
684                             {
685                                 "name": "forwarder",
686                                 "source_requirement_index": 2,
687                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
688                                 "target_capability_name": "feature"
689                             }
690                         ]
691                     },
692                     {
693                         "id": "VFW_57z0ua89aiyl8ncvw7h7mjf34",
694                         "type_name": "tosca.nodes.nfv.ext.zte.VNF.VFW",
695                         "template_name": "VFW",
696                         "properties": {
697                             "is_shared": {
698                                 "type_name": "boolean",
699                                 "value": False
700                             },
701                             "plugin_info": {
702                                 "type_name": "string",
703                                 "value": "vbrasplugin_1.0"
704                             },
705                             "vendor": {
706                                 "type_name": "string",
707                                 "value": "zte"
708                             },
709                             "request_reclassification": {
710                                 "type_name": "boolean",
711                                 "value": False
712                             },
713                             "vnf_extend_type": {
714                                 "type_name": "string",
715                                 "value": "driver"
716                             },
717                             "name": {
718                                 "type_name": "string",
719                                 "value": "VFW"
720                             },
721                             "version": {
722                                 "type_name": "string",
723                                 "value": "1.0"
724                             },
725                             "cross_dc": {
726                                 "type_name": "boolean",
727                                 "value": False
728                             },
729                             "vnf_type": {
730                                 "type_name": "string",
731                                 "value": "VFW"
732                             },
733                             "vnfd_version": {
734                                 "type_name": "string",
735                                 "value": "1.0.0"
736                             },
737                             "id": {
738                                 "type_name": "string",
739                                 "value": "vcpe_vfw_zte_1_0"
740                             },
741                             "nsh_aware": {
742                                 "type_name": "boolean",
743                                 "value": True
744                             },
745                             "adjust_vnf_capacity": {
746                                 "type_name": "boolean",
747                                 "value": True
748                             },
749                             "vmnumber_overquota_alarm": {
750                                 "type_name": "boolean",
751                                 "value": True
752                             },
753                             "csarProvider": {
754                                 "type_name": "string",
755                                 "value": "ZTE"
756                             },
757                             "csarVersion": {
758                                 "type_name": "string",
759                                 "value": "v1.0"
760                             },
761                             "externalPluginManageNetworkName": {
762                                 "type_name": "string",
763                                 "value": "vlan_4007_plugin_net"
764                             },
765                             "csarType": {
766                                 "type_name": "string",
767                                 "value": "NFAR"
768                             }
769                         },
770                         "interfaces": [
771                             {
772                                 "name": "Standard",
773                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
774                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
775                                 "operations": [
776                                     {
777                                         "name": "create",
778                                         "description": "Standard lifecycle create operation."
779                                     },
780                                     {
781                                         "name": "stop",
782                                         "description": "Standard lifecycle stop operation."
783                                     },
784                                     {
785                                         "name": "start",
786                                         "description": "Standard lifecycle start operation."
787                                     },
788                                     {
789                                         "name": "delete",
790                                         "description": "Standard lifecycle delete operation."
791                                     },
792                                     {
793                                         "name": "configure",
794                                         "description": "Standard lifecycle configure operation."
795                                     }
796                                 ]
797                             }
798                         ],
799                         "capabilities": [
800                             {
801                                 "name": "feature",
802                                 "type_name": "tosca.capabilities.Node"
803                             },
804                             {
805                                 "name": "forwarder",
806                                 "type_name": "tosca.capabilities.nfv.Forwarder"
807                             },
808                             {
809                                 "name": "vfw_fw_inout",
810                                 "type_name": "tosca.capabilities.nfv.Forwarder"
811                             }
812                         ],
813                         "relationships": [
814                             {
815                                 "name": "vfw_ctrl_by_manager_cp",
816                                 "source_requirement_index": 0,
817                                 "target_node_id": "ext_mnet_net_au2otee5mcy0dnpqykj487zr3",
818                                 "target_capability_name": "feature"
819                             },
820                             {
821                                 "name": "vfw_data_cp",
822                                 "source_requirement_index": 1,
823                                 "target_node_id": "sfc_data_network_vx3pc1oahn0k0pa5q722yafee",
824                                 "target_capability_name": "feature"
825                             },
826                             {
827                                 "name": "virtualLink",
828                                 "source_requirement_index": 2,
829                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
830                                 "target_capability_name": "feature"
831                             },
832                             {
833                                 "name": "forwarder",
834                                 "source_requirement_index": 3,
835                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
836                                 "target_capability_name": "feature"
837                             }
838                         ]
839                     },
840                     {
841                         "id": "m600_tunnel_cp_imwfk5l48ljz0g9knc6d68hv5",
842                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
843                         "template_name": "m600_tunnel_cp",
844                         "properties": {
845                             "direction": {
846                                 "type_name": "string",
847                                 "value": "bidirectional"
848                             },
849                             "vnic_type": {
850                                 "type_name": "string",
851                                 "value": "normal"
852                             },
853                             "bandwidth": {
854                                 "type_name": "integer",
855                                 "value": 0
856                             },
857                             "mac_address": {
858                                 "type_name": "string",
859                                 "value": "00-11-00-22-33-00"
860                             },
861                             "interface_name": {
862                                 "type_name": "string",
863                                 "value": "gei-0/4/0/13"
864                             },
865                             "ip_address": {
866                                 "type_name": "string",
867                                 "value": "191.167.100.5"
868                             },
869                             "order": {
870                                 "type_name": "integer",
871                                 "value": 0
872                             },
873                             "sfc_encapsulation": {
874                                 "type_name": "string",
875                                 "value": "mac"
876                             }
877                         },
878                         "interfaces": [
879                             {
880                                 "name": "Standard",
881                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
882                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
883                                 "operations": [
884                                     {
885                                         "name": "create",
886                                         "description": "Standard lifecycle create operation."
887                                     },
888                                     {
889                                         "name": "stop",
890                                         "description": "Standard lifecycle stop operation."
891                                     },
892                                     {
893                                         "name": "start",
894                                         "description": "Standard lifecycle start operation."
895                                     },
896                                     {
897                                         "name": "delete",
898                                         "description": "Standard lifecycle delete operation."
899                                     },
900                                     {
901                                         "name": "configure",
902                                         "description": "Standard lifecycle configure operation."
903                                     }
904                                 ]
905                             }
906                         ],
907                         "capabilities": [
908                             {
909                                 "name": "feature",
910                                 "type_name": "tosca.capabilities.Node"
911                             },
912                             {
913                                 "name": "forwarder",
914                                 "type_name": "tosca.capabilities.nfv.Forwarder"
915                             }
916                         ],
917                         "relationships": [
918                             {
919                                 "name": "virtualLink",
920                                 "source_requirement_index": 0,
921                                 "target_node_id": "ext_datanet_net_qtqzlx5dsthzs883hxjn6hyhd",
922                                 "target_capability_name": "feature"
923                             },
924                             {
925                                 "name": "virtualbinding",
926                                 "source_requirement_index": 1,
927                                 "target_node_id": "m6000_s_7qtzo5nuocyfmebc6kp9raq18",
928                                 "target_capability_name": "feature"
929                             },
930                             {
931                                 "name": "forwarder",
932                                 "source_requirement_index": 2,
933                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
934                                 "target_capability_name": "feature"
935                             }
936                         ]
937                     },
938                     {
939                         "id": "ext_mnet_net_au2otee5mcy0dnpqykj487zr3",
940                         "type_name": "tosca.nodes.nfv.ext.VL.Vmware",
941                         "template_name": "ext_mnet_net",
942                         "properties": {
943                             "name": {
944                                 "type_name": "string",
945                                 "value": "vlan_4008_mng_net"
946                             },
947                             "dhcp_enabled": {
948                                 "type_name": "boolean",
949                                 "value": True
950                             },
951                             "location_info": {
952                                 "type_name": "tosca.datatypes.nfv.ext.LocationInfo",
953                                 "value": {
954                                     "tenant": "admin",
955                                     "vimid": 2,
956                                     "availability_zone": "nova"
957                                 }
958                             },
959                             "ip_version": {
960                                 "type_name": "integer",
961                                 "value": 4
962                             },
963                             "mtu": {
964                                 "type_name": "integer",
965                                 "value": 1500
966                             },
967                             "network_name": {
968                                 "type_name": "string",
969                                 "value": "vlan_4008_mng_net"
970                             },
971                             "network_type": {
972                                 "type_name": "string",
973                                 "value": "vlan"
974                             }
975                         },
976                         "interfaces": [
977                             {
978                                 "name": "Standard",
979                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
980                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
981                                 "operations": [
982                                     {
983                                         "name": "create",
984                                         "description": "Standard lifecycle create operation."
985                                     },
986                                     {
987                                         "name": "stop",
988                                         "description": "Standard lifecycle stop operation."
989                                     },
990                                     {
991                                         "name": "start",
992                                         "description": "Standard lifecycle start operation."
993                                     },
994                                     {
995                                         "name": "delete",
996                                         "description": "Standard lifecycle delete operation."
997                                     },
998                                     {
999                                         "name": "configure",
1000                                         "description": "Standard lifecycle configure operation."
1001                                     }
1002                                 ]
1003                             }
1004                         ],
1005                         "capabilities": [
1006                             {
1007                                 "name": "feature",
1008                                 "type_name": "tosca.capabilities.Node"
1009                             },
1010                             {
1011                                 "name": "virtual_linkable",
1012                                 "type_name": "tosca.capabilities.nfv.VirtualLinkable"
1013                             }
1014                         ]
1015                     },
1016                     {
1017                         "id": "m6000_data_in_eldly5txw4frny3cc349uz3nc",
1018                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
1019                         "template_name": "m6000_data_in",
1020                         "properties": {
1021                             "direction": {
1022                                 "type_name": "string",
1023                                 "value": "bidirectional"
1024                             },
1025                             "vnic_type": {
1026                                 "type_name": "string",
1027                                 "value": "normal"
1028                             },
1029                             "bandwidth": {
1030                                 "type_name": "integer",
1031                                 "value": 0
1032                             },
1033                             "mac_address": {
1034                                 "type_name": "string",
1035                                 "value": "11-22-33-22-11-41"
1036                             },
1037                             "interface_name": {
1038                                 "type_name": "string",
1039                                 "value": "gei-0/4/0/7"
1040                             },
1041                             "ip_address": {
1042                                 "type_name": "string",
1043                                 "value": "1.1.1.1"
1044                             },
1045                             "order": {
1046                                 "type_name": "integer",
1047                                 "value": 0
1048                             },
1049                             "sfc_encapsulation": {
1050                                 "type_name": "string",
1051                                 "value": "mac"
1052                             },
1053                             "bond": {
1054                                 "type_name": "string",
1055                                 "value": "none"
1056                             }
1057                         },
1058                         "interfaces": [
1059                             {
1060                                 "name": "Standard",
1061                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1062                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1063                                 "operations": [
1064                                     {
1065                                         "name": "create",
1066                                         "description": "Standard lifecycle create operation."
1067                                     },
1068                                     {
1069                                         "name": "stop",
1070                                         "description": "Standard lifecycle stop operation."
1071                                     },
1072                                     {
1073                                         "name": "start",
1074                                         "description": "Standard lifecycle start operation."
1075                                     },
1076                                     {
1077                                         "name": "delete",
1078                                         "description": "Standard lifecycle delete operation."
1079                                     },
1080                                     {
1081                                         "name": "configure",
1082                                         "description": "Standard lifecycle configure operation."
1083                                     }
1084                                 ]
1085                             }
1086                         ],
1087                         "capabilities": [
1088                             {
1089                                 "name": "feature",
1090                                 "type_name": "tosca.capabilities.Node"
1091                             },
1092                             {
1093                                 "name": "forwarder",
1094                                 "type_name": "tosca.capabilities.nfv.Forwarder"
1095                             }
1096                         ],
1097                         "relationships": [
1098                             {
1099                                 "name": "virtualbinding",
1100                                 "source_requirement_index": 0,
1101                                 "target_node_id": "m6000_s_7qtzo5nuocyfmebc6kp9raq18",
1102                                 "target_capability_name": "feature"
1103                             },
1104                             {
1105                                 "name": "virtualLink",
1106                                 "source_requirement_index": 1,
1107                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
1108                                 "target_capability_name": "feature"
1109                             },
1110                             {
1111                                 "name": "forwarder",
1112                                 "source_requirement_index": 2,
1113                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
1114                                 "target_capability_name": "feature"
1115                             }
1116                         ]
1117                     },
1118                     {
1119                         "id": "ext_datanet_net_qtqzlx5dsthzs883hxjn6hyhd",
1120                         "type_name": "tosca.nodes.nfv.ext.VL.Vmware",
1121                         "template_name": "ext_datanet_net",
1122                         "properties": {
1123                             "name": {
1124                                 "type_name": "string",
1125                                 "value": "vlan_4004_tunnel_net"
1126                             },
1127                             "dhcp_enabled": {
1128                                 "type_name": "boolean",
1129                                 "value": True
1130                             },
1131                             "location_info": {
1132                                 "type_name": "tosca.datatypes.nfv.ext.LocationInfo",
1133                                 "value": {
1134                                     "tenant": "admin",
1135                                     "vimid": 2,
1136                                     "availability_zone": "nova"
1137                                 }
1138                             },
1139                             "ip_version": {
1140                                 "type_name": "integer",
1141                                 "value": 4
1142                             },
1143                             "mtu": {
1144                                 "type_name": "integer",
1145                                 "value": 1500
1146                             },
1147                             "network_name": {
1148                                 "type_name": "string",
1149                                 "value": "vlan_4004_tunnel_net"
1150                             },
1151                             "network_type": {
1152                                 "type_name": "string",
1153                                 "value": "vlan"
1154                             }
1155                         },
1156                         "interfaces": [
1157                             {
1158                                 "name": "Standard",
1159                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1160                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1161                                 "operations": [
1162                                     {
1163                                         "name": "create",
1164                                         "description": "Standard lifecycle create operation."
1165                                     },
1166                                     {
1167                                         "name": "stop",
1168                                         "description": "Standard lifecycle stop operation."
1169                                     },
1170                                     {
1171                                         "name": "start",
1172                                         "description": "Standard lifecycle start operation."
1173                                     },
1174                                     {
1175                                         "name": "delete",
1176                                         "description": "Standard lifecycle delete operation."
1177                                     },
1178                                     {
1179                                         "name": "configure",
1180                                         "description": "Standard lifecycle configure operation."
1181                                     }
1182                                 ]
1183                             }
1184                         ],
1185                         "capabilities": [
1186                             {
1187                                 "name": "feature",
1188                                 "type_name": "tosca.capabilities.Node"
1189                             },
1190                             {
1191                                 "name": "virtual_linkable",
1192                                 "type_name": "tosca.capabilities.nfv.VirtualLinkable"
1193                             }
1194                         ]
1195                     },
1196                     {
1197                         "id": "m600_mnt_cp_l3488y2a8ilyfdn0l89ni4os7",
1198                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
1199                         "template_name": "m600_mnt_cp",
1200                         "properties": {
1201                             "direction": {
1202                                 "type_name": "string",
1203                                 "value": "bidirectional"
1204                             },
1205                             "vnic_type": {
1206                                 "type_name": "string",
1207                                 "value": "normal"
1208                             },
1209                             "bandwidth": {
1210                                 "type_name": "integer",
1211                                 "value": 0
1212                             },
1213                             "mac_address": {
1214                                 "type_name": "string",
1215                                 "value": "00-11-00-22-33-11"
1216                             },
1217                             "interface_name": {
1218                                 "type_name": "string",
1219                                 "value": "gei-0/4/0/1"
1220                             },
1221                             "ip_address": {
1222                                 "type_name": "string",
1223                                 "value": "10.46.244.51"
1224                             },
1225                             "order": {
1226                                 "type_name": "integer",
1227                                 "value": 0
1228                             },
1229                             "sfc_encapsulation": {
1230                                 "type_name": "string",
1231                                 "value": "mac"
1232                             },
1233                             "bond": {
1234                                 "type_name": "string",
1235                                 "value": "none"
1236                             }
1237                         },
1238                         "interfaces": [
1239                             {
1240                                 "name": "Standard",
1241                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1242                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1243                                 "operations": [
1244                                     {
1245                                         "name": "create",
1246                                         "description": "Standard lifecycle create operation."
1247                                     },
1248                                     {
1249                                         "name": "stop",
1250                                         "description": "Standard lifecycle stop operation."
1251                                     },
1252                                     {
1253                                         "name": "start",
1254                                         "description": "Standard lifecycle start operation."
1255                                     },
1256                                     {
1257                                         "name": "delete",
1258                                         "description": "Standard lifecycle delete operation."
1259                                     },
1260                                     {
1261                                         "name": "configure",
1262                                         "description": "Standard lifecycle configure operation."
1263                                     }
1264                                 ]
1265                             }
1266                         ],
1267                         "capabilities": [
1268                             {
1269                                 "name": "feature",
1270                                 "type_name": "tosca.capabilities.Node"
1271                             },
1272                             {
1273                                 "name": "forwarder",
1274                                 "type_name": "tosca.capabilities.nfv.Forwarder"
1275                             }
1276                         ],
1277                         "relationships": [
1278                             {
1279                                 "name": "virtualLink",
1280                                 "source_requirement_index": 0,
1281                                 "target_node_id": "ext_mnet_net_au2otee5mcy0dnpqykj487zr3",
1282                                 "target_capability_name": "feature"
1283                             },
1284                             {
1285                                 "name": "virtualbinding",
1286                                 "source_requirement_index": 1,
1287                                 "target_node_id": "m6000_s_7qtzo5nuocyfmebc6kp9raq18",
1288                                 "target_capability_name": "feature"
1289                             },
1290                             {
1291                                 "name": "forwarder",
1292                                 "source_requirement_index": 2,
1293                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
1294                                 "target_capability_name": "feature"
1295                             }
1296                         ]
1297                     },
1298                     {
1299                         "id": "sfc_data_network_vx3pc1oahn0k0pa5q722yafee",
1300                         "type_name": "tosca.nodes.nfv.ext.zte.VL",
1301                         "template_name": "sfc_data_network",
1302                         "properties": {
1303                             "name": {
1304                                 "type_name": "string",
1305                                 "value": "sfc_data_network"
1306                             },
1307                             "dhcp_enabled": {
1308                                 "type_name": "boolean",
1309                                 "value": True
1310                             },
1311                             "is_predefined": {
1312                                 "type_name": "boolean",
1313                                 "value": False
1314                             },
1315                             "location_info": {
1316                                 "type_name": "tosca.datatypes.nfv.ext.LocationInfo",
1317                                 "value": {
1318                                     "tenant": "admin",
1319                                     "vimid": 2,
1320                                     "availability_zone": "nova"
1321                                 }
1322                             },
1323                             "ip_version": {
1324                                 "type_name": "integer",
1325                                 "value": 4
1326                             },
1327                             "mtu": {
1328                                 "type_name": "integer",
1329                                 "value": 1500
1330                             },
1331                             "network_name": {
1332                                 "type_name": "string",
1333                                 "value": "sfc_data_network"
1334                             },
1335                             "network_type": {
1336                                 "type_name": "string",
1337                                 "value": "vlan"
1338                             }
1339                         },
1340                         "interfaces": [
1341                             {
1342                                 "name": "Standard",
1343                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1344                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1345                                 "operations": [
1346                                     {
1347                                         "name": "create",
1348                                         "description": "Standard lifecycle create operation."
1349                                     },
1350                                     {
1351                                         "name": "stop",
1352                                         "description": "Standard lifecycle stop operation."
1353                                     },
1354                                     {
1355                                         "name": "start",
1356                                         "description": "Standard lifecycle start operation."
1357                                     },
1358                                     {
1359                                         "name": "delete",
1360                                         "description": "Standard lifecycle delete operation."
1361                                     },
1362                                     {
1363                                         "name": "configure",
1364                                         "description": "Standard lifecycle configure operation."
1365                                     }
1366                                 ]
1367                             }
1368                         ],
1369                         "capabilities": [
1370                             {
1371                                 "name": "feature",
1372                                 "type_name": "tosca.capabilities.Node"
1373                             },
1374                             {
1375                                 "name": "virtual_linkable",
1376                                 "type_name": "tosca.capabilities.nfv.VirtualLinkable"
1377                             }
1378                         ]
1379                     },
1380                     {
1381                         "id": "m6000_s_7qtzo5nuocyfmebc6kp9raq18",
1382                         "type_name": "tosca.nodes.nfv.ext.PNF",
1383                         "template_name": "m6000_s",
1384                         "properties": {
1385                             "vendor": {
1386                                 "type_name": "string",
1387                                 "value": "zte"
1388                             },
1389                             "request_reclassification": {
1390                                 "type_name": "boolean",
1391                                 "value": False
1392                             },
1393                             "pnf_type": {
1394                                 "type_name": "string",
1395                                 "value": "m6000s"
1396                             },
1397                             "version": {
1398                                 "type_name": "string",
1399                                 "value": "1.0"
1400                             },
1401                             "management_address": {
1402                                 "type_name": "string",
1403                                 "value": "111111"
1404                             },
1405                             "id": {
1406                                 "type_name": "string",
1407                                 "value": "m6000_s"
1408                             },
1409                             "nsh_aware": {
1410                                 "type_name": "boolean",
1411                                 "value": False
1412                             }
1413                         },
1414                         "interfaces": [
1415                             {
1416                                 "name": "Standard",
1417                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1418                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1419                                 "operations": [
1420                                     {
1421                                         "name": "create",
1422                                         "description": "Standard lifecycle create operation."
1423                                     },
1424                                     {
1425                                         "name": "stop",
1426                                         "description": "Standard lifecycle stop operation."
1427                                     },
1428                                     {
1429                                         "name": "start",
1430                                         "description": "Standard lifecycle start operation."
1431                                     },
1432                                     {
1433                                         "name": "delete",
1434                                         "description": "Standard lifecycle delete operation."
1435                                     },
1436                                     {
1437                                         "name": "configure",
1438                                         "description": "Standard lifecycle configure operation."
1439                                     }
1440                                 ]
1441                             }
1442                         ],
1443                         "capabilities": [
1444                             {
1445                                 "name": "feature",
1446                                 "type_name": "tosca.capabilities.Node"
1447                             },
1448                             {
1449                                 "name": "virtualBinding",
1450                                 "type_name": "tosca.capabilities.nfv.VirtualBindable"
1451                             },
1452                             {
1453                                 "name": "forwarder",
1454                                 "type_name": "tosca.capabilities.nfv.Forwarder"
1455                             }
1456                         ],
1457                         "relationships": [
1458                             {
1459                                 "name": "forwarder",
1460                                 "source_requirement_index": 0,
1461                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
1462                                 "target_capability_name": "feature"
1463                             }
1464                         ]
1465                     },
1466                     {
1467                         "id": "VNAT_cfdljtspvkp234irka59wgab0",
1468                         "type_name": "tosca.nodes.nfv.ext.zte.VNF.VNAT",
1469                         "template_name": "VNAT",
1470                         "properties": {
1471                             "is_shared": {
1472                                 "type_name": "boolean",
1473                                 "value": False
1474                             },
1475                             "plugin_info": {
1476                                 "type_name": "string",
1477                                 "value": "vbrasplugin_1.0"
1478                             },
1479                             "vendor": {
1480                                 "type_name": "string",
1481                                 "value": "zte"
1482                             },
1483                             "request_reclassification": {
1484                                 "type_name": "boolean",
1485                                 "value": False
1486                             },
1487                             "name": {
1488                                 "type_name": "string",
1489                                 "value": "VNAT"
1490                             },
1491                             "vnf_extend_type": {
1492                                 "type_name": "string",
1493                                 "value": "driver"
1494                             },
1495                             "externalPluginManageNetworkName": {
1496                                 "type_name": "string",
1497                                 "value": "vlan_4007_plugin_net"
1498                             },
1499                             "version": {
1500                                 "type_name": "string",
1501                                 "value": "1.0"
1502                             },
1503                             "cross_dc": {
1504                                 "type_name": "boolean",
1505                                 "value": False
1506                             },
1507                             "vnf_type": {
1508                                 "type_name": "string",
1509                                 "value": "VNAT"
1510                             },
1511                             "vnfd_version": {
1512                                 "type_name": "string",
1513                                 "value": "1.0.0"
1514                             },
1515                             "id": {
1516                                 "type_name": "string",
1517                                 "value": "vcpe_vnat_zte_1"
1518                             },
1519                             "nsh_aware": {
1520                                 "type_name": "boolean",
1521                                 "value": True
1522                             },
1523                             "adjust_vnf_capacity": {
1524                                 "type_name": "boolean",
1525                                 "value": True
1526                             },
1527                             "vmnumber_overquota_alarm": {
1528                                 "type_name": "boolean",
1529                                 "value": True
1530                             },
1531                             "csarProvider": {
1532                                 "type_name": "string",
1533                                 "value": "ZTE"
1534                             },
1535                             "NatIpRange": {
1536                                 "type_name": "string",
1537                                 "value": "192.167.0.10-192.168.0.20"
1538                             },
1539                             "csarVersion": {
1540                                 "type_name": "string",
1541                                 "value": "v1.0"
1542                             },
1543                             "csarType": {
1544                                 "type_name": "string",
1545                                 "value": "NFAR"
1546                             }
1547                         },
1548                         "interfaces": [
1549                             {
1550                                 "name": "Standard",
1551                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1552                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1553                                 "operations": [
1554                                     {
1555                                         "name": "create",
1556                                         "description": "Standard lifecycle create operation."
1557                                     },
1558                                     {
1559                                         "name": "stop",
1560                                         "description": "Standard lifecycle stop operation."
1561                                     },
1562                                     {
1563                                         "name": "start",
1564                                         "description": "Standard lifecycle start operation."
1565                                     },
1566                                     {
1567                                         "name": "delete",
1568                                         "description": "Standard lifecycle delete operation."
1569                                     },
1570                                     {
1571                                         "name": "configure",
1572                                         "description": "Standard lifecycle configure operation."
1573                                     }
1574                                 ]
1575                             }
1576                         ],
1577                         "capabilities": [
1578                             {
1579                                 "name": "feature",
1580                                 "type_name": "tosca.capabilities.Node"
1581                             },
1582                             {
1583                                 "name": "forwarder",
1584                                 "type_name": "tosca.capabilities.nfv.Forwarder"
1585                             },
1586                             {
1587                                 "name": "vnat_fw_inout",
1588                                 "type_name": "tosca.capabilities.nfv.Forwarder"
1589                             }
1590                         ],
1591                         "relationships": [
1592                             {
1593                                 "name": "vnat_ctrl_by_manager_cp",
1594                                 "source_requirement_index": 0,
1595                                 "target_node_id": "ext_mnet_net_au2otee5mcy0dnpqykj487zr3",
1596                                 "target_capability_name": "feature"
1597                             },
1598                             {
1599                                 "name": "vnat_data_cp",
1600                                 "source_requirement_index": 1,
1601                                 "target_node_id": "sfc_data_network_vx3pc1oahn0k0pa5q722yafee",
1602                                 "target_capability_name": "feature"
1603                             },
1604                             {
1605                                 "name": "virtualLink",
1606                                 "source_requirement_index": 2,
1607                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
1608                                 "target_capability_name": "feature"
1609                             },
1610                             {
1611                                 "name": "forwarder",
1612                                 "source_requirement_index": 3,
1613                                 "target_node_id": "path2_kgmfqr5ldqs9lj3oscrgxqefc",
1614                                 "target_capability_name": "feature"
1615                             }
1616                         ]
1617                     }
1618                 ],
1619                 "groups": [
1620                     {
1621                         "id": "vnffg1_wk1aqhk6exoh5fmds2unu0uyc",
1622                         "type_name": "tosca.groups.nfv.VNFFG",
1623                         "template_name": "vnffg1",
1624                         "properties": {
1625                             "vendor": {
1626                                 "type_name": "string",
1627                                 "value": "zte"
1628                             },
1629                             "connection_point": {
1630                                 "type_name": "list",
1631                                 "value": [
1632                                     "m6000_data_in",
1633                                     "m600_tunnel_cp",
1634                                     "m6000_data_out"
1635                                 ]
1636                             },
1637                             "version": {
1638                                 "type_name": "string",
1639                                 "value": "1.0"
1640                             },
1641                             "constituent_vnfs": {
1642                                 "type_name": "list",
1643                                 "value": [
1644                                     "VFW",
1645                                     "VNAT"
1646                                 ]
1647                             },
1648                             "number_of_endpoints": {
1649                                 "type_name": "integer",
1650                                 "value": 3
1651                             },
1652                             "dependent_virtual_link": {
1653                                 "type_name": "list",
1654                                 "value": [
1655                                     "sfc_data_network",
1656                                     "ext_datanet_net",
1657                                     "ext_mnet_net"
1658                                 ]
1659                             }
1660                         },
1661                         "interfaces": [
1662                             {
1663                                 "name": "standard",
1664                                 "description": "This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.",
1665                                 "type_name": "tosca.interfaces.node.lifecycle.Standard",
1666                                 "operations": [
1667                                     {
1668                                         "name": "create",
1669                                         "description": "Standard lifecycle create operation."
1670                                     },
1671                                     {
1672                                         "name": "stop",
1673                                         "description": "Standard lifecycle stop operation."
1674                                     },
1675                                     {
1676                                         "name": "start",
1677                                         "description": "Standard lifecycle start operation."
1678                                     },
1679                                     {
1680                                         "name": "delete",
1681                                         "description": "Standard lifecycle delete operation."
1682                                     },
1683                                     {
1684                                         "name": "configure",
1685                                         "description": "Standard lifecycle configure operation."
1686                                     }
1687                                 ]
1688                             }
1689                         ],
1690                         "member_node_ids": [
1691                             "path1_bv53fblv26hawr8dj4fxe2rsd",
1692                             "path2_kgmfqr5ldqs9lj3oscrgxqefc"
1693                         ]
1694                     }
1695                 ],
1696                 "substitution": {
1697                     "node_type_name": "tosca.nodes.nfv.NS.VCPE_NS"
1698                 },
1699                 "inputs": {
1700                     "externalDataNetworkName": {
1701                         "type_name": "string",
1702                         "value": "vlan_4004_tunnel_net"
1703                     },
1704                     "sfc_data_network": {
1705                         "type_name": "string",
1706                         "value": "sfc_data_network"
1707                     },
1708                     "NatIpRange": {
1709                         "type_name": "string",
1710                         "value": "192.167.0.10-192.168.0.20"
1711                     },
1712                     "externalManageNetworkName": {
1713                         "type_name": "string",
1714                         "value": "vlan_4008_mng_net"
1715                     },
1716                     "externalPluginManageNetworkName": {
1717                         "type_name": "string",
1718                         "value": "vlan_4007_plugin_net"
1719                     }
1720                 }
1721             },
1722             "model": {
1723                 "metadata": {
1724                     "vendor": "ZTE",
1725                     "name": "VCPE_NS",
1726                     "csarVersion": "v1.0",
1727                     "csarType": "NSAR",
1728                     "csarProvider": "ZTE",
1729                     "version": 1,
1730                     "invariant_id": "vcpe_ns_sff_1",
1731                     "id": "VCPE_NS",
1732                     "description": "vcpe_ns"
1733                 },
1734                 "node_templates": [
1735                     {
1736                         "name": "path2",
1737                         "type_name": "tosca.nodes.nfv.ext.FP",
1738                         "default_instances": 1,
1739                         "min_instances": 0,
1740                         "properties": {
1741                             "symmetric": {
1742                                 "type_name": "boolean",
1743                                 "value": False
1744                             },
1745                             "policy": {
1746                                 "type_name": "tosca.datatypes.nfv.ext.FPPolicy",
1747                                 "value": {
1748                                     "type": "ACL",
1749                                     "criteria": {
1750                                         "dest_port_range": "1-100",
1751                                         "ip_protocol": "tcp",
1752                                         "source_ip_range": [
1753                                             "119.1.1.1-119.1.1.10"
1754                                         ],
1755                                         "dest_ip_range": [
1756                                             {
1757                                                 "get_input": "NatIpRange"
1758                                             }
1759                                         ],
1760                                         "dscp": 0,
1761                                         "source_port_range": "1-100"
1762                                     }
1763                                 }
1764                             }
1765                         },
1766                         "interface_templates": [
1767                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ed0288a10>"
1768                         ],
1769                         "capability_templates": [
1770                             {
1771                                 "name": "feature",
1772                                 "type_name": "tosca.capabilities.Node"
1773                             }
1774                         ],
1775                         "requirement_templates": [
1776                             {
1777                                 "name": "forwarder",
1778                                 "target_node_template_name": "m6000_data_out"
1779                             },
1780                             {
1781                                 "name": "forwarder",
1782                                 "target_node_template_name": "m600_tunnel_cp"
1783                             },
1784                             {
1785                                 "name": "forwarder",
1786                                 "target_node_template_name": "VNAT",
1787                                 "target_capability_name": "vnat_fw_inout"
1788                             }
1789                         ]
1790                     },
1791                     {
1792                         "name": "path1",
1793                         "type_name": "tosca.nodes.nfv.ext.FP",
1794                         "default_instances": 1,
1795                         "min_instances": 0,
1796                         "properties": {
1797                             "symmetric": {
1798                                 "type_name": "boolean",
1799                                 "value": True
1800                             },
1801                             "policy": {
1802                                 "type_name": "tosca.datatypes.nfv.ext.FPPolicy",
1803                                 "value": {
1804                                     "type": "ACL",
1805                                     "criteria": {
1806                                         "dest_port_range": "1-100",
1807                                         "ip_protocol": "tcp",
1808                                         "source_ip_range": [
1809                                             "1-100"
1810                                         ],
1811                                         "dest_ip_range": [
1812                                             "1-100"
1813                                         ],
1814                                         "dscp": 4,
1815                                         "source_port_range": "1-100"
1816                                     }
1817                                 }
1818                             }
1819                         },
1820                         "interface_templates": [
1821                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec81df090>"
1822                         ],
1823                         "capability_templates": [
1824                             {
1825                                 "name": "feature",
1826                                 "type_name": "tosca.capabilities.Node"
1827                             }
1828                         ],
1829                         "requirement_templates": [
1830                             {
1831                                 "name": "forwarder",
1832                                 "target_node_template_name": "m6000_data_in"
1833                             },
1834                             {
1835                                 "name": "forwarder",
1836                                 "target_node_template_name": "m600_tunnel_cp"
1837                             },
1838                             {
1839                                 "name": "forwarder",
1840                                 "target_node_template_name": "VFW",
1841                                 "target_capability_name": "vfw_fw_inout"
1842                             },
1843                             {
1844                                 "name": "forwarder",
1845                                 "target_node_template_name": "VNAT",
1846                                 "target_capability_name": "vnat_fw_inout"
1847                             },
1848                             {
1849                                 "name": "forwarder",
1850                                 "target_node_template_name": "m600_tunnel_cp"
1851                             },
1852                             {
1853                                 "name": "forwarder",
1854                                 "target_node_template_name": "m6000_data_out"
1855                             }
1856                         ]
1857                     },
1858                     {
1859                         "name": "m6000_data_out",
1860                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
1861                         "default_instances": 1,
1862                         "min_instances": 0,
1863                         "properties": {
1864                             "direction": {
1865                                 "type_name": "string",
1866                                 "value": "bidirectional"
1867                             },
1868                             "vnic_type": {
1869                                 "type_name": "string",
1870                                 "value": "normal"
1871                             },
1872                             "bandwidth": {
1873                                 "type_name": "integer",
1874                                 "value": 0
1875                             },
1876                             "mac_address": {
1877                                 "type_name": "string",
1878                                 "value": "11-22-33-22-11-44"
1879                             },
1880                             "interface_name": {
1881                                 "type_name": "string",
1882                                 "value": "xgei-0/4/1/5"
1883                             },
1884                             "ip_address": {
1885                                 "type_name": "string",
1886                                 "value": "176.1.1.2"
1887                             },
1888                             "order": {
1889                                 "type_name": "integer",
1890                                 "value": 0
1891                             },
1892                             "sfc_encapsulation": {
1893                                 "type_name": "string",
1894                                 "value": "mac"
1895                             }
1896                         },
1897                         "interface_templates": [
1898                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec82c6610>"
1899                         ],
1900                         "capability_templates": [
1901                             {
1902                                 "name": "feature",
1903                                 "type_name": "tosca.capabilities.Node"
1904                             },
1905                             {
1906                                 "name": "forwarder",
1907                                 "type_name": "tosca.capabilities.nfv.Forwarder"
1908                             }
1909                         ],
1910                         "requirement_templates": [
1911                             {
1912                                 "name": "virtualbinding",
1913                                 "target_node_template_name": "m6000_s",
1914                                 "target_capability_name": "virtualBinding"
1915                             },
1916                             {
1917                                 "name": "virtualLink",
1918                                 "target_node_type_name": "tosca.nodes.Root"
1919                             },
1920                             {
1921                                 "name": "forwarder",
1922                                 "target_node_type_name": "tosca.nodes.Root"
1923                             }
1924                         ]
1925                     },
1926                     {
1927                         "name": "VFW",
1928                         "type_name": "tosca.nodes.nfv.ext.zte.VNF.VFW",
1929                         "default_instances": 1,
1930                         "min_instances": 0,
1931                         "properties": {
1932                             "is_shared": {
1933                                 "type_name": "boolean",
1934                                 "value": False
1935                             },
1936                             "plugin_info": {
1937                                 "type_name": "string",
1938                                 "value": "vbrasplugin_1.0"
1939                             },
1940                             "vendor": {
1941                                 "type_name": "string",
1942                                 "value": "zte"
1943                             },
1944                             "request_reclassification": {
1945                                 "type_name": "boolean",
1946                                 "value": False
1947                             },
1948                             "vnf_extend_type": {
1949                                 "type_name": "string",
1950                                 "value": "driver"
1951                             },
1952                             "name": {
1953                                 "type_name": "string",
1954                                 "value": "VFW"
1955                             },
1956                             "version": {
1957                                 "type_name": "string",
1958                                 "value": "1.0"
1959                             },
1960                             "cross_dc": {
1961                                 "type_name": "boolean",
1962                                 "value": False
1963                             },
1964                             "vnf_type": {
1965                                 "type_name": "string",
1966                                 "value": "VFW"
1967                             },
1968                             "vnfd_version": {
1969                                 "type_name": "string",
1970                                 "value": "1.0.0"
1971                             },
1972                             "id": {
1973                                 "type_name": "string",
1974                                 "value": "vcpe_vfw_zte_1_0"
1975                             },
1976                             "nsh_aware": {
1977                                 "type_name": "boolean",
1978                                 "value": True
1979                             },
1980                             "adjust_vnf_capacity": {
1981                                 "type_name": "boolean",
1982                                 "value": True
1983                             },
1984                             "vmnumber_overquota_alarm": {
1985                                 "type_name": "boolean",
1986                                 "value": True
1987                             },
1988                             "csarProvider": {
1989                                 "type_name": "string",
1990                                 "value": "ZTE"
1991                             },
1992                             "csarVersion": {
1993                                 "type_name": "string",
1994                                 "value": "v1.0"
1995                             },
1996                             "externalPluginManageNetworkName": {
1997                                 "type_name": "string",
1998                                 "value": "vlan_4007_plugin_net"
1999                             },
2000                             "csarType": {
2001                                 "type_name": "string",
2002                                 "value": "NFAR"
2003                             }
2004                         },
2005                         "interface_templates": [
2006                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec8281950>"
2007                         ],
2008                         "capability_templates": [
2009                             {
2010                                 "name": "feature",
2011                                 "type_name": "tosca.capabilities.Node"
2012                             },
2013                             {
2014                                 "name": "forwarder",
2015                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2016                             },
2017                             {
2018                                 "name": "vfw_fw_inout",
2019                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2020                             }
2021                         ],
2022                         "requirement_templates": [
2023                             {
2024                                 "name": "vfw_ctrl_by_manager_cp",
2025                                 "target_node_template_name": "ext_mnet_net",
2026                                 "target_capability_name": "virtual_linkable"
2027                             },
2028                             {
2029                                 "name": "vfw_data_cp",
2030                                 "target_node_template_name": "sfc_data_network",
2031                                 "target_capability_name": "virtual_linkable"
2032                             },
2033                             {
2034                                 "name": "virtualLink",
2035                                 "target_node_type_name": "tosca.nodes.Root"
2036                             },
2037                             {
2038                                 "name": "forwarder",
2039                                 "target_node_type_name": "tosca.nodes.Root"
2040                             }
2041                         ]
2042                     },
2043                     {
2044                         "name": "m600_tunnel_cp",
2045                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
2046                         "default_instances": 1,
2047                         "min_instances": 0,
2048                         "properties": {
2049                             "direction": {
2050                                 "type_name": "string",
2051                                 "value": "bidirectional"
2052                             },
2053                             "vnic_type": {
2054                                 "type_name": "string",
2055                                 "value": "normal"
2056                             },
2057                             "bandwidth": {
2058                                 "type_name": "integer",
2059                                 "value": 0
2060                             },
2061                             "mac_address": {
2062                                 "type_name": "string",
2063                                 "value": "00-11-00-22-33-00"
2064                             },
2065                             "interface_name": {
2066                                 "type_name": "string",
2067                                 "value": "gei-0/4/0/13"
2068                             },
2069                             "ip_address": {
2070                                 "type_name": "string",
2071                                 "value": "191.167.100.5"
2072                             },
2073                             "order": {
2074                                 "type_name": "integer",
2075                                 "value": 0
2076                             },
2077                             "sfc_encapsulation": {
2078                                 "type_name": "string",
2079                                 "value": "mac"
2080                             }
2081                         },
2082                         "interface_templates": [
2083                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x1ae39d0>"
2084                         ],
2085                         "capability_templates": [
2086                             {
2087                                 "name": "feature",
2088                                 "type_name": "tosca.capabilities.Node"
2089                             },
2090                             {
2091                                 "name": "forwarder",
2092                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2093                             }
2094                         ],
2095                         "requirement_templates": [
2096                             {
2097                                 "name": "virtualLink",
2098                                 "target_node_template_name": "ext_datanet_net",
2099                                 "target_capability_name": "virtual_linkable"
2100                             },
2101                             {
2102                                 "name": "virtualbinding",
2103                                 "target_node_template_name": "m6000_s",
2104                                 "target_capability_name": "virtualBinding"
2105                             },
2106                             {
2107                                 "name": "forwarder",
2108                                 "target_node_type_name": "tosca.nodes.Root"
2109                             }
2110                         ]
2111                     },
2112                     {
2113                         "name": "ext_mnet_net",
2114                         "type_name": "tosca.nodes.nfv.ext.VL.Vmware",
2115                         "default_instances": 1,
2116                         "min_instances": 0,
2117                         "properties": {
2118                             "name": {
2119                                 "type_name": "string",
2120                                 "value": "vlan_4008_mng_net"
2121                             },
2122                             "dhcp_enabled": {
2123                                 "type_name": "boolean",
2124                                 "value": True
2125                             },
2126                             "location_info": {
2127                                 "type_name": "tosca.datatypes.nfv.ext.LocationInfo",
2128                                 "value": {
2129                                     "tenant": "admin",
2130                                     "vimid": 2,
2131                                     "availability_zone": "nova"
2132                                 }
2133                             },
2134                             "ip_version": {
2135                                 "type_name": "integer",
2136                                 "value": 4
2137                             },
2138                             "mtu": {
2139                                 "type_name": "integer",
2140                                 "value": 1500
2141                             },
2142                             "network_name": {
2143                                 "type_name": "string",
2144                                 "value": "vlan_4008_mng_net"
2145                             },
2146                             "network_type": {
2147                                 "type_name": "string",
2148                                 "value": "vlan"
2149                             }
2150                         },
2151                         "interface_templates": [
2152                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ed00f89d0>"
2153                         ],
2154                         "capability_templates": [
2155                             {
2156                                 "name": "feature",
2157                                 "type_name": "tosca.capabilities.Node"
2158                             },
2159                             {
2160                                 "name": "virtual_linkable",
2161                                 "type_name": "tosca.capabilities.nfv.VirtualLinkable"
2162                             }
2163                         ]
2164                     },
2165                     {
2166                         "name": "m6000_data_in",
2167                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
2168                         "default_instances": 1,
2169                         "min_instances": 0,
2170                         "properties": {
2171                             "direction": {
2172                                 "type_name": "string",
2173                                 "value": "bidirectional"
2174                             },
2175                             "vnic_type": {
2176                                 "type_name": "string",
2177                                 "value": "normal"
2178                             },
2179                             "bandwidth": {
2180                                 "type_name": "integer",
2181                                 "value": 0
2182                             },
2183                             "mac_address": {
2184                                 "type_name": "string",
2185                                 "value": "11-22-33-22-11-41"
2186                             },
2187                             "interface_name": {
2188                                 "type_name": "string",
2189                                 "value": "gei-0/4/0/7"
2190                             },
2191                             "ip_address": {
2192                                 "type_name": "string",
2193                                 "value": "1.1.1.1"
2194                             },
2195                             "order": {
2196                                 "type_name": "integer",
2197                                 "value": 0
2198                             },
2199                             "sfc_encapsulation": {
2200                                 "type_name": "string",
2201                                 "value": "mac"
2202                             },
2203                             "bond": {
2204                                 "type_name": "string",
2205                                 "value": "none"
2206                             }
2207                         },
2208                         "interface_templates": [
2209                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x1745710>"
2210                         ],
2211                         "capability_templates": [
2212                             {
2213                                 "name": "feature",
2214                                 "type_name": "tosca.capabilities.Node"
2215                             },
2216                             {
2217                                 "name": "forwarder",
2218                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2219                             }
2220                         ],
2221                         "requirement_templates": [
2222                             {
2223                                 "name": "virtualbinding",
2224                                 "target_node_template_name": "m6000_s",
2225                                 "target_capability_name": "virtualBinding"
2226                             },
2227                             {
2228                                 "name": "virtualLink",
2229                                 "target_node_type_name": "tosca.nodes.Root"
2230                             },
2231                             {
2232                                 "name": "forwarder",
2233                                 "target_node_type_name": "tosca.nodes.Root"
2234                             }
2235                         ]
2236                     },
2237                     {
2238                         "name": "ext_datanet_net",
2239                         "type_name": "tosca.nodes.nfv.ext.VL.Vmware",
2240                         "default_instances": 1,
2241                         "min_instances": 0,
2242                         "properties": {
2243                             "name": {
2244                                 "type_name": "string",
2245                                 "value": "vlan_4004_tunnel_net"
2246                             },
2247                             "dhcp_enabled": {
2248                                 "type_name": "boolean",
2249                                 "value": True
2250                             },
2251                             "location_info": {
2252                                 "type_name": "tosca.datatypes.nfv.ext.LocationInfo",
2253                                 "value": {
2254                                     "tenant": "admin",
2255                                     "vimid": 2,
2256                                     "availability_zone": "nova"
2257                                 }
2258                             },
2259                             "ip_version": {
2260                                 "type_name": "integer",
2261                                 "value": 4
2262                             },
2263                             "mtu": {
2264                                 "type_name": "integer",
2265                                 "value": 1500
2266                             },
2267                             "network_name": {
2268                                 "type_name": "string",
2269                                 "value": "vlan_4004_tunnel_net"
2270                             },
2271                             "network_type": {
2272                                 "type_name": "string",
2273                                 "value": "vlan"
2274                             }
2275                         },
2276                         "interface_templates": [
2277                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8eac063990>"
2278                         ],
2279                         "capability_templates": [
2280                             {
2281                                 "name": "feature",
2282                                 "type_name": "tosca.capabilities.Node"
2283                             },
2284                             {
2285                                 "name": "virtual_linkable",
2286                                 "type_name": "tosca.capabilities.nfv.VirtualLinkable"
2287                             }
2288                         ]
2289                     },
2290                     {
2291                         "name": "m600_mnt_cp",
2292                         "type_name": "tosca.nodes.nfv.ext.zte.CP",
2293                         "default_instances": 1,
2294                         "min_instances": 0,
2295                         "properties": {
2296                             "direction": {
2297                                 "type_name": "string",
2298                                 "value": "bidirectional"
2299                             },
2300                             "vnic_type": {
2301                                 "type_name": "string",
2302                                 "value": "normal"
2303                             },
2304                             "bandwidth": {
2305                                 "type_name": "integer",
2306                                 "value": 0
2307                             },
2308                             "mac_address": {
2309                                 "type_name": "string",
2310                                 "value": "00-11-00-22-33-11"
2311                             },
2312                             "interface_name": {
2313                                 "type_name": "string",
2314                                 "value": "gei-0/4/0/1"
2315                             },
2316                             "ip_address": {
2317                                 "type_name": "string",
2318                                 "value": "10.46.244.51"
2319                             },
2320                             "order": {
2321                                 "type_name": "integer",
2322                                 "value": 0
2323                             },
2324                             "sfc_encapsulation": {
2325                                 "type_name": "string",
2326                                 "value": "mac"
2327                             },
2328                             "bond": {
2329                                 "type_name": "string",
2330                                 "value": "none"
2331                             }
2332                         },
2333                         "interface_templates": [
2334                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec81264d0>"
2335                         ],
2336                         "capability_templates": [
2337                             {
2338                                 "name": "feature",
2339                                 "type_name": "tosca.capabilities.Node"
2340                             },
2341                             {
2342                                 "name": "forwarder",
2343                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2344                             }
2345                         ],
2346                         "requirement_templates": [
2347                             {
2348                                 "name": "virtualLink",
2349                                 "target_node_template_name": "ext_mnet_net",
2350                                 "target_capability_name": "virtual_linkable"
2351                             },
2352                             {
2353                                 "name": "virtualbinding",
2354                                 "target_node_template_name": "m6000_s",
2355                                 "target_capability_name": "virtualBinding"
2356                             },
2357                             {
2358                                 "name": "forwarder",
2359                                 "target_node_type_name": "tosca.nodes.Root"
2360                             }
2361                         ]
2362                     },
2363                     {
2364                         "name": "sfc_data_network",
2365                         "type_name": "tosca.nodes.nfv.ext.zte.VL",
2366                         "default_instances": 1,
2367                         "min_instances": 0,
2368                         "properties": {
2369                             "name": {
2370                                 "type_name": "string",
2371                                 "value": "sfc_data_network"
2372                             },
2373                             "dhcp_enabled": {
2374                                 "type_name": "boolean",
2375                                 "value": True
2376                             },
2377                             "is_predefined": {
2378                                 "type_name": "boolean",
2379                                 "value": False
2380                             },
2381                             "location_info": {
2382                                 "type_name": "tosca.datatypes.nfv.ext.LocationInfo",
2383                                 "value": {
2384                                     "tenant": "admin",
2385                                     "vimid": 2,
2386                                     "availability_zone": "nova"
2387                                 }
2388                             },
2389                             "ip_version": {
2390                                 "type_name": "integer",
2391                                 "value": 4
2392                             },
2393                             "mtu": {
2394                                 "type_name": "integer",
2395                                 "value": 1500
2396                             },
2397                             "network_name": {
2398                                 "type_name": "string",
2399                                 "value": "sfc_data_network"
2400                             },
2401                             "network_type": {
2402                                 "type_name": "string",
2403                                 "value": "vlan"
2404                             }
2405                         },
2406                         "interface_templates": [
2407                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec813c6d0>"
2408                         ],
2409                         "capability_templates": [
2410                             {
2411                                 "name": "feature",
2412                                 "type_name": "tosca.capabilities.Node"
2413                             },
2414                             {
2415                                 "name": "virtual_linkable",
2416                                 "type_name": "tosca.capabilities.nfv.VirtualLinkable"
2417                             }
2418                         ]
2419                     },
2420                     {
2421                         "name": "m6000_s",
2422                         "type_name": "tosca.nodes.nfv.ext.PNF",
2423                         "default_instances": 1,
2424                         "min_instances": 0,
2425                         "properties": {
2426                             "vendor": {
2427                                 "type_name": "string",
2428                                 "value": "zte"
2429                             },
2430                             "request_reclassification": {
2431                                 "type_name": "boolean",
2432                                 "value": False
2433                             },
2434                             "pnf_type": {
2435                                 "type_name": "string",
2436                                 "value": "m6000s"
2437                             },
2438                             "version": {
2439                                 "type_name": "string",
2440                                 "value": "1.0"
2441                             },
2442                             "management_address": {
2443                                 "type_name": "string",
2444                                 "value": "111111"
2445                             },
2446                             "id": {
2447                                 "type_name": "string",
2448                                 "value": "m6000_s"
2449                             },
2450                             "nsh_aware": {
2451                                 "type_name": "boolean",
2452                                 "value": False
2453                             }
2454                         },
2455                         "interface_templates": [
2456                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec8132490>"
2457                         ],
2458                         "capability_templates": [
2459                             {
2460                                 "name": "feature",
2461                                 "type_name": "tosca.capabilities.Node"
2462                             },
2463                             {
2464                                 "name": "virtualBinding",
2465                                 "type_name": "tosca.capabilities.nfv.VirtualBindable"
2466                             },
2467                             {
2468                                 "name": "forwarder",
2469                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2470                             }
2471                         ],
2472                         "requirement_templates": [
2473                             {
2474                                 "name": "forwarder",
2475                                 "target_node_type_name": "tosca.nodes.Root"
2476                             }
2477                         ]
2478                     },
2479                     {
2480                         "name": "VNAT",
2481                         "type_name": "tosca.nodes.nfv.ext.zte.VNF.VNAT",
2482                         "default_instances": 1,
2483                         "min_instances": 0,
2484                         "properties": {
2485                             "is_shared": {
2486                                 "type_name": "boolean",
2487                                 "value": False
2488                             },
2489                             "plugin_info": {
2490                                 "type_name": "string",
2491                                 "value": "vbrasplugin_1.0"
2492                             },
2493                             "vendor": {
2494                                 "type_name": "string",
2495                                 "value": "zte"
2496                             },
2497                             "request_reclassification": {
2498                                 "type_name": "boolean",
2499                                 "value": False
2500                             },
2501                             "name": {
2502                                 "type_name": "string",
2503                                 "value": "VNAT"
2504                             },
2505                             "vnf_extend_type": {
2506                                 "type_name": "string",
2507                                 "value": "driver"
2508                             },
2509                             "externalPluginManageNetworkName": {
2510                                 "type_name": "string",
2511                                 "value": "vlan_4007_plugin_net"
2512                             },
2513                             "version": {
2514                                 "type_name": "string",
2515                                 "value": "1.0"
2516                             },
2517                             "cross_dc": {
2518                                 "type_name": "boolean",
2519                                 "value": False
2520                             },
2521                             "vnf_type": {
2522                                 "type_name": "string",
2523                                 "value": "VNAT"
2524                             },
2525                             "vnfd_version": {
2526                                 "type_name": "string",
2527                                 "value": "1.0.0"
2528                             },
2529                             "id": {
2530                                 "type_name": "string",
2531                                 "value": "vcpe_vnat_zte_1"
2532                             },
2533                             "nsh_aware": {
2534                                 "type_name": "boolean",
2535                                 "value": True
2536                             },
2537                             "adjust_vnf_capacity": {
2538                                 "type_name": "boolean",
2539                                 "value": True
2540                             },
2541                             "vmnumber_overquota_alarm": {
2542                                 "type_name": "boolean",
2543                                 "value": True
2544                             },
2545                             "csarProvider": {
2546                                 "type_name": "string",
2547                                 "value": "ZTE"
2548                             },
2549                             "NatIpRange": {
2550                                 "type_name": "string",
2551                                 "value": "192.167.0.10-192.168.0.20"
2552                             },
2553                             "csarVersion": {
2554                                 "type_name": "string",
2555                                 "value": "v1.0"
2556                             },
2557                             "csarType": {
2558                                 "type_name": "string",
2559                                 "value": "NFAR"
2560                             }
2561                         },
2562                         "interface_templates": [
2563                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x1bba810>"
2564                         ],
2565                         "capability_templates": [
2566                             {
2567                                 "name": "feature",
2568                                 "type_name": "tosca.capabilities.Node"
2569                             },
2570                             {
2571                                 "name": "forwarder",
2572                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2573                             },
2574                             {
2575                                 "name": "vnat_fw_inout",
2576                                 "type_name": "tosca.capabilities.nfv.Forwarder"
2577                             }
2578                         ],
2579                         "requirement_templates": [
2580                             {
2581                                 "name": "vnat_ctrl_by_manager_cp",
2582                                 "target_node_template_name": "ext_mnet_net",
2583                                 "target_capability_name": "virtual_linkable"
2584                             },
2585                             {
2586                                 "name": "vnat_data_cp",
2587                                 "target_node_template_name": "sfc_data_network",
2588                                 "target_capability_name": "virtual_linkable"
2589                             },
2590                             {
2591                                 "name": "virtualLink",
2592                                 "target_node_type_name": "tosca.nodes.Root"
2593                             },
2594                             {
2595                                 "name": "forwarder",
2596                                 "target_node_type_name": "tosca.nodes.Root"
2597                             }
2598                         ]
2599                     }
2600                 ],
2601                 "group_templates": [
2602                     {
2603                         "name": "vnffg1",
2604                         "type_name": "tosca.groups.nfv.VNFFG",
2605                         "properties": {
2606                             "vendor": {
2607                                 "type_name": "string",
2608                                 "value": "zte"
2609                             },
2610                             "connection_point": {
2611                                 "type_name": "list",
2612                                 "value": [
2613                                     "m6000_data_in",
2614                                     "m600_tunnel_cp",
2615                                     "m6000_data_out"
2616                                 ]
2617                             },
2618                             "version": {
2619                                 "type_name": "string",
2620                                 "value": "1.0"
2621                             },
2622                             "constituent_vnfs": {
2623                                 "type_name": "list",
2624                                 "value": [
2625                                     "VFW",
2626                                     "VNAT"
2627                                 ]
2628                             },
2629                             "number_of_endpoints": {
2630                                 "type_name": "integer",
2631                                 "value": 3
2632                             },
2633                             "dependent_virtual_link": {
2634                                 "type_name": "list",
2635                                 "value": [
2636                                     "sfc_data_network",
2637                                     "ext_datanet_net",
2638                                     "ext_mnet_net"
2639                                 ]
2640                             }
2641                         },
2642                         "interface_templates": [
2643                             "<aria.modeling.model_elements.InterfaceTemplate object at 0x7f8ec811cd10>"
2644                         ],
2645                         "member_node_template_names": [
2646                             "path1",
2647                             "path2"
2648                         ]
2649                     }
2650                 ],
2651                 "substitution_template": {
2652                     "node_type_name": "tosca.nodes.nfv.NS.VCPE_NS"
2653                 },
2654                 "inputs": {
2655                     "externalDataNetworkName": {
2656                         "type_name": "string",
2657                         "value": "vlan_4004_tunnel_net"
2658                     },
2659                     "sfc_data_network": {
2660                         "type_name": "string",
2661                         "value": "sfc_data_network"
2662                     },
2663                     "NatIpRange": {
2664                         "type_name": "string",
2665                         "value": "192.167.0.10-192.168.0.20"
2666                     },
2667                     "externalManageNetworkName": {
2668                         "type_name": "string",
2669                         "value": "vlan_4008_mng_net"
2670                     },
2671                     "externalPluginManageNetworkName": {
2672                         "type_name": "string",
2673                         "value": "vlan_4007_plugin_net"
2674                     }
2675                 }
2676             }
2677         }
2678     )
2679     print convert_nsd_model(src_json)