mdsal.git
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>
4 years agoDo not depend on generator impl in binding-dom-codec-api 68/87868/3
Robert Varga [Tue, 18 Feb 2020 16:54:24 +0000 (17:54 +0100)]
Do not depend on generator impl in binding-dom-codec-api

The API itself does not depend on a particular generator
implementation, make sure that is reflected in pom.xml.

JIRA: YANGTOOLS-392
Change-Id: Ia35d16df7bc43ac43560a98d387518af2d9fe040
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPromote BindingRuntimeContext to binding-generator-api 28/87828/25
Robert Varga [Mon, 17 Feb 2020 21:50:45 +0000 (22:50 +0100)]
Promote BindingRuntimeContext to binding-generator-api

BindingRuntimeContext only requires BindingRuntimeTypes, make
them required in factory method and have users take care of
implementation binding. This allows us to promote it to an API
utility, reducing cross-implementation clutter.

This refactor also shows that BindingCodecTreeFactory is mixing
apples and oranges, forcing users to deal with things that should
readily come from BindingRuntimeContext -- we refactor that support
code so that it is hosted in ModuleInfoBackedContext instead.

JIRA: MDSAL-392
Change-Id: I6381c889c7a1911f9e524aadf1c06c61e99fd75f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake sure docs depend on codec-api 67/87867/2
Robert Varga [Tue, 18 Feb 2020 16:50:13 +0000 (17:50 +0100)]
Make sure docs depend on codec-api

We want to keep it properly documented, make sure to include
mdsal-binding-dom-codec-api.

JIRA: MDSAL-392
Change-Id: Ic0889bb8c73ebc6019dbbfdb5f0029a4754615c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMove mdsal-binding-dom-codec tests 60/87860/16
Robert Varga [Tue, 18 Feb 2020 09:00:52 +0000 (10:00 +0100)]
Move mdsal-binding-dom-codec tests

Keeping the tests in a separate package is not useful, make sure
we match the implementation package.

JIRA: MDSAL-392
Change-Id: Id5f8c1af72203a64f03c681c52ca791f282b678d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPromote codec exceptions to binding.codec.api 54/87854/20
Robert Varga [Mon, 17 Feb 2020 23:53:20 +0000 (00:53 +0100)]
Promote codec exceptions to binding.codec.api

This exception should be part of documented API contract, promote
it.

JIRA: MDSAL-392
Change-Id: Ia0985e0399468ee3f57a4a50f65b38085245edeb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPromote ReferencedTypeImpl to model.api.DefaultType 53/87853/13
Robert Varga [Mon, 17 Feb 2020 23:00:43 +0000 (00:00 +0100)]
Promote ReferencedTypeImpl to model.api.DefaultType

This is simple bare type, taking advantage of only AbstractType,
hence we cen provide it in API and allows users to share.

JIRA: MDSAL-392
Change-Id: I67a4b7d16ba9a80637d3d9454e76fd01ef3fe428
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRefactor GeneratedClassLoadingStrategy 59/87859/11
Robert Varga [Tue, 18 Feb 2020 08:58:07 +0000 (09:58 +0100)]
Refactor GeneratedClassLoadingStrategy

This class holds two implementations, each of which is a singleton.
Make sure we lazy-load implementation classes so that the CHA can
be more effective.

JIRA: MDSAL-392
Change-Id: Ia31f63d877ec1025e1a06bf8676d918857e6fd1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove BindingRuntimeContext.getEnumMapping() 32/87832/10
Robert Varga [Mon, 17 Feb 2020 22:42:21 +0000 (23:42 +0100)]
Remove BindingRuntimeContext.getEnumMapping()

These methods are inexact and unused, remove them to prevent any
confusion as to what goes on w.r.t. enums: their class-to-YANG
mapping is captured in the classes themselves, so go fetch it as
appropriate: either enumerate the class, or if you have an instance,
just call getName().

JIRA: MDSAL-392
Change-Id: I0034004e92ae4444efab2401dc16b859047d677a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate BindingRuntimeContext.getEnumMapping() 31/87831/9
Robert Varga [Mon, 17 Feb 2020 22:36:15 +0000 (23:36 +0100)]
Deprecate BindingRuntimeContext.getEnumMapping()

Generated enumerations capture their YANG-declared name and expose
it as their method.

JIRA: MDSAL-392
Change-Id: Iac16b6b3599565f059332ed079c432c0603ac500
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPromote AbstractBaseType to binding.model.api 30/87830/9
Robert Varga [Mon, 17 Feb 2020 22:17:52 +0000 (23:17 +0100)]
Promote AbstractBaseType to binding.model.api

This base class forms an obvious connection between two API concepts,
it should live in the API package as well.

JIRA: MDSAL-392
Change-Id: I5d1209563d2b18f818e3b1c3853b7d7c88fea7a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMove BindingSchemaContextUtils.findInstantiatedCase() 29/87829/9
Robert Varga [Mon, 17 Feb 2020 21:58:39 +0000 (22:58 +0100)]
Move BindingSchemaContextUtils.findInstantiatedCase()

The only user is BindingRuntimeContext, move the method there
and sever its dependence in binding.generator.impl.

JIRA: MDSAL-392
Change-Id: I4cc349f5d99a4f9ee0c35b01c553e1ddda263e6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake Binding(Runtime)Generator a proper service 65/87865/3
Robert Varga [Tue, 18 Feb 2020 11:16:43 +0000 (12:16 +0100)]
Make Binding(Runtime)Generator a proper service

We want to expose proper services which implement generator APIs,
not force users to instantiate an implementation by themselves.

This allows us to hide BindingGeneratorImpl and refactor it.

JIRA: MDSAL-392
Change-Id: Id41f8562e87165e8509b9c5076804244d0b342b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse default createParser() only 61/87861/1
Robert Varga [Tue, 18 Feb 2020 09:42:02 +0000 (10:42 +0100)]
Use default createParser() only

Blueprint should be fixed up completely now, use default method
to construct parser.

Change-Id: Ibd452bf36ff22a767d48711a2ba1fe57b217005e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBindingRuntimeTypes should expose SchemaContext 27/87827/1
Robert Varga [Mon, 17 Feb 2020 21:28:38 +0000 (22:28 +0100)]
BindingRuntimeTypes should expose SchemaContext

This is an invariant which is useful to users, make sure we expose
it so that they do not have to track it separately.

Change-Id: If4ddb0915eb433a9f8f857bde473a5de798192ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSplit ound mdsal-binding-dom-codec-api 26/87826/1
Robert Varga [Mon, 17 Feb 2020 21:04:13 +0000 (22:04 +0100)]
Split ound mdsal-binding-dom-codec-api

The codec has a well-defined API surface, make sure we publish it
as a separate bundle.

Change-Id: Iea7511d7d076320b54dcb719a49767085765a408
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove DispatchSerializers 22/87822/1
Robert Varga [Mon, 17 Feb 2020 17:14:25 +0000 (18:14 +0100)]
Remove DispatchSerializers

These classes are not used anywhere, remove them.

Change-Id: I701c276f6036c7a7a50588d6a18de46831daecfd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate DispatchSerializers for removal 21/87821/1
Robert Varga [Mon, 17 Feb 2020 17:13:40 +0000 (18:13 +0100)]
Deprecate DispatchSerializers for removal

These classes are not used anywhere, deprecate them for removal.

Change-Id: I4538b1c794cd21fd0f21921c0838db620af5eff2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse SchemaNodeIdentifier instead of a SchemaPath 19/87819/1
Robert Varga [Mon, 17 Feb 2020 16:57:07 +0000 (17:57 +0100)]
Use SchemaNodeIdentifier instead of a SchemaPath

This method is not implemented but is going to be needed for RPC
dispatch. Make sure to update it to take SchemaNodeIdentifier,
which is well-defined in terms of lookup.

JIRA: MDSAL-86
Change-Id: I7d188c6912a29cff94f9a4e0b8b0b609bc7c6cae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix checkstyle a bit 18/87818/1
Robert Varga [Mon, 17 Feb 2020 16:55:45 +0000 (17:55 +0100)]
Fix checkstyle a bit

We have a misaligned method here, fix that up.

Change-Id: Iff4ad3e9a5c2da1e64f73f8b3dfaf78d77b1db85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not use org.junit.rules.ExpectedException redux 11/87811/1
Robert Varga [Mon, 17 Feb 2020 13:01:11 +0000 (14:01 +0100)]
Do not use org.junit.rules.ExpectedException redux

We have assertThrows() which is much more useful, refactor the test
to be more explicit and eliminate use of deprecated elements.

Change-Id: I27d567a2d146451143505756cb47c02a027e779e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove duplicate version declaration 10/87810/1
Robert Varga [Mon, 17 Feb 2020 12:55:21 +0000 (13:55 +0100)]
Remove duplicate version declaration

mdsal-binding-generator-impl matches our project version, hence
it can inherit version from parent.

Change-Id: I1bf665166b6883a47360a20066f6c54cd291b690
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not use org.junit.rules.ExpectedException 64/87664/1
Robert Varga [Thu, 13 Feb 2020 09:50:34 +0000 (10:50 +0100)]
Do not use org.junit.rules.ExpectedException

We have assertThrows() which is much more useful, refactor the test
to be more explicit and eliminate use of deprecated elements.

Change-Id: I8613afbd3028d602a17f9ea7024e8abde6b8cf48
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoEnable spotbugs in mdsal-binding-java-api-generator 16/76916/22
Robert Varga [Thu, 11 Oct 2018 23:22:07 +0000 (01:22 +0200)]
Enable spotbugs in mdsal-binding-java-api-generator

This fixes up the issues reported and flips enforcement to on.

Change-Id: I205b07535f42f6a3f3c5ae4e14167de4982e9338
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-6.0.5/yangtools-4.0.7 44/87544/1
Robert Varga [Mon, 10 Feb 2020 14:18:45 +0000 (15:18 +0100)]
Bump to odlparent-6.0.5/yangtools-4.0.7

This picks up latest updates from both yangtools and odlparent.

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