Fixes NAT node not working on Windows (#1163)

This commit is contained in:
ziajka committed 2017-08-21 10:17:56 +02:00
1 parent 3dd5dbe0c1
commit 7523e9c4bc
2 files changed
+23 -1

No files matched your search

+3 -1
View File
@@ -36,7 +36,9 @@ class Nat(Cloud):
raise NodeError("virbr0 is missing. You need to install libvirt")
interface = "virbr0"
else:
if "vmnet8" not in [interface["name"] for interface in gns3server.utils.interfaces.interfaces()]:
names = filter(lambda x: 'vmnet8' in x.lower(),
[interface["name"] for interface in gns3server.utils.interfaces.interfaces()])
if not len(list(names)):
raise NodeError("vmnet8 is missing. You need to install VMware or use the NAT node on GNS3 VM")
interface = "vmnet8"