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

[yang-models] device_metadata validation issue #9592

Closed
ganglyu opened this issue Dec 20, 2021 · 1 comment · Fixed by #10154
Closed

[yang-models] device_metadata validation issue #9592

ganglyu opened this issue Dec 20, 2021 · 1 comment · Fixed by #10154
Assignees
Labels
YANG YANG model related changes

Comments

@ganglyu
Copy link
Contributor

ganglyu commented Dec 20, 2021

Description

'DEVICE_METADATA': {'localhost': {'bgp_asn': '65100',
'cloudtype': None,
'deployment_id': None,
'docker_routing_config_mode': 'separated',
'hostname': 'multi_npu_platform_01',
'hwsku': 'multi-npu-01',
'region': None,
'synchronous_mode': 'enable',
'type': 'LeafRouter'}},

Config db schema generated by minigraph can’t pass yang validation, deployment_id can’t be none for yang validation.
parse_asic_meta did not update deployment_id, and it seems that we need to update yang model or sonic-config-engine.

Steps to reproduce the issue:

  1. Run command 'sonic-cfggen -m tests/multi_npu_data/sample-minigraph-noportchannel.xml -p tests/multi_npu_data/sample_port_config-3.ini -n asic3 --print-data'
  2. Use sonic_yang to validate config db schema.

Describe the results you received:

Yang validation failed.

Describe the results you expected:

Yang validation should pass.

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@ganglyu ganglyu added the YANG YANG model related changes label Dec 20, 2021
@SuvarnaMeenakshi
Copy link
Contributor

@ganglyu deployment_id is specified as int value, so ideally should not be None.
Fix should be made in sonic-cfggen to ensure that deployment id is not populated if it is None.

@arlakshm fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants