From 3c384a7bf0e8ae9bd1f49d11cf512a45abc09f4c Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 15 Nov 2016 17:36:51 +1100 Subject: [PATCH] Try to fix VPCS and loobpack adapters not working together. Ref #771. --- gns3server/compute/base_node.py | 2 +- gns3server/compute/builtin/nodes/cloud.py | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/gns3server/compute/base_node.py b/gns3server/compute/base_node.py index f83e3158..b82c4cce 100644 --- a/gns3server/compute/base_node.py +++ b/gns3server/compute/base_node.py @@ -603,7 +603,7 @@ class BaseNode: yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name, interface=npf_id)) else: - raise NodeError("Could not find NPF id for VMnet interface {}".format(ethernet_interface)) + raise NodeError("Could not find NPF id for interface {}".format(ethernet_interface)) if block_host_traffic: if source_mac: diff --git a/gns3server/compute/builtin/nodes/cloud.py b/gns3server/compute/builtin/nodes/cloud.py index 1634948d..d0979d92 100644 --- a/gns3server/compute/builtin/nodes/cloud.py +++ b/gns3server/compute/builtin/nodes/cloud.py @@ -188,16 +188,7 @@ class Cloud(BaseNode): if port_info["type"] in ("ethernet", "tap"): if sys.platform.startswith("win"): - windows_interfaces = self._interfaces() - npf = None - for interface in windows_interfaces: - if port_info["interface"] == interface["name"]: - npf = interface["id"] - if npf: - yield from self._ubridge_send('bridge add_nio_ethernet {name} "{interface}"'.format(name=bridge_name, - interface=npf)) - else: - raise NodeError("Could not find NPF id for interface {}".format(port_info["interface"])) + yield from self._add_ubridge_ethernet_connection(bridge_name, port_info["interface"]) else: