diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-24 19:24:25 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-24 19:24:25 -0700 |
commit | df80168450faa013ce50893e3c62979829b1fea8 (patch) | |
tree | 61e07890e154a4c9e7dcdfdfdb8338605847ab72 /cloudinit | |
parent | 314530b519814af4b19b4f7cbcb9a35a6cd68e2d (diff) | |
download | vyos-cloud-init-df80168450faa013ce50893e3c62979829b1fea8.tar.gz vyos-cloud-init-df80168450faa013ce50893e3c62979829b1fea8.zip |
Add a netconfig format test + if rhel is passed the 'all'
device name, throw an error since rhel can not currently
handle this case.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/distros/rhel.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py index 0e451b02..752bb294 100644 --- a/cloudinit/distros/rhel.py +++ b/cloudinit/distros/rhel.py @@ -196,6 +196,12 @@ class Distro(distros.Distro): contents = [] return (exists, QuotingConfigObj(contents)) + def _bring_up_interfaces(self, device_names): + if device_names and 'all' in device_names: + raise RuntimeError(('Distro %s can not translate ' + 'the device name "all"') % (self.name)) + return distros.Distro._bring_up_interfaces(self, device_names) + def set_timezone(self, tz): tz_file = os.path.join("/usr/share/zoneinfo", tz) if not os.path.isfile(tz_file): |