Skip to content

Commit b0d7b80

Browse files
authored
Clarify last-reboot-time is updated during a power-on event (#1179)
* Clarify last-reboot-time is updated during a power-on event. * Deprecate last-reboot-time leaf. This leaf will be removed in a future major release of OC. * Add boot-time which will replace last-boot-time in a future major release of OC.
1 parent c9eb9c9 commit b0d7b80

File tree

2 files changed

+35
-8
lines changed

2 files changed

+35
-8
lines changed

release/models/platform/openconfig-platform-common.yang

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ submodule openconfig-platform-common {
2020
"This modules contains common groupings that are used in multiple
2121
components within the platform module.";
2222

23-
oc-ext:openconfig-version "0.30.0";
23+
oc-ext:openconfig-version "0.31.0";
2424

25-
revision "2024-10-13" {
25+
revision "2025-01-30" {
26+
description
27+
"Deprecate last-reboot-time and add boot-time.";
28+
reference "0.31.0";
29+
}
30+
31+
revision "2024-10-13" {
2632
description
2733
"Add storage state io-errors.";
2834
reference "0.30.0";

release/models/platform/openconfig-platform.yang

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ module openconfig-platform {
6565
(presence or absence of a component) and state (physical
6666
attributes or status).";
6767

68-
oc-ext:openconfig-version "0.30.0";
68+
oc-ext:openconfig-version "0.31.0";
69+
70+
revision "2025-01-30" {
71+
description
72+
"Deprecate last-reboot-time and add boot-time.";
73+
reference "0.31.0";
74+
}
6975

7076
revision "2024-10-13" {
7177
description
@@ -85,7 +91,7 @@ module openconfig-platform {
8591
reference "0.28.0";
8692
}
8793

88-
revision "2024-05-29" {
94+
revision "2024-05-29" {
8995
description
9096
"Change install-position from leaf-ref to string.";
9197
reference "0.27.0";
@@ -637,8 +643,9 @@ module openconfig-platform {
637643
- USER_INITIATED
638644
- SYSTEM_INITIATED
639645
- POWER_FAILURE
640-
This field is not updated during reboots; those are tracked
641-
in the 'last-reboot-time' leaf.";
646+
This field is only updated when power is shut off. It is not
647+
updated during reboots; those are tracked in the 'boot-time'
648+
leaf.";
642649
}
643650

644651
container last-switchover-reason {
@@ -674,11 +681,25 @@ module openconfig-platform {
674681
leaf last-reboot-time {
675682
type oc-types:timeticks64;
676683
units "nanoseconds";
684+
status deprecated;
677685
description
678686
"This reports the time of the last reboot of the component. The
679687
value is the timestamp in nanoseconds relative to the Unix Epoch
680-
(Jan 1, 1970 00:00:00 UTC). This timer is not updated during
681-
power shutdowns; those are tracked in 'last-poweroff-time' leaf.";
688+
(Jan 1, 1970 00:00:00 UTC). This timer is updated when the component
689+
starts up, either due to a power-on event or a reboot. This timer
690+
is not updated during power shutdowns; those are tracked in
691+
the 'last-poweroff-time' leaf.
692+
This leaf is deprecated and the boot-time leaf should be used
693+
instead.";
694+
}
695+
696+
leaf boot-time {
697+
type oc-types:timeticks64;
698+
units "nanoseconds";
699+
description
700+
"This timestamp indicates the time that the component was started.
701+
The value is the timestamp in nanoseconds relative to the Unix
702+
Epoch (Jan 1, 1970 00:00:00 UTC).";
682703
}
683704

684705
leaf switchover-ready {

0 commit comments

Comments
 (0)