About the gRPC Agent
The Cisco NX-OS gRPC protocol defines a mechanism through which a network device can be managed and its configuration data can be retrieved and installed. The protocol exposes a complete and formal Application Programming Interface (API) that clients can use to manage device configurations.
The Cisco NX-OS gRPC protocol uses a remote procedure call (RPC) paradigm where an external client manipulates device configurations utilizing Google Protocol Buffer (GPB)-defined API calls along with their service- specific arguments. These GPB-defined APIs transparently cause an RPC call to the device that return replies in the same GPB-defined API context.
The gRPC Agent provides a secure transport through TLS and user authentication and authorization through AAA.
The functional objective of the Cisco NX-OS gRPC protocol is to mirror that provided by NETCONF, particularly in terms of both stateless and stateful configuration manipulation for maximum operational flexibility.
The Cisco NX-OS gRPC Agent supports the following protocol operations:
-
Get
-
GetConfig
-
GetOper
-
EditConfig
-
StartSession
-
CloseSession
-
KillSession
The gRPC Agent supports two types of operations:
-
Stateless operations are performed entirely within a single message without creating a session.
-
Stateful operations are performed using multiple messages. The following is the sequence of operations that are performed:
-
Start the session. This action acquires a unique session ID.
-
Perform session tasks using the session ID.
-
Close the session. This action invalidates the session ID.
-
The following are the supported operations. See the Appendix for their RPC definitions in the .proto file that is exported by the gRPC Agent.
Operation |
Description |
---|---|
StartSession |
Starts a new session between the client and server and acquires a unique session ID. |
EditConfig |
Writes the specified YANG data subset to the target datastore. |
GetConfig |
Retrieves the specified YANG configuration data subset from the source datastore. |
GetOper |
Retrieves the specified YANG operational data from the source datastore. |
Get |
Retrieves the specified YANG configuration and operational data from the source datastore. |
KillSession |
Forces the termination of a session. |
CloseSession |
Requests graceful termination of a session. |
GetConfig, GetOper, and Get are stateless operations so don’t require a session ID.
EditConfig can be either stateless or stateful. For a stateless operation, specify the SessionID as 0. For a stateful operation, a valid (nonzero) SessionID is required.
The gRPC Agent supports timeout for the sessions. The idle timeout for sessions can be configured on the device, after which idle sessions are closed and deleted.