summaryrefslogtreecommitdiff
path: root/cloudinit/settings.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-03-15 14:33:45 -0400
committerScott Moser <smoser@brickies.net>2017-03-17 21:31:56 -0400
commit5beecdf88b630a397b3722ddb299e9a37ff02737 (patch)
tree620b47c50cd392789bcd8afd3dc355bcbbf751bc /cloudinit/settings.py
parent58cc8f7521725d4f007ce90001a28326bc240231 (diff)
downloadvyos-cloud-init-5beecdf88b630a397b3722ddb299e9a37ff02737.tar.gz
vyos-cloud-init-5beecdf88b630a397b3722ddb299e9a37ff02737.zip
net: add renderers for automatically selecting the renderer.
Previously, the distro had hard coded which network renderer it would use. This adds support for just picking the right renderer based on what is available. Now, that can be set via a priority in system_info, but should generally work. That config looks like: system_info: network: renderers: ["eni", "sysconfig"] When no renderers are found, a specific RendererNotFoundError is raised. stages.py is modified to catch that and log it at error level. This path should not really be exercised, but could occur if for example an Ubuntu system did not have ifupdown, or a rhel system did not have sysconfig. In such a system previously we would have quietly rendered ENI configuration but that would have been ignored. This is one step better in that we at least log the error.
Diffstat (limited to 'cloudinit/settings.py')
-rw-r--r--cloudinit/settings.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloudinit/settings.py b/cloudinit/settings.py
index 692ff5e5..dbafead5 100644
--- a/cloudinit/settings.py
+++ b/cloudinit/settings.py
@@ -46,6 +46,7 @@ CFG_BUILTIN = {
'templates_dir': '/etc/cloud/templates/',
},
'distro': 'ubuntu',
+ 'network': {'renderers': None},
},
'vendor_data': {'enabled': True, 'prefix': []},
}