Nat node work on any linux thanks to libvirt

Fix #599
This commit is contained in:
Julien Duponchelle committed 2016-09-05 18:40:49 +02:00
1 parent 4b891070d2
commit d772b6fbd7
3 files changed
+10 -13

No files matched your search

+2 -2
View File
@@ -31,8 +31,8 @@ def test_json(on_gns3vm, project):
"status": "started",
"ports": [
{
"interface": "eth1",
"name": "nat0",
"interface": "virbr0",
"name": "virbr0",
"port_number": 0,
"type": "ethernet"
}
+2 -2
View File
@@ -315,10 +315,10 @@ def async_run(loop):
@pytest.yield_fixture
def on_gns3vm():
def on_gns3vm(linux_platform):
"""
Mock the hostname to emulate the GNS3 VM
"""
with patch("gns3server.utils.interfaces.interfaces", return_value=[{"name": "eth0"}, {"name": "eth1"}]):
with patch("gns3server.utils.interfaces.interfaces", return_value=[{"name": "eth0"}, {"name": "eth1", "name": "virbr0"}]):
with patch("socket.gethostname", return_value="gns3vm"):
yield