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