This section provides a brief overview of the NX-OS Programmable Interface infrastructure.
When NX-OS receives a request whether through NETCONF, RESTConf, or gRPC, the request is converted into an abstract message
object. That message object is distributed to the underlying model infrastructure based on the namespace in the request. Using
the namespace, the appropriate model is selected and the request is passed to it for processing. The model infrastructure
executes the request (read or write) on the device datastore. The results are returned to the agent of origin for response
transmission back to the requesting client.
NX-OS Programmable Interface Agents
Agents provide an interface between the Device and clients. They specify the transport, the protocol, and the encoding of
the communications with the Device. NX-OS Programmable Interfaces support three agents: NETCONF, RESTConf, and gRPC, each
providing different interfaces for configuration management of the Device through YANG models.
Table 1. NX-OS Programmable Interface Agents
Agent
|
Transport
|
Protocol
|
Encoding
|
NETCONF
|
SSH
|
|
XML
|
RESTConf
|
HTTP
|
draft-ietf-netconf-restconf-10[1
|
XML or JSON
|
gRPC
|
HTTP
|
gRPC Protocol Spec[2]
|
Google Protobuf
|
The protocol specifications are described in the following documents:
Model Infrastructure
The Model Infrastructure takes requests that are received from the Agent, determines the namespace that is associated with
the YANG model in the request, and selects the model component matching the namespace to process the request. When the selected
model component completes request processing, the processing results are sent to the requesting Agent for transmission back
to the client. The Model Infrastructure is also responsible for handling protocol initiation requests involving authentication,
handshaking, and so on, as specified by the Agent protocol.
Device YANG Model
The Device Configuration is described in a YANG model that is called a Device Model. The Device Model is manifested in the
Model Infrastructure as another model component with the Device namespace.
Common YANG Models
A Common Model is another kind of model component that contains within its elements, YANG Paths to the equivalent Device Model
elements. These equivalent Device Model elements are used to read and write Device Model data in the Device YANG context.