The OS service provides an interface for OS installation on a Target. The
Client progresses through 3 RPCs:
1) Installation - provide the Target with the OS package.
2) Activation - activate an installed OS package.
3) Verification - verify that the Activation was successful.
Dual Supervisor Target is supported, where the above process is executed once
for the whole Target or once for each Supervisor. Targets that require the
above process executed once per Supervisor will reply with the flag
Verify->VerifyResponse->individual_supervisor_install set to true.
Note that certain platforms may have particular approaches to upgrade the
firmware of specific components, eg., power supply units, etc.. In addition,
platforms may have processes to apply patches to the running OS. Handling
these exceptions introduces extra complexities. For Targets that implement
this service, component firmware upgrade or OS patching MUST be embedded
within an OS upgrade.
| Method Name | Request / Response Type | Description |
|---|---|---|
| Install | InstallRequest
stream InstallResponse stream |
Install transfers an OS package into the Target. No concurrent Install RPCs |
| Activate | ActivateRequest
ActivateResponse |
Activate sets the requested OS version as the version which is used at the |
| Verify | VerifyRequest
VerifyResponse |
Verify checks the running OS version. During reboot, gRPC client returns |
| Field | Type | Description |
|---|---|---|
| type | ActivateError.Type |
|
| detail | string |
|
If the Target is already running the requested version in ActivateRequest,
then it replies with ActivateOK. If the Target has the OS package version
requested in ActivateRequest then it replies with ActivateOK and proceeds to
boot.
A dual Supervisor Target which requires installing the entire system with
one Install RPC, will activate the image on all Supervisors in response to
one Activate RPC. The Target should activate the image on both Supervisors
with the least impact possible to forwarding.
On a dual Supervisor Target which requires one Install RPC per supervisor,
performing this RPC on the Active Supervisor triggers a switchover before
booting the (old)Active Supervisor. The Target should perform a switchover
with the least impact possible to forwarding.
The ActivateRequest is sent by the Client to the Target to initiate a change
in the next bootable OS version that is to be used on the Target.
Dual Supervisor Target which requires installing the entire system with
one Install RPC MUST return NOT_SUPPORTED_ON_BACKUP error when requested
to Activate on standby Supervisor.
| Field | Type | Description |
|---|---|---|
| version | string |
The version that is required to be activated and optionally immediattely |
| standby_supervisor | bool |
For dual Supervisors setting this flag instructs the Target to perform the |
| no_reboot | bool |
If set to 'False' the Target will initiate the reboot process immediatelly |
The ActivateResponse is sent from the Target to the Client in response to the
Activate RPC. It indicates the success of making the OS package version
active.
| Field | Type | Description |
|---|---|---|
| response (one of) | ||
| activate_ok | ActivateOK |
|
| activate_error | ActivateError |
|
The InstallError message MUST be sent by the Target to the Client whenever an
issue occurs. The Target MUST immediately close the RPC without a gRPC error.
| Field | Type | Description |
|---|---|---|
| type | InstallError.Type |
|
| detail | string |
|
| Field | Type | Description |
|---|---|---|
| request (one of) | ||
| transfer_request | TransferRequest |
|
| transfer_content | bytes |
|
| transfer_end | TransferEnd |
|
The InstallResponse is used by the Target to inform the Client about the
state of the Install RPC. At any stage of the process the Target can reply
with an Error message which MUST terminate the stream.
A dual Supervisor Target which requires installing the entire system with
one Install RPC, will either have the image on both Supervisors or neither
Supervisor. Such Targets do not need to sync the image from peer Supervisor
and MUST immediately respond with TransferReady.
| Field | Type | Description |
|---|---|---|
| response (one of) | ||
| transfer_ready | TransferReady |
|
| transfer_progress | TransferProgress |
|
| sync_progress | SyncProgress |
|
| validated | Validated |
|
| install_error | InstallError |
|
| Field | Type | Description |
|---|---|---|
| id | string | Standby Supervisor ID, usually the slot number. |
| version | string |
|
| activation_fail_message | string |
|
| Field | Type | Description |
|---|---|---|
| state | StandbyState.State |
|
The SyncProgress message signals the Client about the progress of
transferring the OS package between Supervisors.
A dual Supervisor Target which requires installing the entire system with
one Install RPC, does not need to transfer the package between Supervisors
and MUST not send SyncProgress.
| Field | Type | Description |
|---|---|---|
| percentage_transferred | uint32 | The percentage that has transferred between Supervisors. |
The TransferEnd message is sent whenever the Client finishes transferring
the OS package to the Target. At this point the Target MUST perform a general
health check to the OS package. If the Target fails to parse the OS package
it MUST immediately reply with an InstallError->type->PARSE_FAIL. If the
integrity check of the OS package fails it MUST immediately reply with an
InstallError->type->INTEGRITY_FAIL. If the identified OS version contained in
the package is not compatible with the Target either because of the platform
type or the running OS, it MUST immediately reply with an
InstallError->type->INCOMPATIBLE. If the image is force transferred by
omitting the InstallRequest->TransferRequest->version value, and the OS
package is the same as the one running in the Target, the RPC MUST
immediately abort and reply with an InstallError->type->INSTALL_RUN_PACKAGE.
The TransferProgress message is sent by the target asynchronously during a
file transfer. The device SHOULD not respond to each input block received
from the client, but rather determine reasonable intervals at which to send
the message (e.g., 5MB).
| Field | Type | Description |
|---|---|---|
| bytes_received | uint64 | The number of bytes transferred. |
The TransferReady message tells the Client that the Target is ready to accept
the transfer of the OS package. At this stage the Target MUST have cleared
enough space to accept the incoming OS package.
| Field | Type | Description |
|---|---|---|
| version | string |
The version string is a vendor defined string that identifies the OS |
| standby_supervisor | bool |
For a Target with dual Supervisors setting this flag instructs the Target |
| package_size | uint64 |
Optionally specify the package size in bytes of the OS package being |
The Validated message asserts that the Target was able to parse the package
and perform integrity checks to its contents.
| Field | Type | Description |
|---|---|---|
| version | string | The OS version string that identifies the OS version in the OS package. |
| description | string |
Informational field that SHOULD be used for providing more details about |
| Field | Type | Description |
|---|---|---|
| version | string | The OS version currently running. |
| activation_fail_message | string |
Informational message describing fail details of the last boot. This MUST |
| verify_standby | VerifyStandby |
|
| individual_supervisor_install | bool |
Dual Supervisor Targets that require the Install/Activate/Verify process |
| Field | Type | Description |
|---|---|---|
| state (one of) | ||
| standby_state | StandbyState | Standby state indicates problems with the standby. |
| verify_response | StandbyResponse | Standby response indicates that the standby is present and ready. |
Credentials defines credentials needed to perform authentication on a device.
HashType defines the valid hash methods for data verification. UNSPECIFIED
should be treated an error.
| Field | Type | Description |
|---|---|---|
| method | HashType.HashMethod |
|
| hash | bytes |
|
Path encodes a data tree path as a series of repeated strings, with
each element of the path representing a data tree node name and the
associated attributes.
Reference: gNMI Specification Section 2.2.2.
| Field | Type | Description |
|---|---|---|
| origin | string | Label to disambiguate path. |
| elem (repeated) | PathElem | Elements of the path. |
PathElem encodes an element of a gNMI path, along with any attributes (keys)
that may be associated with it.
Reference: gNMI Specification Section 2.2.2.
| Field | Type | Description |
|---|---|---|
| name | string | The name of the element in the path. |
| key (repeated) | PathElem.KeyEntry | Map of key (attribute) name to value. |
| Name | Number | Description |
|---|---|---|
| UNSPECIFIED | 0 | |
| SHA256 | 1 | |
| SHA512 | 2 | |
| MD5 | 3 |
Generic Layer 3 Protocol enumeration.
| Name | Number | Description |
|---|---|---|
| UNSPECIFIED | 0 | |
| IPV4 | 1 | |
| IPV6 | 2 |
The gNOI service semantic version.
| Extension | Type | Base | Number | Description |
|---|---|---|---|---|
| gnoi_version | string | .google.protobuf.FileOptions | 1002 | The gNOI service semantic version. |
| Proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
Created by Siva Sivakumar / Roman Dodin / srl-labs