From 187bf48e3712b15dc0deeba6bfc7003da3aa77a2 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 23:39:56 +0000 Subject: Apply patch vrf-Allow-vrf-port-to-hold-IP-information.patch patch_name: vrf-Allow-vrf-port-to-hold-IP-information.patch present_in_specfile: true location_in_specfile: 1 --- 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}