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

* Add missing device types to the DEVICE_METADATA type field

Signed-off-by: Neetha John <nejo@microsoft.com>
This commit is contained in:
Neetha John 2021-11-11 19:41:24 -08:00 committed by GitHub
parent a980e836c1
commit 2dc94b30bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View File

@ -33,6 +33,9 @@
"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_CORRECT_BUFFER_MODEL_PATTERN": {
"desc": "DEVICE_METADATA correct value for BUFFER_MODEL field"
},

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"
}
}
}
},
"DEV_META_DEV_NEIGH_VERSION_TABLE": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {

View File

@ -91,7 +91,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";
}
}