Skip to content

Commit

Permalink
Add ip config support for Vlan (sonic-net#347)
Browse files Browse the repository at this point in the history
Signed-off-by: Jipan Yang <[email protected]>
  • Loading branch information
jipanyang authored and lguohan committed Oct 19, 2018
1 parent 4562d57 commit 1bbf2fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,8 @@ def add(ctx, ip_addr):
config_db.set_entry("INTERFACE", (interface_name, ip_addr), {"NULL": "NULL"})
elif interface_name.startswith("PortChannel"):
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"})

#
# 'del' subcommand
Expand All @@ -826,6 +828,8 @@ def remove(ctx, ip_addr):
config_db.set_entry("INTERFACE", (interface_name, ip_addr), None)
elif interface_name.startswith("PortChannel"):
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)

#
# 'acl' group ('config acl ...')
Expand Down

0 comments on commit 1bbf2fb

Please sign in to comment.