summaryrefslogtreecommitdiff
path: root/cloudinit/distros/rhel.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-09-24 19:24:25 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-09-24 19:24:25 -0700
commitdf80168450faa013ce50893e3c62979829b1fea8 (patch)
tree61e07890e154a4c9e7dcdfdfdb8338605847ab72 /cloudinit/distros/rhel.py
parent314530b519814af4b19b4f7cbcb9a35a6cd68e2d (diff)
downloadvyos-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/distros/rhel.py')
-rw-r--r--cloudinit/distros/rhel.py6
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):