akarneliuk / pygnmi

The pure Python implementation of the gNMI client.
https://training.karneliuk.com
BSD 3-Clause "New" or "Revised" License
129 stars 44 forks source link

Help needed with forming the set path #157

Closed baijuw closed 5 months ago

baijuw commented 5 months ago

image This is probably very simple. But I am struggling to get my update path right. I am following your example as is. When my message variable is as so :- nokia_update = [ ('/nokia-conf:configure/port[port-id=1/1/c1]', {"admin-state": "disable"} ) ]

Logically this seems to be right looking at the yang tree. I still get the following error:-

Error: MINOR: MGMT_CORE #2104: /configure/port[port-id=1/1/c1]/admin-state - Missing namespace - prefix expected nokia-conf - gRPC: update operation 1

baijuw commented 5 months ago

To add a get request to the path /nokia-conf:configure/port[port-id=1/1/c1] works and gives me the following output

{ "notification": [ { "timestamp": 1718265204251137468, "prefix": null, "alias": null, "atomic": false, "update": [ { "path": "configure/port[port-id=1/1/c1]", "val": { "port-id": "1/1/c1", "admin-state": "enable", "connector": { "breakout": "c1-100g" } } } ] } ] }

baijuw commented 5 months ago

After some trial and error this worked for me. nokia_update = [ ('/nokia-conf:configure/port[port-id=1/1/c1]', {"nokia-conf:admin-state": "disable"} ) ]