Skip to content

Commit

Permalink
Add SonicHost to DEVICE_METADATA yang model (#19544)
Browse files Browse the repository at this point in the history
#### Why I did it
Fixes sonic-net/sonic-mgmt#12297

#### How I did it
Add 'SonicHost' to the allowed device types for the DEVICE_METADATA table
  • Loading branch information
theasianpianist authored Jul 23, 2024
1 parent a8dc94b commit 0324d9a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
"DEVICE_METADATA_TYPE_BMC_MGMT_TOR_PATTERN": {
"desc": "DEVICE_METADATA value as BmcMgmtToRRouter for Type field"
},
"DEVICE_METADATA_TYPE_SONIC_HOST_PATTERN": {
"desc": "DEVICE_METADATA value as SonicHost for Type field"
},
"DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": {
"desc": "DEVICE_METADATA value as not-provisioned for Type field"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@
}
}
},
"DEVICE_METADATA_TYPE_SONIC_HOST_PATTERN": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"bgp_asn": "65002",
"type": "SonicHost"
}
}
}
},
"DEVICE_METADATA_TYPE_NOT_PROVISIONED_PATTERN": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module sonic-device_metadata {
leaf type {
type string {
length 1..255;
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|not-provisioned";
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|SonicHost|not-provisioned";
}
}

Expand Down

0 comments on commit 0324d9a

Please sign in to comment.