Skip to content

Commit

Permalink
[TPID CONFIG]TPID attribute Yang model and default TPID for Minigraph…
Browse files Browse the repository at this point in the history
… to configDB Changes (sonic-net#7630)

* [TPID CONFIG]TPID attribute Yang model and default TPID for Minigraph to configDB Changes

* Fixed alignment spacing issue, removed length and convert to use tpid_type typedef for both LAG and PORT tpid attribute, added description in port and portchannel leaf for the tpid attribute
  • Loading branch information
gechiang authored and Carl Keene committed Aug 7, 2021
1 parent 3b5ee23 commit 848e1f8
Show file tree
Hide file tree
Showing 14 changed files with 433 additions and 236 deletions.
6 changes: 4 additions & 2 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1450,9 +1450,10 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
# for the ports w/o neighbor info, set it to port alias
port['description'] = port.get('alias', port_name)

# set default port MTU as 9100
# set default port MTU as 9100 and default TPID 0x8100
for port in ports.values():
port['mtu'] = '9100'
port['tpid'] = '0x8100'

# asymmetric PFC is disabled by default
for port in ports.values():
Expand Down Expand Up @@ -1485,9 +1486,10 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
print("Warning: ignore '%s' as part of its member interfaces is not in the port_config.ini" % pc_name, file=sys.stderr)
del pcs[pc_name]

# set default port channel MTU as 9100 and admin status up
# set default port channel MTU as 9100 and admin status up and default TPID 0x8100
for pc in pcs.values():
pc['mtu'] = '9100'
pc['tpid'] = '0x8100'
pc['admin_status'] = 'up'

results['PORTCHANNEL'] = pcs
Expand Down
Loading

0 comments on commit 848e1f8

Please sign in to comment.