Skip to content

Commit

Permalink
Add bootz status model and link it to the openconfig system tree (#893)
Browse files Browse the repository at this point in the history
* Add bootz status model and link it to the openconfig system tree

* Address Arista's comments
  • Loading branch information
marcushines authored Jun 29, 2023
1 parent 0c29988 commit 6e1174a
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 21 deletions.
24 changes: 13 additions & 11 deletions release/models/system/.spec.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
- name: openconfig-system
docs:
- yang/system/openconfig-aaa-types.yang
- yang/system/openconfig-alarm-types.yang
- yang/system/openconfig-system.yang
- yang/system/openconfig-system-terminal.yang
- yang/system/openconfig-system-logging.yang
- yang/system/openconfig-system-utilization.yang
- yang/system/openconfig-procmon.yang
- yang/openflow/openconfig-openflow.yang
- yang/system/openconfig-aaa.yang
- yang/system/openconfig-aaa-tacacs.yang
- yang/system/openconfig-aaa-radius.yang
- yang/system/openconfig-aaa-tacacs.yang
- yang/system/openconfig-aaa-types.yang
- yang/system/openconfig-alarms.yang
- yang/system/openconfig-alarm-types.yang
- yang/system/openconfig-license.yang
- yang/openflow/openconfig-openflow.yang
- yang/system/openconfig-system-grpc.yang
- yang/system/openconfig-procmon.yang
- yang/system/openconfig-system.yang
- yang/system/openconfig-system-bootz.yang
- yang/system/openconfig-system-controlplane.yang
- yang/system/openconfig-system-grpc.yang
- yang/system/openconfig-system-logging.yang
- yang/system/openconfig-system-terminal.yang
- yang/system/openconfig-system-utilization.yang
build:
- yang/system/openconfig-system.yang
- yang/system/openconfig-system-utilization.yang
run-ci: true
- name: openconfig-system-ext
build:
- yang/system/openconfig-system.yang
- yang/system/openconfig-system-grpc.yang
- yang/system/openconfig-system-bootz.yang
- yang/system/openconfig-system-controlplane.yang
- yang/system/openconfig-system-grpc.yang
run-ci: true
- name: openconfig-messages
docs:
Expand Down
115 changes: 115 additions & 0 deletions release/models/system/openconfig-system-bootz.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
module openconfig-system-bootz {
yang-version "1";

namespace "http://openconfig.net/yang/system-bootz";
prefix "oc-sys-bootz";

import openconfig-extensions { prefix oc-ext; }
import openconfig-system { prefix oc-sys; }
import openconfig-types { prefix oc-types; }
import openconfig-yang-types { prefix oc-yang; }

organization
"OpenConfig working group";
contact
"www.openconfig.net";

description
"This module adds configuration and operational state relating to bootz
service running on a network device.";


oc-ext:openconfig-version "1.0.0";
oc-ext:catalog-organization "openconfig";
oc-ext:origin "openconfig";

revision "2023-06-16" {
description
"Creation of bootz state paths needed for the service.";
reference "1.0.0";
}

grouping bootz-service-structural {
description
"Structural grouping for bootz service that can be enabled on
the system.";

container bootz {
description
"Bootz protocol container for management of bootz protocol state.";

container state {
config false;
description
"Operational state relating to the bootz service.";
uses bootz-state;
}
}
}

grouping bootz-state {
description
"State parameters required to monitor bootz service.";

leaf checksum {
type string;
default "";
description
"The current checksum of the bootz protocol buffer.
This value should refect the current sha-512 of the bootz
protocol buffer message BootstrapDataSigned. The protocol
buffer serialization must be done by tag value for each field
in the bootz protocol buffer. This will produce a
determintistic marshalled value which can be
checksummed.";
}

leaf error-count {
type oc-yang:counter64;
description
"Total count of all bootz errors.";
}

leaf status {
type enumeration {
enum BOOTZ_UNSPECIFIED;
enum BOOTZ_SENT;
enum BOOTZ_RECEIVED;
enum BOOTZ_CONFIGURATION_APPLIED;
enum BOOTZ_OK;
enum BOOTZ_OV_INVALID;
enum BOOTZ_OS_UPGRADE_IN_PROGRESS;
enum BOOTZ_OS_UPGRADE_COMPLETE;
enum BOOTZ_OS_INVALID_IMAGE;
enum BOOTZ_CONFIGURATION_INVALID;
}
description
"The status of the bootz service.
The general sequence for the flow would be:
BOOTZ_UNSPECIFIED <- system initial state
BOOTZ_SENT <- bootz request sent
BOOTZ_RECEIVED <- bootz response received
BOOTZ_OS_UPGRADE_IN_PROGRESS <- (if needed)
BOOTZ_OS_UPGRADE_COMPLETE <- (if needed)
BOOTZ_CONFIGURATION_APPLIED <- bootz configuration applied
BOOTZ_OK <- bootz process successful
If any error is encounter an error ENUM will be returned.";
}

leaf last-boot-attempt {
type oc-types:timeticks64;
description
"The timestamp of the last bootz attempt.";
}
}

augment "/oc-sys:system" {
description
"Add bootz service configuration to the openconfig-system model.";

uses bootz-service-structural;
}
}
26 changes: 16 additions & 10 deletions release/models/system/openconfig-system.yang
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ module openconfig-system {
Section 4.c of the IETF Trust's Legal Provisions Relating
to IETF Documents (http://trustee.ietf.org/license-info).";

oc-ext:openconfig-version "0.17.0";
oc-ext:openconfig-version "0.17.1";

revision "2023-06-16" {
description
"Reordered imports to be alphabetical.";
reference "0.17.1";
}

revision "2022-12-20" {
description
Expand Down Expand Up @@ -1255,20 +1261,20 @@ module openconfig-system {
}

uses mount-points-top;
uses system-clock-top;
uses system-dns-top;
uses system-ntp-top;
uses oc-sys-term:system-ssh-server-top;
uses oc-sys-term:system-telnet-server-top;
uses oc-log:logging-top;
uses oc-aaa:aaa-top;
uses system-memory-top;
uses system-cpu-top;
uses oc-proc:procmon-processes-top;
uses oc-alarms:alarms-top;
uses oc-log:logging-top;
uses oc-proc:procmon-processes-top;
uses oc-messages:messages-top;
uses oc-license:license-top;
uses oc-sys-term:system-ssh-server-top;
uses oc-sys-term:system-telnet-server-top;
uses system-clock-top;
uses system-cpu-top;
uses system-dns-top;
uses system-macaddr-top;
uses system-memory-top;
uses system-ntp-top;
}
}

Expand Down

0 comments on commit 6e1174a

Please sign in to comment.