mdsal.git
4 years agoDeprecated getSessionContext() for removal 77/89077/3
Robert Varga [Thu, 16 Apr 2020 16:25:36 +0000 (18:25 +0200)]
Deprecated getSessionContext() for removal

We really want to be removing this method, mark it for removal.

Change-Id: I7e0779d58bdb6b1c2478544166e7bf14e3cdaeb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd Binding/DOM Query language adapter 93/88193/27
Robert Varga [Sun, 1 Mar 2020 12:14:00 +0000 (13:14 +0100)]
Add Binding/DOM Query language adapter

Provide implementation of binding language translation on top
of its DOM counterpart.

On the DOM layer the expression can be transmitted, hence it gives
the possibility to move the execution to storage backend, thus
reducing app/backend data interchange volume.

Change-Id: I51c8ec7e34c2485f62aeb5bdbe35fe1507cabaa9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSplit DOMRpcRouter from blueprint 74/89074/3
Robert Varga [Thu, 16 Apr 2020 13:29:06 +0000 (15:29 +0200)]
Split DOMRpcRouter from blueprint

Add OSGi DS wiring instead of blueprint, so that we can ditch
some references to ODL extensions. This also neccessitates adding
a few missing forwarding implementations.

JIRA: MDSAL-521
Change-Id: I15d2c9373f06c31bcee43c520733bb2f4a2255ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFixup odl-mdsal-trace's name 73/89073/1
Robert Varga [Thu, 16 Apr 2020 12:35:05 +0000 (14:35 +0200)]
Fixup odl-mdsal-trace's name

Fix naming here to be consistent with other features by adding
"MD-SAL" infix.

Change-Id: Iad4418faf3712f88ba74b7c4e4ea39d016a3807d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRefactor binding-dom-adapter 40/89040/10
Robert Varga [Sun, 12 Apr 2020 11:35:02 +0000 (13:35 +0200)]
Refactor binding-dom-adapter

BindingNormalizedNodeCodecRegistry is a serializer which allows
dynamic updates to its backing codec. Rather than referencing this
implementation, reference either BindingNormalizedNodeSerializer
(interface) or BindingCodecContext, which is the simple implentation.

This makes it obvious we are not using BindingNormalizedNodeCodecRegistry
in the context of mdsal-binding-dom-codec at all, making it a good
candidate to move to mdsal-binding-dom-adapter. Except we do not want
to just move it, but refactor so that it is properly controlled.

Change-Id: I2be67ed78ac89da5c5b5ec7322d03e769d2826c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd mdsal-binding-dom-codec-osgi dependency 69/89069/1
Robert Varga [Thu, 16 Apr 2020 10:56:44 +0000 (12:56 +0200)]
Add mdsal-binding-dom-codec-osgi dependency

docs should depend on this artifact to have proper build order
and complete javadocs.

Change-Id: I61a62bf063ce379393c81b5924d0fd3f8b35ea14
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoHide BindingMountPointAdapter 44/89044/3
Robert Varga [Sun, 12 Apr 2020 13:11:29 +0000 (15:11 +0200)]
Hide BindingMountPointAdapter

This class is an internal implementation detail, hide it. Also
use Codec directly rather than taking a registry reference.

Change-Id: Ie3ac61f2456d2b6c5f3ba84d2588839fa5a4415f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix a BindingToNormalizedNodeCodec warning 45/89045/2
Robert Varga [Sun, 12 Apr 2020 14:43:11 +0000 (16:43 +0200)]
Fix a BindingToNormalizedNodeCodec warning

We are not using proper generic arguments, which the interface
specification requires. Fix that.

Change-Id: I6c22eaba5b6b739f0d23de2e6ededa4bc89ad888
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.getCodecFactory() 35/89035/1
Robert Varga [Sat, 11 Apr 2020 15:04:36 +0000 (17:04 +0200)]
Remove BindingToNormalizedNodeCodec.getCodecFactory()

This is a duplicate of getCodecRegistry(), remove it.

Change-Id: I32b04de56a22659fec2db54847ebf16424f0e31f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove verification message 30/89030/1
Robert Varga [Sat, 11 Apr 2020 02:46:48 +0000 (04:46 +0200)]
Improve verification message

Since we have the class identity available, let's use it to diagnoze
failures to supply a proper resource name.

Change-Id: I9b159e9ca8c16565b8e63b82637696ea90a42bc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.instanceIdentifierToNode() 29/89029/1
Robert Varga [Sat, 11 Apr 2020 01:58:56 +0000 (03:58 +0200)]
Remove BindingToNormalizedNodeCodec.instanceIdentifierToNode()

This method has a single in-package user, move it to centralize
logic and reduce codec clutter.

Change-Id: If234858384de767c71971c1a310cf45cb59f428c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.toNormalized(Entry) 28/89028/1
Robert Varga [Sat, 11 Apr 2020 01:52:37 +0000 (03:52 +0200)]
Remove BindingToNormalizedNodeCodec.toNormalized(Entry)

This method is a simple delegator to a interface-specified method
with a single caller -- refactor the caller and remove it.

Change-Id: If1a811484581848900e05f45dd9f76d0cd8ed567
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.toNormalized(InstanceIdentifier) 27/89027/1
Robert Varga [Sat, 11 Apr 2020 01:45:48 +0000 (03:45 +0200)]
Remove BindingToNormalizedNodeCodec.toNormalized(InstanceIdentifier)

This method is a duplicate of
BindingNormalizedNodeSerializer.toYangInstanceIdentifier(), remove it
and adjust callers to reduce confusion.

Change-Id: I5bbbdd87b2c0b6f85b2208ed23d25446fab9e0f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix mdsal-binding-dom-codec exports 26/89026/1
Robert Varga [Sat, 11 Apr 2020 01:40:47 +0000 (03:40 +0200)]
Fix mdsal-binding-dom-codec exports

We only need the .impl package exported, as we do not want to
embed our -api artifact, as that just wrecks source code lookups.

Change-Id: I9c85c7ba0e121c0497cd17e0fcfdc2b7133ddfc8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.toBinding() 25/89025/1
Robert Varga [Sat, 11 Apr 2020 01:22:17 +0000 (03:22 +0200)]
Remove BindingToNormalizedNodeCodec.toBinding()

This method is not used anywhere, remove it to keep our codebase
free of distractions.

Change-Id: I4ddd88572f336c0046cd807563718b6875f8bbcf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove AbstractForwardedDataBroker 24/89024/1
Robert Varga [Sat, 11 Apr 2020 01:20:00 +0000 (03:20 +0200)]
Remove AbstractForwardedDataBroker

This class hosts a chunk of functionality which is not used anymore,
dating back to when we had DataChangeListeners. Remove it.

Change-Id: Ia2c7dbbf0621eb5ba69983b84393acbb8d3ffd99
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.getNotificationClasses() 23/89023/1
Robert Varga [Sat, 11 Apr 2020 01:11:54 +0000 (03:11 +0200)]
Remove BindingToNormalizedNodeCodec.getNotificationClasses()

This method is not used anywhere, remove it to reduce the amount
of untested legacy code.

Change-Id: I76a8c1beca37d296b73e5aad9ac885a16d805c97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd more error context to ResourceYangModuleInfo 99/88999/2
Robert Varga [Thu, 9 Apr 2020 17:55:32 +0000 (19:55 +0200)]
Add more error context to ResourceYangModuleInfo

In case we end up failing to load a resource, log the subclass
and potentially the ClassLoader where the problem occured.

Change-Id: Id5cbe9875734d0c8f185d7cbbd8cc2cd3f09ee3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCache YangModuleInfo type name 69/86469/9
Robert Varga [Wed, 18 Dec 2019 09:05:15 +0000 (10:05 +0100)]
Cache YangModuleInfo type name

Analysis of a heap dump shows we are creating a number of instances
pointing to the same type for the purposes of having the QNAME constant.

As we have the context in which we are creating YangModuleInfo,
instantiate a primitive cache to de-duplicate these definitions.

JIRA: MDSAL-515
Change-Id: I9bb52d04627e91eac3adff672b06f6340cac157f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUnable to resolve grouping test 99/88399/4
miroslav.kovac [Wed, 11 Mar 2020 11:55:56 +0000 (12:55 +0100)]
Unable to resolve grouping test

JIRA MDSAL-531
Change-Id: Icdba0c0babf93ca14f7d81b42cc432eb4455d6e0
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
4 years agoMake DOMSchemaService operate of EffectiveModelContext 97/84797/5
Robert Varga [Mon, 30 Sep 2019 05:08:26 +0000 (07:08 +0200)]
Make DOMSchemaService operate of EffectiveModelContext

We are stepping towards working on Declared/EffectiveStatements
instead of SchemaNodes, this exposes EffectiveModelContext from
the DOMSchemaService.

JIRA: MDSAL-435
Change-Id: I6b24f423e104683e008a97595647a7b9ce4d3a11
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 7.0.1 91/88991/1
Robert Varga [Thu, 9 Apr 2020 07:58:53 +0000 (09:58 +0200)]
Bump odlparent to 7.0.1

This picks up latest updates.

Change-Id: I2782df0f7638233ebfb0a9715a3c49aa4078baa8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove WriteOperations.put()/merge() with ensure parents 77/88977/3
Robert Varga [Wed, 8 Apr 2020 13:16:45 +0000 (15:16 +0200)]
Remove WriteOperations.put()/merge() with ensure parents

These methods have been deprecated in favor of their explicit
counterparts, mergeParentStructurePut() and mergeParentStructureMerge().

While all users have not been migrated, force that migration to
happen now.

Change-Id: Ia5ae9f0f82c3b64e11e7a828ff614045029ed5ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix logic ensuring parent presence 75/88975/1
Robert Varga [Wed, 8 Apr 2020 13:01:59 +0000 (15:01 +0200)]
Fix logic ensuring parent presence

When we are asked to create intermediate nodes for a path, whose
parent is the conceptual root (i.e. its parent is empty), we should
not attempt to merge it, as it just does not make sense.

JIRA: MDSAL-534
Change-Id: Ia5f6ef2857903d8e88030f4c1f3867b8ed8f5a0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove superfluous @NonNull annotations 74/88974/1
Robert Varga [Wed, 8 Apr 2020 12:31:02 +0000 (14:31 +0200)]
Remove superfluous @NonNull annotations

These annotations are inherited from interface contract, there is
no point in specifying them again.

Change-Id: I7e2cb6d353b358f5c2eefc03181803377e047750
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate test to use mergeParentStructure{Merge,Put} 71/88971/2
Robert Varga [Wed, 8 Apr 2020 12:22:51 +0000 (14:22 +0200)]
Migrate test to use mergeParentStructure{Merge,Put}

We have deprecated these methods, make sure we migrate the test
so that it does not add false warnings.

Change-Id: I3a6bd6b936f34478fe7afdcc26547ffa7edb8992
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRealign junit links 69/88969/1
Robert Varga [Wed, 8 Apr 2020 11:45:06 +0000 (13:45 +0200)]
Realign junit links

Align JUnit links with odlparent-7, so that we generate nice
javadocs.

Change-Id: I28cb6669dfcb24d5b3de9d4d519555d6e48645e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump byte-buddy to 1.10.9 29/88929/2
Robert Varga [Tue, 7 Apr 2020 09:52:49 +0000 (11:52 +0200)]
Bump byte-buddy to 1.10.9

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

Change-Id: I6dd7ef731fefd5de334b268f23c9a24bf5ae0a41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFixup netty's parent reference 63/88863/1
Robert Varga [Thu, 2 Apr 2020 19:37:17 +0000 (21:37 +0200)]
Fixup netty's parent reference

We want to pull in 7.0.0, not 6.0.3.

Change-Id: I64b4b13ce6ba75887150a72b2e44d0969950209f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd a simple Binding query language 52/88552/11
Robert Varga [Fri, 20 Mar 2020 16:22:09 +0000 (17:22 +0100)]
Add a simple Binding query language

Offloading some amount of data matching towards the storage engine
can give use two-fold improvement:

1) skip instantiation of Binding DTOs, as the query can be realized
   in terms of DOM matches
2) potentially skip transfer of large amount of data

For Binding layer we want to have something type-safe, where we are
in control of the flow the language.

This provides a first cut at the structure, which may end up being
further evolved.

Change-Id: Ica52158c889c0df9a6004227c0b64092590f67af
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSimplify empty checking 73/88673/1
Robert Varga [Wed, 25 Mar 2020 14:34:22 +0000 (15:34 +0100)]
Simplify empty checking

Use a simple negation instead of an equality check -- not that it
makes much difference in generated code.

Change-Id: If7c73a3884544c5acb5590b8154df712d4af2c55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRefactor "value" property access 49/88649/6
Robert Varga [Tue, 24 Mar 2020 15:15:19 +0000 (16:15 +0100)]
Refactor "value" property access

There are a number of callers open-coding the way to acquire 'value'
property. Centralize them.

JIRA: MDSAL-530
Change-Id: I6fdf17b204c7f491eb667747a68d6d80daf55b78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd ScalarTypeObject 46/88646/9
Robert Varga [Tue, 24 Mar 2020 13:55:09 +0000 (14:55 +0100)]
Add ScalarTypeObject

TypeObjects are used for encapsulated values, which expose a getValue()
method, which is guaranteed to be non-null and can have additional
validation implied.

JIRA: MDSAL-530
Change-Id: I3ec4a5b4d7e04ff0c220144c9d1796fb44b2a80b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix import order 71/88671/1
Robert Varga [Wed, 25 Mar 2020 11:35:13 +0000 (12:35 +0100)]
Fix import order

xtend plugin does not automatically order imports, fix a misorder.

Change-Id: I099bbe07debe6a37b1f94fd6f39ec42d6d87f917
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse StringBuilder streaming in AbstractTypeProvider.union() 50/88650/3
Robert Varga [Tue, 24 Mar 2020 15:38:31 +0000 (16:38 +0100)]
Use StringBuilder streaming in AbstractTypeProvider.union()

StringBuilder's methods return a value we can use to form a nice
pipeline.

Change-Id: I70831ac9f7347d23b6c5b5e3cd34c99df6d29ce0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoJavaFileTemplate.findProperty() should be static 48/88648/3
Robert Varga [Tue, 24 Mar 2020 14:15:11 +0000 (15:15 +0100)]
JavaFileTemplate.findProperty() should be static

This method does not touch any local state -- hence it is truly
a static utility that can be moved to a properly-bound state.

Change-Id: Iad3b70d129e758a24aaa0558a1549728f529f236
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 7.0.0 69/88669/1
Robert Varga [Wed, 25 Mar 2020 08:28:47 +0000 (09:28 +0100)]
Bump odlparent to 7.0.0

Do not rely on snapshots, use the released version.

Change-Id: I2fc5ebecbd18ce392a75979fb0e7185ffd206190
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded dependency on osgi-core 58/88558/1
Robert Varga [Fri, 20 Mar 2020 20:31:58 +0000 (21:31 +0100)]
Remove unneeded dependency on osgi-core

mdsal-binding-api does not need osgi-core, remove the dependency.

Change-Id: I962211addacff49d6d0edbdd1c0d12cde464d431
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate mdsal-trace-impl's use of BindingNormalizedNodeSerializer 39/88439/2
Robert Varga [Mon, 16 Mar 2020 12:26:18 +0000 (13:26 +0100)]
Migrate mdsal-trace-impl's use of BindingNormalizedNodeSerializer

We do not really need a full serializer here, it is eanough to get
an InstanceIdentifierCodec -- which is readily available from
BindingCodecTree.

JIRA: MDSAL-522
Change-Id: Ia82128b3579b562bb8ca7277072aee07a66a5e1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRefactor OSGi ModuleInfoSnapshot/BindingRuntimeContext 04/88204/12
Robert Varga [Mon, 2 Mar 2020 07:18:31 +0000 (08:18 +0100)]
Refactor OSGi ModuleInfoSnapshot/BindingRuntimeContext

All components acting on EffectiveModel should end up reacting
to new generation by publishing components based on it before
tearing down the previous instance.

Refactor lifecycle by introducing this into both mdsal-dom-schema-osgi
and mdsal-binding-runtime-osgi -- providing the infrastructure for
mdsal-binding-dom-codec doing the same.

This leads to mdsal-binding-dom-codec-osgi to provide atomic updates
of BindingDOMCodecServices (and its constituent services), hence we
no longer want binding-dom-adapter to publish
BindingNormalizedNodeSerializer from its internal service.

JIRA: MDSAL-525
Change-Id: Ia6757b3db8068d585638bd8e2d3d17aaadb08955
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix test locations 95/88395/3
Robert Varga [Wed, 11 Mar 2020 09:30:05 +0000 (10:30 +0100)]
Fix test locations

Some of our tests are still located in legacy packages from
controller. Fix this by moving them to appropriate packages in
mdsal structure.

Change-Id: I4beac6dc0c98a1b1d7e022dddae57bedbf54aca9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove dependency on general-entity 87/88387/1
Robert Varga [Tue, 10 Mar 2020 09:49:24 +0000 (10:49 +0100)]
Remove dependency on general-entity

mdsal-binding-api should not depend on general-entity, as that
part of API is served by EOS APIs.

Change-Id: I0d8860b9c07bd1b7305c08cce9fa8c74e3703f36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove replaceAllIllegalChars(CharSequence) 36/88336/2
Robert Varga [Fri, 6 Mar 2020 18:21:28 +0000 (19:21 +0100)]
Remove replaceAllIllegalChars(CharSequence)

We do not have any callers here, remove the deprecated method.

Change-Id: I19a0919560729efb11a5658f1e4403543d30a134
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix YANG snippet escaping 07/88207/6
Robert Varga [Mon, 2 Mar 2020 12:58:50 +0000 (13:58 +0100)]
Fix YANG snippet escaping

This is the non-javadoc path for module generation, where we are
failing to escape potential unicode references. Add the proper
callout and also optimize it to be a faster no-op when not
applicable, properly documenting what is going on.

JIRA: MDSAL-529
Change-Id: Ib21ed4f15555d49aaa7eb3dac61043c4b2e90451
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPropagate grouping inference flag 24/88124/3
Samuel Kontris [Fri, 28 Feb 2020 13:33:02 +0000 (14:33 +0100)]
Propagate grouping inference flag

The test case ends up looking through the magic code flagged
for refactoring -- which is losing knowledge that the parent
node is actually a grouping. Fix this up by propagating the
flag correctly.

JIRA: MDSAL-519
Change-Id: I8fe04e688adfcc068ff29e90a039530bcd56b3c3
Signed-off-by: Samuel Kontris <samuel.kontris@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCentralize BindingCodecContext services 99/88199/5
Robert Varga [Sun, 1 Mar 2020 18:46:28 +0000 (19:46 +0100)]
Centralize BindingCodecContext services

BindingCodecContext provides an immutable class providing a number
of services. It really should provide all services, so that
downstreams can make a proper decision around lifecycle.

We do not want to expose BindingCodecContext itself, as it provides
other, implementation-internal, services -- hence create
BindingDOMCodecServices to hold the interface specification.

Missing methods come from BindingNormalizedNodeSerializer, which
can perhaps be re-formulated externally, but including it here
makes this more obvious for BindingNormalizedNodeCodecRegistry.

JIRA: MDSAL-825
Change-Id: I2a37f9c36b25bf4ef43c76bf81a170edfe75b60c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 7.0.0-SNAPSHOT 46/88246/4
Robert Varga [Wed, 4 Mar 2020 12:14:43 +0000 (13:14 +0100)]
Bump odlparent to 7.0.0-SNAPSHOT

This picks up upgraded odlparent, notably for pre-installed SCR.

Change-Id: Icaab7aaab204e0959dc6606d319f947779040688
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not pull immutables.org processor to docs 47/88247/1
Robert Varga [Wed, 4 Mar 2020 12:35:45 +0000 (13:35 +0100)]
Do not pull immutables.org processor to docs

We only need annotations here, pull only those.

Change-Id: I22ef37856bf4aa4bf1d586357a6d4a286f2e7944
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBindingCodecContext implements BindingNormalizedNodeWriterFactory 96/88196/2
Robert Varga [Sun, 1 Mar 2020 13:34:45 +0000 (14:34 +0100)]
BindingCodecContext implements BindingNormalizedNodeWriterFactory

There is slight confusion between BindingCodecContext and
BindingNormalizedNodeCodecRegistry -- the registry implements this
interface and uses internal methods with exact signatures for most
of them. There's a few methods missing, leading to confusion as to
what is what.

Move the two methods and make BindingCodecContext be the Immutable
reference implementation. This also shows that we have a lifecycle
issue, where we can end up reading codecContext twice.

Fix that race by properly encapsulating state before referring to
the (now static) common method. This has the nice side-effect of
removing state capture of 'this', leading to the indirection lambda
being stateless.

JIRA: MDSAL-825
Change-Id: I81e26ad6865c48035b64d1973bae1bb396d584f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.deserializeFunction() 95/88195/1
Robert Varga [Sun, 1 Mar 2020 13:17:58 +0000 (14:17 +0100)]
Remove BindingToNormalizedNodeCodec.deserializeFunction()

This method has been deprecated and has no users, remove it and
reduce clutter.

Change-Id: I195913e7117f98b839696f02bfaa46aa62017385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMove AbstractLazyActionContainerNode to SPI 94/88194/1
Robert Varga [Sun, 1 Mar 2020 12:22:00 +0000 (13:22 +0100)]
Move AbstractLazyActionContainerNode to SPI

While this is an implementation detail, it can be shared between
implementations quite reasonably. Pull it out of
binding-dom-codec-impl.

JIRA: MDSAL-825
Change-Id: I21b79bee5b73583a406d17665dfd9aff1376c3c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate BindingInstanceIdentifierCodec documentation 92/88192/1
Robert Varga [Sun, 1 Mar 2020 12:05:40 +0000 (13:05 +0100)]
Update BindingInstanceIdentifierCodec documentation

Document IllegalArgumentException being thrown and add FIXMEs.

Change-Id: I44e8a8c86b2dd180dc09f23a8a930b23f01b3c75
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReduce BindingNormalizedNodeCodecRegistry proliferation 66/88166/3
Robert Varga [Sat, 29 Feb 2020 15:36:35 +0000 (16:36 +0100)]
Reduce BindingNormalizedNodeCodecRegistry proliferation

Most functional blocks require only a
BindingNormalizedNodeSerializer implementation, not the concrete
implementation. This allows us to disconnect component lifecycle
from BindingCodecContext updates without relying on magic class.

BindingNormalizedNodeCodecRegistry provides a globally updated
holder for these implementations, so that they end up refreshing
their codec based on latest global state.

A follow-up patch will introduce an explicit component, which can
be used in these contexts.

JIRA: MDSAL-525
Change-Id: I6938e23e30656b9dbc960bd6b2ca17c068b67b35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd type parameter documentation 65/88165/1
Robert Varga [Sat, 29 Feb 2020 15:16:49 +0000 (16:16 +0100)]
Add type parameter documentation

'C' here is undocumented, add at least a single line.

Change-Id: I06f4471983c0ea1fcbff49f45f6e263661030db4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExpose BindingInstanceIdentifierCodec from BindingCodecTree 60/88160/4
Robert Varga [Sat, 29 Feb 2020 14:38:05 +0000 (15:38 +0100)]
Expose BindingInstanceIdentifierCodec from BindingCodecTree

This codec is in similar class as IdentityCodec -- make sure it is
available to users.

JIRA: MDSAL-522
JIRA: MDSAL-525
Change-Id: I08371dfbbb264991d6d5840838c0736b35921b8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse ListenerRegistry.clear() 58/88158/3
Robert Varga [Sat, 29 Feb 2020 10:57:05 +0000 (11:57 +0100)]
Use ListenerRegistry.clear()

We do not need to access the registrations, just instruct the registry
to clear them.

Change-Id: I710989a5fe473135d5051ab127e23dc33e4227c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoModernize ListenerRegistry users 48/88148/3
Robert Varga [Sat, 29 Feb 2020 10:16:40 +0000 (11:16 +0100)]
Modernize ListenerRegistry users

ListenerRegistry has been modernized for Java 8 way back
in https://git.opendaylight.org/gerrit/c/yangtools/+/73957 and our
users have not been updated.

Use new API surface introduced in that patch, which actually makes
our code cleaner.

Change-Id: Id7e554ed229638cdc871d5b4152cc6795a662514
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove ScanningSchemaServiceProvider.removeListener() 57/88157/2
Robert Varga [Sat, 29 Feb 2020 10:38:39 +0000 (11:38 +0100)]
Remove ScanningSchemaServiceProvider.removeListener()

This method is not used anywhere, remove it.

Change-Id: I5e6d9c25618344b12085d121101ca56b4e09a647
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not use by-listener unregistration 50/88150/2
Robert Varga [Sat, 29 Feb 2020 10:36:10 +0000 (11:36 +0100)]
Do not use by-listener unregistration

This test is the only one needing access to unregister(L). Remove
it via proper registration interaction.

Change-Id: I5eff48b7123820bb090fdb834054fa78fd767e8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove TracingBroker.name 59/88159/3
Robert Varga [Sat, 29 Feb 2020 11:58:15 +0000 (12:58 +0100)]
Remove TracingBroker.name

This can only ever be 'default', remove it as a property.

Change-Id: I66ca5bb6fdf1072cc3f9550866ff375f59a6c544
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded cast 49/88149/2
Robert Varga [Sat, 29 Feb 2020 10:28:54 +0000 (11:28 +0100)]
Remove unneeded cast

Pointed out by Eclipse, very true.

Change-Id: If9ad77f87889e423e7918badc1b4bff2480079ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoConvert DOMSchemaServiceImpl into a component 47/88147/1
Robert Varga [Sat, 29 Feb 2020 09:43:46 +0000 (10:43 +0100)]
Convert DOMSchemaServiceImpl into a component

This is a trivial service which has no dependencies, promote it
to a component and remove it from blueprint.

JIRA: MDSAL-521
Change-Id: Ia6f0feb0ad1324e4a57cac476167dfbe4e07eade
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExpand test suite to cover uses-augment of actions 35/88135/2
Robert Varga [Fri, 28 Feb 2020 17:39:51 +0000 (18:39 +0100)]
Expand test suite to cover uses-augment of actions

Augment can also target a relative path from uses context, this
expands the testing model to cover that case, too.

The test case flushes out the problem of not handling
action/notification nodes when targeted in this manner, leading
to an obvious hiccup.

JIRA: MDSAL-517
Change-Id: If389440622c31f544917b04e3825fe6e08e08244
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate Mdsal517Test a bit 34/88134/1
Robert Varga [Fri, 28 Feb 2020 17:36:28 +0000 (18:36 +0100)]
Update Mdsal517Test a bit

This just cleans up naming to prevent confusion.

JIRA: MDSAL-617
Change-Id: I75d2e95d2396f63d05cd533f16057f556850763c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoHide BindingCodecContext methods 33/88133/1
Robert Varga [Fri, 28 Feb 2020 17:29:10 +0000 (18:29 +0100)]
Hide BindingCodecContext methods

BindingCodecContext is package-private, so should be its methods.

Change-Id: Ic371d8f63597d0e00f0287903be81cf3e5e49e45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFixup docs references 32/88132/1
Robert Varga [Fri, 28 Feb 2020 16:14:13 +0000 (17:14 +0100)]
Fixup docs references

We do not use blueprint annotations anymore and reference Karaf's
FeaturesService. Adjust docs to reflect that.

Change-Id: I1c5691a81e13ce2cc5aef81d8285c2b59162521d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake OSGiModuleInfoSnapshot generation unsigned 31/88131/1
Robert Varga [Fri, 28 Feb 2020 15:02:58 +0000 (16:02 +0100)]
Make OSGiModuleInfoSnapshot generation unsigned

The intent is to have this an unsigned counter, expose it as such.

JIRA: MDSAL-392
Change-Id: I7d240933ae35288be0ba6a5f8a047587ab179803
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not expose DataObjectSerializerRegistry outside of codec 30/88130/1
Robert Varga [Fri, 28 Feb 2020 14:25:18 +0000 (15:25 +0100)]
Do not expose DataObjectSerializerRegistry outside of codec

BindingNormalizedNodeCodecRegistry should not implement this
interface directly, as it is only used internally.

Change-Id: I02956b6ae399eabb27634a2048c837f05f6ab3ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix minor typos from previous patches 29/88129/1
Robert Varga [Fri, 28 Feb 2020 14:59:15 +0000 (15:59 +0100)]
Fix minor typos from previous patches

Copyrhing header is wrong and we have an extra empty line, clean
that up.

JIRA: MDSAL-392
Change-Id: Id9dcbf88c12a86d6358fc400705b729f394db398
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd KarafFeaturesSupportTest 23/88123/3
Robert Varga [Fri, 28 Feb 2020 13:22:21 +0000 (14:22 +0100)]
Add KarafFeaturesSupportTest

Improve test coverage a bit exercising KarafFeaturesSupport.

JIRA: MDSAL-235
Change-Id: I475e69566bce11c44ec8022b0d6bb1d451f45ff5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake mdsal-dom-schema-osgi Karaf-aware 62/88062/11
Robert Varga [Fri, 28 Feb 2020 11:58:16 +0000 (12:58 +0100)]
Make mdsal-dom-schema-osgi Karaf-aware

Karaf's FeaturesService exposes lifecycle hooks which allow us
to understand in that an installation is in progress, so that
we can suppress updates while we bundles are not fully resolved.

JIRA: MDSAL-235
Change-Id: Ie5c5b862a5d2975cd4cb08ca4bb1976f263578d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRework binding component instantiation 28/88028/18
Robert Varga [Mon, 24 Feb 2020 11:40:56 +0000 (12:40 +0100)]
Rework binding component instantiation

This reshuffles how DOM and Binding interoperate where schema is
concerned. Since Binding requires Classloader information available
at scanning time, we refactor mdsal-dom-schema-service-osgi to
actually perform Binding-aware scanning, so that this information
is available in ModuleInfoSnapshot.

These are published as OSGiModuleInfoSnapshot along with generation
number for easier reference by a new component, OSGiModelRuntime.

DOMSchemaService is realized on top of ServiceRegistry, where it
listens for OSGiModelRuntime and for SchemaContextListeners, driving
an OSGi whiteboard pattern.

This renders mdsal-binding-dom-codec-osgi completely superfluous,
as there is not enough magic going on to justify it.

mdsal-binding-runtime-osgi is also hooked onto OSGiModuleInfoSnapshot,
providing BindingRuntimeContexts as needed and retaining generation
inforation.

JIRA: MDSAL-392
Change-Id: I083caf3abbc3d7e2212d1df14e45d2745096b5f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix augmentation pointing to a grouping action's input 03/88103/10
miroslav.kovac [Thu, 27 Feb 2020 16:51:37 +0000 (17:51 +0100)]
Fix augmentation pointing to a grouping action's input

When augmentation targets an action input which itself is defined
in a grouping, we need to actually lookup the original definition.

Add a type aliasing information, which should be consulted when
making a simple reference to a type -- and use it in
augmentationToGenTypes().

JIRA: MDSAL-517
Change-Id: I1ef383e8777a7c09a979cbdd84f71be3a0f9b021
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSwitch from NPE to ISE 12/88112/1
Robert Varga [Fri, 28 Feb 2020 05:55:29 +0000 (06:55 +0100)]
Switch from NPE to ISE

When we fail to locate a type it constitutes an IllegalState, not
a plain NPE.

Change-Id: I46eaa470342a5e72ad6a92aefed97e458a2ca398
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix action/grouping lookup mechanics 91/88091/7
Robert Varga [Thu, 27 Feb 2020 09:38:33 +0000 (10:38 +0100)]
Fix action/grouping lookup mechanics

When we are following references towards the original definitions
we need to mind the fact that 'uses' statement may point to a grouping
in a different module and hence we need to adjust namespace accordingly.

The same thing applies when we want to find generated types for such
actions' input/output -- here we need to acquire the correct
ModuleContext.

JIRA: MDSAL-516
Change-Id: I1931279beb8e663e6d8558d50c5d7d274e248cf3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBindingReflections.getModuleInfo() returns @NonNull 00/88100/1
Robert Varga [Thu, 27 Feb 2020 15:38:47 +0000 (16:38 +0100)]
BindingReflections.getModuleInfo() returns @NonNull

A null return here would be an API violation, make sure we catch
these in BindingReflections and do not bother users with potential
nulls.

Change-Id: I1670a46d1de4aeac0730538822157ec6ae216011
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse osgi-core constants 74/88074/1
Robert Varga [Wed, 26 Feb 2020 10:38:07 +0000 (11:38 +0100)]
Use osgi-core constants

Just to keep things consistent, use OSGi's Constants class to get
the bundle id for framework (i.e. SYSTEM_BUNDLE_ID).

Change-Id: I18dae474c944f29ebb32203a12db1c96c2e1483f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove commented-out dependency 44/88044/1
Robert Varga [Tue, 25 Feb 2020 13:53:01 +0000 (14:53 +0100)]
Remove commented-out dependency

We do not need a dependency on javax.annotation, remove it.

Change-Id: I5f71224827f2e4c106820e9859988df5d5d12893
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse BindingCodecTreeFactory in yanglib 43/88043/1
Robert Varga [Tue, 25 Feb 2020 13:49:17 +0000 (14:49 +0100)]
Use BindingCodecTreeFactory in yanglib

Since BindingCodecTreeFactory is a proper component now, we can
use in our yanglib implementations, severing explicit dependency
on binding-dom-codec implementation.

JIRA: MDSAL-392
Change-Id: I76b3ce49a2b25ef7e2f9ff357f98c843659ad181
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingToNormalizedNodeCodec.getDefaultNodeFor() 42/88042/1
Robert Varga [Tue, 25 Feb 2020 11:42:50 +0000 (12:42 +0100)]
Remove BindingToNormalizedNodeCodec.getDefaultNodeFor()

This method is used only in controller compat layer, which is going
away anyway. Remove it from our proper.

Change-Id: I61b73754e08c3b36ce6043e19b1cf25d554888d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUntangle BindingCodecContext/BindingNormalizedNodeCodecRegistry 39/88039/1
Robert Varga [Tue, 25 Feb 2020 11:15:01 +0000 (12:15 +0100)]
Untangle BindingCodecContext/BindingNormalizedNodeCodecRegistry

The relationship here should be clear -- a BindingCodecContext is
self-contained and should not be subject to dynamism. The registry
maintains a 'current' codec.

Achieving this is very simple -- just do not perform upcalls to
Registry when we are looking for a streamer, it would just loop
back to BindingCodecContext and we want to be consistent, i.e. do
not try to upcall to a different BindingCodecContext.

JIRA: MDSAL-392
Change-Id: I720738f122ba89974e32c91ed8c7f3a059c21690
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSplit off DefaultBindingCodecTreeFactory 38/88038/2
Robert Varga [Tue, 25 Feb 2020 11:07:34 +0000 (12:07 +0100)]
Split off DefaultBindingCodecTreeFactory

BindingCodecTreeFactory is a simple interface which should be backed
by a simple implementation, rather than munging it with the codec
itself. Split it out of BindingNormalizedNodeCodecRegistry and back
it by the corresponding context.

JIRA: MDSAL-392
Change-Id: I1c35d39ab1b7d3b40a6cc3eacd69d3677306c081
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse only BundleContext in BindingClassLoadingStrategy 27/88027/2
Robert Varga [Mon, 24 Feb 2020 12:23:16 +0000 (13:23 +0100)]
Use only BundleContext in BindingClassLoadingStrategy

OSGi DS allows us to inject BundleContext directly, do not bother
with ComponentContext.

JIRA: MDSAL-392
Change-Id: I679d981d36a2e9e8d7df09bc79f87b4e803b1e8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate assertThat() imports 36/88036/1
Robert Varga [Mon, 24 Feb 2020 13:28:09 +0000 (14:28 +0100)]
Migrate assertThat() imports

Assert.assertThat() has been deprecated, with MatcherAssert.assertThat()
being its replacement.

Change-Id: Ifd0f0243756e78f0788f39867514958109d1ab24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse OSGi DS instead of Activator/blueprint 16/87916/8
Robert Varga [Wed, 19 Feb 2020 17:18:52 +0000 (18:18 +0100)]
Use OSGi DS instead of Activator/blueprint

This saves us some hassle, making the intent more obvious.

JIRA: MDSAL-392
Change-Id: I76a42e206857b1c59d0080c788b157ecf40ba829
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 5.0.0-SNAPSHOT 92/87092/22
Robert Varga [Thu, 23 Jan 2020 07:01:07 +0000 (08:01 +0100)]
Bump yangtools to 5.0.0-SNAPSHOT

This adopts yangtools-5.0.0 at snapshots, so we can shake out
integation issues and base our development on yt-5.0.0 changes.

This forces us to refactor mdsal-binding-dom-codec-osgi, which
is done in this patch. We adopt OSGi DS for tracking services.

JIRA: MDSAL-392
Change-Id: Ib5f7cb9817869ca5fc9053af4620d9536a27dcbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingRuntimeContext{Listener,Service} 17/88017/2
Robert Varga [Sun, 23 Feb 2020 21:26:25 +0000 (22:26 +0100)]
Remove BindingRuntimeContext{Listener,Service}

These are not used anywhere and we'll be publishing the context
to the SR anyway. Remove the code while preparing to have it
refactored with DS.

Change-Id: I7639a7ae64edbbc52789eaa0ce388ce7698ff2d7
JIRA: MDSAL-392
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSplit up BindingRuntimeContext 27/87927/4
Robert Varga [Thu, 20 Feb 2020 10:24:15 +0000 (11:24 +0100)]
Split up BindingRuntimeContext

We need to disconnect API and implementation here, so that we can
publish BindingRuntimeTypes as a service. The split is done within
runtime-api, though the code is still subject to movement.

JIRA: MDSAL-392
Change-Id: Ied64b89018312daef61d9eb9da3e77a0314eca9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove blueprint component 99/87999/1
Robert Varga [Fri, 21 Feb 2020 19:15:14 +0000 (20:15 +0100)]
Remove blueprint component

A thorough review of MD-SAL lifecycle has shown we bend over
backwards to maintain immutable service view for blueprint
containers.

The basic mindset behind blueprint goes directly against MD-SAL's
view of immutable objects. Specifically, hides all dynamic services
behind proxies, isolating us from the Service Registry. Hence we
cannot use the registry to exchange state -- which defeats the point
of having the service registry.

OSGi Declarative Services use static binding (by default) and allow
us to expose component lifecycle, so that it can be correctly
responded to.

We therefore remove any pretense we are endorsing blueprint -- because
we are not. Everybody should decompose their application properly
and use DS for OSGi.

JIRA: MDSAL-413
Change-Id: I6a53e2f9da80a52d4d53371669158e9db7452c1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoruntime-api does not depend on spec-util 15/87915/1
Robert Varga [Wed, 19 Feb 2020 16:50:33 +0000 (17:50 +0100)]
runtime-api does not depend on spec-util

This is a bad dependency -- nothing in the API should depend on
details of the binding spec.

JIRA: MDSAL-392
Change-Id: I0fd60b7f4531656b8b82cdabd3e1c8777ac92eb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingSchemaContextUtils 14/87914/1
Robert Varga [Wed, 19 Feb 2020 16:41:07 +0000 (17:41 +0100)]
Remove BindingSchemaContextUtils

This class is not referenced anywhere, remove it.

JIRA: MDSAL-392
Change-Id: Ic82e0b4cd3f119f24753014c77da5e37f26794e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSpecialize ModuleInfoBackedContext for no fallback 11/87911/2
Robert Varga [Wed, 19 Feb 2020 15:08:34 +0000 (16:08 +0100)]
Specialize ModuleInfoBackedContext for no fallback

We expect BindingRuntimeContext to accurately access classes in
most scenarios. Make sure we ditch TCCL in those scenarios.

JIRA: MDSAL-392
Change-Id: I4a712a65732b98678f555e31dc9400a588a70d1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSplit out mdsal-binding-runtime-{api,spi} 09/87909/5
Robert Varga [Wed, 19 Feb 2020 11:29:37 +0000 (12:29 +0100)]
Split out mdsal-binding-runtime-{api,spi}

There are a number of runtime details being carried in generator-api
which are pure runtime details.

Split these out, so that we can properly separate the concerns
and cleanup lifecycle. That in turn allows us to create more focused
users and eliminate code duplication.

JIRA: MDSAL-392
Change-Id: I7fe59a3b5f43516d2fcee7344efa97731ebb7215
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove version declaration 08/87908/1
Robert Varga [Wed, 19 Feb 2020 11:44:54 +0000 (12:44 +0100)]
Remove version declaration

We are inheriting project version, let's not re-declare it.

Change-Id: Ibb00161b6c26a9334efbbc6ffdd5a57af9611db0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSeparate out mdsal-binding-dom-codec-spi 75/87875/2
Robert Varga [Tue, 18 Feb 2020 21:08:48 +0000 (22:08 +0100)]
Separate out mdsal-binding-dom-codec-spi

We have a couple of classes which are appropriate in an SPI package,
make sure they are not part of reference implementaiton.

JIRA: MDSAL-392
Change-Id: I2bf6cac4cc5a128bb954d31b9985238271c1a73c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove AugmentationReader 77/87877/2
Robert Varga [Tue, 18 Feb 2020 21:35:56 +0000 (22:35 +0100)]
Remove AugmentationReader

This interface is not useful now that we have AugmentationHolder
in yang-binding. Remove it and any references to it.

JIRA: MDSAL-392
Change-Id: I0c3eeead7cb43eb46b3938b33cb49e94a831dc1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate AugmentationReader for removal 76/87876/2
Robert Varga [Tue, 18 Feb 2020 21:23:52 +0000 (22:23 +0100)]
Deprecate AugmentationReader for removal

AugmentationHolder provides the equivalent functionality in-line
in the DataObject itself. Deprecate AugmentationHolder for removal.

JIRA: MDSAL-392
Change-Id: I51044365a38e26f57792bb2036a2775f3b92d711
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingDataAware 74/87874/1
Robert Varga [Tue, 18 Feb 2020 21:01:10 +0000 (22:01 +0100)]
Remove BindingDataAware

We have an equivalent interface in BindingLazyContainerNode,
hence there is no point in keeping an adapter-specific interface
around.

JIRA: MDSAL-392
Change-Id: I1beb3dc8f709bbce80aee5a9d64ef11f75926a41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRehost BaseYangTypes 73/87873/3
Robert Varga [Tue, 18 Feb 2020 19:55:42 +0000 (20:55 +0100)]
Rehost BaseYangTypes

These types are closely related to Types and as such are part of
the same API group as binding.model.util. Relocating them allows
us to lower dependencies on mdsal-binding-generator-impl.

JIRA: MDSAL-392
Change-Id: I3ba9097c3194c42d3c8f3f1b3fac521934e7d1cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoYangSchemaUtils is not used anywhere, remove it 72/87872/1
Robert Varga [Tue, 18 Feb 2020 19:49:49 +0000 (20:49 +0100)]
YangSchemaUtils is not used anywhere, remove it

This is the last class in mdsal.binding.generator.util as known
to mdsal-binding-generator-impl, freeing up the package for
relocation.

JIRA: MDSAL-392
Change-Id: I9e6f6839f0950ba3600ef3e49139757f8e7e44d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>