Skip to content
Open
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
2 changes: 1 addition & 1 deletion src/model/oem/dell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub struct System {
pub populated_pcie_slots: i64,
pub power_cap_enabled_state: Option<String>, // We see this field explicitly returned as null by Dell XE9680s
pub system_generation: String,
pub temp_rollup_status: String,
pub temp_rollup_status: Option<String>, // Observed as null if machine is off
#[serde(rename = "UUID")]
pub uuid: String,
pub volt_rollup_status: String,
Expand Down
12 changes: 12 additions & 0 deletions src/model/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,18 @@ mod test {
assert_eq!(result.part_number.as_deref(), Some("0H28RRA06"));
}

#[test]
fn test_system_dell_null_temp_rollup() {
let data = include_str!("testdata/system_dell_null_temp_rollup.json");
let result: super::ComputerSystem = serde_json::from_str(data).unwrap();
let dell = result
.oem
.expect("should contain OEM data")
.dell
.expect("should contain dell-specific OEM data");
assert!(dell.dell_system.temp_rollup_status.is_none());
}

#[test]
fn test_system_bluefield_boot_valid() {
// Old firmware versions of Bluefield deliver empty values for Boot fields
Expand Down
Loading