Skip to content

Commit

Permalink
[yang] Add missing device types to the device_metadata yang (#9464)
Browse files Browse the repository at this point in the history
Signed-off-by: Neetha John <[email protected]>

Bring back the changes in #9226 that were reverted. Unable to do a revert-revert.

Why I did it
Few device types were missing in the DEVICE_METADATA type field

How I did it
Added missing device types to the device metadata yang
  • Loading branch information
neethajohn authored and judyjoseph committed Jan 9, 2022
1 parent 7988264 commit 3c20bd8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"DEVICE_METADATA_TYPE_INCORRECT_PATTERN": {
"desc": "DEVICE_METADATA_TYPE_INCORRECT_PATTERN pattern failure.",
"eStrKey" : "Pattern"
},
"DEVICE_METADATA_TYPE_CORRECT_PATTERN": {
"desc": "DEVICE_METADATA correct value for Type field"
},
"DEVICE_METADATA_DEFAULT_SYNCHRONOUS_MODE": {
"desc": "DEVICE_METADATA DEFAULT VALUE FOR SYNCHRONOUS MODE.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@
}
}
},
"DEVICE_METADATA_TYPE_CORRECT_PATTERN": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"bgp_asn": "65002",
"type": "BackEndToRRouter"
}
}
}
},
"DEVICE_METADATA_DEFAULT_SYNCHRONOUS_MODE": {
"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 @@ -90,7 +90,7 @@ module sonic-device_metadata {
leaf type {
type string {
length 1..255;
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC";
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR";
}
}

Expand Down

0 comments on commit 3c20bd8

Please sign in to comment.