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 #9699

Closed
ganglyu opened this issue Jan 7, 2022 · 2 comments · Fixed by #9806
Closed

[yang-models] device_metadata validation issue #9699

ganglyu opened this issue Jan 7, 2022 · 2 comments · Fixed by #9806
Assignees
Labels
Triaged this issue has been triaged YANG YANG model related changes

Comments

@ganglyu
Copy link
Contributor

ganglyu commented Jan 7, 2022

Description

'DEVICE_METADATA': {'localhost': {'bgp_asn': '65100',
'cloudtype': None,
'cluster': 'AAA00PrdStr00',
'deployment_id': '1',
'docker_routing_config_mode': 'separated',
'hostname': 'switch-t0',
'hwsku': 'Force10-S6000',
'peer_switch': 'switch2-t0',
'region': None,
'resource_type': 'Storage',
'storage_device': 'true',
'subtype': 'DualToR',
'synchronous_mode': 'enable',
'type': 'ToRRouter'}},

https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-config-engine/minigraph.py#L247-L248
Config db schema generated by minigraph can’t pass yang validation:
there's no 'cluster' in yang model.
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/simple-sample-graph-case.xml -p t0-sample-port-config.ini --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 Jan 7, 2022
@renukamanavalan
Copy link
Contributor

@praveen-li , can you please look into this issue ?

@praveen-li
Copy link
Member

@ganglyu Kindly follow this PR #6464.
This way you can add 'cluster' field by yourself and also can add tests.
Kindly let me know if any issues in understanding this, we can have a quick call b/w 5-6 PM PST anyday.

@ganglyu ganglyu assigned ganglyu and unassigned praveen-li Jan 11, 2022
@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged YANG YANG model related changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants