Skip to content

Commit c283c5c

Browse files
r12fUbuntu
authored and
Ubuntu
committed
Add mgmt_type into device metadata YANG model. (sonic-net#21897)
Add mgmt_type into device metadata YANG model.
1 parent 5aff9c0 commit c283c5c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/sonic-yang-models/tests/yang_model_tests/tests/device_metadata.json

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
"DEVICE_METADATA_RESOURCE_TYPE_CONFIG": {
9595
"desc": "Verifying resource type configuration."
9696
},
97+
"DEVICE_METADATA_MGMT_TYPE_CONFIG": {
98+
"desc": "Verifying mgmt type configuration."
99+
},
97100
"DEVICE_METADATA_VALID_CLUSTER": {
98101
"desc": "Verifying valid cluster configuration."
99102
},

src/sonic-yang-models/tests/yang_model_tests/tests_config/device_metadata.json

+9
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@
257257
}
258258
}
259259
},
260+
"DEVICE_METADATA_MGMT_TYPE_CONFIG": {
261+
"sonic-device_metadata:sonic-device_metadata": {
262+
"sonic-device_metadata:DEVICE_METADATA": {
263+
"sonic-device_metadata:localhost": {
264+
"mgmt_type": "mgmt_type_x"
265+
}
266+
}
267+
}
268+
},
260269
"DEVICE_METADATA_VALID_CLUSTER": {
261270
"sonic-device_metadata:sonic-device_metadata": {
262271
"sonic-device_metadata:DEVICE_METADATA": {

src/sonic-yang-models/yang-models/sonic-device_metadata.yang

+5
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ module sonic-device_metadata {
157157
type string;
158158
}
159159

160+
leaf mgmt_type {
161+
type string;
162+
description "Indicates the management type of this device.";
163+
}
164+
160165
leaf cluster {
161166
type string;
162167
description "The switch is a member of this cluster.";

0 commit comments

Comments
 (0)