Code Monkey home page Code Monkey logo

Comments (6)

wenovus avatar wenovus commented on September 27, 2024

identities and enumerations are represented as strings per https://datatracker.ietf.org/doc/html/rfc7951, 2 is ambiguous.

from ygot.

Sneh-Prabha avatar Sneh-Prabha commented on September 27, 2024

Yes, value is generated using ygot. I also dont know how to distinguish between values as if it for first enum or second and also how to give value in tag as whatever I am giving it is not accepting and converting to nil after unmarshal.

from ygot.

wenovus avatar wenovus commented on September 27, 2024

Here I would be expecting ygot to accept the string "A", "B", "C", or "D" since these seem to be the enum names in YANG. How did you get 2 in the output? ygot would not be able to unmarshal that.

from ygot.

Sneh-Prabha avatar Sneh-Prabha commented on September 27, 2024

Inside each enums we have Identity. That might be causing values to be generated as 0,1,2 ?

from ygot.

wenovus avatar wenovus commented on September 27, 2024

In your code you have

err := xml.Unmarshal([]byte(xmlData), &gostruct)

I'm not quite sure where the xml library is, nor where xmlData comes from or why those two things has to do with ygot. The data is not RFC7951 compliant, so I would recommend understanding how it was generated.

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.