+ elif descriptor_type == 'vnfd':
+ if 'vnfd-catalog' in descriptor:
+ vnfd = descriptor['vnfd-catalog']['vnfd'][0]
+ elif 'vnfd:vnfd-catalog' in descriptor:
+ vnfd = descriptor['vnfd:vnfd-catalog']['vnfd'][0]
+
+ if node_type == 'vnf_vl':
+ for k, v in enumerate(vnfd['internal-vld']):
+ if v['id'] == old['id']:
+ vnfd['internal-vld'][k].update(updated)
+ if node_type == 'cp':
+ for k, v in enumerate(vnfd['connection-point']):
+ if v['name'] == old['name']:
+ vnfd['connection-point'][k].update(updated)
+ for vdu in vnfd['vdu']:
+ if 'interface' in vdu:
+ for intf in vdu['interface']:
+ if 'external-connection-point-ref' in intf and intf['external-connection-point-ref'] == old['name']:
+ intf['external-connection-point-ref'] = updated['name']
+ if node_type == 'vdu':
+ for k, v in enumerate(vnfd['vdu']):
+ if v['name'] == old['name']:
+ vnfd['vdu'][k].update(updated)