summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-06-15 16:11:24 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-06-15 16:11:24 -0700
commit459de83024b41c32823b75cf483da994fb1388b7 (patch)
tree3f611a640fe41f82b1b27cf7f2ea94a78603cd49 /cloudinit/distros
parente0b1e3a8c925446ee9e6d15aae1783b49fb870f8 (diff)
downloadvyos-cloud-init-459de83024b41c32823b75cf483da994fb1388b7.tar.gz
vyos-cloud-init-459de83024b41c32823b75cf483da994fb1388b7.zip
Fixup code review comments
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/debian.py12
-rw-r--r--cloudinit/distros/rhel.py4
2 files changed, 8 insertions, 8 deletions
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index e71aaa97..511ed4fe 100644
--- a/cloudinit/distros/debian.py
+++ b/cloudinit/distros/debian.py
@@ -57,7 +57,11 @@ class Distro(distros.Distro):
# should only happen say once per instance...)
self._runner = helpers.Runners(paths)
self.osfamily = 'debian'
- self._net_renderer = eni.Renderer()
+ self._net_renderer = eni.Renderer({
+ 'eni_path': self.network_conf_fn,
+ 'links_prefix_path': self.links_prefix,
+ 'netrules_path': None,
+ })
def apply_locale(self, locale, out_fn=None):
if not out_fn:
@@ -82,12 +86,8 @@ class Distro(distros.Distro):
def _write_network_config(self, netconfig):
ns = net.parse_net_config_data(netconfig)
- self._net_renderer.render_network_state(
- target="/", network_state=ns,
- eni=self.network_conf_fn, links_prefix=self.links_prefix,
- netrules=None)
+ self._net_renderer.render_network_state("/", ns)
_maybe_remove_legacy_eth0()
-
return []
def _bring_up_interfaces(self, device_names):
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py
index 20525e47..1aa42d75 100644
--- a/cloudinit/distros/rhel.py
+++ b/cloudinit/distros/rhel.py
@@ -67,8 +67,8 @@ class Distro(distros.Distro):
self.package_command('install', pkgs=pkglist)
def _write_network_config(self, netconfig):
- self._net_renderer.render_network_state(
- target="/", parse_net_config_data(netconfig))
+ ns = parse_net_config_data(netconfig)
+ self._net_renderer.render_network_state("/", ns)
return []
def _write_network(self, settings):