Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity Support in Ygot #960

Open
Sneh-Prabha opened this issue Mar 28, 2024 · 1 comment
Open

Identity Support in Ygot #960

Sneh-Prabha opened this issue Mar 28, 2024 · 1 comment

Comments

@Sneh-Prabha
Copy link

Hi,
We are using YGOT for yang to go-struct conversion. I can see in generated go struct code it seems Identity type is being treated as ENUM.
Do we have support for Identity type in Ygot and if not can you suggest how can we solve this issue?

@wenovus
Copy link
Collaborator

wenovus commented Mar 28, 2024

Since identities are used to form a hierarchical subclass relationship with a single base identity, in practice (esp. with the OpenConfig YANG models) they effectively form a enumeration structure, where the base identity is the UNSET/default enum value and all sub-identities are possible values for the "enum". This is a major reason why we have chosen to model the two the same way in generated code. The marshalling/unmarshalling work in a way compatible with RFC7951 for identities.

Is there a special use case you're looking at which makes this modelling not work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants