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