mdsal.git
3 years agoConvert mdsal-dom-api to a JPMS module 31/93631/2
Robert Varga [Fri, 6 Nov 2020 16:22:10 +0000 (17:22 +0100)]
Convert mdsal-dom-api to a JPMS module

This is a very simple artifact, convert it to a JPMS module.

JIRA: MDSAL-621
Change-Id: I2bb4083010bb3bdb4dfa61f18ebf7b0db5299a92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert mdsal-common-api to a JPMS module 30/93630/2
Robert Varga [Fri, 6 Nov 2020 16:15:21 +0000 (17:15 +0100)]
Convert mdsal-common-api to a JPMS module

This is a very simple artifact, convert it to a JPMS module.

JIRA: MDSAL-620
Change-Id: I20a73390bd4ccee8bfff74fe08a0be038ccea811
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor FileSearchUtil 84/93584/9
Illia [Wed, 4 Nov 2020 15:05:15 +0000 (17:05 +0200)]
Refactor FileSearchUtil

Migrate to Java 11.
Add method for verifying containment of consecutive lines.
Add methods which add different level indentation.

Change-Id: I54fff1d1f840375102eed479a3cb338085e03762
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoBump odlparent/yangtools to 8.0.1/6.0.1 21/93621/1
Robert Varga [Fri, 6 Nov 2020 12:24:56 +0000 (13:24 +0100)]
Bump odlparent/yangtools to 8.0.1/6.0.1

Pick up latest fixes from upstream.

Change-Id: I818d72880f2da4491cd0daa1d856360c9cd59d45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix GeneratorImpl checkstyle 20/92820/17
Illia [Wed, 30 Sep 2020 23:38:53 +0000 (02:38 +0300)]
Fix GeneratorImpl checkstyle

Move resources closing to finally block, verify folder creation.
Eliminate Xtend "dispatch" usage. Rewrite to its Java implementation.

Change-Id: I1d709d3a9007d2ee69512f4293771dcc06e1a4eb
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoRemove unneeded constants 07/93607/1
Robert Varga [Thu, 5 Nov 2020 14:56:55 +0000 (15:56 +0100)]
Remove unneeded constants

This have slipped through review, remove them.

JIRA: MDSAL-596
Change-Id: Icb0483ff2f78dbb0613dc21ffc4fb45f805be32e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd support for formatting EffectiveModelContext 84/93084/12
Robert Varga [Thu, 15 Oct 2020 18:40:35 +0000 (20:40 +0200)]
Add support for formatting EffectiveModelContext

Introduce a fluent-builder like pattern so we have the
option to override various options of the resulting output.

JIRA: MDSAL-596
Change-Id: I1929664db4262b0428e078b4712844b4bc2679b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
3 years agoSkip pmd/cpd/spotbugs 46/93546/2
Robert Varga [Sun, 1 Nov 2020 17:13:06 +0000 (18:13 +0100)]
Skip pmd/cpd/spotbugs

This is just generated code, there is no point in running these.

Change-Id: I0ef79c800cd76debc9f328930220715715cef6f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor DOMQueryPredicate 58/93458/5
Robert Varga [Wed, 28 Oct 2020 16:50:24 +0000 (17:50 +0100)]
Refactor DOMQueryPredicate

Refactor aimed at allowing composite predicates without multiple
lookups. While the DOM language allows this use case, the binding
layer does not take advantage of it.

JIRA: MDSAL-617
Change-Id: Ib8a3f77ee660a8c2881d0a18bd0238c6ddce5ade
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse Map.entry() instead of SimpleImmutableEntry 35/93435/3
Robert Varga [Wed, 28 Oct 2020 00:03:12 +0000 (01:03 +0100)]
Use Map.entry() instead of SimpleImmutableEntry

We are using these a dumb DTOs, hence using a value-based
non-serializable implementation is more appropriate.

JIRA: MDSAL-605
Change-Id: Ie36c397a6e265328f31b70dce05b8c72b8756584
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename LazyDOMQueryResultIterator 33/93433/3
Robert Varga [Tue, 27 Oct 2020 22:55:47 +0000 (23:55 +0100)]
Rename LazyDOMQueryResultIterator

This is an implementation-internal class, shorten its name to
DOMQueryIterator. It is shorter and matches naming of others.

JIRA: MDSAL-605
Change-Id: I8413a20c4ba533c62bf6c5c3013b4d1bf8f841e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd support for keyed entries 98/93398/7
Robert Varga [Mon, 26 Oct 2020 22:54:40 +0000 (23:54 +0100)]
Add support for keyed entries

When we enter a NodeIdentifierWithPredicates for a Map, we can
service that with a direct map lookup instead of iteration. As we
now have the tools to access this step, add a unit test and fix
the implementation.

These predicates add another dimension to matching, where we have
to deal with Maps, something that NormalizedNodes does not help
with.

Predicate matching is split into its own class with a clear entry
point, so as to separate it from other complex pieces. This also
solves the tension between Evaluator and Iterator by shifting
ownership to a third class.

Since a predicate now be matching multiple nodes, we have to also
introduce an explicit DOMQueryPredicate.Not, so that its effects
can be properly accounted for.

JIRA: MDSAL-612
Change-Id: I34511517c5746efc5d245a56da89083c44100752
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd support for selecting exact items from lists 27/93427/2
Robert Varga [Tue, 27 Oct 2020 19:53:23 +0000 (20:53 +0100)]
Add support for selecting exact items from lists

The query language prototype was centered around wildcard matches,
while it ignored exact matches in building up the query. Add support
for specifying a list key, as one would in normal InstanceIdentifier.

JIRA: MDSAL-612
Change-Id: I0c63d6d4990a31888f33a86c9d798b09bb10c734
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor LazyDOMQueryResultIterator 92/93392/7
Robert Varga [Mon, 26 Oct 2020 18:29:11 +0000 (19:29 +0100)]
Refactor LazyDOMQueryResultIterator

Rework the logic to keep minimum stack allocations. Whereas we used
stack for keeping the decision state and traverse all entries, here
we keep an explicit stack with state.

We mutate the state using a "simple" sstateful dispatch, where we
are are carefully peeling the various possibilities. This logic is
one large method due to 'current' being manipulated and non-local
returns.

This improves test case performance by more than a factor-of-two,
easily beating linear search by a wide margin.

For clarity we have two classes of Frames, one dealing with MapNode's
children and the other one taking care of all the other nodes. While
this might cause bimorphic invocation of Frame.hasNext(), the overall
effect on clarity is immense.

We also change match() a bit, to take predicates, as it is all that
it should be interested in.

JIRA: MDSAL-610
Change-Id: I7136c6297cc66832539d1bb3d9f653968eb7bdb1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd LazyDOMQueryResult 68/93368/5
Robert Varga [Mon, 26 Oct 2020 14:17:55 +0000 (15:17 +0100)]
Add LazyDOMQueryResult

Rehost the evaluation logic into a dedicated iterator class. This
does not make iteration lazy, but sets the stage by giving the state
being passed around a place to live.

JIRA: MDSAL-610
Change-Id: Ic23eb38d7e5a6bd1cf1b7637dec88eff552520d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBetter encapsulate search state 89/93389/1
Robert Varga [Mon, 26 Oct 2020 14:05:25 +0000 (15:05 +0100)]
Better encapsulate search state

'remaining' is a bit unclear, make sure to push down initialization
down a bit.

JIRA: MDSAL-610
Change-Id: Id607bd444e58eaaa288e8f0fc505d20ec31bed75
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPropagate notification status to generated listener methods 57/93257/14
Vladyslav Marchenko [Thu, 22 Oct 2020 12:51:40 +0000 (15:51 +0300)]
Propagate notification status to generated listener methods

When we are generating listener interface for notifications:
- deprecated notification methods are marked as @deprecated;
- obsolete notification methods are marked as @deprecated and
  additionally are "default no-op" (so that users are not forced
  to implement them);

JIRA: MDSAL-554
Change-Id: I298b4dff44bd74715d9e1ebac277ac4d7918ffe6
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoHide EagerDOMQueryResult behind DOMQueryResult.of() 67/93367/1
Robert Varga [Mon, 26 Oct 2020 02:54:40 +0000 (03:54 +0100)]
Hide EagerDOMQueryResult behind DOMQueryResult.of()

Most users might not want to depend on dom.spi just for an immutable
holder. Add DOMQueryResult.of() methods and use them as replacements
for EagerDOMQueryResult.of().

JIRA: MDSAL-605
Change-Id: I96f81cc105b9890638769b2f2185e961c0fd1885
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoQueryResults should be Iterable, Immutable 65/93365/2
Robert Varga [Mon, 26 Oct 2020 01:51:43 +0000 (02:51 +0100)]
QueryResults should be Iterable, Immutable

Each query result really is a holder of result items, in some
iteration order. Expose this by implementing Iterable, so that
we end up correctly implementing stream() et al.

JIRA: MDSAL-605
Change-Id: I4cf1cd29e74e8c640ee62126e4f1cb9efa956cce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCache leaf lookups 64/93364/1
Robert Varga [Mon, 26 Oct 2020 01:28:00 +0000 (02:28 +0100)]
Cache leaf lookups

When we are binding a method name to its schema, we are performing
the inverse lookup. Instantiate a cache for these, so we end up
searching only once in DefaultQueryFactory's life.

JIRA: MDSAL-611
Change-Id: Idf9f3de22d907036478dc289387746eeb5a719a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd DOMDataTreeQueryOperations 48/93348/3
Robert Varga [Sun, 25 Oct 2020 17:17:42 +0000 (18:17 +0100)]
Add DOMDataTreeQueryOperations

DOMDataTreeQueryOperations exposes the ability to execute queries
on the backing datastore, much like one would execute a read.

mdsal-binding-dom-adapter is taught to recognize the interface and
use it to offload execution deeper. It still falls back to its
evaluation should the backing store not support this.

DOMStoreReadTransaction gained the ability to value expressions,
using a default implementation based om DOMQueryEvaluator.

Based on that capability, mdsal-dom-broker's transactions are
retrofitted to always provide evaluation locally.

JIRA: MDSAL-607
Change-Id: Ia20acf59870f47c8a84914e239dee82e2a56c1bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd QueryOperations 46/93346/9
Robert Varga [Sun, 25 Oct 2020 14:30:08 +0000 (15:30 +0100)]
Add QueryOperations

Introduce QueryOperations, which support execution of QueryExpressions.
We implement these in the binding/dom adapter in terms of a read/eval
supported by DOMQueryEvaluator.

This allows users to execute queries no matter what the underlying
storage engine supports. This has the upside of instantiating fewer
Binding objects, as the result set is usually a subset of the overall
tree.

TypedTransactions get these unconditionally, throwing
UnsupportedOperationException if the backend does not provide them
(which the default implementation does).

JIRA: MDSAL-606
Change-Id: If68fbb027aa72b1a4b5eef1437e92c30974a1e12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd DOMQueryResult streaming interfaces 63/93363/1
Robert Varga [Sun, 25 Oct 2020 23:40:40 +0000 (00:40 +0100)]
Add DOMQueryResult streaming interfaces

Current definition is really an implementation-specific. The API
exposed from DOMQueryResult is eager, not allowing for eager
termination of searching.

Fix this by turning DOMQueryResult into an interface and add
an eager implementation to match current behavior.

Also update DefaultQueryResult to take advantage of lazy
transformations.

JIRA: MDSAL-605
Change-Id: I8375954e09ce6139aad0f83e883ed75771faceab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPeel predicate identifiers 54/93354/1
Robert Varga [Sun, 25 Oct 2020 22:03:48 +0000 (23:03 +0100)]
Peel predicate identifiers

Most of the time we will be treated with simple predicates, peel
them off, so we do not end up iterating.

JIRA: MDSAL-605
Change-Id: I1864c33c5aa34cd3a58171f8cfbe729dd325fb35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCreate YangInstanceIdentifier only for a match 53/93353/1
Robert Varga [Sun, 25 Oct 2020 19:19:48 +0000 (20:19 +0100)]
Create YangInstanceIdentifier only for a match

This is a classic performance tune up: do not create
YangInstanceIdentifier until we need it.

JIRA: MDSAL-605
Change-Id: Idf9f391d5e7d8080795ce3f6d9b943b5240fe21e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd DOMQueryResult 47/93347/2
Robert Varga [Sun, 25 Oct 2020 16:35:02 +0000 (17:35 +0100)]
Add DOMQueryResult

Working with DOMQueryEvaluator is clunky, introduce a DOMQueryResult,
which reigns it in a bit.

JIRA: MDSAL-605
Change-Id: I83c29c56d184ff880c22154bbb8a3b2bc4f9ec3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpose DefaultQuery class 44/93344/5
Robert Varga [Sun, 25 Oct 2020 14:43:54 +0000 (15:43 +0100)]
Expose DefaultQuery class

DefaultQuery captures the codec context, hence it is useful for
intra-implementation transforms. This includes the ability to
transform the result set from DOM.

JIRA: MDSAL-605
Change-Id: I565d1ec5070653d45bb6340e79799612fc06d61c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClarify DOMQueryEvaluator API 45/93345/4
Robert Varga [Sun, 25 Oct 2020 15:17:08 +0000 (16:17 +0100)]
Clarify DOMQueryEvaluator API

DOMQueryEvaluator has two modes of operation, each useful on its
own. Separate the two and document them.

JIRA: MDSAL-605
Change-Id: I6bc93b7098a18dc8d5c5886234fc0cf90772d15b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SimpleQueryExecutor 15/93315/16
Robert Varga [Fri, 23 Oct 2020 20:46:07 +0000 (22:46 +0200)]
Add SimpleQueryExecutor

This refactors the interace a bit and provides a basic evaluator.
The idea is that given a root object it will evaluate the query.

JIRA: MDSAL-605
Change-Id: Ifcf8880d502eed93fa243a2c1e2f50a116306fe5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix DOMQueryPredicate signature 34/93334/2
Robert Varga [Sat, 24 Oct 2020 20:34:01 +0000 (22:34 +0200)]
Fix DOMQueryPredicate signature

DOMQueryPredicates need to be operating on NormalizedNodes, not
plain objects. Internal implementations, which are value-based
need to check for appropriateness of the passed NormalizedNode
and dispatch to check its value.

JIRA: MDSAL-605
Change-Id: Id17400a799b6d14612d077113ba29be4f04a7b6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd isNull() predicate to both DOM and Binding queries 33/93333/2
Robert Varga [Sat, 24 Oct 2020 20:24:23 +0000 (22:24 +0200)]
Add isNull() predicate to both DOM and Binding queries

We have a nonnull() predicate, this adds its counterpart.

JIRA: MDSAL-605
Change-Id: I76d8ac700c8844f71cfe6e24a6fab23d6212a145
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix DOMQueryEvaluator bugs 32/93332/2
Robert Varga [Sat, 24 Oct 2020 16:23:12 +0000 (18:23 +0200)]
Fix DOMQueryEvaluator bugs

In case we are matching through a list node, we need to make
sure to match against all its children.

Also when evaluating a predicate, make sure to first perform
a lookup for its relative path.

JIRA: MDSAL-605
Change-Id: Iabe0f26206212a356ebae05162452d61f7c781af
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpose property name when checking key components 80/93180/3
Robert Varga [Mon, 19 Oct 2020 13:39:51 +0000 (15:39 +0200)]
Expose property name when checking key components

Experience with null enforcement of key components indicates we should
carry the name of the property in the exception message -- otherwise
the string is not really helpful.

This patch re-organizes the checking so that we do that, via
newly-introduced CodeHelpers.requireKeyProp() method.

Since we are in the area, also codegen methods' handling of arrays by
creating an explicit 'cloneCall()' utility method.

JIRA: MDSAL-599
Change-Id: If9a87b4976ecdcd09e1fdd83ddfaf03ab4d09a85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse powermock's Whitebox for reflection 68/93168/3
Robert Varga [Mon, 19 Oct 2020 10:59:29 +0000 (12:59 +0200)]
Use powermock's Whitebox for reflection

We have some reflection-based tests, migrate them to use Whitebox.

Change-Id: Ia272f004e32d3de5e58779359cd00a858f6a01ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDOMQueryEvaluator is @NonNullByDefault 21/93321/1
Robert Varga [Sat, 24 Oct 2020 16:23:12 +0000 (18:23 +0200)]
DOMQueryEvaluator is @NonNullByDefault

Clarify that we are not dealing with nullable types.

Change-Id: Ibd5d330ee7603b544b9b2033054cca900b810539
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate QueryResult design 14/93314/4
Robert Varga [Fri, 23 Oct 2020 19:19:20 +0000 (21:19 +0200)]
Update QueryResult design

A query needs to result in a set of path/object tuples, as we really
need to discern matches. Having a concrete path of matches helps
getting identifiers of parent objects for subquent queries.

DOMQueryResult already contains this capability, we just need to
propagate it.

JIRA: MDSAL-604
Change-Id: Iec9ad34aac105eeb45c26a31a24611c9e0f2bb82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix MatchBuilderPath documentation 16/93316/5
Robert Varga [Fri, 23 Oct 2020 21:58:58 +0000 (23:58 +0200)]
Fix MatchBuilderPath documentation

We have a sentence trailing off, fix it up. Since we are introducing
a new pointer, update LambdaDecoder documentation. QueryExpression
gets a free pass on whitespace.

Change-Id: Ib5f66a80b99f5be18b5b9f41be4fd850435465f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump maven-core dependency 10/93210/1
Robert Varga [Tue, 20 Oct 2020 00:27:01 +0000 (02:27 +0200)]
Bump maven-core dependency

yang-maven-plugin requires at least 3.5.2, there is no point in
using anything else.

Change-Id: I06dc094b87684b1f29b27d6042ed26e4dd0bbad5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 7.0.2-SNAPSHOT 60/93160/2
Robert Varga [Mon, 19 Oct 2020 10:44:00 +0000 (12:44 +0200)]
Bump versions to 7.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I0528a0389fde5ef044a0a9ce2311c7895794ecb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix nullness errors reported by Eclipse 30/92730/5
Robert Varga [Sat, 26 Sep 2020 22:01:07 +0000 (00:01 +0200)]
Fix nullness errors reported by Eclipse

Eclipse provides a lot of noise around builders where we pass
down classes. This fixes them up by losening the contracts and
adding Class<@NonNull T> where generics are involved. Since we are
at it, also fixup the suite to generate fewer warnings.

JIRA: MDSAL-601
Change-Id: I7b21d88584a18cc1bed6ea776b22e82584484339
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove trailing comments 58/93158/2
Robert Varga [Mon, 19 Oct 2020 09:41:43 +0000 (11:41 +0200)]
Remove trailing comments

Trailing comments are frowned upon, remove them.

Change-Id: I5897228a28e771551548e4c3c6d88b51ef6b32a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoProperly cache caseType class 52/93152/2
Robert Varga [Sun, 18 Oct 2020 20:21:01 +0000 (22:21 +0200)]
Properly cache caseType class

We lost this bit when we were switching annotations. Since we
require Java 11, we should no longer be exposed to the JDK issue.

Change-Id: I769686186f1b03a2bd7e00bbc9474d91278c8d91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix failure to generate runtime types with duplicate schema 37/93137/6
Robert Varga [Sat, 17 Oct 2020 22:21:51 +0000 (00:21 +0200)]
Fix failure to generate runtime types with duplicate schema

The equality contract for TypeDefinition has changed in yangtools-6,
so that TypeDefinitions compare as equal if they represent the same
*semantic* type.

In BindingRuntimeTimes we made the assumption that there is at most
a 1:1 mapping of schema-to-type and used a BiMap to track that
relationship.

Fix that assumption by keeping the maps separate, and teach
RuntimeTypeGenerator to be careful and use an IdentityHashMap to
build that for us.

JIRA: MDSAL-600
Change-Id: Iff5dc7116bf1e5e7c78050d4161282097a3ff033
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMark DataTreeChangeListener for evolution 03/93103/1
Robert Varga [Fri, 16 Oct 2020 19:06:24 +0000 (21:06 +0200)]
Mark DataTreeChangeListener for evolution

We should consider making convergence explicit, because people
routinely ignore this capability, which was retrofitted.

Change-Id: I361181b95a61c1beb8047b2497481a44e19fcd92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove commented-out enums 87/93087/1
Robert Varga [Fri, 16 Oct 2020 08:08:05 +0000 (10:08 +0200)]
Remove commented-out enums

Our type model is needlessly huge. Trim it down by removing
commented-out portion.

Change-Id: I097a773091cd74cf9cb4b38be3dbaefa376286a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a FIXME for getModuleInfo 69/93069/2
Robert Varga [Thu, 15 Oct 2020 05:57:01 +0000 (07:57 +0200)]
Add a FIXME for getModuleInfo

We do not want to throw Exception here, mark for improvement.

Change-Id: I67e4ba4e9ca7b6076eb78acb08bbcdb5c13c7d44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate ModuleInfoSnapshotBuilder a bit 68/93068/2
Robert Varga [Thu, 15 Oct 2020 05:49:31 +0000 (07:49 +0200)]
Update ModuleInfoSnapshotBuilder a bit

While we are dealing with YangModuleInfo, users should not really
be mucking with that -- it is a binding-internal thing after all.

Expose a j.l.Class-based add() method, which performs proper
introspection to find the appropriate info -- thus allowing us to
simplify users a bit.

Change-Id: I2b00b40ffee2be977fba8b7c7fb80ea28dfd073b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd ForwardingYangLibSupport 55/93055/2
Robert Varga [Wed, 14 Oct 2020 14:48:23 +0000 (16:48 +0200)]
Add ForwardingYangLibSupport

OSGi wiring for YangLibSupport is using forwarding in two
implementations. Simplify both by factoring out
ForwardingYangLibSupport.

Change-Id: I05a48ebd689a47c248d79f8bdb878994098ce63f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd YangLibSupport.implementedRevision() 54/93054/1
Robert Varga [Wed, 14 Oct 2020 14:41:40 +0000 (16:41 +0200)]
Add YangLibSupport.implementedRevision()

We want to decompose our services as much as possible, and RESTCONF
legally needs to know the version we are implementing. Expose that
version.

JIRA: MDSAL-595
Change-Id: Ic8dc27adf2c85658e364712af616db7ac558b595
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 7.0.1-SNAPSHOT 06/93006/1
Robert Varga [Fri, 9 Oct 2020 14:37:30 +0000 (16:37 +0200)]
Bump versions to 7.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I0e31c365683e8a7ac15d961e2b96f67f921662ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGenerate @param for RPC invocation methods 78/89878/24
illia.ihushev [Wed, 20 May 2020 11:47:31 +0000 (14:47 +0300)]
Generate @param for RPC invocation methods

Make codegen correctly format javadoc comments with @return, @param,
@throws. This is accomplished by splitting the member comment into
three distinct pieces in TypeMemberComment:
 - a common header: 'Invoke {@code rpc_name_here} RPC.'
 - a description-based block
 - a common footer, describing param/return/throws declarations

These are communicated from type generator and composed into javadoc
by the templating code.

JIRA: MDSAL-402
Change-Id: Ia6b7537cbeb28f9e7ff68479e887ab32e92a1c4b
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMark TypeComment as Immutable 02/93002/1
Robert Varga [Fri, 9 Oct 2020 10:12:06 +0000 (12:12 +0200)]
Mark TypeComment as Immutable

This is expected to be a holder object, mark it as such.

Change-Id: Idca4489ef765cc3f6d722a1d6dd20904b0fae828
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFormat MethodSignature javadocs 01/93001/1
Robert Varga [Fri, 9 Oct 2020 10:10:49 +0000 (12:10 +0200)]
Format MethodSignature javadocs

This is a run-of-the-mill reformat, nothing to see.

Change-Id: I8381c15042e54178567d64b964f4d72536d5f235
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump byte-buddy to 1.10.17 96/92996/2
Robert Varga [Thu, 8 Oct 2020 13:56:51 +0000 (15:56 +0200)]
Bump byte-buddy to 1.10.17

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.14
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.15
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.16
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.17

Change-Id: Id6e36110773baae89824591e5cfd0cb9e344d84c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump yangtools to 6.0.0 97/92997/1
Robert Varga [Thu, 8 Oct 2020 14:39:32 +0000 (16:39 +0200)]
Bump yangtools to 6.0.0

Switch to using released version of yangtools-6.

Change-Id: I2c3ca9d7bd7bdd24104dd8ab8d3d8a6106dc1734
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix CodeGeneratorImpl checkstyle 14/92814/10
Illia [Wed, 30 Sep 2020 15:11:27 +0000 (18:11 +0300)]
Fix CodeGeneratorImpl checkstyle

Narrow catch statements argument types. Verify creation of folders.

Change-Id: I3ea039e9af05458de4e41ea4b6040b90537921b3
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoHide LazySerializedDOMNotification 87/92987/7
Robert Varga [Wed, 7 Oct 2020 22:16:51 +0000 (00:16 +0200)]
Hide LazySerializedDOMNotification

LazySerializedDOMNotification is an implementation detail that is
not needed outside of the adapter.

Change-Id: I73de104040e4a014f1ec24bbb302ebca1004df55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove DOMSchemaService.getSessionContext() 83/92983/6
Robert Varga [Wed, 7 Oct 2020 21:38:00 +0000 (23:38 +0200)]
Remove DOMSchemaService.getSessionContext()

This method is not really useful, as we never needed it. Remove it.

Change-Id: I809dc005e0a62d1087d7e6e29f9b686de27aeb57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up DOMExtensibleService 88/92988/5
Robert Varga [Wed, 7 Oct 2020 22:31:01 +0000 (00:31 +0200)]
Clean up DOMExtensibleService

Make sure we do not require implementations to deal with extensions,
as the default implementation serves most use cases.

Also introduce ForwardingDOMExtensibleService, so that the forwarding
part is neatly shared by all forwarders -- which points out the fact
we also need a ForwardingDOMDataTreeService.

Change-Id: I10440111a89ad72061779bcb846cfd934d96b2bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove org.opendaylight.yangtools.yang.binding.RpcImplementation 85/92985/3
Robert Varga [Wed, 7 Oct 2020 21:41:11 +0000 (23:41 +0200)]
Remove org.opendaylight.yangtools.yang.binding.RpcImplementation

We do not use this interface anywhere, remove it.

Change-Id: Ia838e7a45616b8fba6d94cfb5c25c7f14b974910
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove deprecated AbstractIetfInetUtil methods 84/92984/3
Robert Varga [Wed, 7 Oct 2020 21:39:47 +0000 (23:39 +0200)]
Remove deprecated AbstractIetfInetUtil methods

We have a few deprecations here, remove these methods.

Change-Id: Idfd53d34c8892f7eb23f16c2be55fcfda4a0179c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoHide BindingRpcFutureAware 82/92982/1
Robert Varga [Wed, 7 Oct 2020 21:34:37 +0000 (23:34 +0200)]
Hide BindingRpcFutureAware

This interface is not used anywhere anymore, hide it so we can
remove it in future.

Change-Id: I9b8e434c92a3c41c3d64183b7b8cf29ec5379a1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor AbstractDataBrokerTestCustomizer 81/92981/3
Robert Varga [Wed, 7 Oct 2020 20:41:32 +0000 (22:41 +0200)]
Refactor AbstractDataBrokerTestCustomizer

Since we are dealing with binding classes and their translation,
make sure we operate on BindingRuntimeContext as the primary
entrypoint for tests and other harness.

This allows us to eliminate a few testing-only classes, which
were dealing with EffectiveModelContext -> BindingRuntimeContext
translation.

JIRA: MDSAL-578
Change-Id: I2539ea427cdc6d8a76699bb59fcad1f9e02f60dd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd another FixedDOMSchemaService constructor 79/92979/1
Robert Varga [Wed, 7 Oct 2020 19:28:10 +0000 (21:28 +0200)]
Add another FixedDOMSchemaService constructor

There are a number of cases which could use a simple wrapper
to return a known EffectiveModelContext. Provide such a factory
method.

Change-Id: Iae654cf67b302acc0a97fa07d24c1a36a5725c0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust for ModuleEffectiveStatement argument 23/92923/1
Robert Varga [Tue, 6 Oct 2020 11:41:48 +0000 (13:41 +0200)]
Adjust for ModuleEffectiveStatement argument

The argument has changed, extract the local name.

Change-Id: I7a6f3cad95b32e3f60c1719b36a95c5f91847557
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust to SchemaContextProvider going away 22/92922/1
Robert Varga [Tue, 6 Oct 2020 11:23:55 +0000 (13:23 +0200)]
Adjust to SchemaContextProvider going away

We only have EffectiveModelContextProvider, use that.

Change-Id: I5b528de7ab36e5ff026966d171f84c4d34d94571
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust for WhenConditionAware using XPath 05/92905/1
Robert Varga [Mon, 5 Oct 2020 20:50:49 +0000 (22:50 +0200)]
Adjust for WhenConditionAware using XPath

We are mocking WhenConditionAware objects and therefore need to
ensure we adjust for the return type changing.

Change-Id: I9e46a219f594ab797f34cfd1f0da0c462bad5a92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust to {Container,Input,Output}SchemaNode split 01/92901/5
Robert Varga [Mon, 5 Oct 2020 11:13:34 +0000 (13:13 +0200)]
Adjust to {Container,Input,Output}SchemaNode split

We no longer represent all cases using ContainerSchemaNode, hence
we need to adjust users to the new realities.

Change-Id: Ie7c6670d368cdea1220115ae93dd03c16945f75f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust for Module/Submodule statement separation 99/92899/1
Robert Varga [Mon, 5 Oct 2020 08:30:49 +0000 (10:30 +0200)]
Adjust for Module/Submodule statement separation

Yangtools is providing dedicated classes for Submodule, adjust
for the API change.

Change-Id: I04242bcc1c753d331cdfd16f4632b2ba288ac78d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust for EffectiveStatementEquivalent 98/92898/1
Robert Varga [Mon, 5 Oct 2020 08:30:03 +0000 (10:30 +0200)]
Adjust for EffectiveStatementEquivalent

Update for yangtools API changing.

Change-Id: Idea292db5f22f827327d3c66a22bb89d2f82e773
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake sure fake DataTreeModifications use EffectiveModelContext 92/92892/2
Robert Varga [Sun, 4 Oct 2020 17:16:46 +0000 (19:16 +0200)]
Make sure fake DataTreeModifications use EffectiveModelContext

As yangtools is transitioning to use of EffectiveModelContext, so
we need to properly support it.

Change-Id: I8b7be35219c137cb7eee32239314bd8e5406363f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix WadlRestconfGenerator checkstyle 29/92829/5
Illia [Thu, 1 Oct 2020 10:28:47 +0000 (13:28 +0300)]
Fix WadlRestconfGenerator checkstyle

Move resources closing to finally block. Suppress uncalled private method
warning(called from anonymous class).

Signed-off-by: Illia <illia.ihushev@pantheon.tech>
Change-Id: I86aba7b831c90cf8a927d3468b7b5eba30031e05

3 years agoSimplify ModuleInfoSnapshotBuilder 82/92882/3
Robert Varga [Sat, 3 Oct 2020 07:31:39 +0000 (09:31 +0200)]
Simplify ModuleInfoSnapshotBuilder

There is no need to allocate a full resolver, as the things we want
to achieve here are easily done through a simple parser.

Change-Id: I03a7255bc2b6f50171cc6b353ab15409e08ab747
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRehost BaseTypes.isInt8() and friends 59/92859/1
Robert Varga [Fri, 2 Oct 2020 14:28:46 +0000 (16:28 +0200)]
Rehost BaseTypes.isInt8() and friends

These methods are incoming from yangtools, as their semantics
is not quite well-defined in yang-model world. They are only
used by TypeProvider, so it should host them.

JIRA: YANGTOOLS-1099
Change-Id: I1b0a0e1d88728aaa1c538730a924575adb7b165e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate SchemaPath references in codec infrastructure 28/92828/4
Robert Varga [Thu, 1 Oct 2020 10:01:02 +0000 (12:01 +0200)]
Eliminate SchemaPath references in codec infrastructure

We have switched to SchemaNodeIdentifier across the board, this patch
makes the finishing touches.

JIRA: MDSAL-570
Change-Id: I8b54143e71ebbd4aef03cb00704e2b4f5311174f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd DOMRpcProviderService bulk registration 54/87754/32
Robert Varga [Sat, 15 Feb 2020 19:53:55 +0000 (20:53 +0100)]
Add DOMRpcProviderService bulk registration

binding-dom-adapter will need the ability to atomically register
a number of implementations. This patch adds that capability.

JIRA: MDSAL-86
Change-Id: Ia948d449ad83b79ca833d5510a4885493b53e202
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Ilya Igushev <illia.ihushev@pantheon.tech>
3 years agoRemove unthrown exceptions 27/92827/1
Robert Varga [Thu, 1 Oct 2020 09:48:55 +0000 (11:48 +0200)]
Remove unthrown exceptions

IOException is not thrown here, remove the declarations.

Change-Id: Ie112d79946b165283c900b420045aedf1b4d8673
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove use of MockitoAnnotations.initMocks() 26/92826/1
Robert Varga [Thu, 1 Oct 2020 09:45:06 +0000 (11:45 +0200)]
Remove use of MockitoAnnotations.initMocks()

This method has been deprecated. To deal with it just upgrade tests
to use strict runner.

Change-Id: I2164ac5eab938f1cc1adf136f8a5394dac886f92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove GeneratedTransferIdentityObject 25/92825/1
Robert Varga [Thu, 1 Oct 2020 09:40:21 +0000 (11:40 +0200)]
Remove GeneratedTransferIdentityObject

This interface is not implemented nor used anywhere, remove it.

Change-Id: I1085e9393afb23775c49f52b6522d70f8424c856
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump java-diff-utils to 4.8 24/92824/1
Robert Varga [Thu, 1 Oct 2020 09:36:09 +0000 (11:36 +0200)]
Bump java-diff-utils to 4.8

https://github.com/java-diff-utils/java-diff-utils/blob/master/CHANGELOG.md#48

JIRA: MDSAL-558
Change-Id: Idc1607cc5830ec9b67dd1a5eb87af72d90ce8fb4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReplace lmax disruptor with QueuedNotificationManager 34/89334/18
Tadei Bilan [Fri, 24 Apr 2020 10:03:34 +0000 (12:03 +0200)]
Replace lmax disruptor with QueuedNotificationManager

LMAX tends to eat CPU when being idle and does not deliver things
in parallel. QueuedNotificationManager seems to fare better in this
regard.

JIRA: MDSAL-546
Change-Id: I6f0e100110bd0888e55b4a21127306293ad97202
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean DataContainerCodecPrototype methods 19/92819/4
Robert Varga [Wed, 30 Sep 2020 18:28:40 +0000 (20:28 +0200)]
Clean DataContainerCodecPrototype methods

We have a number of suppressions and needlessly-public methods,
clean that up.

Change-Id: Id317f9392678f5c91c46ee42eff044d5aa8d31df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate locking in DataObjectCodecContext 18/92818/1
Robert Varga [Wed, 30 Sep 2020 18:14:32 +0000 (20:14 +0200)]
Eliminate locking in DataObjectCodecContext

Use normal getAcquire()/compareAndExchangeRelease() loading to
eliminate the use of locking when we are dealing with mismatched
augmentations. We also split processing into multiple staggered
method to help with inlining.

Change-Id: I2a35aea38c0ec502b27827af145cdad1a00312a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRelax DataContainerCodecPrototype.instance locking 13/92813/3
Robert Varga [Wed, 30 Sep 2020 15:55:36 +0000 (17:55 +0200)]
Relax DataContainerCodecPrototype.instance locking

All the objects we are creating in createInstance() do not have
unexpected side-effects nor should they require happens-before
semantics beyond what they can guarantee themselves.

Base on that we can make loadInstance() lockless and concurrent,
and reconcile purely via getAcquire()/compareAndExchangeRelease().

JIRA: MDSAL-579
Change-Id: I292024afafa41aecb65e547acc5c888ba7890ee1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not allocate HashMap for non-augmentations 10/92810/7
Robert Varga [Wed, 30 Sep 2020 12:34:20 +0000 (14:34 +0200)]
Do not allocate HashMap for non-augmentations

Push state allocation into the conditional for better encapsulation.

Change-Id: Icf60a259634d263d920b60f3ab55bf162cf709d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove BindingRuntimeContext.getAugmentationDefinition() 09/92809/7
Robert Varga [Wed, 30 Sep 2020 12:24:13 +0000 (14:24 +0200)]
Improve BindingRuntimeContext.getAugmentationDefinition()

All callers are already guarding the call site with a check, hence
we can also require them to perform an explicit reinterpret. This
pushes safety checks to compile-time.

Also remove duplicate javadocs, so that we have one text defining
semantics.

Change-Id: I3ce23440c725441e663331e94a931ad09d71634a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove ModuleInfoSnapshotBuilder API 05/92805/8
Robert Varga [Wed, 30 Sep 2020 10:57:13 +0000 (12:57 +0200)]
Improve ModuleInfoSnapshotBuilder API

Add a fluent add(ModuleInfo) method and its siblings, so it is
much easier to use the builder. This also factors out
ModuleInfoSnapshotResolver which is a dynamic registry.

Change-Id: I886883d26f748e32f6d8c766926b4dbd00b75fa5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse only BindingRuntimeContext for augmentation loading 07/92807/6
Robert Varga [Wed, 30 Sep 2020 11:26:55 +0000 (13:26 +0200)]
Use only BindingRuntimeContext for augmentation loading

BindingRuntimeContext is the only proper way of loading binding
classes. Do not attempt to go behind its back, but rather trust
it can load everything it references -- it is a bug for if it
cannot.

Eliminate opportunistic augmentation class loading, which allows
is to make augmentation prototypes properly constant.

JIRA: MDSAL-578
Change-Id: Ie99e57b29b437a7fee52be4eb5006d3d122cb383
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate ClassLoadingStrategy 04/92804/5
Robert Varga [Wed, 30 Sep 2020 10:43:56 +0000 (12:43 +0200)]
Eliminate ClassLoadingStrategy

ClassLoadingStrategy as a separate concept is very confusing. The
reality is that ModuleInfoSnapshot needs to be able to load classes
based on their FQCN and BindingRuntimeContext needs to do the same
based on they binding.model.api.Type.

Split ClassLoadingStrategy's two methods appropriately and remove
it. Also adjust all users to not rely on it.

JIRA: MDSAL-578
Change-Id: Id4606efcd67d8ea7c42e78c48c48aa915cb11a52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReduce use of getSchemaContext 06/92806/2
Robert Varga [Wed, 30 Sep 2020 11:05:14 +0000 (13:05 +0200)]
Reduce use of getSchemaContext

We are moving towards to EffectiveModelContext usage across all
components. Make sure we propagate it to more places, fixing
related deprecation warnings.

Change-Id: If8da2a8c7037dbc1966351acc7c63b5f2cd1db85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCreate proper assertFileContains() 98/92798/2
Robert Varga [Tue, 29 Sep 2020 22:45:37 +0000 (00:45 +0200)]
Create proper assertFileContains()

We want to have a proper assertion, not just assertTrue(). Change
findInFile() to assertFileContains().

Change-Id: I15d36db3423bc28df364dbed216adbdced8fc9a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix FileSearchUtil.getFiles() 70/92670/5
Illia [Thu, 24 Sep 2020 11:18:25 +0000 (14:18 +0300)]
Fix FileSearchUtil.getFiles()

Do not skip files in the current folder after finding the first child
folder.

Change-Id: Ifba6071e431e18a0a4caa03c90d11b246ec2bc6b
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoMove common util methods to dedicated class 34/92034/13
illia.ihushev [Tue, 11 Aug 2020 11:47:27 +0000 (14:47 +0300)]
Move common util methods to dedicated class

This will make it easier to reuse them.

Change-Id: I4ad75ba20da12936311bdb81c7b2e8e7a7a284d0
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd Replicator's config files to etc on startup 96/92796/2
Tibor Král [Wed, 19 Aug 2020 10:05:28 +0000 (12:05 +0200)]
Add Replicator's config files to etc on startup

Currently the configuration files don't reside inside
the etc folder when the bundle starts up. They either
have to be created manually or by editing via Karaf
Config CLI. This makes it more difficult for the
user to see the options and modify them as needed.

Add the files directly to the bundle stating all the
options and filled with default value. Then load them
inside the etc folder on bundle startup.

Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Change-Id: If55316d89dcb5570d4f9f8a5b30fd5310ad90a48
(cherry picked from commit 6f149e51688bf6d9fee30b704af9ef4b7ac81a0f)
(cherry picked from commit 82a3eab7e8a2b6d7c776a54d540b3ccf93a7adad)

3 years agoAdd BindingMap helper class 20/92720/13
Robert Varga [Fri, 25 Sep 2020 16:20:22 +0000 (18:20 +0200)]
Add BindingMap helper class

Changing the mapping of keyed lists from List to Map made the baseline
generated builders hard to use, as there isn't an easy way to build
a map of entries in a fluent way.

BindingMap fills this role, providing both a direct way via
BindingMap.of(V...) as well as Builder-based interface via
BindingMap.Builder.

JIRA: MDSAL-553
Change-Id: Ieb3093c37b30f79666bffb50aa22a20922e41344
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoBump to odlparent-8.0.0/yangtools-8.0.0-SNAPSHOT 83/92783/5
Robert Varga [Tue, 29 Sep 2020 14:17:03 +0000 (16:17 +0200)]
Bump to odlparent-8.0.0/yangtools-8.0.0-SNAPSHOT

This patch starts integration for MRI window.

Change-Id: Ifa9780fbdfb411b4613df0ee18407d85e81bd517
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove yanglib feature.xmls 88/92788/1
Robert Varga [Tue, 29 Sep 2020 15:32:04 +0000 (17:32 +0200)]
Remove yanglib feature.xmls

Our baseline already requires SCR installation, remove feature
overrides.

Change-Id: I70dae7e3206b76148c3bcdbfab5ec374954a66a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse QName.bindTo() instead of withModule() 85/92785/1
Robert Varga [Tue, 29 Sep 2020 14:56:01 +0000 (16:56 +0200)]
Use QName.bindTo() instead of withModule()

QName.withModule() has been deprecated, migrate to using
AbstractQName.bindTo().

Change-Id: I95aa618ce0f8a0ad4844e99db03f373e9e4ea884
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years ago$YangModuleInfoImpl not generated for only extensions model 55/92155/8
Michal Banik [Thu, 13 Aug 2020 18:09:04 +0000 (20:09 +0200)]
$YangModuleInfoImpl not generated for only extensions model

This adds a minimal test case, which flushes out the problem
in test harness, but production code is actually fine.

JIRA: MDSAL-589
Change-Id: I93404702551546585812f8d1b5be6690cc38e750
Signed-off-by: Michal Banik <michal.banik@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools to 7.0.6/5.0.6 68/92568/1
Robert Varga [Mon, 21 Sep 2020 12:17:50 +0000 (14:17 +0200)]
Bump odlparent/yangtools to 7.0.6/5.0.6

Pick up latest updates from upstream.

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