+ if node_type == 'interface':
+ for vdu in vnfd['vdu']:
+ if vdu['id'] == args['vdu_id']:
+ vdu['interface'].append({
+ "virtual-interface": {
+ "type": "VIRTIO"
+ },
+ "name": element_id,
+ "mgmt-interface": True,
+ "type": "EXTERNAL",
+ "external-connection-point-ref": args["external-connection-point-ref"]
+ })
+ if node_type == 'int_cp':
+ for vdu in vnfd['vdu']:
+ if vdu['id'] == args['vdu_id']:
+ if 'internal-connection-point' not in vdu:
+ vdu['internal-connection-point'] = []
+ vdu['internal-connection-point'].append({
+ "short-name": element_id,
+ "type": "VPORT",
+ "id": element_id,
+ "name": element_id
+ })
+ if 'interface' not in vdu:
+ vdu['interface'] = []
+ vdu['interface'].append({
+ "virtual-interface": {
+ "type": "VIRTIO"
+ },
+ "name": "int_"+element_id,
+ "type": "INTERNAL",
+ "internal-connection-point-ref": element_id
+ })
+ for int_vld in vnfd['internal-vld']:
+ if int_vld['id'] == args['vld_id']:
+ if 'internal-connection-point' not in int_vld:
+ int_vld['internal-connection-point'] = []
+ int_vld['internal-connection-point'].append({
+ 'id-ref': element_id
+ })