Comments (6)
identities and enumerations are represented as strings per https://datatracker.ietf.org/doc/html/rfc7951, 2
is ambiguous.
from ygot.
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.
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.
Inside each enums we have Identity. That might be causing values to be generated as 0,1,2 ?
from ygot.
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)
- Make sure CI runs `go mod tidy` and notices no diffs.
- ygot.diff seems slow
- ytypes.GetNode consumes more CPU & memory than the deprecated util.GetNode
- how to resolve the dependency for gribi HOT 2
- Diff api does generate deletes for leaf list values HOT 6
- Can enum preserve their defined values while converting yang to gostruct using openconfig/ygot\@v0.25.4/generator/generator.go ? HOT 3
- ygot.Diff don't respect presence containers HOT 9
- Mandatory module name in the generated struct names HOT 3
- Preserve YANG elements order when generating structs HOT 1
- Doesn't choice and case statement in YANG result in oneof fields in proto? HOT 2
- ygot Validate error, when yang leaf type is union
- When will ygot have support for bits datatype for yang to go conversion HOT 2
- Device Returns Array for Each Interface HOT 3
- Allow ytypes.SetNode on intermediate nodes in compressed mode
- Identity Support in Ygot HOT 1
- [Question] From ygot gostruct or emittedJSON to gNMI Set Update HOT 6
- ytypes.Unmarshal() treating 50 as a float64 even though I am converting 50 to string before unmarshalling HOT 7
- How to set LeafrefOptions IgnoreMissingData for UnmarshalSetRequest HOT 2
- Can't generate OC-YANG network-instance HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ygot.