gNMI Get RPC Mode

Overview

The gNMI Get RPC in OcNOS enables on-demand retrieval of network configuration, state, or operational data. It allows clients to fetch real-time state or configuration snapshots without requiring continuous monitoring.

 

The system supports IPI and OpenConfig (OC) XPaths and uses JSON_IETF encoding for responses.
Implicit wildcard paths (e.g., /interfaces/interface/state) are supported, simplifying data retrieval, but explicit wildcard paths are not.

Feature Characteristics

The Figure 2. Sample Get RPC Request and Figure 3. gNMI Get Mode Data Flow illustrates the gNMI Get RPC workflow in OcNOS, where a gNMI client requests specific telemetry data from a gNMI server (OcNOS target), which then processes the request and retrieves data from the Centralized Management and Logging Daemon (CMLd) and Protocol Modules (PM) or SQL Database. The response is converted into JSON_IETF format and sent back to the client.

Figure 2. Sample Get RPC Request

Figure 3. gNMI Get Mode Data Flow

1. The gNMI client sends a Get RPC request to the OcNOS device with the required sensor path, data type (State, Configuration, or All), and encoding type (JSON_IETF).
2. The gNMI server validates the request and forwards it to CMLd. It performs validations on XPath correctness, encoding type (JSON_IETF), requested data type (State, Configuration, or All). Once validated, the gNMI server forwards the request to CMLd.
3. CMLd fetches state data from PMs and configuration data from the SQL database. The retrieved data is combined before being sent back to the gNMI server.
4. The gNMI server processes the response, converts it into JSON_IETF format, and sends it to the gNMI client (gnmic).
5. The Get RPC response is received, and the connection is closed.

Benefits

Reduced Network Overhead: Fetches only requested data, minimizing unnecessary telemetry traffic.

On-Demand Data Access: Eliminates the need for continuous monitoring while providing real-time insights.