} elem { name: "oper-status" } } val { json_ietf_val: "\"UP\"" } } } gNMI SetRequest The Set RPC specifies how to set one or more configurable attributes associated with a supported model. A SetRequest is sent from a client to a target to update the values in the data tree. SetRequests also support JSON keys, and must contain a YANG-prefix, in which the namespace of the element differs from parent. For example, the routed-vlan element derived from augmentation in openconfig-vlan.yang must be entered as oc-vlan:routed-vlan , because it is different from the namespace of the parent node (The parent node prefix is oc-if.).
The total set of deletes, replace, and updates contained in any one SetRequest is treated as a single transaction. If any subordinate element of the transaction fails; the entire transaction is disallowed and rolled back. A SetResponse is sent back for a SetRequest. Table 1: Example of a SetRequest JSON Structure gNMI Protocol gNMI SetRequest SetRequest SetResponse ++++++++ Sending set request: ++++++++ update { path { elem { name: "interfaces" } elem { name: "interface" key { key: "name" value: "Loopback111" } } elem { name: "config" } } val { json ietf val: _ _ "{\"openconfig-interfaces:enabled\":\"false\"}" } } ++++++++ Received set response: ++++++++ response { path { elem { name:
"interfaces" } elem { name: "interface" key { key: "name" value: "Loopback111" } } elem { name: "config" } } op: UPDATE } timestamp: 1521699342123890045 gNMI Protocol 8