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