Refactor augment generator linkage 61/99161/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 21 Dec 2021 13:22:03 +0000 (14:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 24 Dec 2021 21:53:52 +0000 (22:53 +0100)
commit0ee9d3f008bf22efaf6151f7fa3e8c48087f8f4d
tree624e142f5a388a2026bce3c5f718a26a2f9500c8
parent1eb90b40c71b7535c55206fa227fcf476e06d77d
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>
(cherry picked from commit d601e4b48e111846c005b6f773634e7a5c28e89f)
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]