mdsal.git
2 years agoRelease mdsal v8.0.13
jenkins-releng [Sun, 13 Mar 2022 09:07:36 +0000 (09:07 +0000)]
Release mdsal

2 years agoCorrect ActionService generics 97/100097/1
Robert Varga [Thu, 3 Mar 2022 08:49:24 +0000 (09:49 +0100)]
Correct ActionService generics

We need to allow for any Action, even for KeyedListAction. Make sure to
adjust generics accordingly and add a test.

JIRA: MDSAL-726
Change-Id: I04c8fdf1c8803647c8640bbdd10c19304336b915
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7496691fabeb9d3b1276476740045d17fe473641)

2 years agoFix identityref wildcards 91/100091/1
Robert Varga [Fri, 11 Mar 2022 19:09:22 +0000 (20:09 +0100)]
Fix identityref wildcards

Identityref use Class<? extends Target> for their return types, hence
we mask unmask the ParameterizedType to Target's JavaTypeName.

JIRA: MDSAL-732
Change-Id: I96fd0ffcffcd65aa7c658ab9d881a950ba41c6cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f735dcbc86962f6b51abecadec0c00f595649984)

2 years agoInclude namespace manipulations in error report 89/100089/1
Robert Varga [Sat, 12 Mar 2022 03:41:11 +0000 (04:41 +0100)]
Include namespace manipulations in error report

We need squashing information to make sense of what the requirement
is attempting to do, include it in toString().

Change-Id: Ieeb913680990acb5ccd8690b28c55e4a72f5836e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 14442dc3bf8df154bbe23b993694ed901144cc3b)

2 years agoImprove information provided on failed linkage progress 93/99893/1
Robert Varga [Fri, 4 Mar 2022 18:53:05 +0000 (19:53 +0100)]
Improve information provided on failed linkage progress

Linkage algorithm seems to have a issue with a set of proprietary
models. Rather than throwing a simple exception, add debug logging
to track which items progress and report any remaining items as
suppressed exceptions.

Change-Id: Ia7f1efe498f1ac82de35facf0188d0a2972e2b09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 46df82388d1f9bf7a939ccf9e26fbd71cd5193c2)

2 years agoRemove an unneeded line 09/99809/1
Robert Varga [Sun, 20 Feb 2022 15:00:16 +0000 (16:00 +0100)]
Remove an unneeded line

We are at the end of the loop, no need for a continue statement.

Change-Id: I79478fcbda4820c3923fae39dfec5fe7c47a0e70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4460442fba0d2efe0249a42b371ba21f1c898273)

2 years agoBump versions to 8.0.13-SNAPSHOT 96/99796/1
Robert Varga [Fri, 18 Feb 2022 10:49:37 +0000 (11:49 +0100)]
Bump versions to 8.0.13-SNAPSHOT

This starts the next development iteration.

Change-Id: I4cfc4ce8bd020b2e3544b2f2bafc84867a487fbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect ActionProviderService method definition 63/99763/1
Peter Suna [Tue, 15 Feb 2022 17:08:35 +0000 (18:08 +0100)]
Correct ActionProviderService method definition

registerImplementation generics fail to account for KeyedListActions.
Fix that by making sure allow for KeyedInstanceIdentifiers as well as
InstanceIdentifiers.

JIRA: MDSAL-723
Change-Id: Iac402bb4390dbd1805fc930c2250b3c7c8343dc0
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
(cherry picked from commit 128c1abfb15284e16cdb471bcaacdf7cf6a60eb1)

2 years agoBump versions to 8.0.12-SNAPSHOT 07/99707/1
Robert Varga [Mon, 14 Feb 2022 00:34:06 +0000 (01:34 +0100)]
Bump versions to 8.0.12-SNAPSHOT

This starts the next development iteration.

Change-Id: I57ee9dc7bc7d195b86ea7277e06419607ff31a45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix uses/augment linkage 14/99414/32
Robert Varga [Fri, 21 Jan 2022 06:10:37 +0000 (07:10 +0100)]
Fix uses/augment linkage

Our previous fix for MDSAL-715 switched the resolution logic to a unified
approach based on linked augmentation. Unfortunately it missed the fact
that linking the groupings also had the side-effect of setting the
augment target, which in turn populates 'augments' list.

Our failure to do so ends up wrecking lookups in the case where we have
an uses-augmented node further augmented by a module-augment.

Fix this by intertwining original and augment linkage, so that a subtree
root (such as module) pays attention to augments which need to resolve
before descending to recursive linkage.

JIRA: MDSAL-718
Change-Id: I7bd6cbed636267d35113888ddd35f0c6d9411043
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump yangtools to 7.0.14 05/99705/2
Robert Varga [Sun, 13 Feb 2022 09:22:14 +0000 (10:22 +0100)]
Bump yangtools to 7.0.14

Pick up fixes from upstream.

Change-Id: Ia4eccc01ba1a9655483e390b100a34d607cfad23
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect ActionSpec definition 83/99683/1
Robert Varga [Thu, 10 Feb 2022 10:38:25 +0000 (11:38 +0100)]
Correct ActionSpec definition

ActionSpec's generics fail to account for KeyedListActions. Fix that
by making sure allow for KeyedInstanceIdentifiers as well as
InstanceIdentifiers.

JIRA: MDSAL-721
Change-Id: I520e23e0294c38c37c6a15dd4d7f05c937476357
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7c8af4914727a5343d0dfa2034e1f1c818ce6e35)

2 years agoClarify ActionSpec documentation 82/99682/1
Robert Varga [Thu, 10 Feb 2022 09:21:45 +0000 (10:21 +0100)]
Clarify ActionSpec documentation

The documentation hints at wildcard InstanceIdentifier, but people have
trouble with the concept and what it means. Clarify that a bit.

JIRA: MDSAL-721
Change-Id: I9af71fbbfd2d27b4e4c4c12077975be1671647e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 42919cabad6f17037fe40b7ab3954b7ffcaf0b34)

2 years agoFix an eclipse warning 70/99570/1
Robert Varga [Thu, 3 Feb 2022 15:09:32 +0000 (16:09 +0100)]
Fix an eclipse warning

<T extends Optional<?>> is not liked because of Optional being final.
Fix the warning by changing the prototype a bit.

Change-Id: I8864b695e4affa01913df83721c63ff4fe6d5015
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExamine supported features in yanglib 67/99567/1
Robert Varga [Thu, 3 Feb 2022 08:43:00 +0000 (09:43 +0100)]
Examine supported features in yanglib

yang-model-library exposes the features that are actually supported from
a particular module. Process this information and pass it to
SchemaContextResolver so that it can create a correct
EffectiveModelContext.

JIRA: MDSAL-719
Change-Id: I32af4cdec4acb823ad90f2608036f0d71210910b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit cf58c213929bfe0f02649dae81e06a89b3cab75c)

2 years agoUse 'var' for local variables 66/99566/1
Robert Varga [Thu, 3 Feb 2022 07:29:05 +0000 (08:29 +0100)]
Use 'var' for local variables

We need to use long qualifiers because various we have simple name
overlaps. Use 'var' consistently so that we shorten these.

Change-Id: Ib49fef64bb2ed61d96edbe28a42588deb7b239ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 03a39718d931d49725ad83a95c56fac2fa156bb3)

2 years agoSimplify original tracking 27/99527/1
Robert Varga [Sun, 30 Jan 2022 00:22:23 +0000 (01:22 +0100)]
Simplify original tracking

Rather that having a quad-state 'prev' field typed to Object, potentially
containing an OriginalLink, make its state logically tri-state typed
with AbstractExplicitGenerator. The resolved generator is then carried in
an explicit field.

JIRA: MDSAL-718
Change-Id: I357a1ad6037a9c5288bdf2ec84dd90882cbcf76a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEnforce explicit generator linkage 21/99521/4
Robert Varga [Fri, 28 Jan 2022 23:06:59 +0000 (00:06 +0100)]
Enforce explicit generator linkage

We are keeping the original pointer as a simple nullable field. This can
result in us confusing an unresolved generator with an original, leading
to potential badness.

Refactor the AbstractExplicitGenerator to track incremental resolution,
catching invalid accesses.

JIRA: MDSAL-718
Change-Id: Ie67fa4d08d0887f301948e3d03d846ed9ee1d628
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove AugmentedTypeTest 22/99522/1
Robert Varga [Sat, 29 Jan 2022 01:53:32 +0000 (02:53 +0100)]
Improve AugmentedTypeTest

Eclipse is warning of an always-false equality check in this test suite.
Fix this by performing a proper type comparison, eliminating use of
assertTrue().

Change-Id: Ib9e1de97f9263584f4fa484d8998e57c433e1971
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent/yangtools to 9.0.13/7.0.13 74/99474/1
Robert Varga [Wed, 26 Jan 2022 16:29:59 +0000 (17:29 +0100)]
Bump odlparent/yangtools to 9.0.13/7.0.13

Pick up latest fixes from upstream.

Change-Id: I36e9caf475128854abae451610e9c821d66d7c0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoGeneratorReactor.linkOriginalGenerator() should be stateless 33/99433/1
Robert Varga [Tue, 25 Jan 2022 12:01:22 +0000 (13:01 +0100)]
GeneratorReactor.linkOriginalGenerator() should be stateless

linkOriginalGenerator() does not need to modify GeneratorReactor, make
it static, so that we can disconnect the state manipulation.

JIRA: MDSAL-718
Change-Id: I6ef2b81f4645522e2c6388bfcde48c36527e421a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove GeneratorReactor.leafGenerators 31/99431/1
Robert Varga [Tue, 25 Jan 2022 11:49:48 +0000 (12:49 +0100)]
Remove GeneratorReactor.leafGenerators

This field is completely unused, remove it.

Change-Id: I6d7a923d27406ce062430428ddd3e75649ea54ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove GeneratorReactor timing 20/99420/1
Robert Varga [Mon, 24 Jan 2022 09:37:29 +0000 (10:37 +0100)]
Improve GeneratorReactor timing

Parts of generation are not covered by timer, make sure we measure the
entire execution.

Change-Id: If1ac6fee65f7569bffc7f124551819d12d27f046
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions 8.0.11-SNAPSHOT 76/99376/1
Robert Varga [Wed, 19 Jan 2022 08:21:16 +0000 (09:21 +0100)]
Bump versions 8.0.11-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia52c3f9dda20b417c28665e026f186d03b301570
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent/yangtools to 9.0.12/7.0.12 75/99375/1
Robert Varga [Wed, 19 Jan 2022 08:20:35 +0000 (09:20 +0100)]
Bump odlparent/yangtools to 9.0.12/7.0.12

Pick up latest fixes from upstream.

Change-Id: I93a5848523b632ce9ef451ff896275b238a7cba6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 8.0.10-SNAPSHOT 46/99246/1
Robert Varga [Mon, 10 Jan 2022 10:53:03 +0000 (11:53 +0100)]
Bump versions to 8.0.10-SNAPSHOT

This starts the next development iteration.

Change-Id: I23e50a7fc505c3eb0f25ad1b886de98eca2c1170
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix DataObject builer javadoc references 45/99245/1
Robert Varga [Mon, 10 Jan 2022 09:54:31 +0000 (10:54 +0100)]
Fix DataObject builer javadoc references

We have a few mis-references generated in documentation, fix them up.

Change-Id: I3040adeb6ec10ca46395212324df29dbe292a82d
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit aa2ff80e8294ab1590bebcb4b8c60e36d266bda7)

2 years agoBump odlparent/yangtools to 9.0.10/7.0.11 42/99242/1
Robert Varga [Mon, 10 Jan 2022 10:07:10 +0000 (11:07 +0100)]
Bump odlparent/yangtools to 9.0.10/7.0.11

Pick up latest fixes from upstream.

Change-Id: I8facba41b2019da8daeea754b78c96d586672aaf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump java-diff-utils to 4.11 41/99241/1
Robert Varga [Mon, 10 Jan 2022 09:04:23 +0000 (10:04 +0100)]
Bump java-diff-utils to 4.11

https://github.com/java-diff-utils/java-diff-utils/blob/master/CHANGELOG.md#49
https://github.com/java-diff-utils/java-diff-utils/blob/master/CHANGELOG.md#410
https://github.com/java-diff-utils/java-diff-utils/blob/master/CHANGELOG.md#411

Change-Id: I5e4191c4993ac472ee33171fa4d2da604a7c7313
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 43200236635afacd16c0dffd3f31162d2077278d)

2 years agoDeprecate AssertDataObjects 40/99240/1
Ivan Hrasko [Thu, 4 Nov 2021 14:10:26 +0000 (15:10 +0100)]
Deprecate AssertDataObjects

XtendBuilderExtensions class is proven to be unnecessary,
remove its usage and mark it for removal.

JIRA: MDSAL-716
Change-Id: I92cf5e060b41320b1d8b7b067c76e5bfdf61fc5c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1fbc15a384476ed652e45faa6e9dc4d41234aae0)

2 years agoBump versions to 8.0.9-SNAPSHOT 62/99162/1
Robert Varga [Fri, 24 Dec 2021 22:30:05 +0000 (23:30 +0100)]
Bump versions to 8.0.9-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie4a972f57108fb92e8668e1d255f27cf7b00386e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor augment generator linkage 61/99161/1
Robert Varga [Tue, 21 Dec 2021 13:22:03 +0000 (14:22 +0100)]
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)

2 years agoUse Empty.value() instead of Empty.getInstance() 31/99031/1
Robert Varga [Mon, 22 Nov 2021 13:09:34 +0000 (14:09 +0100)]
Use Empty.value() instead of Empty.getInstance()

Empty..getInstance() is going away, do not generate references to it.

Change-Id: I9322032c8b4c6741d2608948fc98711f3ce2573c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 140fdfc2474786eb3b9cbf5217d39618597eeead)

2 years agoBump odlparent/yangtools to 9.0.9/7.0.10 19/99119/3
Robert Varga [Sun, 19 Dec 2021 09:43:05 +0000 (10:43 +0100)]
Bump odlparent/yangtools to 9.0.9/7.0.10

Pick up latest fixes from upstream.

Change-Id: I90601e17bd7c2e502ad98077df6f52e401125f66
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo no use reflection to obtain opaque value ctor 10/98910/1
Robert Varga [Wed, 8 Dec 2021 16:03:25 +0000 (17:03 +0100)]
Do no use reflection to obtain opaque value ctor

We can do all the lookups and access via java.lang.invoke, let's
not bring java.lang.reflect to the party.

Change-Id: I7528a469270d384fbbbd9680cffe227129cf4d39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c95e5240ca83def4357e8ca7c45b71ea33e9f973)

2 years agoUse a shared type for Pattern 87/98887/1
Robert Varga [Tue, 7 Dec 2021 15:37:05 +0000 (16:37 +0100)]
Use a shared type for Pattern

We are looking up the type here multiple times, which is not entirely
efficient. Add a constant to hold the type.

Change-Id: I5da339cd21c5944c13ed2eb66f15b9ae61d56b46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit bd63710ebd35fbda6eff024bb3bbc60f037eee9f)

2 years agoUse BindingTypes instead of rollin input/output types 86/98886/1
Robert Varga [Tue, 7 Dec 2021 09:13:28 +0000 (10:13 +0100)]
Use BindingTypes instead of rollin input/output types

We have well-known constants covering ConcreteTypes for RpcInput and
RpcOutput. Use them directly, reducing startup time a bit.

Change-Id: I145c4de2db0d3769f6926200f8e8afe6461a445f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2db704e27af6f96b6cc7a37f86bd0b2ad378384e)

2 years agoFix action invocation and registration 00/98800/1
Robert Varga [Thu, 25 Nov 2021 15:28:33 +0000 (16:28 +0100)]
Fix action invocation and registration

Binding actions involving groupings are a bit more complicated when it
comes to DOM mapping. An instantiated Action can correspond to any
number of ActionEffectiveStatements, but we skimped that over and used
the SchemaPath (and after that, an invalid SchemaNodeIdentifier) to
identify them.

Correct this by requiring users to provide an ActionSpec, which is a
combination of an Action interface and a corresponding instantiation
path.

JIRA: MDSAL-712
Change-Id: I632c0f51b2e71fa1b0a04e43d5b1c50286430b21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 54cf838b1a16c1f911963e23e738b1eef753c421)

2 years agoAnother mdsal-dom-api module update 56/98556/1
Robert Varga [Mon, 15 Nov 2021 12:14:49 +0000 (13:14 +0100)]
Another mdsal-dom-api module update

We are using annotations in interfaces, hence we need to require
them transitively.

Change-Id: Ibc6b02f5e02c3e7533a9272daa1090569234e11a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 54b2e91548e5121f9cc1ec8d1982f768dafe7ea5)

2 years agoUpdate mdsal-dom-api module-info 46/98546/1
Robert Varga [Mon, 15 Nov 2021 07:12:50 +0000 (08:12 +0100)]
Update mdsal-dom-api module-info

Our users need access to both concepts and yang.common, reflect that.

Change-Id: I46f18e3a6057ff5407c3cfdde7dcea31baf54f62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7b91035d8c3cc1ed0ff401c546bbfb9a445a3290)

2 years agoClean up IMDS dependencies 98/98498/1
Robert Varga [Sun, 14 Nov 2021 10:27:43 +0000 (11:27 +0100)]
Clean up IMDS dependencies

Fix dependency declarations and make sure we do not need error-prone.

Change-Id: Ie015e508cf352fc0f28c03bb9b99879773fd0aba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump byte-buddy to 1.12.1 29/98329/2
Robert Varga [Sun, 7 Nov 2021 18:16:11 +0000 (19:16 +0100)]
Bump byte-buddy to 1.12.1

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.1
plus the preceding items.

Change-Id: Ie785b9e131369a35584f68a9c9b32ee536b5cead
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse Map.entry() in BindingCodecContext 44/98244/1
Robert Varga [Fri, 29 Oct 2021 16:05:21 +0000 (18:05 +0200)]
Use Map.entry() in BindingCodecContext

We are not using nulls, let's use an immutable entry.

Change-Id: I1d2fdd64b8396f991a267c429cf5822d9ada5fa1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove CompilationTestUtils 06/98206/1
Robert Varga [Thu, 28 Oct 2021 15:53:16 +0000 (17:53 +0200)]
Improve CompilationTestUtils

We can perform better asserts, let's do that.

Change-Id: I671e1a0425d74b2f87a398102fba9cd890b9efc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd missing requires on yang-common 05/98205/1
Robert Varga [Thu, 28 Oct 2021 16:00:36 +0000 (18:00 +0200)]
Add missing requires on yang-common

We are referencing types from yang-common, make sure we require them
and not get them transitively.

Change-Id: Id93e890e3a303b4199e7ae2f2809e29b02f81b7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 8.0.8-SNAPSHOT 45/98145/1
Robert Varga [Tue, 26 Oct 2021 19:36:06 +0000 (21:36 +0200)]
Bump versions to 8.0.8-SNAPSHOT

This starts the next development iteration.

Change-Id: I55d485d6a4ad9de8147d2deee1ec56ca3f3b7e8c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.8 44/98144/2
Robert Varga [Tue, 26 Oct 2021 19:31:35 +0000 (21:31 +0200)]
Bump odlparent to 9.0.8

We have mis-aligned versions view of odlparent with yangtools-7.0.9,
fix that.

JIRA: MDSAL-703
Change-Id: I3d772d956bacce0dfd8c398d2b7a9b1b49d2c1bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup BindingTypesTest 45/98045/1
Robert Varga [Fri, 22 Oct 2021 11:39:23 +0000 (13:39 +0200)]
Cleanup BindingTypesTest

Use assertThrows() instead of @Text(expected), not that it really
matters here.

Change-Id: I8c8ac3d0c5fc99eebaaaae9c5d0943244e9498f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRequire checker.qual 44/98044/1
Robert Varga [Fri, 22 Oct 2021 10:17:35 +0000 (12:17 +0200)]
Require checker.qual

We are using the annotations here, but do not pull in the corresponding
module. Fix that.

Change-Id: Idc25a01c5ba0068763f45f11ddcdfb75a1aae3ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDataTreeIdentifier is HierarchicalIdentifier 43/98043/1
Robert Varga [Fri, 22 Oct 2021 10:12:54 +0000 (12:12 +0200)]
DataTreeIdentifier is HierarchicalIdentifier

yangtools.concepts.Path is deprecated, use its replacement interface,
which actually fits here like a glove.

Change-Id: Ic3df2f95ce54334526444aeb28688bf70e14ed35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 8.0.7-SNAPSHOT 14/98014/2
Robert Varga [Wed, 20 Oct 2021 20:13:08 +0000 (22:13 +0200)]
Bump versions to 8.0.7-SNAPSHOT

This starts the next development iteration.

Change-Id: Idd52a361f4d44df5bc4cac63d6f6b2b98797d4b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse HierarchicalIdentifier 86/97886/5
Robert Varga [Thu, 14 Oct 2021 18:29:19 +0000 (20:29 +0200)]
Use HierarchicalIdentifier

We have a number of identifiers which do not actually implement
Identifier concept but rather Path. We have a replacement for Path,
so let's use it, improving contracts the process of doing so.

Change-Id: Idf506084d1b67993f4a7d37efd23b5fca234375f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent/yangtools 13/98013/3
Robert Varga [Wed, 20 Oct 2021 20:12:22 +0000 (22:12 +0200)]
Bump odlparent/yangtools

Adopt odlparent-9.0.7, yangtools-7.0.9.

Change-Id: I5bafc485191739b184a46c4a3db532a00b50b554
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd NotificationService.registerListener() 76/97976/5
Robert Varga [Tue, 19 Oct 2021 12:08:56 +0000 (14:08 +0200)]
Add NotificationService.registerListener()

We want to get rid of FooListener-based notifications, so that we
can use simple lambdas and proper composition. This takes the first
step towards that by allowing users to register a simple
@FunctionalInterface-based listener.

JIRA: MDSAL-700
Change-Id: Ica1ac23515c813366d5d66dc91c3183695f84ce7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove RoutedDOMRpcRoutingTableEntryTest 54/97954/5
Robert Varga [Sun, 17 Oct 2021 10:52:18 +0000 (12:52 +0200)]
Improve RoutedDOMRpcRoutingTableEntryTest

The only test we had here was exercising a warning path, expand
the test suite to properly cover routed RPCs.

Change-Id: Ic37cdc54b1406257408505b21cb65d6d0aa1cf35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not use anonymous classes in PingPongTransactionChain 52/97952/4
Robert Varga [Sun, 17 Oct 2021 10:23:38 +0000 (12:23 +0200)]
Do not use anonymous classes in PingPongTransactionChain

PingPongTransactionChain is quite complicated and it is not helpful
to have just anonymous subclasses, which may end up capturing more
than we want. Split them out to make Sonar happier.

Change-Id: I9995682091daf6b31c196fee5b89d8cfd19f016c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd basic PingPongTransactionChainTest 53/97953/3
Robert Varga [Sun, 17 Oct 2021 13:14:28 +0000 (15:14 +0200)]
Add basic PingPongTransactionChainTest

Covert the basics of behaviour, this still does not deal with various
race conditions.

JIRA: MDSAL-698
Change-Id: I53103cf3226ca8426dd12eed1f013052258ceb1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove DOMRpcRouterTest 51/97951/1
Robert Varga [Sun, 17 Oct 2021 09:13:20 +0000 (11:13 +0200)]
Improve DOMRpcRouterTest

The test is testing a router with no RPCs, add a simple test model
and use its constants to improve actual coverage.

Change-Id: Id2db74f5d321d2857ab3f1237711b4d654e4087b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove RoutedDOMRpcRoutingTableEntryTest 50/97950/4
Robert Varga [Sun, 17 Oct 2021 08:39:06 +0000 (10:39 +0200)]
Improve RoutedDOMRpcRoutingTableEntryTest

Add a few assertions around what we expect to happen.

Change-Id: I4fc56fb0f763a5b9cf6669444a8d1e3e442780c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTestUtils is a utility class 49/97949/2
Robert Varga [Sun, 17 Oct 2021 08:27:13 +0000 (10:27 +0200)]
TestUtils is a utility class

We are subclassing TestUtils just to get at a few static methods and
constants. Turn it into a final class instead.

Change-Id: Ibb25b783b76429b9fca3ba44838e93f2755127d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFold OSGiDOMNotificationRouter 48/97948/2
Robert Varga [Sun, 17 Oct 2021 08:16:28 +0000 (10:16 +0200)]
Fold OSGiDOMNotificationRouter

We have constructor injection, hence we can easily combine the two
implementations. Also add javax.inject annotations to allow easier
integration.

Change-Id: Id3604110522f73ef4e2f705cad74b31545eb27f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove OSGi RPC/Action component coverage 47/97947/2
Robert Varga [Sun, 17 Oct 2021 08:03:03 +0000 (10:03 +0200)]
Improve OSGi RPC/Action component coverage

These are simple forwarders, add equally simple tests to cover their
basics.

Change-Id: I529253060122bcddc14a4c629de27d4c2d798af0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove useless throws 46/97946/2
Robert Varga [Sun, 17 Oct 2021 07:44:32 +0000 (09:44 +0200)]
Remove useless throws

Utility test classes have to have a private constructor, but there
is no point in guarding it with an UOE.

Change-Id: I658835c9c6a93032637198d66f08f8d0e0d6b0b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove DOMRpcRouter coverage 45/97945/3
Robert Varga [Sun, 17 Oct 2021 06:57:45 +0000 (08:57 +0200)]
Improve DOMRpcRouter coverage

The test suite could use a ton of improvements, add a few more
assertions and tests.

Change-Id: I4492dc352e65c5240c55bb730d4b0468669776dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove listener dispatch 44/97944/2
Robert Varga [Sun, 17 Oct 2021 07:34:42 +0000 (09:34 +0200)]
Improve listener dispatch

Both RPC and action listeners should always be ImmutableLists, make sure
that is captured in their definition. This is an invariant useful for
JIT, as we bind directly to implementation -- and do not throw
Collections.emptyList() into the mix.

Change-Id: I7fe71819f11b80399734759bf774c629adfe12bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup OSGi DOMRpcRouter services 43/97943/1
Robert Varga [Sun, 17 Oct 2021 06:28:36 +0000 (08:28 +0200)]
Cleanup OSGi DOMRpcRouter services

We have constructor injection available, which allows us to make these
classes cleaner by making the delegate field final.

Change-Id: I7ed6aa2f5670fb80fb123957a1446ceb0f6aef7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMerge (OSGi)DOMRpcRouter 42/97942/1
Robert Varga [Sun, 17 Oct 2021 06:19:34 +0000 (08:19 +0200)]
Merge (OSGi)DOMRpcRouter

We have contructor injection in OSGi DS, hence we can merge these
classes. Also add missing cleanup under javax.inject rules.

Change-Id: I3c580929f67e4f103707902706c9303221272cb3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup mdsal-binding-generator packaging 33/97933/1
Robert Varga [Sat, 16 Oct 2021 15:09:23 +0000 (17:09 +0200)]
Cleanup mdsal-binding-generator packaging

We just ditched utilities depending on it, hence we do not need to
pull it anymore. Also adjust dependencies to silence warnings.

Change-Id: If09662e7a49d0df34aadf23a63193d48f3e75044
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove mdsal.binding.yang.types 32/97932/2
Robert Varga [Sat, 16 Oct 2021 14:52:56 +0000 (16:52 +0200)]
Remove mdsal.binding.yang.types

This package is not exported by us and therefore not accessible by
anyone. We have just ditched its last user, ditch the package as well,
along with its test suite.

Change-Id: Ida72524105d0134395c06c48a994fc86893567d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMigrate ConfigTypeProvider tests 31/97931/1
Robert Varga [Sat, 16 Oct 2021 13:16:03 +0000 (15:16 +0200)]
Migrate ConfigTypeProvider tests

There are a few remaining tests, migrate them and inhume
AbstractTypeProvider et al.

Change-Id: I1aa96547dfa67ef7dc48f8ef948656fab0405ca4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove a chunk of AbstractTypeProvider 29/97929/1
Robert Varga [Sat, 16 Oct 2021 13:06:45 +0000 (15:06 +0200)]
Remove a chunk of AbstractTypeProvider

We now have no references to some of the code, remove it before
we proceed further. Also hide methods not called externally, so
they will be identified as unused.

Change-Id: I351355657eb8cd2e19c18d553c18a0590cef8a9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExpand DefaultBindingGeneratorTest 28/97928/1
Robert Varga [Sat, 16 Oct 2021 13:00:05 +0000 (15:00 +0200)]
Expand DefaultBindingGeneratorTest

We have fixed the test model (as it was invalid). Add an explicit test
for the now-unresovled grouping leaf type and also restore the original
negative test.

Change-Id: I14c0d734ee8990f9ad9ac8f8c58f37cafae34990
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RuntimeTypeProvider 27/97927/1
Robert Varga [Sat, 16 Oct 2021 11:55:10 +0000 (13:55 +0200)]
Remove RuntimeTypeProvider

Migrate all disabled tests which rely on it and remove it. This
increases our assertion coverage and reduces the amount of code we lug
around.

Change-Id: I5ecd83b953f021786a7fb9bd8a228c67e528ea7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReduce code duplication a tiny bit 13/97913/1
Robert Varga [Fri, 15 Oct 2021 19:55:51 +0000 (21:55 +0200)]
Reduce code duplication a tiny bit

The 'else' part of CaseNodeCodecContext's return is the same as
overridden method, hence call super instead of duplicating code.

Also add a few FIXMEs to guide our intent going forward.

JIRA: MDSAL-697
Change-Id: I7dd9576da217f1a186e9298346ee62aa2ede45d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd a ModuleAugmentGenerator FIXME 12/97912/1
Robert Varga [Fri, 15 Oct 2021 18:32:52 +0000 (20:32 +0200)]
Add a ModuleAugmentGenerator FIXME

Since we will be dealing with getOriginal(), it seems we had some
dead code from conversion. This might prove useful in what we need
to achieve here.

JIRA: MDSAL-696
Change-Id: I8af7f2277f5adc9c08b304d4f8693fc43ece6778
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove getOriginalIfPossible() 11/97911/1
Robert Varga [Fri, 15 Oct 2021 18:31:06 +0000 (20:31 +0200)]
Remove getOriginalIfPossible()

We already have originalNodeOf(), which does precisely the same thing
as we just transplanted.

Change-Id: Ibcafaa23027be1e52e4bb1d8c1f752683fab1aff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup AbstractBindingRuntimeContext.getAvailableAugmentationTypes() 09/97909/9
Robert Varga [Fri, 15 Oct 2021 16:01:22 +0000 (18:01 +0200)]
Cleanup AbstractBindingRuntimeContext.getAvailableAugmentationTypes()

We are performing lookups along augmentation instantiation axis using
APIs which are going away. Cleanup the code and move the traversal to
BindingRuntimeTypes.

Leave a FIXME for getting the required intelligence from
GeneratorReactor as well as some sorely-needed documentation as to what
exactly is going on.

JIRA: MDSAL-695
Change-Id: I6dd7ad7807546091bfbc5cced48b574d6bff49e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup findChildSchemaDefinition() 07/97907/3
Robert Varga [Fri, 15 Oct 2021 13:46:04 +0000 (15:46 +0200)]
Cleanup findChildSchemaDefinition()

Now that we have the search and codec check split out, we can clean up
some of the logic to ditch if-else blocks. Also fixes a potential NPE.

Change-Id: I2a341d06bd3abfc39d7ecfaaf876e6617ddea037
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove grouping/instantiation lookup code 04/97904/3
Robert Varga [Fri, 15 Oct 2021 12:56:29 +0000 (14:56 +0200)]
Move grouping/instantiation lookup code

DatObjectCodecContext should not be concerned with relationships
between parent and child, certainly not to the point of dealing with
where an original grouping leaf is instantiated.

The natural place for this logic is BindingRuntimeContext or
BindingRuntimeTypes, as those get their indices from
mdsal-binding-generator -- which is the core component understanding
these relationships.

Also ditch use of Optionals for tracking walk through dependencies,
which clears up some ugly casts.

Change-Id: I72bfa499794b55c0c6266462b36df56c2ac085c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix GeneratorReactor.mapToGenerator() 94/97394/16
Robert Varga [Sun, 5 Sep 2021 22:48:00 +0000 (00:48 +0200)]
Fix GeneratorReactor.mapToGenerator()

GeneratorReactor.mapToGenerator() relies on EffectiveStatements having
an identity, as it looks up only based on statement.

Rework the logic to operate on SchemaInferenceStack's state, which
provides hierarchical path which should match Generator layout. This
turns out to be a simple delegator job, but we need to switch matching
strategies when we go along the grouping or augment axis.

JIRA: MDSAL-694
Change-Id: Id87c54fdfc2ff37cdf44503e0603074a74c1c02c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoProperly annotate byte[] 69/97669/1
Robert Varga [Tue, 28 Sep 2021 14:54:47 +0000 (16:54 +0200)]
Properly annotate byte[]

This is the only case where we are using a simple array, which has
different annotation placement than reference types. Recognize it and do
the right thing.

JIRA: MDSAL-678
Change-Id: I38fe9c66cbfcf4388cc74ade241b4e986d2c7d6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRequire transitive on spotbugs-annotations 68/97668/1
Robert Varga [Tue, 28 Sep 2021 14:25:47 +0000 (16:25 +0200)]
Require transitive on spotbugs-annotations

mdsal-binding-api is using @CheckReturnValue, which is not included in
the transitively-visible set and triggers two warnings from javac. Fix
that.

Change-Id: I6007a4745cbb31bd446e52fe7254e26c01388a7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFilter empty augmentations from DataObject.toString() 67/97667/1
Robert Varga [Tue, 28 Sep 2021 14:12:48 +0000 (16:12 +0200)]
Filter empty augmentations from DataObject.toString()

Empty augmentations are a hallmark of every toString() result we see.
They carry no semantic meaning, so let's filter them to make life easier
for everyone.

JIRA: MDSAL-691
Change-Id: I79dc07fa72c6c952e797ebb96784788e0dd30241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd FIXMEs for hex-formatting binary values 66/97666/1
Robert Varga [Tue, 28 Sep 2021 14:09:48 +0000 (16:09 +0200)]
Add FIXMEs for hex-formatting binary values

Add FIXMEs to point out where things need to change.

Change-Id: Id7bbd991cf1adf93ee37fa34dfd3314410d72da0
JIRA: MDSAL-692
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix Types.getDefaultRestrictions() 60/97660/1
Robert Varga [Tue, 28 Sep 2021 03:39:16 +0000 (05:39 +0200)]
Fix Types.getDefaultRestrictions()

We have a warning about class visibility, fix it by using public
interface. Also mark the method for removal, as it does not seem
to be used.

Change-Id: I00556715ef3200dc2b46540a05c8e6c0fea0f55e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse a simple substraction for converting case 93/97593/3
Robert Varga [Wed, 22 Sep 2021 00:02:53 +0000 (02:02 +0200)]
Use a simple substraction for converting case

We are dealing with Latin1 here, just use plain arithmetics guaranteed
to work.

Change-Id: Ie86943401e6cea7bd9d000f6ccc7aa82aa7e9156
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd HexFormat FIXMEs 92/97592/1
Robert Varga [Tue, 21 Sep 2021 23:55:40 +0000 (01:55 +0200)]
Add HexFormat FIXMEs

Add markers where we should be taking advantage of Java 17's new
HexFormat class.

Change-Id: I907502f7c976163ec44df62bf056df282ae9a743
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove OSGiBindingAdapterFactory 10/94210/9
Robert Varga [Fri, 11 Dec 2020 10:57:27 +0000 (11:57 +0100)]
Remove OSGiBindingAdapterFactory

We have constructor injection, hence we do not need a separate
OSGi class for BindingAdapterFactory.

Change-Id: I41eeec3112bc8e745cd3b2db9012f28f57746625
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove generatedTypeForExtendedDefinitionTypeWithIdentityrefBaseTypeTest() 91/97591/1
Robert Varga [Tue, 21 Sep 2021 22:27:01 +0000 (00:27 +0200)]
Move generatedTypeForExtendedDefinitionTypeWithIdentityrefBaseTypeTest()

Move this test into the legacy test suite.

Change-Id: I127db528643cc59f76ce3e6198c96508e2c46d01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove useless test 90/97590/1
Robert Varga [Tue, 21 Sep 2021 22:09:00 +0000 (00:09 +0200)]
Remove useless test

This is a test for a null check in dead code, just remove it.

Change-Id: If5a2347a27697640cb109be0a2d93d28de291dd2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove a few more tests 19/97219/7
Robert Varga [Mon, 16 Aug 2021 13:26:18 +0000 (15:26 +0200)]
Move a few more tests

A few tests from TypeProviderTest can be re-activated with
DefaultBindingGenerator, migrate them.

Change-Id: I61ffbd5c622bba113d58e32e4d2db6fe7275461b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix OSGiDOMSchemaService lifecycle 46/97546/4
Robert Varga [Mon, 20 Sep 2021 15:39:21 +0000 (17:39 +0200)]
Fix OSGiDOMSchemaService lifecycle

Original refactor specified rather invalid lifecycle for the
OSGiModuleInfoSnapshot dependency -- it is missing the dynamic
binding which was there in one version of the patch set.

Unfortunately the invalid instruction (FieldOption for a method) is not
caught and it is causing a rather weird state, where we end up with a
deactivated service still having listeners firing.

Fix injection lifecycle by having a property DYNAMIC and GREEDY
lifecycle -- which does exactly the right thing, except we need to track
a bit more state to make logging more sane.

JIRA: MDSAL-689
Change-Id: Ia027c45daab528821bee9ae93248d9d7e9ada85d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix raw Component{Factory,Instance} references 45/97545/2
Robert Varga [Mon, 20 Sep 2021 14:47:51 +0000 (16:47 +0200)]
Fix raw Component{Factory,Instance} references

These interfaces are now properly generic, bind them to their
corresponding component.

Change-Id: Ib03ec6cfeee4c10fbbfc5e6e0950d1dd035cecfe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup ReadFailedException 79/97479/1
Robert Varga [Mon, 13 Sep 2021 17:52:13 +0000 (19:52 +0200)]
Cleanup ReadFailedException

Remove redundant type specification and make arguments final.

Change-Id: Ib4791bb47c24bbdc6fb1ab6675d302650103ce43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd a FIXME for method returns 90/97390/4
Robert Varga [Sun, 5 Sep 2021 18:00:54 +0000 (20:00 +0200)]
Add a FIXME for method returns

Method semantics are quite counter-intuitive, add a FIXME to ensure
users do not get confused.

Change-Id: Iefca54eb050c6c2df0cf8a4b1a99b641e282beb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 8.0.6-SNAPSHOT 51/97451/1
Robert Varga [Sun, 12 Sep 2021 09:27:15 +0000 (11:27 +0200)]
Bump versions to 8.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I22d0d635fd45b187c6deda49d6a7922bad96a69e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent/yangtools 50/97450/1
Robert Varga [Sat, 11 Sep 2021 14:22:08 +0000 (16:22 +0200)]
Bump odlparent/yangtools

Adopt odlparent-9.0.6/yangtools-7.0.8.

Change-Id: I6f5682c34c0358b9bb94bc41a7d9c89c55fa4241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect Generator.findGenerator() return type 97/97397/1
Robert Varga [Mon, 6 Sep 2021 08:09:45 +0000 (10:09 +0200)]
Correct Generator.findGenerator() return type

We can only ever return AbstractExplicitGenerator, make sure we reflect
that in method return type.

Change-Id: Ica9d309910836682476659cb09f9346e2fe16cc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCentralize Builder and Key suffixes 92/97392/3
Robert Varga [Sun, 5 Sep 2021 20:21:35 +0000 (22:21 +0200)]
Centralize Builder and Key suffixes

We have a number of places hard-coding these constants, use a common
place for them.

Change-Id: Ifbd633e1bc7fbd66bd72d091955e4353d412b6c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove simple BaseTemplate methods 91/97391/1
Robert Varga [Sun, 5 Sep 2021 18:36:23 +0000 (20:36 +0200)]
Move simple BaseTemplate methods

Reduce xtend proliferation by moving simplistic methods into
JavaFileTemplate and using them from there. This has also benefit in
that BaseTemplate does not reference yang.model.api directly.

Change-Id: I0f10e8abd5fcf54f9d288bd882ad5e9b62298113
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>