From c66315ad27fc976b54cd9b24146a776cf07a898d Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kella <45939429+kirankella@users.noreply.github.com> Date: Fri, 10 May 2019 11:23:23 +0530 Subject: [PATCH] Config interface Loopback0 ip add/del is not working (#443) * Incremental addition/deletion of address on Loopback0 interface are not working. Fix: - Check if add/remove are called on Loopback0 interface and pass them to config DB. --- config/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/main.py b/config/main.py index 177b49bc3b19..2190c82fd83a 100755 --- a/config/main.py +++ b/config/main.py @@ -952,6 +952,9 @@ def add(ctx, interface_name, ip_addr): config_db.set_entry("PORTCHANNEL_INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"}) elif interface_name.startswith("Vlan"): config_db.set_entry("VLAN_INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"}) + elif interface_name.startswith("Loopback"): + config_db.set_entry("LOOPBACK_INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"}) + # # 'del' subcommand @@ -975,6 +978,8 @@ def remove(ctx, interface_name, ip_addr): config_db.set_entry("PORTCHANNEL_INTERFACE", (interface_name, ip_addr), None) elif interface_name.startswith("Vlan"): config_db.set_entry("VLAN_INTERFACE", (interface_name, ip_addr), None) + elif interface_name.startswith("Loopback"): + config_db.set_entry("LOOPBACK_INTERFACE", (interface_name, ip_addr), None) # # 'acl' group ('config acl ...')