gNOI

The gRPC Network Operations Interface (gNOI) defines a set of gRPC-based services for executing operational commands on network devices. The individual RPCs and messages that perform the operations required for certificate management on the node are defined at the following location: https://github.com/openconfig/gnoi. This repository also stores the various per-service protos in subdirectories.

Note:

The protos used to define the gNOI services in this release were pulled from the following hash: https://github.com/openconfig/gnoi/commit/1ece8ed91a0d5d283219a99eb4dc6c7eadb8f287.

SR Linux supports the following gNOI services:

gNOI file service

The gNOI file service allows the client to transfer files to and from the target node. The main use for this service is extracting debugging information through the transfer of system logs and core files.

SR Linux supports the following gNOI file RPCs:

Note: The TransferToRemote RPC is not supported.

Get RPC

The Get RPC reads and streams the contents of a file from a target node to the client using sequential messages, and sends a final message containing the hash of the streamed data before closing the stream.

The target node returns an error if:

  • An error occurs while reading the file.
  • The file does not exist.

Get RPC structure

rpc Get(GetRequest) returns (stream GetResponse) {}

Put RPC

The Put RPC streams data to the target node and writes the data to a file. The client streams the file using sequential messages. The initial message contains information about the filename and permissions. The final message includes the hash of the streamed data.

The target node returns an error if:

  • An error occurs while writing the data.
  • The location does not exist.

Put RPC structure

rpc Put(stream PutRequest) returns (PutResponse) {}

Stat RPC

The Stat RPC returns metadata about files on the target node.

If the path specified in the StatRequest references a directory, the StatResponse returns the metadata for all files and folders, including the parent directory. If the path references a direct path to a file, the StatResponse returns metadata for the specified file only.

The target node returns an error if:
  • The file does not exist.
  • An error occurs while accessing the metadata.

Stat RPC structure

rpc Stat(StatRequest) returns (StatResponse) {}

Remove RPC

The Remove RPC removes the specified file from the target node.

The target node returns an error if:

  • An error occurs during the remove operation (for example, permission denied).
  • The file does not exist.
  • The path references a directory instead of a file.

Remove RPC structure

rpc Remove(RemoveRequest) returns (RemoveResponse) {}

gNOI system service

The gNOI system service defines an interface that allows a client to perform operational tasks on target network nodes. SR Linux supports the following gNOI system RPCs:

Ping RPC

The Ping RPC allows the client to execute the ping command on the target node. The target node streams the results back to the client. Some targets do not stream any results until they receive all results. If the RPC does not specify a packet count, the ping operation uses a default of five packets.

Note:
  • The Ping RPC does not currently support specification of a network-instance. The ping is executed in the network-instance where the gNMI server is running.
  • SR Linux does not support setting the interval field in the PingRequest to -1 (flood ping).

Ping RPC structure

rpc Ping(PingRequest) returns (stream PingResponse) {}

Traceroute RPC

The Traceroute RPC allows the client to execute the traceroute command on the target node. The target node streams the results back to the client. Some targets do not stream any results until they receive all results. If the RPC does not specify a hop count, the traceroute operation uses a default of 30.

Note:
  • The Traceroute RPC does not currently support specification of a network-instance. The traceroute is executed in the network-instance where the gNMI server is running.
  • In the TracerouteRequest, SR Linux does not support the TCP and UDP enum values for the l4protocol field. Only ICMP is supported.
  • In the TracerouteResponse, SR Linux does not support the mpls and as_path fields.

Traceroute RPC structure

rpc Traceroute(TracerouteRequest) returns (stream TracerouteResponse) {}

Time RPC

The Time RPC returns the current time on the target node. It is typically used to test whether the target is currently responding.

Time RPC structure

rpc Time(TimeRequest) returns (TimeResponse) {}

SwitchControlProcessor RPC

The SwitchControlProcessor RPC switches the active control processing module (CPM) on the target node to the control slot (A or B) that is specified in the request message.

SwitchControlProcessor RPC structure

rpc SwitchControlProcessor(SwitchControlProcessorRequest)
    returns (SwitchControlProcessorResponse) {}

Reboot RPC

The Reboot RPC allows the client to reboot a target node, either immediately or at some time in the future. It triggers the reboot of the entire chassis. It also supports specification of a reboot method (for example, cold or warm reboot), however, if the target node does not support the specified reboot method, the Reboot RPC fails.

Note: SR Linux supports only the cold reboot method, and does not support rebooting of subcomponents.

If a reboot is pending on the active control processor, the service rejects all other reboot requests.

Reboot RPC structure

rpc Reboot(RebootRequest) returns (RebootResponse) {}

CancelReboot RPC

The CancelReboot RPC allows the client to cancel any pending reboot requests on the target node.

Note: SR Linux does not support canceling a reboot for a subcomponent.

CancelReboot RPC structure

message CancelRebootResponse { }

RebootStatus RPC

The RebootStatus RPC allows the client to query the status of a reboot on the target node.

Note: SR Linux does not support querying on a single component at a time.

RebootStatus RPC structure

rpc RebootStatus(RebootStatusRequest) returns (RebootStatusResponse) {}

gNOI configuration

SR Linux supports gNOI services using the existing gNMI server configuration. To enable gNOI support, enable the gNMI server.

Like gNMI, the session between the gNOI client and SR Linux must be encrypted using TLS.

See the "Management servers" chapter in the SR Linux Configuration Basics Guide for information about how to configure the gNMI server.