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