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

Add mgmt_type into device metadata YANG model. #21897

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

r12f
Copy link
Contributor

@r12f r12f commented Mar 1, 2025

Why I did it

Enhance yang model for networking-metadata.

Adding a new field in device metadata YANG model to distinguish the management type of the device. Depends on the users, this field can be used to tell the purpose of deployment or who/how the device is being managed.

Work item tracking
  • Microsoft ADO (number only):

How I did it

This change adds a new field called mgmt_type for this purpose.

How to verify it

Unit test.

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305
  • 202405
  • 202411

Tested branch (Please provide the tested image version)

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.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@ganglyu ganglyu left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -157,6 +157,11 @@ module sonic-device_metadata {
type string;
}

leaf mgmt_type {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this field be enum, or it is arbitrary value? Also, is there any restrcition? like length bound, lastly, is it mandatory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is just a user-specified string, no pattern, not enum. the way to use it is in the template evaluation.

this field is optional, not mandatory.

Copy link
Contributor

@xincunli-sonic xincunli-sonic left a comment

Choose a reason for hiding this comment

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

LGTM

@r12f
Copy link
Contributor Author

r12f commented Mar 4, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 21897 in repo sonic-net/sonic-buildimage

@r12f
Copy link
Contributor Author

r12f commented Mar 4, 2025

/azp run Azure.sonic-buildimage

Copy link

Commenter does not have sufficient privileges for PR 21897 in repo sonic-net/sonic-buildimage

@r12f r12f force-pushed the user/r12f/update-yang branch from a0fd70d to c137d09 Compare March 4, 2025 07:17
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@kperumalbfn kperumalbfn left a comment

Choose a reason for hiding this comment

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

LGTM

@kperumalbfn kperumalbfn merged commit 19cd4a5 into sonic-net:master Mar 5, 2025
21 checks passed
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #21934

miatttao pushed a commit to miatttao/sonic-buildimage that referenced this pull request Mar 5, 2025
Add mgmt_type into device metadata YANG model.
prabhataravind pushed a commit to prabhataravind/sonic-buildimage that referenced this pull request Mar 5, 2025
Add mgmt_type into device metadata YANG model.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #21944

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

Successfully merging this pull request may close these issues.

7 participants