summaryrefslogtreecommitdiff
path: root/cloudinit/net/renderer.py
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2018-09-05 14:17:16 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-09-05 14:17:16 +0000
commitdb50bc0d999e3a90136864a774f85e4e15b144e8 (patch)
treec0233ddee1fdec72c19500217ae001fa41d9a051 /cloudinit/net/renderer.py
parent3f6d0972d83c8bfd6a5e666d73cb84a8cfe9c8b6 (diff)
downloadvyos-cloud-init-db50bc0d999e3a90136864a774f85e4e15b144e8.tar.gz
vyos-cloud-init-db50bc0d999e3a90136864a774f85e4e15b144e8.zip
sysconfig: refactor sysconfig to accept distro specific templates paths
Multiple distros use sysconfig format but have different content and paths to certain files. Update distros to specify these template paths in their renderer_configs dictionary.
Diffstat (limited to 'cloudinit/net/renderer.py')
-rw-r--r--cloudinit/net/renderer.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/cloudinit/net/renderer.py b/cloudinit/net/renderer.py
index 57652e27..5f32e90f 100644
--- a/cloudinit/net/renderer.py
+++ b/cloudinit/net/renderer.py
@@ -45,11 +45,14 @@ class Renderer(object):
return content.getvalue()
@abc.abstractmethod
- def render_network_state(self, network_state, target=None):
+ def render_network_state(self, network_state, templates=None,
+ target=None):
"""Render network state."""
- def render_network_config(self, network_config, target=None):
+ def render_network_config(self, network_config, templates=None,
+ target=None):
return self.render_network_state(
- network_state=parse_net_config_data(network_config), target=target)
+ network_state=parse_net_config_data(network_config),
+ templates=templates, target=target)
# vi: ts=4 expandtab