Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202211][yang] Extend device_metadata yang model with rack_mgmt_map #15141

Merged
merged 2 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,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"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@
},
"DEVICE_METADATA_ADVERTISE_LO_PREFIX_AS_128": {
"desc": "Verifying advertising lo prefix as /128."
},
"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."
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,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"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ module sonic-device_metadata {
description "Advertise Loopback0 interface IPv6 /128 subnet address as it is with set to true.
By default SONiC advertises /128 subnet prefix in Loopback0 as /64 subnet route";
}

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 */
}
Expand Down