[Yang] Add resource_type and downstream_subrole to yang model (#9696)

#### Why I did it
As a fix for https://github.com/Azure/sonic-buildimage/issues/9574

#### How I did it
Enhance yang model for networking-metadata

#### How to verify it
Unit testing
This commit is contained in:
Anish Narsian 2022-01-14 15:37:20 -08:00 committed by Judy Joseph
parent 69a381affc
commit 20f39ba0a4
3 changed files with 32 additions and 0 deletions

View File

@ -60,6 +60,12 @@
},
"DEVICE_METADATA_CORRECT_CLOUDTYPE_REGION_CONFIG": {
"desc": "Verifying cloudtype and region configuration."
},
"DEVICE_METADATA_DOWNSTREAM_SUBROLE_CONFIG": {
"desc": "Verifying downstream subrole configuration."
},
"DEVICE_METADATA_RESOURCE_TYPE_CONFIG": {
"desc": "Verifying resource type configuration."
},
"DEVICE_METADATA_VALID_SUBTYPE": {
"desc": "Verifying valid subtype value"

View File

@ -160,6 +160,24 @@
}
}
},
"DEVICE_METADATA_DOWNSTREAM_SUBROLE_CONFIG": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"downstream_subrole": "downstream_subrole_y"
}
}
}
},
"DEVICE_METADATA_RESOURCE_TYPE_CONFIG": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"resource_type": "resource_type_x"
}
}
}
},
"DEVICE_METADATA_VALID_SUBTYPE": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {

View File

@ -127,6 +127,14 @@ module sonic-device_metadata {
type string;
}
leaf downstream_subrole {
type string;
}
leaf resource_type {
type string;
}
leaf subtype {
type string {
pattern "DualToR";