[yang]: Add support for BmcMgmtToRRouter (#10488)

Why I did it
minigraph parser has introduced new type.

How I did it
Update yang models to support BmcMgmtToRRouter.

How to verify it
Run unit test for sonic-yang-models

Signed-off-by: Gang Lv ganglv@microsoft.com
This commit is contained in:
ganglv 2022-04-08 07:48:01 +08:00 committed by Judy Joseph
parent 1ad75641cb
commit bf34b17d20
3 changed files with 14 additions and 1 deletions

View File

@ -36,6 +36,9 @@
"DEVICE_METADATA_TYPE_CORRECT_PATTERN": {
"desc": "DEVICE_METADATA correct value for Type field"
},
"DEVICE_METADATA_TYPE_BMC_MGMT_TOR_PATTERN": {
"desc": "DEVICE_METADATA value as BmcMgmtToRRouter for Type field"
},
"DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": {
"desc": "DEVICE_METADATA value as not-provisioned for Type field"
},

View File

@ -54,6 +54,16 @@
}
}
},
"DEVICE_METADATA_TYPE_BMC_MGMT_TOR_PATTERN": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"bgp_asn": "65002",
"type": "BmcMgmtToRRouter"
}
}
}
},
"DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {

View File

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