From 6897aaf40e321cb585b299a75085f75666b5f816 Mon Sep 17 00:00:00 2001 From: srividya0208 <68350089+srividya0208@users.noreply.github.com> Date: Sat, 18 Jul 2020 01:50:17 -0500 Subject: vyos.ifconfig: T2673: Fix admin state if the mac address is changed for an interface Changes are made in the interface.py script in order to bring the admin state to 'UP' after the mac is manually added in system config.The script is marking the interface from up to down state(as the MAC address can only be changed if interface is in 'down' state) but it is not bringing it up after the change --- python/vyos/ifconfig/interface.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index 1819ffc82..c73a3bbf8 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -322,7 +322,11 @@ class Interface(Control): self.set_admin_state('down') self.set_interface('mac', mac) - + + # Turn an interface to the 'up' state if it was changed to 'down' by this fucntion + if prev_state == 'up': + self.set_admin_state('up') + def set_vrf(self, vrf=''): """ Add/Remove interface from given VRF instance. -- cgit v1.2.3