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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
"DEVICE_METADATA_RESOURCE_TYPE_CONFIG": {
"desc": "Verifying resource type configuration."
},
"DEVICE_METADATA_MGMT_TYPE_CONFIG": {
"desc": "Verifying mgmt type configuration."
},
"DEVICE_METADATA_VALID_CLUSTER": {
"desc": "Verifying valid cluster configuration."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@
}
}
},
"DEVICE_METADATA_MGMT_TYPE_CONFIG": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"mgmt_type": "mgmt_type_x"
}
}
}
},
"DEVICE_METADATA_VALID_CLUSTER": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

type string;
description "Indicates the management type of this device.";
}

leaf cluster {
type string;
description "The switch is a member of this cluster.";
Expand Down
Loading