From b934ee34e5cda781928987c1f905ef4e71a04ce5 Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Fri, 26 Jul 2024 13:15:47 -0600 Subject: [PATCH] chore(eni): Deprecate ENI as an input configuration format --- cloudinit/sources/DataSourceConfigDrive.py | 8 ++++++++ cloudinit/sources/DataSourceNoCloud.py | 7 +++++++ .../reference/network-config-format-eni.rst | 20 ------------------- doc/rtd/reference/network-config.rst | 8 -------- 4 files changed, 15 insertions(+), 28 deletions(-) delete mode 100644 doc/rtd/reference/network-config-format-eni.rst diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index 3f82c89ea42..d5db34cd1d7 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -176,6 +176,14 @@ def network_config(self): elif self.network_eni is not None: self._network_config = eni.convert_eni_data(self.network_eni) LOG.debug("network config provided via converted eni data") + util.deprecate( + deprecated="Eni network configuration in ConfigDrive", + deprecated_version="24.3", + extra_message=( + "You can use openstack's network " + "configuration format instead" + ), + ) else: LOG.debug("no network configuration available") return self._network_config diff --git a/cloudinit/sources/DataSourceNoCloud.py b/cloudinit/sources/DataSourceNoCloud.py index 69ebab91479..291da950cac 100644 --- a/cloudinit/sources/DataSourceNoCloud.py +++ b/cloudinit/sources/DataSourceNoCloud.py @@ -271,6 +271,13 @@ def check_instance_id(self, sys_cfg): def network_config(self): if self._network_config is None: if self._network_eni is not None: + util.deprecate( + deprecated="Eni network configuration in NoCloud", + deprecated_version="24.3", + extra_message=( + "You can use network v1 or network v2 instead" + ), + ) self._network_config = eni.convert_eni_data(self._network_eni) return self._network_config diff --git a/doc/rtd/reference/network-config-format-eni.rst b/doc/rtd/reference/network-config-format-eni.rst deleted file mode 100644 index be7bbeb29ec..00000000000 --- a/doc/rtd/reference/network-config-format-eni.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _network_config_eni: - -Network configuration ENI (legacy) -********************************** - -``Cloud-init`` supports reading and writing network config in the ``ENI`` -format which is consumed by the ``ifupdown`` tool to parse and apply network -configuration. - -As an input format this is **legacy**. In cases where ENI format is available -and another format is also available, ``cloud-init`` will prefer to use the -other, newer format. - -This can happen in either :ref:`datasource_nocloud` or -:ref:`datasource_openstack` datasources. - -Please reference existing `documentation`_ for the -:file:`/etc/network/interfaces(5)` format. - -.. _documentation: http://manpages.ubuntu.com/manpages/trusty/en/man5/interfaces.5.html diff --git a/doc/rtd/reference/network-config.rst b/doc/rtd/reference/network-config.rst index 2e95550e61a..61a12167d74 100644 --- a/doc/rtd/reference/network-config.rst +++ b/doc/rtd/reference/network-config.rst @@ -126,7 +126,6 @@ The following datasources optionally provide network configuration: - :ref:`datasource_config_drive` - `OpenStack Metadata Service Network`_ - - :ref:`network_config_eni` - :ref:`datasource_digital_ocean` @@ -140,15 +139,9 @@ The following datasources optionally provide network configuration: - :ref:`network_config_v1` - :ref:`network_config_v2` - - :ref:`network_config_eni` - -- :ref:`datasource_opennebula` - - - :ref:`network_config_eni` - :ref:`datasource_openstack` - - :ref:`network_config_eni` - `OpenStack Metadata Service Network`_ - :ref:`datasource_smartos` @@ -168,7 +161,6 @@ For more information on network configuration formats: .. toctree:: :maxdepth: 1 - network-config-format-eni.rst network-config-format-v1.rst network-config-format-v2.rst