[YANGTOOLS-848] No methods isAugmenting and isAddedByUses available on ActionDefinition Created: 16/Feb/18 Updated: 22/Feb/18 Resolved: 20/Feb/18 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Peter Verthez | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
An action can be added in an augment or a grouping, like a DataSchemaNode. But there are no methods isAugmenting and isAddedByUses available on ActionDefinition, like there is on DataSchemaNode. This is an omission in the API. The same would be applicable for NotificationDefinition. |
| Comments |
| Comment by Robert Varga [ 19/Feb/18 ] |
|
Both these methods are marked as deprecated, as they are a leak from declared to effective model. As such they are only used by MDSAL's binding generator, which does not handle actions nor non-root notifications, as far as I can tell. What exactly is the use case for them? |
| Comment by Peter Verthez [ 19/Feb/18 ] |
|
We have a converter from YANG to YIN (loosely based on YinExportUtils in ODL, but since that was not complete at that time we wrote our own). That needs to know whether an action is added by augmentation or uses, to be able to regenerate the content of a module properly. |
| Comment by Robert Varga [ 20/Feb/18 ] |
|
Proper implementation of YIN module export does not actually require any of this. If your implementation requires those bits, they can be derived given the whole-Module visibility, hence I suggest you do that in your implementation, as introducing these methods:
|
| Comment by Peter Verthez [ 20/Feb/18 ] |
|
Can you clarify then how we can derive that? |
| Comment by Robert Varga [ 22/Feb/18 ] |
|
For example: isAugmenting() means that either the node has a different namespace (i.e. augment from another module) or there is a corresponding augment statement in current module. isAddedByUses() is similar. |