diff --git a/src/sonic-config-engine/sonic-cfggen b/src/sonic-config-engine/sonic-cfggen index aebd4d0544f5..1efa4cced820 100755 --- a/src/sonic-config-engine/sonic-cfggen +++ b/src/sonic-config-engine/sonic-cfggen @@ -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 @@ -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))