diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-06-21 13:36:30 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-06-21 13:36:30 -0400 |
commit | 58d0b39d20ec5c18b1c9449c6358242860356e0d (patch) | |
tree | 0da9490d5c1f519705e0b3863f1b765b657f9775 | |
parent | ed28818c80628b10c2435e77b86c81dad05674e1 (diff) | |
download | vyos-cloud-init-58d0b39d20ec5c18b1c9449c6358242860356e0d.tar.gz vyos-cloud-init-58d0b39d20ec5c18b1c9449c6358242860356e0d.zip |
fix flake8
-rw-r--r-- | cloudinit/net/eni.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_net.py | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py index fe3800ed..d963d1f2 100644 --- a/cloudinit/net/eni.py +++ b/cloudinit/net/eni.py @@ -379,7 +379,7 @@ class Renderer(renderer.Renderer): iface['inet'] = subnet_inet if iface['mode'].startswith('dhcp'): iface['mode'] = 'dhcp' - + lines = list( _iface_start_entry(iface, index) + _iface_add_subnet(iface, subnet) + @@ -407,8 +407,6 @@ class Renderer(renderer.Renderer): def _render_interfaces(self, network_state): '''Given state, emit etc/network/interfaces content.''' - content = "" - # handle 'lo' specifically as we need to insert the global dns entries # there (as that is the only interface that will be always up). lo = {'name': 'lo', 'type': 'physical', 'inet': 'inet', diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py index f47ae516..f39fd97a 100644 --- a/tests/unittests/test_net.py +++ b/tests/unittests/test_net.py @@ -6,9 +6,9 @@ from cloudinit.net import sysconfig from cloudinit.sources.helpers import openstack from cloudinit import util +from .helpers import dir2dict from .helpers import mock from .helpers import TestCase -from .helpers import dir2dict import base64 import copy @@ -626,9 +626,6 @@ class TestEniRoundTrip(TestCase): 'netrules_path': netrules_path}) renderer.render_network_state(self.tmp_dir, ns) - #for f, c in dir2dict(self.tmp_dir).items(): - # print("=== %s ===" % f) - # print(c) return dir2dict(self.tmp_dir) def testsimple_convert_and_render(self): @@ -641,7 +638,6 @@ class TestEniRoundTrip(TestCase): def testsimple_render_all(self): entry = NETWORK_CONFIGS['all'] files = self._render_and_read(network_config=yaml.load(entry['yaml'])) - for f in files: print(f) self.assertEqual( entry['expected_eni'].splitlines(), files['/etc/network/interfaces'].splitlines()) |