[yang]: update Yang models for cloudtype and region (#9425)

Why I did it
#9122
DEVICE_METADATA does not have cloudtype and region.

How I did it
Add cloudtype and region to DEVICE_METADATA.

How to verify it
Follow the steps in #9122.
Build sonic-yang-model.

Signed-off-by: Gang Lv ganglv@microsoft.com
This commit is contained in:
ganglyu 2021-12-09 09:04:52 +08:00 committed by GitHub
parent 1fb347ab4f
commit 3c1770b7cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 1 deletions

View File

@ -280,7 +280,9 @@
"hostname": "asw.dc",
"bgp_asn": "64850",
"hwsku": "Stone",
"buffer_model": "dynamic"
"buffer_model": "dynamic",
"cloudtype": "Public",
"region": "usfoo"
}
},
"VLAN": {

View File

@ -54,6 +54,9 @@
},
"DEVICE_METADATA_FRR_MGMT_FWK_CONFIG": {
"desc": "Verifying FRR MGMT framework configuration."
},
"DEVICE_METADATA_CORRECT_CLOUDTYPE_REGION_CONFIG": {
"desc": "Verifying cloudtype and region configuration."
}
}

View File

@ -139,5 +139,15 @@
}
}
}
},
"DEVICE_METADATA_CORRECT_CLOUDTYPE_REGION_CONFIG": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"cloudtype": "Public",
"region": "usfoo"
}
}
}
}
}

View File

@ -120,6 +120,14 @@ module sonic-device_metadata {
}
default enable;
}
leaf cloudtype {
type string;
}
leaf region {
type string;
}
}
/* end of container localhost */
}