Skip to content

Commit

Permalink
Clarify last-reboot-time is updated during a power-on event (#1179)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
dplore authored Feb 20, 2025
1 parent c9eb9c9 commit b0d7b80
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
10 changes: 8 additions & 2 deletions release/models/platform/openconfig-platform-common.yang
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ submodule openconfig-platform-common {
"This modules contains common groupings that are used in multiple
components within the platform module.";

oc-ext:openconfig-version "0.30.0";
oc-ext:openconfig-version "0.31.0";

revision "2024-10-13" {
revision "2025-01-30" {
description
"Deprecate last-reboot-time and add boot-time.";
reference "0.31.0";
}

revision "2024-10-13" {
description
"Add storage state io-errors.";
reference "0.30.0";
Expand Down
33 changes: 27 additions & 6 deletions release/models/platform/openconfig-platform.yang
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ module openconfig-platform {
(presence or absence of a component) and state (physical
attributes or status).";

oc-ext:openconfig-version "0.30.0";
oc-ext:openconfig-version "0.31.0";

revision "2025-01-30" {
description
"Deprecate last-reboot-time and add boot-time.";
reference "0.31.0";
}

revision "2024-10-13" {
description
Expand All @@ -85,7 +91,7 @@ module openconfig-platform {
reference "0.28.0";
}

revision "2024-05-29" {
revision "2024-05-29" {
description
"Change install-position from leaf-ref to string.";
reference "0.27.0";
Expand Down Expand Up @@ -637,8 +643,9 @@ module openconfig-platform {
- USER_INITIATED
- SYSTEM_INITIATED
- POWER_FAILURE
This field is not updated during reboots; those are tracked
in the 'last-reboot-time' leaf.";
This field is only updated when power is shut off. It is not
updated during reboots; those are tracked in the 'boot-time'
leaf.";
}

container last-switchover-reason {
Expand Down Expand Up @@ -674,11 +681,25 @@ module openconfig-platform {
leaf last-reboot-time {
type oc-types:timeticks64;
units "nanoseconds";
status deprecated;
description
"This reports the time of the last reboot of the component. The
value is the timestamp in nanoseconds relative to the Unix Epoch
(Jan 1, 1970 00:00:00 UTC). This timer is not updated during
power shutdowns; those are tracked in 'last-poweroff-time' leaf.";
(Jan 1, 1970 00:00:00 UTC). This timer is updated when the component
starts up, either due to a power-on event or a reboot. This timer
is not updated during power shutdowns; those are tracked in
the 'last-poweroff-time' leaf.
This leaf is deprecated and the boot-time leaf should be used
instead.";
}

leaf boot-time {
type oc-types:timeticks64;
units "nanoseconds";
description
"This timestamp indicates the time that the component was started.
The value is the timestamp in nanoseconds relative to the Unix
Epoch (Jan 1, 1970 00:00:00 UTC).";
}

leaf switchover-ready {
Expand Down

0 comments on commit b0d7b80

Please sign in to comment.