summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-06-10 14:36:29 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-06-10 14:36:29 -0700
commite5d4ee779981a0e572dc0ca4519b5bf770e3bcaa (patch)
treede06a8f896906541cfaabebd062fa08baf23fdda /cloudinit/distros
parentf47d811af4f2ae0977db076b3eedb27634da2132 (diff)
downloadvyos-cloud-init-e5d4ee779981a0e572dc0ca4519b5bf770e3bcaa.tar.gz
vyos-cloud-init-e5d4ee779981a0e572dc0ca4519b5bf770e3bcaa.zip
Ensure renderer is used in rhel
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/rhel.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py
index 812e7002..20525e47 100644
--- a/cloudinit/distros/rhel.py
+++ b/cloudinit/distros/rhel.py
@@ -23,6 +23,8 @@
from cloudinit import distros
from cloudinit import helpers
from cloudinit import log as logging
+from cloudinit.net.network_state import parse_net_config_data
+from cloudinit.net import sysconfig
from cloudinit import util
from cloudinit.distros import net_util
@@ -59,10 +61,16 @@ class Distro(distros.Distro):
# should only happen say once per instance...)
self._runner = helpers.Runners(paths)
self.osfamily = 'redhat'
+ self._net_renderer = sysconfig.Renderer()
def install_packages(self, pkglist):
self.package_command('install', pkgs=pkglist)
+ def _write_network_config(self, netconfig):
+ self._net_renderer.render_network_state(
+ target="/", parse_net_config_data(netconfig))
+ return []
+
def _write_network(self, settings):
# TODO(harlowja) fix this... since this is the ubuntu format
entries = net_util.translate_network(settings)