Skip to content

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

Closed
wen587 wants to merge 8 commits intosonic-net:masterfrom
wen587:w_swss_py
Closed

[strict yang] Add YANG based cfg_schema.h to schema.h#984
wen587 wants to merge 8 commits intosonic-net:masterfrom
wen587:w_swss_py

Conversation

@wen587
Copy link
Contributor

@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

@azure-pipelines
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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@qiluo-msft
Copy link
Contributor

qiluo-msft commented Mar 17, 2025

#define CFG_PORT_TABLE_NAME "PORT"

will you remove all ConfigDB macros? #Closed


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
Contributor 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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
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
Contributor 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

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, please fix PR checker failures.

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.

4 participants