From 5b78316f516ac69a71b456dfc451770bc1299e67 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2020 08:08:16 +0000 Subject: import nmstate-0.4.1-2.el8 --- diff --git a/SOURCES/vrf-Allow-vrf-port-to-hold-IP-information.patch b/SOURCES/vrf-Allow-vrf-port-to-hold-IP-information.patch new file mode 100644 index 0000000..9bf9f5e --- /dev/null +++ b/SOURCES/vrf-Allow-vrf-port-to-hold-IP-information.patch @@ -0,0 +1,43 @@ +From 14551813a0b729ee00cd7f56a06312035e78e304 Mon Sep 17 00:00:00 2001 +From: Gris Ge +Date: Wed, 28 Oct 2020 12:36:45 +0800 +Subject: [PATCH] vrf: Allow vrf port to hold IP information + +According to https://www.kernel.org/doc/Documentation/networking/vrf.txt +the vrf port is allowed to hold IP address. + +Integration test case included. + +Signed-off-by: Gris Ge +--- + libnmstate/ifaces/base_iface.py | 6 +++++- + tests/integration/vrf_test.py | 36 +++++++++++++++++++++++++++++++++ + 2 files changed, 41 insertions(+), 1 deletion(-) + +diff --git a/libnmstate/ifaces/base_iface.py b/libnmstate/ifaces/base_iface.py +index ae54245..156aece 100644 +--- a/libnmstate/ifaces/base_iface.py ++++ b/libnmstate/ifaces/base_iface.py +@@ -233,6 +233,7 @@ class BaseIface: + if ( + ip_state.is_enabled + and self.controller ++ and self.controller_type != InterfaceType.VRF + and not self.can_have_ip_as_port + ): + raise NmstateValueError( +@@ -279,7 +280,10 @@ class BaseIface: + def set_controller(self, controller_iface_name, controller_type): + self._info[BaseIface.CONTROLLER_METADATA] = controller_iface_name + self._info[BaseIface.CONTROLLER_TYPE_METADATA] = controller_type +- if not self.can_have_ip_as_port: ++ if ( ++ not self.can_have_ip_as_port ++ and controller_type != InterfaceType.VRF ++ ): + for family in (Interface.IPV4, Interface.IPV6): + self._info[family] = {InterfaceIP.ENABLED: False} + +-- +2.25.4 + diff --git a/SPECS/nmstate.spec b/SPECS/nmstate.spec index f90d158..d452c24 100644 --- a/SPECS/nmstate.spec +++ b/SPECS/nmstate.spec @@ -4,13 +4,14 @@ Name: nmstate Version: 0.4.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Declarative network manager API License: LGPLv2+ URL: https://github.com/%{srcname}/%{srcname} Source0: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz Source1: %{url}/releases/download/v%{version}/%{srcname}-%{version}.tar.gz.asc Source2: https://www.nmstate.io/nmstate.gpg +Patch0: vrf-Allow-vrf-port-to-hold-IP-information.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -83,6 +84,9 @@ gpgv2 --keyring ./gpgkey-mantainers.gpg %{SOURCE1} %{SOURCE0} %{python3_sitelib}/%{libname}/plugins/__pycache__/nmstate_plugin_ovsdb* %changelog +* Wed Oct 28 2020 Fernando Fernandez Mancera - 0.4.1-2 +- Allow VRF port to hold IP information + * Tue Oct 22 2020 Fernando Fernandez Mancera - 0.4.1-1 - Upgrade to 0.4.1