You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module solely augments /c:configuration by using a grouping defined inside of it.
The issue I experience is that when I do e := yang.ToEntry(ms.Modules[mn]) for that module, the *yang.Entry structure has an empty Dir field.
The question is: how to get the directory of such modules?
The text was updated successfully, but these errors were encountered:
hellt
changed the title
how to get a (*yang.Entry).Dir if the module augments another module?
how to get a (*yang.Entry).Dir if the module just augments another module?
Sep 8, 2020
Maybe someone knows which direction should I dig? So far I resorted to pyang to extract paths, but that would be awesome if the same modules could be handled by goyang
It looks like the reason is because once augments are applied, they are removed from Entry.Augments during Modules.Process. This doesn't seem to be the right thing to do.
Would having the entries accessible under Entry.Augments be sufficient for your needs? Entry.Dir is only populated if there is actually data residing in the module, instead of just being declared within an augment or grouping statement.
@wenovus I saw the same, the Augments field gets emptied on a successful augmentation processing.
Having Entry.Augments to be walkable in a way that Dir is would help.
On the other hand I will check if the module X that module Y augments starts to contain the Dir structure under the paths that were augmented.
Hi *,
I have problems understanding how one can get a directory structure of a module which augments another one.
Consider a module like that
This module solely augments
/c:configuration
by using a grouping defined inside of it.The issue I experience is that when I do
e := yang.ToEntry(ms.Modules[mn])
for that module, the*yang.Entry
structure has an emptyDir
field.The question is: how to get the directory of such modules?
The text was updated successfully, but these errors were encountered: