diff options
-rw-r--r-- | cloudinit/distros/__init__.py | 12 | ||||
-rw-r--r-- | cloudinit/distros/debian.py | 9 | ||||
-rw-r--r-- | cloudinit/stages.py | 11 | ||||
-rw-r--r-- | cloudinit/util.py | 9 |
4 files changed, 0 insertions, 41 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index e32ddd57..74b484a7 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -78,10 +78,6 @@ class Distro(object): def _write_network_config(self, settings): raise NotImplementedError() - @abc.abstractmethod - def _write_network_fallback(self): - raise NotImplementedError() - def _find_tz_file(self, tz): tz_file = os.path.join(self.tz_zone_dir, str(tz)) if not os.path.isfile(tz_file): @@ -147,14 +143,6 @@ class Distro(object): return self._bring_up_interfaces(dev_names) return False - def apply_fallback_network(self, bring_up=True): - # Write it out - dev_names = self._write_network_fallback() - # Now try to bring them up - if bring_up: - return self._bring_up_interfaces(dev_names) - return False - @abc.abstractmethod def apply_locale(self, locale, out_fn=None): raise NotImplementedError() diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py index de8c4c6c..909d6deb 100644 --- a/cloudinit/distros/debian.py +++ b/cloudinit/distros/debian.py @@ -82,15 +82,6 @@ class Distro(distros.Distro): net.render_network_state(network_state=ns, target="/") return [] - def _write_network_fallback(self): - # old fallback configuration is obsolete, disable it - util.disable_conf_file('/etc/network/interfaces.d/eth0.cfg') - nconf = net.generate_fallback_config() - if nconf is not None: - ns = nconf['config'] - net.render_network_state(network_state=ns, target="/") - return [] - def _bring_up_interfaces(self, device_names): use_all = False for d in device_names: diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 64da3b5b..c230ec0d 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -567,17 +567,6 @@ class Init(object): # Run the handlers self._do_handlers(user_data_msg, c_handlers_list, frequency) - def apply_networking(self): - """Attempt to apply network configuration, either using network - configuration from datasource or fallback configuration if that is - not available""" - if self.datasource and self.datasource.network_config: - ds_net_conf = self.datasource.network_config - res = self.distro.apply_network_config(ds_net_conf, bring_up=True) - else: - res = self.distro.apply_fallback_network(bring_up=True) - return res - class Modules(object): def __init__(self, init, cfg_files=None, reporter=None): diff --git a/cloudinit/util.py b/cloudinit/util.py index 58ab3c75..20916e53 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -849,15 +849,6 @@ def read_seeded(base="", ext="", timeout=5, retries=10, file_retries=0): return (md, ud) -def disable_conf_file(conf): - # disable .cfg file by renaming it if it exists - if not os.path.exists(conf): - return None - target_path = conf + '.disabled' - rename(conf, target_path) - return target_path - - def read_conf_d(confd): # Get reverse sorted list (later trumps newer) confs = sorted(os.listdir(confd), reverse=True) |