Skip to content

Commit 3ea09a0

Browse files
committed
Add IP remove warnings for VRF commands
1 parent 0e1b0cf commit 3ea09a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/main.py

+6
Original file line numberDiff line numberDiff line change
@@ -4975,6 +4975,8 @@ def bind(ctx, interface_name, vrf_name):
49754975
config_db.set_entry(table_name, interface_name, subintf_entry)
49764976
else:
49774977
config_db.set_entry(table_name, interface_name, {"vrf_name": vrf_name})
4978+
4979+
click.echo("Interface {} IPv4 disabled and address(es) removed due to binding VRF {}".format(interface_name, vrf_name))
49784980

49794981
#
49804982
# 'unbind' subcommand
@@ -5012,6 +5014,9 @@ def unbind(ctx, interface_name):
50125014
else:
50135015
config_db.set_entry(table_name, interface_name, None)
50145016

5017+
click.echo("Interface {} IPv4 disabled and address(es) removed due to unbinding VRF".format(interface_name))
5018+
5019+
50155020
#
50165021
# 'ipv6' subgroup ('config interface ipv6 ...')
50175022
#
@@ -5185,6 +5190,7 @@ def del_vrf(ctx, vrf_name):
51855190
else:
51865191
del_interface_bind_to_vrf(config_db, vrf_name)
51875192
config_db.set_entry('VRF', vrf_name, None)
5193+
click.echo("IPv4 addresses from all interfaces in VRF {} have been removed".format(vrf_name))
51885194

51895195

51905196
@vrf.command('add_vrf_vni_map')

0 commit comments

Comments
 (0)