Skip to content

Commit c66315a

Browse files
kirankellalguohan
authored andcommitted
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.
1 parent 430d4b8 commit c66315a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config/main.py

+5
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,9 @@ def add(ctx, interface_name, ip_addr):
952952
config_db.set_entry("PORTCHANNEL_INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"})
953953
elif interface_name.startswith("Vlan"):
954954
config_db.set_entry("VLAN_INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"})
955+
elif interface_name.startswith("Loopback"):
956+
config_db.set_entry("LOOPBACK_INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"})
957+
955958

956959
#
957960
# 'del' subcommand
@@ -975,6 +978,8 @@ def remove(ctx, interface_name, ip_addr):
975978
config_db.set_entry("PORTCHANNEL_INTERFACE", (interface_name, ip_addr), None)
976979
elif interface_name.startswith("Vlan"):
977980
config_db.set_entry("VLAN_INTERFACE", (interface_name, ip_addr), None)
981+
elif interface_name.startswith("Loopback"):
982+
config_db.set_entry("LOOPBACK_INTERFACE", (interface_name, ip_addr), None)
978983

979984
#
980985
# 'acl' group ('config acl ...')

0 commit comments

Comments
 (0)