From b7e436efdf0b19ade18363fb47084239abf28e6d Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 15 Mar 2018 20:47:42 +0700 Subject: [PATCH] Fix tests. --- gns3server/compute/builtin/nodes/nat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/builtin/nodes/nat.py b/gns3server/compute/builtin/nodes/nat.py index 2e745177..387a8f61 100644 --- a/gns3server/compute/builtin/nodes/nat.py +++ b/gns3server/compute/builtin/nodes/nat.py @@ -21,6 +21,7 @@ from .cloud import Cloud from ...error import NodeError import gns3server.utils.interfaces +from gns3server.config import Config import logging log = logging.getLogger(__name__) @@ -35,12 +36,12 @@ class Nat(Cloud): def __init__(self, name, node_id, project, manager, ports=None): if sys.platform.startswith("linux"): - nat_interface = manager.config.get_section_config("Server").get("nat_interface", "virbr0") + nat_interface = Config.instance().get_section_config("Server").get("nat_interface", "virbr0") if nat_interface not in [interface["name"] for interface in gns3server.utils.interfaces.interfaces()]: raise NodeError("NAT interface {} is missing, please install libvirt".format(nat_interface)) interface = nat_interface else: - nat_interface = manager.config.get_section_config("Server").get("nat_interface", "vmnet8") + nat_interface = Config.instance().get_section_config("Server").get("nat_interface", "vmnet8") interfaces = list(filter(lambda x: nat_interface in x.lower(), [interface["name"] for interface in gns3server.utils.interfaces.interfaces()])) if not len(interfaces):