Skip to content

Commit

Permalink
This commit addresses below issues:
Browse files Browse the repository at this point in the history
1. Short Format Subinterface getting deleted after vrf binding . Issue
10802:sonic-net/sonic-buildimage#10802
2. Do not allow short format subinterface to be created without encap
vlan configuration. Issue 10878:
sonic-net/sonic-buildimage#10878
  • Loading branch information
preetham-singh committed Nov 18, 2022
1 parent 51794d3 commit bfe986e
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 @@ -6810,6 +6810,10 @@ def add_subinterface(ctx, subinterface_name, vid):
subintf_dict = {}
if vid is not None:
subintf_dict.update({"vlan" : vid})

if subintf_vlan_check(config_db, get_intf_longname(interface_alias), vid) is True:
ctx.fail("Vlan {} encap already configured on other subinterface on {}".format(vid, interface_alias))

subintf_dict.update({"admin_status" : "up"})

try:
Expand Down

0 comments on commit bfe986e

Please sign in to comment.