Skip to content

Commit

Permalink
[chassis] Add chassis support for CLI "config qos reload" (#3233)
Browse files Browse the repository at this point in the history
* Add support for chassis in qos reload
  • Loading branch information
wenyiz2021 authored Mar 21, 2024
1 parent d8541ad commit c149e48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,14 @@ def _qos_update_ports(ctx, ports, dry_run, json_data):
for table_name in tables_multi_index:
entries = config_db.get_keys(table_name)
for key in entries:
port, _ = key
# Add support for chassis/multi-dut:
# on a single-dut, key = ('Ethernet136', '6')
# while on a chassis, key = ('str2-chassis-lcx-1', 'Asic0', 'Ethernet84', '5')
for element in key:
if element.startswith('Eth'):
port = element
break
assert port is not None, "Port is not found in config DB"
if not port in portset_to_handle:
continue
config_db.set_entry(table_name, '|'.join(key), None)
Expand Down

0 comments on commit c149e48

Please sign in to comment.