From df80168450faa013ce50893e3c62979829b1fea8 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 24 Sep 2012 19:24:25 -0700 Subject: Add a netconfig format test + if rhel is passed the 'all' device name, throw an error since rhel can not currently handle this case. --- cloudinit/distros/rhel.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cloudinit') 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): -- cgit v1.2.3