Skip to content

Commit

Permalink
[config] parse optional fields from hwsku
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytroxshevchuk committed Dec 8, 2020
1 parent 43a32e6 commit 290559f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sonic-config-engine/portconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ def parse_platform_json_file(hwsku_json_file, platform_json_file):
brkout_mode = hwsku_dict[INTF_KEY][intf][BRKOUT_MODE]

child_ports = get_child_ports(intf, brkout_mode, platform_json_file)

# take optional fields from hwsku.json
for key, item in hwsku_dict[INTF_KEY][intf].items():
if key == BRKOUT_MODE:
continue
child_ports.get(intf)[key] = item

ports.update(child_ports)

if not ports:
Expand Down

0 comments on commit 290559f

Please sign in to comment.