mdsal.git
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)

3 years agoRemove unused local variable 56/92556/1
Illia [Mon, 21 Sep 2020 10:13:45 +0000 (13:13 +0300)]
Remove unused local variable

Change-Id: I2452717e6141c1380d244bd66181440e249e21ad
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoRemove odl-uint24 99/92499/7
Robert Varga [Sat, 19 Sep 2020 07:22:01 +0000 (09:22 +0200)]
Remove odl-uint24

ietf-routing-types provides an equivalent type, let's not muddle
the waters with our own.

JIRA: MDSAL-593
Change-Id: Idc36d0f413d72d27926ea095910a467ad9ef0447
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd RFC8346 models 00/92500/1
Robert Varga [Sat, 19 Sep 2020 09:19:18 +0000 (11:19 +0200)]
Add RFC8346 models

RFC8346 defines a set of models useful when dealing with L3
topologies. Package them in MD-SAL.

JIRA: MDSAL-594
Change-Id: I8437c61666c2f852b0a8a1aaa78d62215d295347
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd RFC8795 types 98/92498/4
Robert Varga [Sat, 19 Sep 2020 07:01:24 +0000 (09:01 +0200)]
Add RFC8795 types

RFC8795 defines a set of models useful when dealing with traffic
engineering and topologies. Package them in MD-SAL.

JIRA: MDSAL-592
Change-Id: I51177a6306ea88e60f602bc24f2dc95cf6f9aeab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd RFC8776 types 97/92497/5
Robert Varga [Sat, 19 Sep 2020 06:34:19 +0000 (08:34 +0200)]
Add RFC8776 types

RFC8776 defines a set of types useful when dealing with traffic
engineering. Package them in MD-SAL.

JIRA: MDSAL-591
Change-Id: I62eb310d1848ece9d379c723afde4d51f22bd4b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ietf-ted/topology extensions 18/92418/2
Robert Varga [Mon, 7 Sep 2020 13:33:43 +0000 (15:33 +0200)]
Remove ietf-ted/topology extensions

We are providing standardized ietf-network(-topology), we are moving
away from drafts. Remove the constructs used only by bgpcep, so that
it can take ownership of these.

JIRA: MDSAL-590
Change-Id: I3dc4ebd8b9f02ef6164e6b9d094a9c18675714d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix wrong leafref path 71/91871/6
illia.ihushev [Tue, 4 Aug 2020 19:22:13 +0000 (22:22 +0300)]
Fix wrong leafref path

leafref path points to nonexistent node, fix this path.

Change-Id: Ie6561743cf88d840598e3f2199fddff1c08029fa
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
3 years agoRemove @NonNull spec 74/91874/2
Robert Varga [Tue, 4 Aug 2020 20:51:49 +0000 (22:51 +0200)]
Remove @NonNull spec

The methhod is dominated by the specification from interafce,
hence this @NonNull is superfluous.

Change-Id: Iea9baa8b6ed3cd15fabcb306fd4481164f957375
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix a static method warning 73/91873/2
Robert Varga [Tue, 4 Aug 2020 20:50:46 +0000 (22:50 +0200)]
Fix a static method warning

This method can be static, fix that.

Change-Id: Iba789afc0cdc2a3a3846d48b468b4e0a6b787fcc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up annotations a bit 33/91833/1
Robert Varga [Tue, 4 Aug 2020 06:38:06 +0000 (08:38 +0200)]
Speed up annotations a bit

When we are accessing an annotation, it is better to have the
JavaTypeName ready rather than having to construct/lookup it on
the fly.

Change-Id: I1ad93b3d6af4fd0d1268b8af90102b00f96d32c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate AugmentationHolder 24/91824/4
Robert Varga [Mon, 3 Aug 2020 12:02:14 +0000 (14:02 +0200)]
Eliminate AugmentationHolder

This makes interacting with Augmentables a lot simpler at the expense
of not supporting weird Reflection-based tricks like 'we will load
the interpretation behind your back'.

JIRA: MDSAL-577
Change-Id: Ib97ed323cf8fbec55a06188691610a31a1267bea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove DOMMountPoint's EffectiveModelContext 25/91825/2
Robert Varga [Mon, 3 Aug 2020 14:12:01 +0000 (16:12 +0200)]
Remove DOMMountPoint's EffectiveModelContext

A mount point does not really have to have an EffectiveModelContext,
as the model may not be known. The schema may be acquired via
DOMSchemaService, if it is provided.

JIRA: MDSAL-542
Change-Id: I8013cd773267eee8d5b9cb83d56c46a36ced2005
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix an Xtend warning 23/91823/2
Robert Varga [Mon, 3 Aug 2020 11:59:12 +0000 (13:59 +0200)]
Fix an Xtend warning

There is a teensy warning, fix it up.

JIRA: MDSAL-491
Change-Id: I2a630ea42b27fd447e76a1ee567c61b21d74ace4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix list Key data object nullness guarantees 22/91722/7
illia.ihushev [Tue, 28 Jul 2020 12:20:58 +0000 (15:20 +0300)]
Fix list Key data object nullness guarantees

Verify is values nonnull in the constructors. Annotate getters return
types, constructor parameters with @NonNull.

JIRA: MDSAL-491
Change-Id: Idd8adacd9f8b2916b92a171df8d7e5001b1557d3
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
3 years agoTeach BindingRuntimeContext how to lookup action paths 82/91682/3
Robert Varga [Mon, 27 Jul 2020 11:19:41 +0000 (13:19 +0200)]
Teach BindingRuntimeContext how to lookup action paths

We do not want to rely on SchemaPath in binding-dom-adapter, so that
addressing is kept internal to BindingRuntimeTypes.

JIRA: MDSAL-581
Change-Id: I464582fa43b208de1ba347388cbde26161f3e304
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReplace SchemaPath with SchemaNodeIdentifier.Absolute/QName 05/91505/11
Robert Varga [Tue, 21 Jul 2020 11:42:54 +0000 (13:42 +0200)]
Replace SchemaPath with SchemaNodeIdentifier.Absolute/QName

SchemaNode.getPath() is going away, which also means we do not need
to tie ourselves down with SchemaPath.

RPCs embrace the fact they are really just a top-level construct
and use a plain QName.

Actions and notifications are required to use
SchemaNodeIdentifier.Absolute, which is the exact addressing
equivalent for them.

JIRA: MDSAL-569
Change-Id: I3a8f820c7b8f8a161881865bdac5a00d969cfc63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd @NonNull in DataObjects' default method signatures 57/91757/6
illia.ihushev [Wed, 29 Jul 2020 10:41:34 +0000 (13:41 +0300)]
Add @NonNull in DataObjects' default method signatures

When specific DataObject is not Augmentable bindingToString parameter,
bindingEquals thisObj parameter, bindingHashCode parameter are not
annotated with @NonNull. Add these missing @NonNulls.

JIRA: MDSAL-582
Change-Id: I1ec4b500fd30cdf6b5006b8da2d91e035eff04ae
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
3 years agoSkip bindingHashCode() generation on properties' absence 94/91494/5
Ilya Igushev [Tue, 21 Jul 2020 08:02:32 +0000 (11:02 +0300)]
Skip bindingHashCode() generation on properties' absence

When DataObject implementation has no properties, augmentations, its
hashcode() wouldn't be overridden, so bindingHashcode() remains unused.

JIRA: MDSAL-471
Change-Id: If2f7bbb65f9dccf2353ba22b49d530f2a1ab4a71
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
3 years agoAdd tests for generateBindingHashCode() 54/91454/14
illia.ihushev [Mon, 20 Jul 2020 16:11:36 +0000 (19:11 +0300)]
Add tests for generateBindingHashCode()

Check bindingHashCode() declaration correctness.

JIRA: MDSAL-471
Change-Id: Iebf4963c1069b824ef97d07c9a81bff08cf3cabd
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
3 years agoRecord deactivation reason in adapted services 30/91730/1
Robert Varga [Fri, 31 Jul 2020 21:23:38 +0000 (23:23 +0200)]
Record deactivation reason in adapted services

This improves our ability to diagnose component deactivation by
reporting the reason for it.

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

3 years agoBump byte-buddy to 2.10.13 83/91683/2
Robert Varga [Mon, 27 Jul 2020 15:07:25 +0000 (17:07 +0200)]
Bump byte-buddy to 2.10.13

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.12
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.13

Change-Id: I0966260bd0488abd08e9db0025bb1fd28d01f7e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert mdsal-eos-binding-adapter to OSGi DS 98/91798/3
Robert Varga [Fri, 31 Jul 2020 12:00:34 +0000 (14:00 +0200)]
Convert mdsal-eos-binding-adapter to OSGi DS

This is very simple component, use OSGi DS to activate it. This
exposes our inability to test it, hence disable the corresponding
feature. That test was incomplete due to us relying on ODL blueprint
namespace, which was missing anyway.

JIRA: MDSAL-524
Change-Id: I06ad20c47ee357732d084389ada15b05d5a63b34
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert mdsal-singleton-dom-impl to OSGi DS 97/91797/1
Robert Varga [Fri, 31 Jul 2020 11:44:05 +0000 (13:44 +0200)]
Convert mdsal-singleton-dom-impl to OSGi DS

This is very simple component, use OSGi DS to activate it. This
exposes our inability to test it, hence disable the corresponding
feature. That test was incomplete due to us relying on ODL blueprint
namespace, which was missing anyway.

JIRA: MDSAL-523
Change-Id: Icadaf0fddc1768d97ec74d22a26f079f1811f9b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd binding adapter components for data services 93/91793/1
Robert Varga [Thu, 30 Jul 2020 21:59:36 +0000 (23:59 +0200)]
Add binding adapter components for data services

Rather than operating on service registry directly, create binding
adapters as dedicated components. This allows proper provides/requires
validation for downstream component users.

JIRA: MDSAL-587
Change-Id: I5c9c8140660ac5c7d7a82c25bcbf4e26fc8716be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0def314d2f0495f11a75d49e7ba33cf86e8e9c88)

3 years agoAdd binding adapter components for notification services 92/91792/1
Robert Varga [Thu, 30 Jul 2020 21:46:00 +0000 (23:46 +0200)]
Add binding adapter components for notification services

Rather than operating on service registry directly, create binding
adapters as dedicated components. This allows proper provides/requires
validation for downstream component users.

JIRA: MDSAL-585
Change-Id: I8a3ec440d9e74cfaecdc310812da32b4b8b28241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0e769de7475abae5dd06fc2c93d69d0906c66bee)

3 years agoAdd binding adapter components for action services 91/91791/1
Robert Varga [Thu, 30 Jul 2020 21:39:36 +0000 (23:39 +0200)]
Add binding adapter components for action services

Rather than operating on service registry directly, create binding
adapters as dedicated components. This allows proper provides/requires
validation for downstream component users.

JIRA: MDSAL-584
Change-Id: Ib6dbc8711f4b4789c542332a101dc391d28f8565
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 17ee220f898c60dd60325fa371f350945e7e331f)

3 years agoAdd binding adapter components for MountPointService 90/91790/1
Robert Varga [Thu, 30 Jul 2020 21:02:39 +0000 (23:02 +0200)]
Add binding adapter components for MountPointService

Rather than operating on service registry directly, create binding
adapters as dedicated components. This allows proper provides/requires
validation for downstream component users.

JIRA: MDSAL-586
Change-Id: I8e27d8c0b73f69633d889476aeb7808a69d5825f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4015d2cb081a5e08f8b00413199f8b94f6cf0b4f)

3 years agoAdd binding adapter components for RPC services 89/91789/1
Robert Varga [Thu, 30 Jul 2020 20:10:35 +0000 (22:10 +0200)]
Add binding adapter components for RPC services

Rather than operating on service registry directly, create binding
adapters as dedicated components. This allows proper provides/requires
validation for downstream component users.

JIRA: MDSAL-583
Change-Id: If9680d2efe64535551b0c7a3df8058dac89375cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5df23371ec7909983d59c278cfd28ecff66aad78)

3 years agoBump odlparent/yangtools to 7.0.5/5.0.5 13/91513/2
Robert Varga [Tue, 21 Jul 2020 19:40:36 +0000 (21:40 +0200)]
Bump odlparent/yangtools to 7.0.5/5.0.5

Pick up upgrades needed for netty and also further 7.0.0 development.

Change-Id: Ib80d5cfae5c5b93000ca3cf6fc907513d3901bdb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify DOMNotificationService contract 00/91500/1
Robert Varga [Tue, 21 Jul 2020 10:24:30 +0000 (12:24 +0200)]
Simplify DOMNotificationService contract

One of the methods can be implemented as a default method, making
things easier on implementations. Address the FIXME.

Change-Id: I99b2bc8c07a55b6a4e943f0185cdc6d29c8cf2fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse soft values in ValueTypeCodec 95/91495/1
Robert Varga [Tue, 21 Jul 2020 08:39:32 +0000 (10:39 +0200)]
Use soft values in ValueTypeCodec

Using strong value references in STATIC_CODECS cache leads to target
classes being strongly reachable through the codec itself -- hence
they will never be weakly reachable, hence they will not be GC'd.

Use soft values, which allows the classes to be GC'd as soon as the
JVM decides they have not been used for a while -- which is what
will happen when a class becomes almost-eligible for unloading.

JIRA: MDSAL-580
Change-Id: I7956d564c46a9a1d52ba85fbe61f3a19c507a902
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBinding DTOs: improve equals() implementation 36/89736/22
Vladyslav Marchenko [Wed, 13 May 2020 10:09:03 +0000 (13:09 +0300)]
Binding DTOs: improve equals() implementation

DTO generator code recognize the types being compared and perform the following ordering:
1) numeric types (boolean, byte, short, int, long, biginteger, bigdecimal), identityrefs
2) string, binary, bits
3) instance identifier
4) all other (e.g. composite) types

JIRA: MDSAL-88
Change-Id: I8f64ad3cf234e4f0f16d608bd397b7f3fa96d785
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse bindingEquals() generated for interfaces 83/90983/29
illia.ihushev [Wed, 8 Jul 2020 09:58:08 +0000 (12:58 +0300)]
Use bindingEquals() generated for interfaces

As we are generating a default implementation of equals(), we
can defer to that implementation from runtime-generated proxies.

This results in:
- consistent results between compile-time and runtime implementations
- faster startup time, as there is only one dispatch implementation
- lower memory overhead, as runtime-generated classes are smaller
- more maintainable code, as the implementation can be examined at
  compile-time

Since this is the last method that references properties, we also
get to clean up some of the knowledge of how these need to be ordered.

JIRA: MDSAL-474
Change-Id: I1a0ca93755e670b7d8fa0834f87ee7a828843aa6
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGenerate bindingEquals() and use it in generated implementations 45/90745/32
Ilya Igushev [Fri, 3 Jul 2020 08:07:22 +0000 (08:07 +0000)]
Generate bindingEquals() and use it in generated implementations

As we are gearing towards generating default methods in interfaces,
we need the ability to completely analyze all a target type from
a template, not from a generator.

This ability was previously available to Builder*Template, now it
is part of JavaFileTemplate and hence can be picked up by
InterfaceTemplate as needed.

JIRA: MDSAL-473
Change-Id: Ife60dadb9b66dc01df04ebeba11d82c8806f2236
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up AugmentationHolder's annotations 46/91446/1
Robert Varga [Mon, 20 Jul 2020 12:41:17 +0000 (14:41 +0200)]
Clean up AugmentationHolder's annotations

We know AugmentationHolder must return a non-null, make sure we
have annotations documenting that.

Change-Id: Ie46791349c9ab0b3eb67fa8dd165d67702a993d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse bindingHashCode() generated for interfaces 06/84206/25
Robert Varga [Wed, 4 Sep 2019 17:16:09 +0000 (19:16 +0200)]
Use bindingHashCode() generated for interfaces

As we are generating a default implementation of hashCode(), we
can defer to that implementation from runtime-generated proxies.

This results in:
- consistent results between compile-time and runtime implementations
- faster startup time, as there is only one dispatch implementation
- lower memory overhead, as runtime-generated classes are smaller
- more maintainable code, as the implementation can be examined at
  compile-time

JIRA: MDSAL-472
Change-Id: Ifc4d3b71a1c63508e01491a4bf57bc4b163b5816
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGenerate bindingHashCode() and use it in generated implementations 05/84205/27
Robert Varga [Wed, 4 Sep 2019 15:44:12 +0000 (17:44 +0200)]
Generate bindingHashCode() and use it in generated implementations

As we are gearing towards generating default methods in interfaces,
we need the ability to completely analyze all a target type from
a template, not from a generator.

This ability was previously available to Builder*Template, now it
is part of JavaFileTemplate and hence can be picked up by
InterfaceTemplate as needed.

JIRA: MDSAL-471
Change-Id: I278c085da195df8b4153b62381203b8ddc7bd073
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove use of deprecated setters 43/91443/2
Robert Varga [Mon, 20 Jul 2020 09:50:56 +0000 (11:50 +0200)]
Remove use of deprecated setters

Using lists to populate unordered maps is deprecated, do not use
those methods.

Change-Id: Ie1abec61ee0e46917b5272e8e3f7a6906850626a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ModuleInfoBackedContext 37/91437/1
Robert Varga [Sun, 19 Jul 2020 22:01:39 +0000 (00:01 +0200)]
Remove ModuleInfoBackedContext

We have a replacement in ModuleInfoSnapshotBuilder, which is more
appropriate. Remove this badly leaking class and remove all the cruft
associated with its contract.

Change-Id: I185a57dc488a248bc8387e3f26603772116a48f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse ModuleInfoSnapshot instead of ModuleInfoBackedContext 36/91436/1
Robert Varga [Sun, 19 Jul 2020 21:52:36 +0000 (23:52 +0200)]
Use ModuleInfoSnapshot instead of ModuleInfoBackedContext

We do not need the entire dance around dynamic loading, use just
the bare minimum loader.

Change-Id: Ie04197083144fd24d11108edef013ec5941b2c90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove GeneratedClassLoadingStrategy 34/91434/2
Robert Varga [Sun, 19 Jul 2020 16:30:42 +0000 (18:30 +0200)]
Remove GeneratedClassLoadingStrategy

We do not need this particular class anymore, remove it and migrate
its final set of users.

Change-Id: Ifce3d2803e2c3864377f174c468e83ee3a14b210
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse bindingToString() generated for interfaces 15/91315/25
illia.ihushev [Tue, 14 Jul 2020 08:21:49 +0000 (11:21 +0300)]
Use bindingToString() generated for interfaces

As we are generating a default implementation of toString(), we
can defer to that implementation from runtime-generated proxies.

This results in:
- consistent results between compile-time and runtime implementations
- faster startup time, as there is only one dispatch implementation
- lower memory overhead, as runtime-generated classes are smaller
- more maintainable code, as the implementation can be examined at
  compile-time

JIRA: MDSAL-480
Change-Id: I56aceeb70461f6d35fcd6487e924fdd127a1ba1c
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove deprecated ietf-type-util methods 35/91435/2
Robert Varga [Sun, 19 Jul 2020 19:39:22 +0000 (21:39 +0200)]
Remove deprecated ietf-type-util methods

A number of methods have been deprecated in the previous release,
remove them now.

Change-Id: If9f74b66049e1cc22492af98edccd84df4f8f83a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGenerate bindingToString() and use it in generated implementations 48/90748/21
Ilya Igushev [Thu, 9 Jul 2020 09:52:02 +0000 (09:52 +0000)]
Generate bindingToString() and use it in generated implementations

As we are gearing towards generating default methods in interfaces,
we need the ability to completely analyze all a target type from
a template, not from a generator.

This ability was previously available to Builder*Template, now it
is part of JavaFileTemplate and hence can be picked up by
InterfaceTemplate as needed.

JIRA: MDSAL-479
Change-Id: I1e939aca15f2f77b82a83ca454503522c96bcabe
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCorrect mdsal-binding-runtime-{api,spi} packages 32/91432/3
Robert Varga [Sun, 19 Jul 2020 15:35:56 +0000 (17:35 +0200)]
Correct mdsal-binding-runtime-{api,spi} packages

Previous iteration left these new interface in the wrong package,
correct that mistake.

JIRA: MDSAL-548
Change-Id: I65c51ff2c1fc6c66684325c1022f6dca79a9b837
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate binding.runtime.spi constructs 31/91431/3
Robert Varga [Sun, 19 Jul 2020 15:23:37 +0000 (17:23 +0200)]
Deprecate binding.runtime.spi constructs

GeneratedClassLoadingStrategy is a relic, superseded by
ClassLoadingStrategy interface. Deprecate it for removal.

ModuleInfoBackedContext is an internal implementation detail, which
should not be used outside fo runtime-spi. Deprecate it for removal.

Change-Id: I520b7aa2bd60080e03c41f55087a5a9eca65ea8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove deprecated Builder.addAugmentation() variant 28/91428/3
Robert Varga [Sun, 19 Jul 2020 11:53:46 +0000 (13:53 +0200)]
Remove deprecated Builder.addAugmentation() variant

We only support a single-argument variant, remove the deprecated
one.

JIRA: MDSAL-575
Change-Id: Ib2d256516f03a3e4be532378ac2dac6833acf489
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove uses of deprecated Builder.addAugmentation() 30/91430/1
Robert Varga [Sun, 19 Jul 2020 15:04:18 +0000 (17:04 +0200)]
Remove uses of deprecated Builder.addAugmentation()

We have a few tests which are using the deprecated addAugmentation()
method, remove them.

Change-Id: I3207588958610ee35eb1de2542ee31181467294f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump java-diff-utils to 4.7 87/90087/5
Robert Varga [Fri, 29 May 2020 12:29:27 +0000 (14:29 +0200)]
Bump java-diff-utils to 4.7

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

JIRA: MDSAL-558
Change-Id: I941892d6a0f50ba0a7fb3dcc1e66844b0de1af37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 7.0.0-SNAPSHOT 01/91401/1
Robert Varga [Fri, 17 Jul 2020 21:14:42 +0000 (23:14 +0200)]
Bump versions to 7.0.0-SNAPSHOT

Open the next major release.

Change-Id: I85ddea18470708fbb4d4346b4476ca32198d4f55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 6.0.4-SNAPSHOT 00/91400/1
Robert Varga [Fri, 17 Jul 2020 21:13:30 +0000 (23:13 +0200)]
Bump versions to 6.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie2e139ddea855c81f765e1b9b4dff02810230000
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoResolve generated type for leafrefs targetting unions 69/91369/5
Tomas Cere [Fri, 10 Jul 2020 11:51:54 +0000 (13:51 +0200)]
Resolve generated type for leafrefs targetting unions

We need to be able to resolve the generated type of unions
which are targeted by leafrefs during codegen.
Introduce a path that attempts this by consulting ModuleContext
for the generated types in case we are resolving a leafref.

JIRA: MDSAL-572
Change-Id: I40448a4c9f2fdf26280e0911ebb9dcc5fc60d3f1
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8c4ab985c1723336640324789c65489e71deb4e0)

3 years agoBump odlparent/yangtools to 7.0.4/5.0.4 34/91334/4
Robert Varga [Wed, 15 Jul 2020 10:32:22 +0000 (12:32 +0200)]
Bump odlparent/yangtools to 7.0.4/5.0.4

Pick up latest fixes from upstream.

Change-Id: Ic6d8e45955d77401b0bbdc4535b0a9a5e3ca9732
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake full type information accessible from InterfaceTemplate 35/91335/6
illia.ihushev [Wed, 15 Jul 2020 11:35:26 +0000 (14:35 +0300)]
Make full type information accessible from InterfaceTemplate

As we are gearing towards generating default methods in interfaces,
we need the ability to completely analyze all a target type from
a template, not from a generator.

This ability was previously available to Builder*Template, now it
is part of JavaFileTemplate and hence can be picked up by
InterfaceTemplate as needed.

JIRA: MDSAL-470
Change-Id: I5a9b35ae31bfa7ecbffa2b555587d70a97fab93e
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up BuilderGenerator matcher 39/91339/2
Robert Varga [Wed, 15 Jul 2020 15:43:28 +0000 (17:43 +0200)]
Speed up BuilderGenerator matcher

We do not need to establish FQCN, as we can compare just JavaTypeNames,
which is faster.

Change-Id: I3c387e841fbf2d450195d864a928608bab8128ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGenerate implementedInterfaces method for DataRoot 47/91347/1
Tomas Cere [Thu, 16 Jul 2020 11:34:25 +0000 (13:34 +0200)]
Generate implementedInterfaces method for DataRoot

In case we have multiple top level uses statements we also
need to generate an override of implementedInterfaces() to prevent
clashes with the return types of the extended interfaces.

JIRA: MDSAL-573
Change-Id: I07ad3f6dc5a18369f0be4bdaba03c6c17072297b
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
3 years agoInline single-use locals 05/91305/3
Robert Varga [Mon, 13 Jul 2020 20:11:22 +0000 (22:11 +0200)]
Inline single-use locals

We are storing instrumented type in a local, and use that local
only once. Just inline the getter to trim down some generator
bytecode.

Change-Id: Ibfac0c2dc1d294643cbe2619d14e1672314d8bdf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up CodecDataObjectGenerator documentation 04/91304/2
Robert Varga [Mon, 13 Jul 2020 20:06:45 +0000 (22:06 +0200)]
Clean up CodecDataObjectGenerator documentation

We have a few typos and opportunities for cleanup.

Change-Id: Ibb9f5804ccc05c1b58c51d0ba1ac03fbaef7b223
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd INFO.yaml for mdsal 46/91246/4
Anil Belur [Sun, 12 Jul 2020 00:46:02 +0000 (10:46 +1000)]
Add INFO.yaml for mdsal

Change-Id: Ib3e7c116d04b1c2afbda4ec472c4e31d3cfaf9b2
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove GeneratorUtil.getTopParentTransportObject() 96/91296/1
Robert Varga [Mon, 13 Jul 2020 11:12:34 +0000 (13:12 +0200)]
Remove GeneratorUtil.getTopParentTransportObject()

This method is not used anywhere and is quite inefficient, remove
it.

Change-Id: I3d381793c6c20fb056d03118b942a2257756a4bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoNetty Replicator - improve the reconnection and keepalive mechanisms 52/90752/2
Tibor Král [Tue, 30 Jun 2020 01:29:04 +0000 (03:29 +0200)]
Netty Replicator - improve the reconnection and keepalive mechanisms

In some cases during a network partition the disconnected
channel got closed with delay after a new channel was already created.
This started reconnection process which closed the new channel and
created yet another one.

Also improve the keepalive mechanism since some types of network
partitions left one side unaware of the issue.  It is important both
the Sink and the Source are notified about any connection issue as
soon as possible. PING-PONG messages are exchanged between the two
sides when no deltas are sent for a period of time

Configuration options keepalive-interval-seconds and
max-missed-keepalives added to both configurations.

Change-Id: Iebde72963bddb748ab97617d07cfc77cd8614da4
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b94fbc60c0b41da2f6645ab51188fbcdfa74e4af)

3 years agoAdd documentation for Netty Replication utility 53/90753/1
Tibor Král [Mon, 8 Jun 2020 17:21:11 +0000 (19:21 +0200)]
Add documentation for Netty Replication utility

Provide more information about the replication mechanism,
instalation, configuration and usage.

Change-Id: Ifcfae6853bc1946ac9e58b84219354a543e87ed8
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
3 years agoProvide auto-reconnection for Sink 38/90738/1
Tibor Král [Thu, 25 Jun 2020 16:17:55 +0000 (18:17 +0200)]
Provide auto-reconnection for Sink

In case there is a network partition the Sink needs to
be aware of it and schedule reconnect. This patch adds
configuration knob keepalive-interval-seconds to tweak
how soon after network failure the Sink gets notified.

Change-Id: I1eb2880bb00d1101cd587e4a737ba2f8a485b7ed
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2cbcb2d8589805bcb053462176424dae2b53cd1a)

3 years agoImprove tests and blueprints of Netty Replication Utility 93/90693/2
Tibor Král [Tue, 23 Jun 2020 20:58:52 +0000 (22:58 +0200)]
Improve tests and blueprints of Netty Replication Utility

- Test replication of actual DataTreeChanges from Source
to Sink and fix any related issues.
- Move blueprints to /OSGI-INF/blueprint/ and fix any
related wiring issues

Change-Id: I89c8228538e0462bbe61ca49e1ecf09dad4d4aaf
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a2f2028f4d111e77ca542d2bc2110f38fafd82fb)

3 years agoAdd a unit test for netty replication 70/90570/3
Robert Varga [Mon, 22 Jun 2020 12:44:30 +0000 (14:44 +0200)]
Add a unit test for netty replication

This is a simple unit test, which we can use to validate establishment
of source connection. This flushes out a few bugs, which are also
addressed.

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

3 years agoFixup mdsal-docs 14/90514/1
Robert Varga [Fri, 19 Jun 2020 08:51:02 +0000 (10:51 +0200)]
Fixup mdsal-docs

Merge job is failing, fix it up.

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

3 years agoAdd basic netty replication utility 06/90506/1
Robert Varga [Wed, 17 Jun 2020 10:29:12 +0000 (12:29 +0200)]
Add basic netty replication utility

This adds a source/sink datastore replication component based on
Netty TCP channels. The sink (consumer) connects to source (producer)
via a channel, specifies which data tree it wants replicated and
then listens for DataTreeCandidates to arrive from the source.

Change-Id: Ib283baa9a186ae2fb4ccf909b257006d4645de37
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d7b666857c54c07d9bf5c8e5e38671151d89fb4c)

3 years agoEliminate use of addAugmentation(Class, DataObject) 50/90450/2
Robert Varga [Mon, 15 Jun 2020 12:42:13 +0000 (14:42 +0200)]
Eliminate use of addAugmentation(Class, DataObject)

We have a replacement for this, migrate this user to remove
a warning.

Change-Id: Ib41c26cbd39766a8547edc88be03e3d8acf97265
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 6.0.3-SNAPSHOT 81/90381/1
Robert Varga [Wed, 10 Jun 2020 20:19:00 +0000 (22:19 +0200)]
Bump versions to 6.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Ice8a9c218fcc912a1e136b1063d83b13fcd50528
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix leafref-to-enum encoding 11/89611/8
Peter Valka [Wed, 6 May 2020 07:54:18 +0000 (09:54 +0200)]
Fix leafref-to-enum encoding

When we have a leafref pointing to an enum via an absolute path,
in and RPC, we end up using a no-op codec, whereas we should be
extracting the name (from enum constant, or SchemaContext).

This ends up being a problem not in codec itself, as it is using
reflection to acquire the return type, defaulting to no-op.

The problem lies with AbstractTypeGenerator, which ends up not
being able to look up the generated type in case of RPC. The problem
here is the order in which types are generated, as the leaf being
referenced is generated after the RPC itself -- hence we cannot
find the definition.

While this is again highlighting the problem of single-pass code
generation, we can side-step the problem by moving RPC/notification
generation after the root data generation.

As a further complication, we need to record the enum/schema mapping,
as the codec needs to be able to find them via leafref types.

JIRA: MDSAL-552
Change-Id: Ifd92807029cdb7ba92dcad5655bb34d3ff4cef9d
Signed-off-by: Peter Valka <Peter.Valka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename query adapter package 69/90369/1
Robert Varga [Wed, 10 Jun 2020 08:49:20 +0000 (10:49 +0200)]
Rename query adapter package

org.opendaylight.mdsal.query.binding.adapter does not match
the overall package structure of binding/DOM adapter. Fix that.

Change-Id: I30bc30856032a3fa7c0d4637dc16c0407743dd54
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump to odlparent-7.0.3/yangtools-5.0.3 65/90365/1
Robert Varga [Tue, 9 Jun 2020 22:31:16 +0000 (00:31 +0200)]
Bump to odlparent-7.0.3/yangtools-5.0.3

Pick up latest updates from upstream.

Change-Id: I1f8ac05eecaeac0c7ba0d802543d82c3c7ea7548
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump byte-buddy to 1.10.11 34/90334/1
Robert Varga [Mon, 8 Jun 2020 14:47:44 +0000 (16:47 +0200)]
Bump byte-buddy to 1.10.11

https://github.com/raphw/byte-buddy/blob/master/release-notes.md#4-june-2020-version-11011

Change-Id: I8538ecfa410bfc8fdbdbb87926914961ba2c6f1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump xtendbeans to 1.3.2 30/90330/1
Robert Varga [Mon, 8 Jun 2020 10:57:38 +0000 (12:57 +0200)]
Bump xtendbeans to 1.3.2

This fixes synthetic bridge method issue.

Change-Id: I3766deed8b8ed8bab5e17dc81e5fb8711c0b62e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 6.0.2-SNAPSHOT 38/90138/1
Robert Varga [Sat, 30 May 2020 13:30:08 +0000 (15:30 +0200)]
Bump versions to 6.0.2-SNAPSHOT

This starts next development iteration.

Change-Id: I6dd75c96d5e17bc6435539d44ecc4d0dcbe54daf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump to odlparent-7.0.2/yangtools-5.0.2 32/90132/1
Robert Varga [Sat, 30 May 2020 09:10:19 +0000 (11:10 +0200)]
Bump to odlparent-7.0.2/yangtools-5.0.2

Pick up latest updates from upstream.

Change-Id: Ibe48d3cc3f1ba0896ff582d285261ea287a0a87b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoLink to odlparent docs 28/90128/2
Robert Varga [Sat, 30 May 2020 00:16:20 +0000 (02:16 +0200)]
Link to odlparent docs

We do not use odlparent, but link to it in case this ever changes.

Change-Id: I98881de9a78fa0bda70dffc9098cd95a7f406005
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump byte-buddy to 1.10.10 14/90114/1
Robert Varga [Fri, 29 May 2020 20:49:02 +0000 (22:49 +0200)]
Bump byte-buddy to 1.10.10

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.10

Change-Id: I536fc350302459e59245a87ab0d105d8df6ff3df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPromote ForeignShardThreePhaseCommitCohort to dom.spi 12/90112/3
Robert Varga [Fri, 29 May 2020 19:17:19 +0000 (21:17 +0200)]
Promote ForeignShardThreePhaseCommitCohort to dom.spi

This class is really a sharding SPI thing, promote it as a beta
construct. This allows us to also promote
AbstractShardModificationFactoryBuilder.

Change-Id: I7d29ecbb691cefb79775d384898905a300e9af47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up binding-util tests 00/90100/5
Robert Varga [Fri, 29 May 2020 17:06:31 +0000 (19:06 +0200)]
Clean up binding-util tests

Ditch Truth and use assertThrows() to test exactly what we need.

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