From 8ac03af3c89ace96db902f5127971560b85b5511 Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Fri, 3 Jan 2025 14:12:38 -0800 Subject: [PATCH 1/7] Component upgrade state. --- .../platform/openconfig-platform-types.yang | 36 +++++++- .../models/platform/openconfig-platform.yang | 85 ++++++++++++++++++- 2 files changed, 119 insertions(+), 2 deletions(-) diff --git a/release/models/platform/openconfig-platform-types.yang b/release/models/platform/openconfig-platform-types.yang index 88b0ef5215..d996b08681 100644 --- a/release/models/platform/openconfig-platform-types.yang +++ b/release/models/platform/openconfig-platform-types.yang @@ -22,8 +22,13 @@ module openconfig-platform-types { "This module defines data types (e.g., YANG identities) to support the OpenConfig component inventory model."; - oc-ext:openconfig-version "1.8.0"; + oc-ext:openconfig-version "1.9.0"; + revision "2025-01-03" { + description + "Add OPENCONFIG_UPGRADE_STATUS"; + reference "1.9.0"; + } revision "2024-04-30" { description @@ -552,6 +557,35 @@ module openconfig-platform-types { "The component reboots due to critical errors."; } + identity OPENCONFIG_UPGRADE_STATUS { + description + "Base entity for component upgrade status."; + } + + identity UPGRADE_FILE_LOADING { + base OPENCONFIG_UPGRADE_STATUS; + description + "The file is being loaded on the component."; + } + + identity UPGRADE_IN_PROGRESS { + base OPENCONFIG_UPGRADE_STATUS; + description + "The upgrade is in-progress."; + } + + identity UPGRADE_COMPLETE { + base OPENCONFIG_UPGRADE_STATUS; + description + "The upgrade was completed."; + } + + identity UPGRADE_FAIL { + base OPENCONFIG_UPGRADE_STATUS; + description + "The upgrade failed."; + } + typedef component-redundant-role { type enumeration { enum PRIMARY { diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index 742c3e8af2..b1f9657e6e 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -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-03" { + description + "Add upgrade state information."; + reference "0.31.0"; + } revision "2024-10-13" { description @@ -705,6 +711,82 @@ module openconfig-platform { } + grouping platform-component-upgrade-state { + description + "Upgrade state data for platform components"; + + container upgrade { + description + "Top-level container for component upgrade state data"; + + leaf new-firmware-version { + type string; + description + "This is the version of associated firmware that is available on + the component, but the upgrade is not complete or has not + yet started."; + } + + leaf new-firmware-version-service-impacting { + type boolean; + description + "A value of true indicates that upgrading the firmware would + be a service impacting event."; + } + + leaf status { + type identityref { + base oc-platform-types:OPENCONFIG_UPGRADE_STATUS; + } + description + "The status of the upgrade."; + } + + leaf step { + type string; + description + "Description of the current in-progress step of the upgrade."; + } + + leaf step-percent-complete { + type oc-types:percentage; + description + "The percent complete for the in-progress step."; + } + + leaf total-percent-complete { + type oc-types:percentage; + description + "The percent complete for the entire upgrade process."; + } + + leaf start-timestamp { + type oc-types:timeticks64; + description + "The timestamp when the upgrade started."; + } + + leaf duration { + type yang:counter64; + description + "The duration of the upgrade, in microseconds."; + } + + leaf stop-timestamp { + type oc-types:timeticks64; + description + "The timestamp when the upgrade stopped."; + } + + leaf last-known-failure { + type string; + description + "The reason of the last known failure, if the most recent + upgrade ended in failure."; + } + } + } + grouping platform-component-temp-alarm-state { description "Temperature alarm data for platform components"; @@ -1309,6 +1391,7 @@ module openconfig-platform { "'oc-platform-types:INTEGRATED_CIRCUIT' or " + "'oc-platform-types:FRU'"; } + uses platform-component-upgrade-state; } uses platform-component-properties-top; From 50134ec3b0918cbc4c6274ea12943c23ab358afc Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Fri, 3 Jan 2025 14:18:53 -0800 Subject: [PATCH 2/7] Make the version generic. --- release/models/platform/openconfig-platform.yang | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index b1f9657e6e..c6ec66a89f 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -719,18 +719,17 @@ module openconfig-platform { description "Top-level container for component upgrade state data"; - leaf new-firmware-version { + leaf new-version { type string; description - "This is the version of associated firmware that is available on - the component, but the upgrade is not complete or has not - yet started."; + "This is the version that is available on the component, + but the upgrade is not complete or has not yet started."; } - leaf new-firmware-version-service-impacting { + leaf new-version-service-impacting { type boolean; description - "A value of true indicates that upgrading the firmware would + "A value of true indicates that upgrading would be a service impacting event."; } From 7b9740dade2ffe63e624b6b39333a635b89fd25d Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Fri, 3 Jan 2025 14:23:29 -0800 Subject: [PATCH 3/7] Add missing oc- prefix. --- release/models/platform/openconfig-platform.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index c6ec66a89f..ce022b0012 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -766,7 +766,7 @@ module openconfig-platform { } leaf duration { - type yang:counter64; + type oc-yang:counter64; description "The duration of the upgrade, in microseconds."; } From a0feab60fbf883289ee33b8715fa0bddafc567e6 Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Mon, 6 Jan 2025 17:07:47 -0800 Subject: [PATCH 4/7] Update duration description. Update duration to secs. Add an Abort status. --- release/models/platform/openconfig-platform-types.yang | 6 ++++++ release/models/platform/openconfig-platform.yang | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/release/models/platform/openconfig-platform-types.yang b/release/models/platform/openconfig-platform-types.yang index ba2faae759..4de245e461 100644 --- a/release/models/platform/openconfig-platform-types.yang +++ b/release/models/platform/openconfig-platform-types.yang @@ -592,6 +592,12 @@ module openconfig-platform-types { "The upgrade was completed."; } + identity UPGRADE_ABORT { + base OPENCONFIG_UPGRADE_STATUS; + description + "The upgrade was aborted."; + } + identity UPGRADE_FAIL { base OPENCONFIG_UPGRADE_STATUS; description diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index ce022b0012..f63d9e9b89 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -768,7 +768,8 @@ module openconfig-platform { leaf duration { type oc-yang:counter64; description - "The duration of the upgrade, in microseconds."; + "The time elapsed since the upgrade was initiated or the + duration of the last upgrade. This is reported in seconds."; } leaf stop-timestamp { From 5055ae491d7d02a405f21471fcdfd359e7047e34 Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Tue, 7 Jan 2025 10:14:49 -0800 Subject: [PATCH 5/7] Add a units of seconds. --- release/models/platform/openconfig-platform.yang | 1 + 1 file changed, 1 insertion(+) diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index f63d9e9b89..0f96a22853 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -767,6 +767,7 @@ module openconfig-platform { leaf duration { type oc-yang:counter64; + units "seconds"; description "The time elapsed since the upgrade was initiated or the duration of the last upgrade. This is reported in seconds."; From 15ac77f1b4f6a409861daac4cc9afad14da0aaf8 Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Tue, 7 Jan 2025 12:52:28 -0800 Subject: [PATCH 6/7] s/upgrade/install to signify the new version may be higher or lower than the current version. --- .../platform/openconfig-platform-types.yang | 36 +++++++++---------- .../models/platform/openconfig-platform.yang | 36 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/release/models/platform/openconfig-platform-types.yang b/release/models/platform/openconfig-platform-types.yang index 4de245e461..51f0bea132 100644 --- a/release/models/platform/openconfig-platform-types.yang +++ b/release/models/platform/openconfig-platform-types.yang @@ -24,9 +24,9 @@ module openconfig-platform-types { oc-ext:openconfig-version "1.9.0"; - revision "2025-01-03" { + revision "2025-01-07" { description - "Add OPENCONFIG_UPGRADE_STATUS"; + "Add OPENCONFIG_INSTALL_STATUS"; reference "1.9.0"; } @@ -569,39 +569,39 @@ module openconfig-platform-types { "The component reboots due to critical errors."; } - identity OPENCONFIG_UPGRADE_STATUS { + identity OPENCONFIG_INSTALL_STATUS { description - "Base entity for component upgrade status."; + "Base entity for component install status."; } - identity UPGRADE_FILE_LOADING { - base OPENCONFIG_UPGRADE_STATUS; + identity INSTALL_FILE_LOADING { + base OPENCONFIG_INSTALL_STATUS; description "The file is being loaded on the component."; } - identity UPGRADE_IN_PROGRESS { - base OPENCONFIG_UPGRADE_STATUS; + identity INSTALL_IN_PROGRESS { + base OPENCONFIG_INSTALL_STATUS; description - "The upgrade is in-progress."; + "The install is in-progress."; } - identity UPGRADE_COMPLETE { - base OPENCONFIG_UPGRADE_STATUS; + identity INSTALL_COMPLETE { + base OPENCONFIG_INSTALL_STATUS; description - "The upgrade was completed."; + "The install was completed."; } - identity UPGRADE_ABORT { - base OPENCONFIG_UPGRADE_STATUS; + identity INSTALL_ABORT { + base OPENCONFIG_INSTALL_STATUS; description - "The upgrade was aborted."; + "The install was aborted."; } - identity UPGRADE_FAIL { - base OPENCONFIG_UPGRADE_STATUS; + identity INSTALL_FAIL { + base OPENCONFIG_INSTALL_STATUS; description - "The upgrade failed."; + "The install failed."; } typedef component-redundant-role { diff --git a/release/models/platform/openconfig-platform.yang b/release/models/platform/openconfig-platform.yang index 0f96a22853..119437158c 100644 --- a/release/models/platform/openconfig-platform.yang +++ b/release/models/platform/openconfig-platform.yang @@ -67,9 +67,9 @@ module openconfig-platform { oc-ext:openconfig-version "0.31.0"; - revision "2025-01-03" { + revision "2025-01-07" { description - "Add upgrade state information."; + "Add install state information."; reference "0.31.0"; } @@ -711,40 +711,40 @@ module openconfig-platform { } - grouping platform-component-upgrade-state { + grouping platform-component-install-state { description - "Upgrade state data for platform components"; + "Install state data for platform components"; - container upgrade { + container install { description - "Top-level container for component upgrade state data"; + "Top-level container for component install state data"; leaf new-version { type string; description "This is the version that is available on the component, - but the upgrade is not complete or has not yet started."; + but the install is not complete or has not yet started."; } leaf new-version-service-impacting { type boolean; description - "A value of true indicates that upgrading would + "A value of true indicates that installing would be a service impacting event."; } leaf status { type identityref { - base oc-platform-types:OPENCONFIG_UPGRADE_STATUS; + base oc-platform-types:OPENCONFIG_INSTALL_STATUS; } description - "The status of the upgrade."; + "The status of the install."; } leaf step { type string; description - "Description of the current in-progress step of the upgrade."; + "Description of the current in-progress step of the install."; } leaf step-percent-complete { @@ -756,34 +756,34 @@ module openconfig-platform { leaf total-percent-complete { type oc-types:percentage; description - "The percent complete for the entire upgrade process."; + "The percent complete for the entire install process."; } leaf start-timestamp { type oc-types:timeticks64; description - "The timestamp when the upgrade started."; + "The timestamp when the install started."; } leaf duration { type oc-yang:counter64; units "seconds"; description - "The time elapsed since the upgrade was initiated or the - duration of the last upgrade. This is reported in seconds."; + "The time elapsed since the install was initiated or the + duration of the last install. This is reported in seconds."; } leaf stop-timestamp { type oc-types:timeticks64; description - "The timestamp when the upgrade stopped."; + "The timestamp when the install stopped."; } leaf last-known-failure { type string; description "The reason of the last known failure, if the most recent - upgrade ended in failure."; + install ended in failure."; } } } @@ -1392,7 +1392,7 @@ module openconfig-platform { "'oc-platform-types:INTEGRATED_CIRCUIT' or " + "'oc-platform-types:FRU'"; } - uses platform-component-upgrade-state; + uses platform-component-install-state; } uses platform-component-properties-top; From db91e094c632afb8b0eb1624365c461189e334a4 Mon Sep 17 00:00:00 2001 From: Eric Breverman Date: Tue, 7 Jan 2025 12:53:38 -0800 Subject: [PATCH 7/7] Increment the YANG file version number. --- release/models/platform/openconfig-platform-types.yang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/models/platform/openconfig-platform-types.yang b/release/models/platform/openconfig-platform-types.yang index 51f0bea132..36cc7b888a 100644 --- a/release/models/platform/openconfig-platform-types.yang +++ b/release/models/platform/openconfig-platform-types.yang @@ -22,12 +22,12 @@ module openconfig-platform-types { "This module defines data types (e.g., YANG identities) to support the OpenConfig component inventory model."; - oc-ext:openconfig-version "1.9.0"; + oc-ext:openconfig-version "1.10.0"; revision "2025-01-07" { description "Add OPENCONFIG_INSTALL_STATUS"; - reference "1.9.0"; + reference "1.10.0"; } revision "2024-11-04" {