summaryrefslogtreecommitdiff
path: root/tests/unittests/test_net.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-19 14:13:07 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-19 14:13:07 -0700
commit880d9fc2f9c62abf19b1506595aa81e5417dea45 (patch)
tree6a53a8a5ac8ea1c53284aa610f98ddaab89c7f9f /tests/unittests/test_net.py
parentabb3c00fadefea8056c300faf141260e124a5064 (diff)
downloadvyos-cloud-init-880d9fc2f9c62abf19b1506595aa81e5417dea45.tar.gz
vyos-cloud-init-880d9fc2f9c62abf19b1506595aa81e5417dea45.zip
Adjust net module to be more isolated
This allows it to be used outside of cloudinit more easily in the future.
Diffstat (limited to 'tests/unittests/test_net.py')
-rw-r--r--tests/unittests/test_net.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index ed2c6d0f..75c433f6 100644
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -2,6 +2,7 @@ from cloudinit import util
from cloudinit import net
from cloudinit.net import cmdline
from cloudinit.net import eni
+from cloudinit.net import network_state
from .helpers import TestCase
from .helpers import mock
@@ -112,14 +113,14 @@ class TestEniNetRendering(TestCase):
mock_sys_dev_path.side_effect = sys_dev_path
network_cfg = net.generate_fallback_config()
- network_state = net.parse_net_config_data(network_cfg,
- skip_broken=False)
+ ns = network_state.parse_net_config_data(network_cfg,
+ skip_broken=False)
render_dir = os.path.join(tmp_dir, "render")
os.makedirs(render_dir)
renderer = eni.Renderer()
- renderer.render_network_state(render_dir, network_state,
+ renderer.render_network_state(render_dir, ns,
eni="interfaces",
links_prefix=None,
netrules=None)