+ vnf_name2id = defaultdict(lambda: "NotExistingNode",
+ reduce(lambda x, y: dict(x, **y),
+ map(lambda d: {d["vnf_name"]: d["vnf_id"]},
+ self.nsd["network_functions"])))
+
+ # check if we need to deploy the management ports (defined as type:management both on in the vnfd and nsd)
+ intfs = vnfd.get("connection_points", [])
+ if USE_DOCKER_MGMT:
+ vnf_id = vnf_name2id[vnf_name]
+ mgmt_intfs = [vnf_id + ':' + intf['id'] for intf in intfs if intf.get('type') == 'management']
+ # check if any of these management interfaces are used in a management-type network in the nsd
+ for nsd_intf_name in mgmt_intfs:
+ vlinks = [ l["connection_points_reference"] for l in self.nsd.get("virtual_links", [])]
+ for link in vlinks:
+ if nsd_intf_name in link and self.check_mgmt_interface(link):
+ # this is indeed a management interface and can be skipped
+ vnf_id, vnf_interface, vnf_sap_docker_name = parse_interface(nsd_intf_name)
+ found_interfaces = [intf for intf in intfs if intf.get('id') == vnf_interface]
+ intfs.remove(found_interfaces[0])
+