Code Monkey home page Code Monkey logo

Comments (6)

wenovus avatar wenovus commented on June 21, 2024

Hi, ygot.Diff returns a Notification value. What did you do with the Notification value that caused the final list to occur?

from ygot.

adelshafiei avatar adelshafiei commented on June 21, 2024

I used the notification list to update device config. In the notification list, there is an update for [18, 25, 34] but no delete is generated for value 1 in the leaf list

from ygot.

wenovus avatar wenovus commented on June 21, 2024

Did you use gNMI.Set with an Update message? If so, I believe setting a leaf-list should overwrite the value instead of appending to them.

That being said, taking a look at RFC7950, NETCONF insert seems to offer more flexible operations, while the gNMI spec doesn't explicitly talk about this scenario. @robshakir Do we have a stance on what happens with leaf-lists when gNMI.Set with Update is executed? Since we don't have an insert operation it seems like replacement must be our behaviour to keep things simple? Esp. if a non-leaf update is made containing leaf-list values. If so I'll update the spec to make this clearer.

from ygot.

robshakir avatar robshakir commented on June 21, 2024

Yes, we do not allow partial update of leaf-lists in gNMI -- we declaratively require them to be entirely specified.

from ygot.

adelshafiei avatar adelshafiei commented on June 21, 2024

In this case, can I enhance the ygot diff api to return a replace gnmipb.Update slice along side the gnmi notification to be used together for the gnmi set request?

from ygot.

wenovus avatar wenovus commented on June 21, 2024

Not quite sure what enhancement you had in mind. Can you just call Set.Replace now instead of Set.Update? It seems like the device is not conforming to the right spec (I will make a PR to update the spec soon), and since Diff only returns leaves it seems like a safe thing to do.

from ygot.

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.