[yang] Extend device_metadata yang model with rack_mgmt_map (#15109)

* [yang] Extend device_metadata yang model with rack_mgmt_map

* Update doc and sample
This commit is contained in:
Yaqiang Zhu 2023-05-19 00:00:20 +08:00 committed by GitHub
parent deb760002a
commit 6332aa31cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 2 deletions

View File

@ -925,7 +925,8 @@ instance is supported in SONiC.
"type": "ToRRouter",
"bgp_adv_lo_prefix_as_128" : "true",
"buffer_model": "traditional",
"yang_config_validation": "disable"
"yang_config_validation": "disable",
"rack_mgmt_map": "dummy_value"
}
}
}

View File

@ -359,7 +359,8 @@
"sub_role": "FrontEnd",
"dhcp_server": "disabled",
"bgp_adv_lo_prefix_as_128": "true",
"yang_config_validation": "disable"
"yang_config_validation": "disable",
"rack_mgmt_map": "dummy_value"
}
},
"VLAN": {

View File

@ -135,5 +135,12 @@
"DEVICE_METADATA_SUPPRESS_PENDING_FIB_ENABLED_SYNCHRONOUS_MODE_DISABLED": {
"desc": "Enable bgp-suppress-fib-pending when synchronous mode is disabled",
"eStr": ["ASIC synchronous mode must be enabled in order to enable suppress FIB pending feature"]
},
"DEVICE_METADATA_VALID_RACK_MGMT_MAP": {
"desc": "Verifying rack_mgmt_map configuration."
},
"DEVICE_METADATA_INVALID_RACK_MGMT_MAP": {
"desc": "Verifying invalid rack_mgmt_map configuration.",
"eStr": "Invalid length for the rack mgmt map."
}
}

View File

@ -362,5 +362,23 @@
}
}
}
},
"DEVICE_METADATA_VALID_RACK_MGMT_MAP": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"rack_mgmt_map": "dummy_value"
}
}
}
},
"DEVICE_METADATA_INVALID_RACK_MGMT_MAP": {
"sonic-device_metadata:sonic-device_metadata": {
"sonic-device_metadata:DEVICE_METADATA": {
"sonic-device_metadata:localhost": {
"rack_mgmt_map": "dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value-dummy_value"
}
}
}
}
}

View File

@ -217,6 +217,14 @@ module sonic-device_metadata {
error-message "ASIC synchronous mode must be enabled in order to enable suppress FIB pending feature";
}
}
leaf rack_mgmt_map {
type string {
length 0..128 {
error-message "Invalid length for the rack mgmt map.";
}
}
description "Information of rack mgmt map.";
}
}
/* end of container localhost */
}