aristanetworks / openmgmt

Documentation and examples for using open network management tools such as OpenConfig
https://aristanetworks.github.io/openmgmt/
Apache License 2.0
68 stars 32 forks source link

Update pygnmi examples #108

Closed dgarros closed 2 years ago

dgarros commented 2 years ago

My primary goal was to update the origin path in update.py file because I was getting the following error

"update requests with an origin of "openconfig-interfaces" are not supported"

Here is the main change I made to this script

# was
paths = ["openconfig-interfaces:interfaces/interface[name=Ethernet1]/config"]
# Replaced with
paths = ["openconfig:/interfaces/interface[name=Ethernet1]/config"]

Since I was working on it, I also took the opportunity to add support for environment variables for all scripts and I formatted them with black. I was able to test all scripts successfully with the latest version of pygnmi and a ceos device running 4.27.3F