Skip to content

Commit 6034108

Browse files
committed
[inventory] Add display implementation for NTP timesync
1 parent 5f2c4dd commit 6034108

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

nexus/types/src/inventory/display.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,24 @@ fn display_sleds(
734734
}
735735
}
736736
}
737+
738+
let timesync = zones
739+
.keys()
740+
.find_map(|zone_id| collection.ntp_timesync.get(zone_id));
741+
742+
match timesync {
743+
None => writeln!(
744+
indent2,
745+
"No information from NTP for this sled"
746+
)?,
747+
Some(ts) if ts.synced => {
748+
writeln!(indent2, "NTP reports that time is synced")?
749+
}
750+
Some(_) => writeln!(
751+
indent2,
752+
"NTP reports that time is NOT synced"
753+
)?,
754+
}
737755
}
738756
}
739757

0 commit comments

Comments
 (0)