openconfig / reference

This repository contains reference implementations, specifications and tooling related to OpenConfig-based network management.
Apache License 2.0
155 stars 88 forks source link

Does gNMI SET with List level operation require list keys also under json_ietf_val ? #194

Open Shobhit-09 opened 10 months ago

Shobhit-09 commented 10 months ago

Hi,

For List level operation, should the list keys also be present inside json_ietf_val in gNMI RPC? Model - https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-if-tunnel.yang

Below are the sample RPC's with and without list key inside json_ietf_val.

RPC without list key inside json_ietf_val: update: { path: { origin: "openconfig", elem: { name: "interfaces" }, elem: { name: "interface", key: { key: "name" value: "tunnel-ip100" } } }, val: { json_ietf_val: "{\"config\": {\"type\": \"iana-if-type:tunnel\"}, \"tunnel\": {\"config\": {\"src\": \"100.1.1.1\", \"dst\": \"100.1.1.2\", \"ttl\": 100, \"gre-key\": 10000}}}" } }

RPC with list key inside json_ietf_val: update: { path: { origin: "openconfig", elem: { name: "interfaces" }, elem: { name: "interface", key: { key: "name" value: "tunnel-ip100" } } }, val: { json_ietf_val: "{\"name\":\"tunnel-ip100", \"config\": {\"type\": \"iana-if-type:tunnel\"}, \"tunnel\": {\"config\": {\"src\": \"100.1.1.1\", \"dst\": \"100.1.1.2\", \"ttl\": 100, \"gre-key\": 10000}}}" } }