diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-09-20 09:08:37 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-09-20 09:08:37 +0000 |
commit | c3680475f9c97028d75a8f1bb58139ddd47d00ed (patch) | |
tree | ef061ca4a492bc60b499eeba851eb25c6788cad6 /cloudinit/distros/__init__.py | |
parent | 98d18c31c8759add858096dea53bc093c7cc9caa (diff) | |
download | vyos-cloud-init-c3680475f9c97028d75a8f1bb58139ddd47d00ed.tar.gz vyos-cloud-init-c3680475f9c97028d75a8f1bb58139ddd47d00ed.zip |
Remove dead-code _write_network distro implementations.
Any distro that has a '_write_nework_config' method should no
longer get their _write_network called at all. So lets drop
that code and raise a RuntimeError any time we got there.
Replace the one caller of 'apply_network' (legacy openstack path)
with a call to apply_network_config after converting the ENI to
network config.
Diffstat (limited to 'cloudinit/distros/__init__.py')
-rw-r--r-- | cloudinit/distros/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index b8a48e85..ac150bef 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -74,11 +74,10 @@ class Distro(object): def install_packages(self, pkglist): raise NotImplementedError() - @abc.abstractmethod def _write_network(self, settings): - # In the future use the http://fedorahosted.org/netcf/ - # to write this blob out in a distro format - raise NotImplementedError() + raise RuntimeError( + "Legacy function '_write_network' was called in distro '%s'.\n" + "_write_network_config needs implementation.\n" % self.name) def _write_network_config(self, settings): raise NotImplementedError() |