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

[strict yang] Add YANG based cfg_schema.h to schema.h #984

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

wen587
Copy link

@wen587 wen587 commented Mar 10, 2025

Depends on sonic-net/sonic-buildimage#21977

Why I did it

To enable YANG based CFG table generation, the ConfigDB related macro will be generated by YANG model

How I did it

Add gen_cfg_schema.py script to generate cfg_schema.h which will be included in schema.h

Work item tracking
  • Microsoft ADO: 31676863

How to verify it

make deb build

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft
Copy link
Contributor

#define CFG_PORT_TABLE_NAME "PORT"

will you remove all ConfigDB macros?


Refers to: common/schema.h:313 in 501fc9a. [](commit_id = 501fc9a, deletion_comment = False)

@qiluo-msft qiluo-msft requested a review from liuh-80 March 17, 2025 00:44
@wen587
Copy link
Author

wen587 commented Mar 17, 2025

#define CFG_PORT_TABLE_NAME "PORT"

will you remove all ConfigDB macros?

Refers to: common/schema.h:313 in 501fc9a. [](commit_id = 501fc9a, deletion_comment = False)

Hii @qiluo-msft , I will remove ConfigDB macros based on macro type.
In use but no YANG: Keep it but remove after YANG added
Non-Standard(unfollow CFG_XXX_TABLE_NAME): Updated other repo which has reference to macro then remove.
Not in use and no YANG: directly remove.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft
Copy link
Contributor

#define CFG_PORT_TABLE_NAME "PORT"

Still applicable.


In reply to: 2727764694


Refers to: common/schema.h:313 in 501fc9a. [](commit_id = 501fc9a, deletion_comment = False)

@wen587
Copy link
Author

wen587 commented Mar 24, 2025

#define CFG_PORT_TABLE_NAME "PORT"

Still applicable.

In reply to: 2727764694

Refers to: common/schema.h:313 in 501fc9a. [](commit_id = 501fc9a, deletion_comment = False)

Hi @qiluo-msft , will remove relative macro in next.
Since this one is not blocking, will remove based on type in next PR:
In use but no YANG: Keep it but remove after YANG added
Non-Standard(unfollow CFG_XXX_TABLE_NAME): Updated other repo which has reference to macro then remove.
Not in use and no YANG: directly remove.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

3 participants