Refactor augment generator linkage
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 21 Dec 2021 13:22:03 +0000 (14:22 +0100)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 19 Jun 2024 00:41:37 +0000 (10:41 +1000)
commit32e4473cb022375ad88c35fc0b5225be594243c9
treed4405dac550f1eaab31ac5350825fb451c325cab
parentcb5d404a46bbb3411f595101e61f5145bccf0d62
Refactor augment generator linkage

The uses/augment and module/augment cases are quite different from
the perspective how we map their argument reference to generators.

The uses/augment case is quite simple, as it refers to grouping's nodes,
not augmentations. The only variation we need to account for is the
skip back to the defining grouping.

The module/augment case, on the other hand, is more complex, as it can
refer to augmentations -- hence it need to account for changes namespace
changes along uses/grouping as well as back from grouping child to
augmentations.

JIRA: MDSAL-715
Change-Id: I7425301afa6de566d985d19450ccfc64ea527119
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/AbstractCompositeGenerator.java
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/AbstractExplicitGenerator.java
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/GeneratorContext.java
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/GeneratorReactor.java
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/ModuleAugmentGenerator.java
binding/mdsal-binding-generator/src/main/java/org/opendaylight/mdsal/binding/generator/impl/reactor/UsesAugmentGenerator.java
binding/mdsal-binding-generator/src/test/java/org/opendaylight/mdsal/binding/generator/impl/Mdsal715Test.java [new file with mode: 0644]
binding/mdsal-binding-generator/src/test/resources/mdsal715/test-module-1.yang [new file with mode: 0644]
binding/mdsal-binding-generator/src/test/resources/mdsal715/test-module-2.yang [new file with mode: 0644]
binding/mdsal-binding-generator/src/test/resources/mdsal715/test-module-3.yang [new file with mode: 0644]
binding/mdsal-binding-generator/src/test/resources/mdsal715/test-module-4.yang [new file with mode: 0644]