[yang] Add missing device types to the device_metadata yang (#9464)

Signed-off-by: Neetha John <nejo@microsoft.com>

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
This commit is contained in:
Neetha John 2021-12-10 09:26:08 -08:00 committed by GitHub
parent 02d273274f
commit 5384b30d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -32,6 +32,9 @@
"DEVICE_METADATA_TYPE_INCORRECT_PATTERN": { "DEVICE_METADATA_TYPE_INCORRECT_PATTERN": {
"desc": "DEVICE_METADATA_TYPE_INCORRECT_PATTERN pattern failure.", "desc": "DEVICE_METADATA_TYPE_INCORRECT_PATTERN pattern failure.",
"eStrKey" : "Pattern" "eStrKey" : "Pattern"
},
"DEVICE_METADATA_TYPE_CORRECT_PATTERN": {
"desc": "DEVICE_METADATA correct value for Type field"
}, },
"DEVICE_METADATA_DEFAULT_SYNCHRONOUS_MODE": { "DEVICE_METADATA_DEFAULT_SYNCHRONOUS_MODE": {
"desc": "DEVICE_METADATA DEFAULT VALUE FOR SYNCHRONOUS MODE.", "desc": "DEVICE_METADATA DEFAULT VALUE FOR SYNCHRONOUS MODE.",

View File

@ -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": { "DEVICE_METADATA_DEFAULT_SYNCHRONOUS_MODE": {
"sonic-device_metadata:sonic-device_metadata": { "sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": { "sonic-device_metadata:DEVICE_METADATA": {

View File

@ -90,7 +90,7 @@ module sonic-device_metadata {
leaf type { leaf type {
type string { type string {
length 1..255; length 1..255;
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC"; pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR";
} }
} }