diff options
author | James Falcon <therealfalcon@gmail.com> | 2021-07-01 14:43:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 14:43:07 -0500 |
commit | 81299de5fe3b6e491a965a6ebef66c6b8bf2c037 (patch) | |
tree | c4d2277a7f6240e306f6222769d349357510414a /cloudinit/distros/arch.py | |
parent | 78e89b03ecb29e7df3181b1219a0b5f44b9d7532 (diff) | |
download | vyos-cloud-init-81299de5fe3b6e491a965a6ebef66c6b8bf2c037.tar.gz vyos-cloud-init-81299de5fe3b6e491a965a6ebef66c6b8bf2c037.zip |
Add new network activators to bring up interfaces (#919)
Currently _bring_up_interfaces() is a no-op for any distro using
renderers. We need to be able to support bringing up a single
interfaces, a list of interfaces, and all interfaces. This should be
independent of the renderers, as the network config is often
generated independent of the mechanism used to apply it.
Additionally, I included a refactor to remove
"_supported_write_network_config". We had a confusing call chain of
apply_network_config->_write_network_config->_supported_write_network_config.
The last two have been combined.
Diffstat (limited to 'cloudinit/distros/arch.py')
-rw-r--r-- | cloudinit/distros/arch.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/cloudinit/distros/arch.py b/cloudinit/distros/arch.py index 246e6fe7..c9acb11f 100644 --- a/cloudinit/distros/arch.py +++ b/cloudinit/distros/arch.py @@ -61,9 +61,9 @@ class Distro(distros.Distro): self.update_package_sources() self.package_command('', pkgs=pkglist) - def _write_network_config(self, netconfig): + def _write_network_state(self, network_state): try: - return self._supported_write_network_config(netconfig) + super()._write_network_state(network_state) except RendererNotFoundError as e: # Fall back to old _write_network raise NotImplementedError from e @@ -101,12 +101,6 @@ class Distro(distros.Distro): util.logexc(LOG, "Running interface command %s failed", cmd) return False - def _bring_up_interfaces(self, device_names): - for d in device_names: - if not self._bring_up_interface(d): - return False - return True - def _write_hostname(self, your_hostname, out_fn): conf = None try: |