mdsal.git
2 years agoUpdate DOMStoreThreePhaseCommitCohort design 21/100021/1
Robert Varga [Wed, 9 Mar 2022 11:38:23 +0000 (12:38 +0100)]
Update DOMStoreThreePhaseCommitCohort design

Do not use ListenableFuture<Void>, which promotes propagation of nulls
across the system. Use instead yang.common.Empty, which has a non-null
singleton value. Also allow commit() to propagate more information
through CommitInfo.

Change-Id: Ib3874c2c84cadcf1f5fb386a38ae5d0a2cb796be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix StatementRepresentation javadoc 08/100008/1
Robert Varga [Wed, 9 Mar 2022 04:53:17 +0000 (05:53 +0100)]
Fix StatementRepresentation javadoc

We have some outdated documentation, fix that up.

Change-Id: I305b58a92363830c473b1bb103dc1127de3bd3dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT 79/97379/60
Robert Varga [Thu, 2 Sep 2021 19:23:37 +0000 (21:23 +0200)]
Adopt odlparent-10.0.0/yangtools-8.0.0-SNAPSHOT

Bump upstream versions to pick up dependency upgrades and major features
from yangtools. Also adjust code to package movements and fix test
models now that unique components are validated by YANG parser.

Change-Id: Id15dd16daea9fe80af030103069d999129b28cf6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRework BindingRuntimeTypes 45/98245/100
Robert Varga [Fri, 29 Oct 2021 16:06:01 +0000 (18:06 +0200)]
Rework BindingRuntimeTypes

BindingRuntimeTypes serves to bring together GeneratedTypes and
SchemaNodes. We do this in a a number of different ways, but a lot of
the times this ends up looking a Type and then finding the SchemaNode
which generated it -- and then perhaps inquire children by SchemaNode
(which again is looked up in some way).

Once we have done these cross-lookups, we resolve the Type to a Class
through BindingRuntimeContext and instantiate a
DataContainerCodecPrototype, which holds these (and other) bits
together.

Current code relies on DerivableSchemaNode and SchemaNode-based lookups
to resolve these due to historical reasons. Our Generator infrastructure
already has AbstractExplicitGenerator.getOriginal() to perform the
equivalent operation.

This patch defines a RuntimeType base interface which holds together an
EffectiveStatement and a Generated type. We also define a
RuntimeTypeContainer to expose lookup methods for inquiring child
RuntimeTypes as appropriate.

BindingRuntimeTypes serves as the root of a tree hierarchy, where
RuntimeType is a leaf node and CompositeRuntimeType is an interior
node.

NodeCodecContext and its subclasses are modified to maintain a reference
to their backing RuntimeType and issue appropriate localized lookups.

JIRA: MDSAL-696
Change-Id: I45850d320e01fce0b227512b9f5f7b19331df60e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not use BindingReflections to acquire augmentations 98/99998/2
Robert Varga [Mon, 7 Mar 2022 17:38:37 +0000 (18:38 +0100)]
Do not use BindingReflections to acquire augmentations

Augmentable interface exposes augmentations directly, hence we
can use it directly, without relying on reflection.

Change-Id: I21b86d581ff0a61db3975cf7655157e4e6678b1b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTrack schema tree generator linkage 98/99798/17
Robert Varga [Fri, 18 Feb 2022 10:49:16 +0000 (11:49 +0100)]
Track schema tree generator linkage

Runtime information requires looking up target generator for a schema
tree particant, which means that AbstractCompositeGenerator needs to
resolve QName to the original instantiation.

We already have that mechanics for the most part, as we need to perform
the lookup to resolve augment statements target.

Introduce SchemaTree{Child,Parent} decomposition of the addressing
problem, and retrofit generators to support them. This will allow us to
support lookups along the schema tree axis.

JIRA: MDSAL-696
Change-Id: I619fe9e7c0896d6d3f0f33b04d5200ca8ec30340
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove information provided on failed linkage progress 69/99969/2
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>
2 years agoBindingRuntimeTypes should be an interface 77/99877/1
Robert Varga [Fri, 25 Feb 2022 16:06:13 +0000 (17:06 +0100)]
BindingRuntimeTypes should be an interface

We do not want to expose the internals of how this interface is
realized, make sure we split it into an interface and an implementation.

JIRA: MDSAL-696
Change-Id: Icc01bc2c66cbf57c8cbb2ff9c32ac30c373b899d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix javadoc warnings in mdsal-binding-util 57/99857/1
Robert Varga [Thu, 24 Feb 2022 15:37:46 +0000 (16:37 +0100)]
Fix javadoc warnings in mdsal-binding-util

We have a few undocumented generic parameters, fix that up.

Change-Id: Ifbe06d528b9333026c1bdc0bd6af73570940ade0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove OriginalLink safety 46/99846/3
Robert Varga [Thu, 24 Feb 2022 07:17:11 +0000 (08:17 +0100)]
Improve OriginalLink safety

The links to previous and original statement need to match our
statement, otherwise we are in trouble. While we do not verify this
at runtime (yet), improve type definitions to carry these around.

JIRA: MDSAL-696
Change-Id: I3bcc1c3b0d2e3f74a0727f8bfa6b2f1e1c578f67
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove is{List,Map}Type(Type) methods 98/99698/4
Robert Varga [Fri, 11 Feb 2022 18:45:12 +0000 (19:45 +0100)]
Remove is{List,Map}Type(Type) methods

These methods are not used anywhere anymore remove them.

Change-Id: I993a2baf48b2603f28559688a907d1b7d7780307
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMap system-ordered leaf-lists to Set<T> 97/99697/6
Robert Varga [Fri, 11 Feb 2022 16:35:19 +0000 (17:35 +0100)]
Map system-ordered leaf-lists to Set<T>

System-ordered leaf-lists can get re-ordered and hence the binding
mapping to java.util.List is not appropriate. Make sure we map them
to java.util.Set.

JIRA: MDSAL-722
Change-Id: I4c82736b3ef25fd1197c446aca2c9d22a59a3d96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix an eclipse warning 11/99811/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>
(cherry picked from commit dedcf36a1d42359adc3ed2fe731ae36024cf18cf)

2 years agoImprove DtaContainerCodecProtype.loadInstance() 44/99844/1
Robert Varga [Wed, 23 Feb 2022 13:04:54 +0000 (14:04 +0100)]
Improve DtaContainerCodecProtype.loadInstance()

We have a warning creeping here, fix it.

Change-Id: I94249f7cdc8f5fabdeee44084aaf0c325d62eb61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide TypeBuilderFactory subclasses 43/99843/1
Robert Varga [Wed, 23 Feb 2022 08:54:42 +0000 (09:54 +0100)]
Hide TypeBuilderFactory subclasses

TypeBuilderFactory subclasses are being checked for Codegen subclass,
so as to add (or not) documentation. Refactor addCodegenInformation()
by moving it to the factory, with Runtime ignoring doing nothing.

Change-Id: I724bd304de0ec1a51520e59e64b21d1060d7e013
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClean up BindingDOMRpcServiceAdapter a bit 40/99840/1
Robert Varga [Tue, 22 Feb 2022 16:59:48 +0000 (17:59 +0100)]
Clean up BindingDOMRpcServiceAdapter a bit

This class should be final. Also use requireNonNull() and Class.cast()
to clean up our act.

Change-Id: I9c47d8eb1e8ec76b50cc6f310e99e3db0605ee8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RpcMethodInvoker specializations 39/99839/2
Robert Varga [Tue, 22 Feb 2022 16:41:49 +0000 (17:41 +0100)]
Remove RpcMethodInvoker specializations

RPCs always contain an input, hence we do not need specializations.
Collapse the three classes into a single one.

Change-Id: Icdd126a8d6b1c6d352eaedf3efdd7b85e96c5f18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSeparate out notification handling 31/99831/4
Robert Varga [Mon, 21 Feb 2022 13:34:38 +0000 (14:34 +0100)]
Separate out notification handling

This reverts another part of 7a17eba49deb73733bdbb9579d2edd672bb0d71e
as well as 576ae2cd595f0ce17abd1f33150b068b7f0f801d, hence not allowing
Notifications to be entered through streamChild().

JIRA: MDSAL-724
Change-Id: I1b37139fcb8bd8aaf92465943a46e71069e87f3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSeparate out RPC input/output codecs 38/99838/3
Robert Varga [Tue, 22 Feb 2022 11:09:56 +0000 (12:09 +0100)]
Separate out RPC input/output codecs

This partially reverts 7a17eba49deb73733bdbb9579d2edd672bb0d71e, as
leads to false sharing and corresponding problems with invalid
InstanceIdentifiers not being caught.

JIRA: MDSAL-724
Change-Id: I0ddf62efffb23e793b6727e0afcf50303f7aea74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMark DataContainerCodecPrototype.isChoice() for removal 35/99835/2
Robert Varga [Mon, 21 Feb 2022 17:04:44 +0000 (18:04 +0100)]
Mark DataContainerCodecPrototype.isChoice() for removal

This is an internal remnant from when we did not have a ChoiceIn
intermediate class. Mark it for removal.

JIRA: MDSAL-696
Change-Id: I50217ccfd6ff4c6c7db58e1085fa253779732e8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd negative tests for instance identifier codec 30/99830/2
Robert Varga [Mon, 21 Feb 2022 13:03:13 +0000 (14:03 +0100)]
Add negative tests for instance identifier codec

We are about to refactor a few aspects of how things are being looked
up, make sure we cover cases which should be rejected.

JIRA: MDSAL-696
Change-Id: I8b0eddf05eadd4178951176480fa35b9753bc751
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove an unneeded line 05/99805/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>
2 years agoAdd some Generator documentation 78/99778/1
Robert Varga [Wed, 16 Feb 2022 18:23:22 +0000 (19:23 +0100)]
Add some Generator documentation

Add a bit of explanation on how the generator tree is organized and drop
a few FIXMEs for things we want to get rid of in the long term.

Change-Id: I7c7820aeadcce0e2a69ff3033d5c2efc75b2dda3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect ActionProviderService method definition 61/99761/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>
2 years agoPackage ietf-yang-patch 14/99714/1
Robert Varga [Mon, 14 Feb 2022 10:19:47 +0000 (11:19 +0100)]
Package ietf-yang-patch

ietf-yang-patch defines a useful structure for atomic datastore
operations. Package it so we can take advantage of it later.

JIRA: MDSAL-676
Change-Id: Ibd66c1e2b3676bb2c3948e47359de4c24a0b03e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPackage ietf-restconf 12/99712/2
Robert Varga [Mon, 14 Feb 2022 10:01:23 +0000 (11:01 +0100)]
Package ietf-restconf

ietf-restconf defines yang-data extension, which is a prerequisite for a
number of other documents. Package the model in mdsal.

JIRA: MDSAL-676
Change-Id: I4ae08b0c02b607a5585acbab31e8996907555ba8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix uses/augment linkage 72/99672/2
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>
(cherry picked from commit f0749e72cfb282d0043d2171afc85a23fe9931da)

2 years agoBump yangtools to 7.0.14 06/99706/1
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>
(cherry picked from commit 2df8a91411f6a2f26372107cb285276c518da79a)

2 years agoBump byte-buddy to 1.12.8 87/99687/9
Robert Varga [Thu, 10 Feb 2022 23:26:22 +0000 (00:26 +0100)]
Bump byte-buddy to 1.12.8

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.2
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.3
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.4
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.5
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.6
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.7
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.12.8

Change-Id: I660d0fff4a67b33202bdb70b56ee546d63ac15d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove ActionProviderServiceAdapter defensiveness 81/99681/1
Robert Varga [Thu, 10 Feb 2022 10:51:39 +0000 (11:51 +0100)]
Improve ActionProviderServiceAdapter defensiveness

Do not throw unchecked exceptions when we encounter an invalid
path, but rather gracefully return an invocation error.

Change-Id: Ia5a32cad4a1785de430d6d9ab48a5fe4178c40a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect ActionSpec definition 80/99680/3
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>
2 years agoClarify ActionSpec documentation 77/99677/2
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>
2 years agoDo not allow wildcards in Action.invoke() 78/99678/3
Robert Varga [Thu, 10 Feb 2022 09:32:22 +0000 (10:32 +0100)]
Do not allow wildcards in Action.invoke()

Wildcard invocations do not make sense, as they could match any number
of instances. Document such attempts as throwing IAE.

Change-Id: I23780fee31c2f6c60d883764c046703ee92687f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove rfc7895 ietf-yang-library 63/99563/3
Robert Varga [Thu, 3 Feb 2022 09:13:40 +0000 (10:13 +0100)]
Remove rfc7895 ietf-yang-library

We have a replacement revision in rfc8525 which we support equally
well. Remove modules and yanglib implementation based on the old
revision.

JIRA: MDSAL-720
Change-Id: I20b84657876a83895eb35bf18b2878e129eece33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExamine supported features in yanglib 62/99562/4
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>
2 years agoUse 'var' for local variables 60/99560/2
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>
2 years agoSimplify original tracking 46/99046/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>
(cherry picked from commit f356d00c296ceedabc3f8d9c27308a0dd2dbb088)

2 years agoEnforce explicit generator linkage 45/99045/1
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>
(cherry picked from commit 40dd3e7e4793c0f04d8a4635f9d2d368e8e5214c)

2 years agoImprove AugmentedTypeTest 44/99044/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>
(cherry picked from commit 501a03c1ddda1c533c5c0072489395ab9aa5064c)

2 years agoFixup AbstractDOMStoreTreeChangePublisher 03/99503/2
Robert Varga [Thu, 27 Jan 2022 18:01:43 +0000 (19:01 +0100)]
Fixup AbstractDOMStoreTreeChangePublisher

With DOMDataTreeChangeListener reporting lists, we need to adjust our
SPI to floow suite.

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

Pick up latest fixes from upstream.

Change-Id: I4cd88e9d8371b8cd3f4cfdc4f004d93f0eb3cf3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoGeneratorReactor.linkOriginalGenerator() should be stateless 41/99441/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>
(cherry picked from commit d8e53a57837f122540ac6642f76a7531bd30a9f4)

2 years agoRemove GeneratorReactor.leafGenerators 40/99440/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>
(cherry picked from commit c711ab32891b1b83280af3e266df45d2cb60b100)

2 years agoImprove GeneratorReactor timing 39/99439/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>
(cherry picked from commit 2c8f6e161d5bccec8d4ba86e34211daf9dc226fb)

2 years agoExpose a List of changes in DOMDataTreeChangeListener 33/97633/3
Robert Varga [Thu, 20 Jan 2022 11:16:27 +0000 (12:16 +0100)]
Expose a List of changes in DOMDataTreeChangeListener

The order of changes have a semantic meaning in that they occur
in-order. There are a number of use cases where we would want to access
only the last delta (i.e. for the last state), which is easier when we
expose a proper List instead of Collection.

Change-Id: I159983207dfc935cbc81eccc24296e3db885f73e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove remaining concepts.(Checked)Builder references 56/98756/11
Ivan Hrasko [Tue, 30 Nov 2021 10:53:40 +0000 (11:53 +0100)]
Remove remaining concepts.(Checked)Builder references

To complete elimination of concepts.(Checked)Builder usage
we have to remove references from manually created Builder
classes and Types.java as well.

JIRA: MDSAL-690
Change-Id: I4a4129bf006d99cf430af6c4d08234208b6620d4
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSimplify leaf access 69/99269/1
Robert Varga [Wed, 12 Jan 2022 12:47:53 +0000 (13:47 +0100)]
Simplify leaf access

We do not need to go through the entryset -- just use Map.values(),
eliminating the need for one object indirection.

Change-Id: I5a5226d4b6b256d998e0a30de52bc89e01d1a16d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAlign argument names of getLeafNodes() 68/99268/1
Robert Varga [Wed, 12 Jan 2022 11:58:04 +0000 (12:58 +0100)]
Align argument names of getLeafNodes()

Naming here is off: the class and schema do not correspond to each
other, but they are not in parent/child relationship, either.

Change-Id: I3f48ce0beaa446fcf4829fb3faaf24d075516ba2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoInline create{Notification,Rpc}DataContext() 67/99267/2
Robert Varga [Wed, 12 Jan 2022 10:51:50 +0000 (11:51 +0100)]
Inline create{Notification,Rpc}DataContext()

We have two methods invoked only from caching loader, inline them,
so that we can eliminate some checks and make visibility obvious.

Change-Id: Id910192224e9a51217f70e125ed58daf08958ab1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClarify BindingReflections.getChildrenClassToMethod() 66/99266/2
Robert Varga [Wed, 12 Jan 2022 10:33:15 +0000 (11:33 +0100)]
Clarify BindingReflections.getChildrenClassToMethod()

Keys in the returned map are not any classes, but are guaranteed to be
DataContainers. Document that fact.

Change-Id: Ieac66637f9d5e6c2a9869304fd7a36b376ed5b05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReference SchemaContext.NAME directly 65/99265/1
Robert Varga [Tue, 11 Jan 2022 14:33:16 +0000 (15:33 +0100)]
Reference SchemaContext.NAME directly

SchemaContext.getQName() is deprecated, reference the name directly.

Change-Id: Icb22924175667221144fae225296c1be3ea4c758
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix raw Notification warnings 62/99262/1
Robert Varga [Tue, 11 Jan 2022 13:44:17 +0000 (14:44 +0100)]
Fix raw Notification warnings

binding.Notification now takes a generic argument, fix a round of raw
references.

Change-Id: I62eed2951a43367e06c69855aaa6a9e43df99392
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove concepts.Builder reference from Builders 55/98755/8
Ivan Hrasko [Tue, 30 Nov 2021 10:38:17 +0000 (11:38 +0100)]
Remove concepts.Builder reference from Builders

In order to better localize callers of build() method, remove
reference to concepts.Builder from Xtend BuilderTemplate.

JIRA: MDSAL-690
Change-Id: I7f068fe2e99afd5bc39f187253d8e2917c2a6e75
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix DataObject builer javadoc references 39/99239/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>
2 years agoRemove AssertDataObjects 38/99238/1
Robert Varga [Mon, 10 Jan 2022 09:12:28 +0000 (10:12 +0100)]
Remove AssertDataObjects

AssertDataObjects has been deprecated, remove it.

JIRA: MDSAL-717
Change-Id: Ie25d1f47955cdabd0ee38b81bf7f6f226e157e4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump java-diff-utils to 4.11 37/99237/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>
2 years agoDeprecate AssertDataObjects 93/98293/16
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>
2 years agoRefactor augment generator linkage 29/99129/8
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>
2 years agoUse Empty.value() instead of Empty.getInstance() 36/98636/14
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>
2 years agoBump odlparent/yangtools to 9.0.9/7.0.10 18/99118/3
Robert Varga [Sun, 19 Dec 2021 09:42:19 +0000 (10:42 +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 30/98930/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>
2 years agoUse a shared type for Pattern 75/98875/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>
2 years agoUse BindingTypes instead of rollin input/output types 70/98870/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>
2 years agoVerify no schema/type overlap 37/98837/1
Robert Varga [Fri, 3 Dec 2021 15:31:20 +0000 (16:31 +0100)]
Verify no schema/type overlap

We could end up overwriting previous Schema->Type mapping, let's make
sure we never do that, as that could end up in all sorts of disasters.

Change-Id: Ie4e1682af9c5d59e8ec70b263f0f239f69dd3603
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove TestModel 02/98802/1
Robert Varga [Thu, 2 Dec 2021 10:50:09 +0000 (11:50 +0100)]
Move TestModel

There is no point in having a separate model, which is not used
anywhere, move it to mdsal.dom.proker package.

Change-Id: I8a40783ac77ec70b8314e56135f89da5c0b9b30a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove ScanningSchemaServiceProvider 01/98801/1
Robert Varga [Thu, 2 Dec 2021 10:02:09 +0000 (11:02 +0100)]
Remove ScanningSchemaServiceProvider

This class is not used anywhere, remove it. Also clean up dependencies
a bit.

Change-Id: Ic940691658250a0e86a2a5d3c2c8f22f3bf3f904
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove BindingRuntimeContext.getActionIdentifier() 90/98790/2
Robert Varga [Wed, 1 Dec 2021 14:37:00 +0000 (15:37 +0100)]
Remove BindingRuntimeContext.getActionIdentifier()

This method is left unused, remove it to prevent confusion to users.

JIRA: MDSAL-712
Change-Id: Ic924877f255dc9b2ccafaa64866deefd45a81f17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix action invocation and registration 01/98701/6
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>
2 years agoUpdate iana-routing-types to 2021-10-19 32/98732/2
Robert Varga [Mon, 29 Nov 2021 09:12:47 +0000 (10:12 +0100)]
Update iana-routing-types to 2021-10-19

Refresh the models we are packaging so downstreams can take advantage of
allocations made in the past 4 years.

JIRA: MDSAL-707
Change-Id: I17e8e77c21c29c70bc320b9869bb3b489e464f9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RFC7223 models 31/98731/2
Robert Varga [Mon, 29 Nov 2021 09:06:51 +0000 (10:06 +0100)]
Remove RFC7223 models

RFC7223 has been superseded by RFC8343, which we have packaged for a
long time. Remove it.

JIRA: MDSAL-708
Change-Id: I3b2f12e174dc5f0e7be7daaa1545a4b43e906241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpgrade iana-if-type 30/98730/2
Robert Varga [Mon, 29 Nov 2021 08:52:26 +0000 (09:52 +0100)]
Upgrade iana-if-type

Ditch double packaging of iana-if-type in favor of having a single
updated revision.

JIRA: MDSAL-706
Change-Id: Ib9637fa92bc1fb72cdf315cd0c8e65b9d0f11625
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove rfc7277 ietf-ip 29/98729/2
Robert Varga [Mon, 29 Nov 2021 07:52:27 +0000 (08:52 +0100)]
Remove rfc7277 ietf-ip

This model has been obsoleted by RFC8344 which we are packaging
separately. Remove it to reduce overlap.

JIRA: MDSAL-705
Change-Id: I195009d640bbafc833bdf96c08c24040bfda1d86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix Notification raw types 37/98637/1
Robert Varga [Mon, 22 Nov 2021 13:39:34 +0000 (14:39 +0100)]
Fix Notification raw types

Narrowing of Notification's implementedInterface() has introduced a few
places where we treat it as raw type. Fix mdsal-binding-dom-adapter's
offences.

Change-Id: Ie2bc9eb8bf9051ab2945f477fa99e88d0348421d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAnother mdsal-dom-api module update 32/98532/2
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>
2 years agoMigrate eos/css to use HierarchicalIdentifier 79/98579/1
Robert Varga [Wed, 17 Nov 2021 09:56:32 +0000 (10:56 +0100)]
Migrate eos/css to use HierarchicalIdentifier

Use replacement of Path to prepare for adoption of yangtools-8.

Change-Id: Ie1a1e18129101a1084b59b352ee45d925983a584
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate mdsal-dom-api module-info 27/98527/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>
2 years agoNarrow Notification.implementedInterface() return type 75/97975/9
Robert Varga [Tue, 19 Oct 2021 11:59:00 +0000 (13:59 +0200)]
Narrow Notification.implementedInterface() return type

All Notification interfaces should provide their own identity here,
make sure there is no confusion about that.

Change-Id: I9fb7f82fcee7acd38aa05b38a2721ef62f8a1750
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup InMemoryDOMStoreThreePhaseCommitCohortTest 99/98499/4
Robert Varga [Sun, 14 Nov 2021 10:31:48 +0000 (11:31 +0100)]
Cleanup InMemoryDOMStoreThreePhaseCommitCohortTest

Use mockito runner and make sure mocks are not static.

Change-Id: I3e7e160fbea64a760b41f882cd69dc0831b0f44d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove unified-html-generator 54/98254/2
Robert Varga [Tue, 2 Nov 2021 06:43:33 +0000 (07:43 +0100)]
Remove unified-html-generator

This generator is not used anywhere, remove it.

JIRA: MDSAL-688
Change-Id: I69259cc3c5684b15372a32edd0fd3f7bca5819ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRequire HierarchicalIdentifier 87/97887/7
Robert Varga [Thu, 14 Oct 2021 22:12:28 +0000 (00:12 +0200)]
Require HierarchicalIdentifier

yangtools.concepts.Path is going away and we are the last holdout,
migrate to its replacement.

Change-Id: I100261228105c35c157dce09120092b4d451f69b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 9.0.0-SNAPSHOT 10/98510/1
Robert Varga [Sun, 14 Nov 2021 19:29:17 +0000 (20:29 +0100)]
Bump versions to 9.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I2e86b89f44c05f9b22bc6fa44bf7f3b983bc3f0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>