Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[multi-asic]: Skip must field check in config_db for default namespace in multi-asic platform #10617

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/sonic-config-engine/sonic-cfggen
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ from functools import partial
from minigraph import minigraph_encoder, parse_xml, parse_device_desc_xml, parse_asic_sub_role, parse_asic_switch_type
from portconfig import get_port_config, get_breakout_mode
from redis_bcc import RedisBytecodeCache
from sonic_py_common.multi_asic import get_asic_id_from_name, get_asic_device_id
from sonic_py_common.multi_asic import get_asic_id_from_name, get_asic_device_id, is_multi_asic
from sonic_py_common import device_info
from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector, SonicDBConfig, ConfigDBPipeConnector

Expand Down Expand Up @@ -349,7 +349,10 @@ def main():
else:
deep_update(data, parse_xml(minigraph, port_config_file=args.port_config, asic_name=asic_name, hwsku_config_file=args.hwsku_config))
# check if minigraph parser has speed and lanes in PORT table
_must_field_by_yang(data, 'PORT', ['speed', 'lanes'])
# speed and lanes will not be present for default namespace for
# multi-asic platform.
if not is_multi_asic() or asic_name:
_must_field_by_yang(data, 'PORT', ['speed', 'lanes'])

if args.device_description is not None:
deep_update(data, parse_device_desc_xml(args.device_description))
Expand Down