Giter Site home page Giter Site logo

path format and root format about pygnmi HOT 5 CLOSED

akarneliuk avatar akarneliuk commented on July 19, 2024
path format and root format

from pygnmi.

Comments (5)

akarneliuk avatar akarneliuk commented on July 19, 2024

Hello @slieberth ,

Actually, that was a thing I added to the new release published yesterday (modification of the path processing to allow '/' and possibility to omit or add origin). Could you please check that out?

Best,
Anton

from pygnmi.

slieberth avatar slieberth commented on July 19, 2024

Hi Anton,

thanks for the changes, looks almost perfect, if origin and leading slash is present (e.g. openconfig-interfaces:/interfaces/interface), then origin is not detected correctly, instead the leading origin gets a path element ...

/ --> path {} --> OK!

/interfaces/interface --> path { elem {name: "interfaces"} elem {name: "interface" } --> OK!

openconfig-interfaces:interfaces/interface --> path { origin: "openconfig-interfaces" elem { name: "interfaces" } elem { name: "interface" } } --> OK!

openconfig-interfaces:/interfaces/interface --> path { elem { name: "openconfig-interfaces:" } elem { name: "interfaces" } elem { name: "interface" } --> NOK!

regards Stefan

from pygnmi.

akarneliuk avatar akarneliuk commented on July 19, 2024

Hey @slieberth ,

I think it is fixed now. Could you please check?
Could you please also point to the part in documentation with that part : openconfig:interfaces:/interfaces/interface. I tried to search, but not found, so built on your advise.

Best,
Anton

from pygnmi.

slieberth avatar slieberth commented on July 19, 2024

Hi Anton,
thanks for the change, looks good, can confirm the fix, thanks.

in respect to documentation: the doc-string in client.py:148 needs minor change:
path = ['yang-module:container/container[key=value]', 'yang-module:container/container[key=value]', ..]

maybe you should specify also a path without origin prefix. In my tests against arista, origin is completly ignored, so also xxx:/interfaces/interface does work. When testing against Cisco and Juniper I use only the path, without origin.

Greetings from Berlin
Stefan

from pygnmi.

akarneliuk avatar akarneliuk commented on July 19, 2024

Hello @slieberth ,

Thanks a lot. We'll add the mentioned enhancement in the next release in the documentation. With this, we will close the issue.

Best,
Anton

from pygnmi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.