google gNMI Protocol Version 0.4.0 — How to Enable the gNMI Protocol

gNMI Configuration Persistence The gNMI Configuration Persistence feature ensures that all successful configuration changes made through the gNMI SetRequest RPC persists across device restarts. Prior to this feature, the gNMI configuration was stored in the running configuration of a device. And the changes were saved by issuing the write memory command, or the SaveConfig NETCONF RPC. All changes in the running configuration, even if the data was modified by processes other than gNMI, the data is saved to the startup configuration, when the SetRequest RPC is issued. This feature is enabled by default and cannot be disabled.

gNMI Username and Password Authentication User credentials, the username and password provide authorization as metadata in each gNMI RPC. The following is a sample gNMI Capabilities RPC that use the username and password: metadata = [('username','admin'), ('password','lab')] cap_request = gnmi_pb2.CapabilityRequest() # pass metadata to the gnmi_pb2_grpc.gNMIStub object secure_stub.Capabilities(cap_request, metadata=metadata) gNMI Error Messages When errors occur, gNMI returns descriptive error messages. The following section displays some gNMI error messages. The following sample error message is displayed when the path is invalid: gNMI Error Response:

of RPC that terminated with (StatusCode.TERMINATED, An error occurred while parsing provided xpath: unknown tag: “someinvalidxpath" Additional information: badly formatted or nonexistent path)> The following sample error message is displayed for an unimplemented error: gNMI Error Response: of RPC that terminated with (StatusCode.UNIMPLEMENTED, Requested encoding "ASCII" not supported)> The following sample error message is displayed when the data element is empty: gNMI Error Response: of RPC that terminated with (StatusCode.NOT_FOUND, Empty set returned for path "/oc-if:interfaces/noinfohere")> How to Enable the gNMI Protocol Perform the following steps to enable the gNMI protocol:

gNMI Protocol gNMI Configuration Persistence gNMI Protocol 14