mdsal.git
2 years agoBump versions to 8.0.1-SNAPSHOT 74/96674/1
Robert Varga [Fri, 25 Jun 2021 14:50:59 +0000 (16:50 +0200)]
Bump versions to 8.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I42188134fea033a8af370b12784035554a975c6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoLock down mdsal-binding-generator 73/96673/2
Robert Varga [Fri, 25 Jun 2021 14:46:22 +0000 (16:46 +0200)]
Lock down mdsal-binding-generator

Expose only the bare minimum API surface from generator, requiring
downstreams to use proper injection.

Change-Id: I7552c90c4d9524b783a627fe883ed31b69ba9274
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTest self-referencing leafrefs 71/96671/1
Robert Varga [Fri, 25 Jun 2021 13:22:36 +0000 (15:22 +0200)]
Test self-referencing leafrefs

Our refactor has lost the ability to detect self-referencing leafrefs.
Add that capability back and activate the relevant unit test.

Change-Id: Idcc09c1a41560588cb8db3974caa8cc4047aa7ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor mdsal-binding-generator artifacts 67/96667/2
Robert Varga [Fri, 25 Jun 2021 09:53:52 +0000 (11:53 +0200)]
Refactor mdsal-binding-generator artifacts

Generator artifacts have a layout which belies their actual purpose,
as exposed after mdsal-binding-generator-impl refactor.

mdsal-binding-generator-impl is renamed to mdsal-binding-generator,
absorbing BindingGenerator from the API artifact.

mdsal-binding-generator-{api,util} are renamed to
mdsal-binding-model-{api,ri}, with generator-specific utilities being
moved to mdsal-binding-generator.

This change makes it easier to integrate
mdsal-binding-java-api-generator, as we can directly depend on
mdsal-binding-generator.

Change-Id: Idb8591771837175128e05febb4614d624dca03fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide binding.model.api.DefaultType 66/96666/2
Robert Varga [Fri, 25 Jun 2021 08:55:27 +0000 (10:55 +0200)]
Hide binding.model.api.DefaultType

Expose DefaultType only from Type.of() static factory methods and adjust
its implementation to remove open-coded toString() methods.

Change-Id: Iaa3c0a7c117f12235a18e75512d9974403ab7f24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate org.opendaylight.mdsal.binding.generator.spi 65/96665/1
Robert Varga [Thu, 24 Jun 2021 14:49:10 +0000 (16:49 +0200)]
Eliminate org.opendaylight.mdsal.binding.generator.spi

This package is not really used anywhere, remove it to lower confusion.

Change-Id: Iecc4917325749ad12553aa646c5ec894994f54b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove BaseYangTypesProvider 61/96661/1
Robert Varga [Thu, 24 Jun 2021 12:52:43 +0000 (14:52 +0200)]
Move BaseYangTypesProvider

BaseYangTypesProvider is not really used anywhere, centralize it in
mdsal-binding-generator-impl prior to its removal.

Change-Id: I7c92885446f2ce25869f364f8ec922c3d2f43c88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup BindingReflections.getModuleInfo() 60/96660/1
Robert Varga [Thu, 24 Jun 2021 12:35:13 +0000 (14:35 +0200)]
Cleanup BindingReflections.getModuleInfo()

Simplify callers by throwing only IllegalStateExceptions, i.e.
properly catching our internal errors.

Change-Id: I900f3f1ed1236e54a66ed17c093df6a1c855be50
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDOMDataTreeChangeListener.onInitialData() is mandatory 57/96657/4
Robert Varga [Thu, 24 Jun 2021 11:58:11 +0000 (13:58 +0200)]
DOMDataTreeChangeListener.onInitialData() is mandatory

Hiding this method is ugly, make sure users are aware of it.

JIRA: MDSAL-674
Change-Id: I9e733b46dea6251b43b3aa97d06e056fd7e8af16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide mdsal.binding.yang.types 59/96659/1
Robert Varga [Thu, 24 Jun 2021 12:12:03 +0000 (14:12 +0200)]
Hide mdsal.binding.yang.types

Code in these classes is legacy and should be cleaned up. Stop
exporting it as a first step.

Change-Id: I431b8d9ce4b6782a15b3efd85a1b31be73d161c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide NodeWrappedType 58/96658/1
Robert Varga [Thu, 24 Jun 2021 12:02:18 +0000 (14:02 +0200)]
Hide NodeWrappedType

This class is an internal implementation detail, hide it.

Change-Id: Ib76f76332c0a3d0cb8abb4a63e7ab824a8bfad82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDepend on rfc8346 in docs 56/96656/2
Robert Varga [Thu, 24 Jun 2021 11:57:34 +0000 (13:57 +0200)]
Depend on rfc8346 in docs

Force bundle to be created before docs, so that features are tested
last.

Change-Id: If1e992dff1b12c473825b9ed07970cfd74448a55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump byte-buddy to 1.11.5 07/96407/3
Robert Varga [Wed, 2 Jun 2021 08:20:14 +0000 (10:20 +0200)]
Bump byte-buddy to 1.11.5

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.11.1
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.11.2
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.11.3
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.11.4
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.11.5

Also remove ByteBuddyUtils.loadThis(), as it is no longer needed.

Change-Id: I1e32f6d552ce5f1bca1ad71158cb03e1fbfda261
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not hash augmentation keys 52/96652/2
Robert Varga [Thu, 24 Jun 2021 09:20:30 +0000 (11:20 +0200)]
Do not hash augmentation keys

We do not want to take into account augmentation identity for
hashCode(), as that prevents equivalent augmentation lookups.

This is not a complete solution, as equality still indicates non-equal,
but that's better than what we have.

JIRA: MDSAL-667
Change-Id: I1f4d7122534c175aff6e0d7da27c877d7493f92f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove superfluous plugin dance 55/96655/3
Robert Varga [Thu, 24 Jun 2021 10:12:15 +0000 (12:12 +0200)]
Remove superfluous plugin dance

FileGenerator-driven directories are maintained by yang-maven-plugin
itself, there is no need to twiddle with directories here.

Change-Id: I819c622c1816e9f4d4663a68ab20f7187c0ee346
JIRA: MDSAL-232
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove useless no-op constructRequire() 38/96638/1
Robert Varga [Wed, 23 Jun 2021 19:47:35 +0000 (21:47 +0200)]
Remove useless no-op constructRequire()

We want to have as few implementations as possible, the default
implementation already is a no-op, so reflect that.

JIRA: MDSAL-602
Change-Id: I452f8f5dddc48ef14605768722f83f7c0743ddfd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup mdsal-binding-dom-codec-osgi dependency 37/96637/2
Robert Varga [Wed, 23 Jun 2021 19:18:12 +0000 (21:18 +0200)]
Cleanup mdsal-binding-dom-codec-osgi dependency

We are relying on mdsal-binding-dom-codec-spi only, hence we can lower
the dependency.

JIRA: MDSAL-672
Change-Id: If6950aabd833703062c77ea624b621a64aa64c82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup mdsal-binding-dom-adapter dependencies 36/96636/1
Robert Varga [Wed, 23 Jun 2021 19:13:04 +0000 (21:13 +0200)]
Cleanup mdsal-binding-dom-adapter dependencies

yang-model-util's inference faculties are only used by
mdsal-binding-dom-codec, hence we should not be explicitly including
them.

JIRA: MDSAL-672
Change-Id: Ibe16a93639349645c7bb6c65889c2b803f606383
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup mdsal-binding-dom-codec dependencies 35/96635/1
Robert Varga [Wed, 23 Jun 2021 19:09:46 +0000 (21:09 +0200)]
Cleanup mdsal-binding-dom-codec dependencies

We do not need to bring in mdsal-binding-generator-util, as that is only
used by mdsal-binding-generator-impl.

JIRA: MDSAL-672
Change-Id: I5ef15bb2b4d0c6a12606b6b2995ad30f2820c942
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup mdsal-dom-schema-osgi dependencies 34/96634/1
Robert Varga [Wed, 23 Jun 2021 19:05:37 +0000 (21:05 +0200)]
Cleanup mdsal-dom-schema-osgi dependencies

We do not need to pull in anything from yangtools, as we are completely
serviced by mdsal-binding-runtime-spi.

JIRA: MDSAL-672
Change-Id: Ia006161a63fb1f7b42eb356e4191237c336aee4e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix mdsal-binding-api dependencies 32/96632/3
Robert Varga [Wed, 23 Jun 2021 18:30:49 +0000 (20:30 +0200)]
Fix mdsal-binding-api dependencies

We should not be pulling in yang-data-api, as that exposes users to a
ton of DOM-specific interfaces, causing confusion.

JIRA: MDSAL-672
Change-Id: Id55f2cdd446b6d77202f79d0b05c7005166561a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove mdsal-common-util 33/96633/1
Robert Varga [Wed, 23 Jun 2021 18:56:38 +0000 (20:56 +0200)]
Remove mdsal-common-util

This artifact is completely empty, remove it to prevent confusion.

JIRA: MDSAL-672
Change-Id: Iadc8a7a87f7abe120c5651058cf49d2e70e94021
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd non-null getters for leaf objects 32/93932/17
Konstantin.Nosach [Wed, 25 Nov 2020 12:07:32 +0000 (14:07 +0200)]
Add non-null getters for leaf objects

DTO getters inherently return nullable objects. We have a nonnullFoo()
concept, which is very powerful with Lists/Maps, where we return an
empty collection. This turns out to be very useful for end users, who
can worry about other logic problems instead.

This patch introduces a similar construct for non-complex getters, so
that

  container foo {
    leaf bar {
      type string;
    }
  }

ends up generating a default method:

  interface Foo {
    default @NonNull String requireBar() {
        // ..
    }
  }

which nicely throws an exception distinct from NPE and retaining call
site.

JIRA: MDSAL-602
Change-Id: Ia66ee61f51fb9b6eb11aea3736e5246aadad6a3e
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove unified documentation generator 28/96628/3
Robert Varga [Wed, 23 Jun 2021 12:25:42 +0000 (14:25 +0200)]
Move unified documentation generator

maven-sal-api-gen-plugin is not really useful anymore, move its
sole remaining generator into dom's unified-html-generator. It
also is deprecated, since it's never been actually used.

JIRA: MDSAL-232
Change-Id: Id6ed104ca6171d9c3d3b1d9be260211bc6e089a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPromote replicate to a full feature 29/96629/2
Robert Varga [Wed, 23 Jun 2021 12:45:44 +0000 (14:45 +0200)]
Promote replicate to a full feature

There are a few issues in packaging, fix them up and drop
the -exp- infix from feature names.

JIRA: MDSAL-671
Change-Id: I4f3fc6fbba71da77a8c1b8c0ee149955cb43080f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove WADL generator 27/96627/1
Robert Varga [Wed, 23 Jun 2021 12:15:09 +0000 (14:15 +0200)]
Remove WADL generator

WADL generator has been downstreamed to NETCONF project as
restconf-wadl-generator. Remove it from MD-SAL.

JIRA: MDSAL-232
Change-Id: I7179fd305b0a5135e2251519c994a25bd479b02a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert DocumentationGenerator to FileGenerator 04/96604/2
Robert Varga [Wed, 23 Jun 2021 11:34:22 +0000 (13:34 +0200)]
Convert DocumentationGenerator to FileGenerator

Migrate to using FileGenerator, which is a more modern replacement
for BasicCodeGenerator.

JIRA: MDSAL-232
Change-Id: I591b1dbb21bda24be76305abad2999dd9fce1d99
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert WADL generator to FileGenerator API 03/96603/1
Robert Varga [Wed, 23 Jun 2021 10:27:44 +0000 (12:27 +0200)]
Convert WADL generator to FileGenerator API

FileGeneratorFactory acts as a proper bootstrap for generators,
and it really pushes us towards a proper generator/template split,
slightly reducing the use of Xtend for non-templating purposes.

JIRA: MDSAL-232
Change-Id: I5414bd154b02a87eb0cfccf776de54f38ca5fab9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRename additionalConfiguration 02/96602/1
Robert Varga [Wed, 23 Jun 2021 09:51:44 +0000 (11:51 +0200)]
Rename additionalConfiguration

Since we are using FileGeneratorFactory, the configuration map is our
only source of configuration, rename arguments to match that.

JIRA: MDSAL-232
Change-Id: I5da112835906e070ae9016fd62f72459b9e6f4de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoInline WADL generator methods 01/96601/1
Robert Varga [Wed, 23 Jun 2021 09:40:05 +0000 (11:40 +0200)]
Inline WADL generator methods

We have quite a few methods used only once, make sure we make them
more templatey.

JIRA: MDSAL-232
Change-Id: I6ba1cce80f09c9d7e102922d461fc976f5fd8271
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove 'maven' packages 00/96600/1
Robert Varga [Wed, 23 Jun 2021 09:32:19 +0000 (11:32 +0200)]
Remove 'maven' packages

We have four packages here, hosting 6 classes, make sure we squash
them to two packages, each holding 3 classes.

JIRA: MDSAL-232
Change-Id: I9665ca6f7d5ef229ffe3be4f0ff9193ceca605d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse FileGenerator for java-api-generator 80/77680/17
Robert Varga [Sun, 11 Nov 2018 20:19:16 +0000 (21:19 +0100)]
Use FileGenerator for java-api-generator

Do not use deprecated BasicCodeGenerator interface to interact with
yang-maven-plugin. Using FileGenerator allows us to decouple lifecycle
and eliminate a bit of duplication.

JIRA: MDSAL-232
Change-Id: I04931ff6f70f548de5a49042201283c7e503f92e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMake JavaFileTemplate.importedName() identify all name collisions. 98/94298/12
Iaroslav [Wed, 23 Dec 2020 10:23:54 +0000 (12:23 +0200)]
Make JavaFileTemplate.importedName() identify all name collisions.

Refactor xtend files to use importedName instead of fillyQualifiedName
to prevent full package path in generated files.

JIRA: MDSAL-649
Change-Id: I569f46bb095512274b28c0decd5d2d2eefe7f7dd
Signed-off-by: Iaroslav Kholiavko <iaroslav.kholiavko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix UnionTypeCodec.loader() expectations 81/96581/1
Robert Varga [Mon, 21 Jun 2021 10:15:11 +0000 (12:15 +0200)]
Fix UnionTypeCodec.loader() expectations

A union type can be derived via a typedef, in which case we will
not see a top-level RuntimeGeneratedUnion. Update the loader to walk
the inheritence hierarchy to locate union types.

Change-Id: I664c21c0400140c1f02a7c48f455608751ddd072
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump to yangtools-7.0.3 67/96567/1
Robert Varga [Sat, 19 Jun 2021 09:27:32 +0000 (11:27 +0200)]
Bump to yangtools-7.0.3

Pick up fixes from upstream.

Change-Id: Iad48c8176c3c91e79552266e2943c80e09e0a3bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd Member.equalRoot() 60/96560/1
Robert Varga [Fri, 18 Jun 2021 12:51:44 +0000 (14:51 +0200)]
Add Member.equalRoot()

When we are considering two distinct augmentations to, say, RPC input,
we need to consider more than just the local name, as otherwise we end
up shifting more than needed.

Change-Id: If717d54dfc3f6e5caa8d7e0955c752439ffac141
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRestore augmentation sorting semantics 54/96554/2
Robert Varga [Wed, 16 Jun 2021 15:53:06 +0000 (17:53 +0200)]
Restore augmentation sorting semantics

Augmentation sort we are performing to order augmentations has another,
undocumented, impact. It provides stability of generated code towards
reformats of the YANG source, so that changing the order of augment
statements (by itself) does not change the naming of generated fields.

The simple comparator failed to take this effect, leading to an
incompatible change of assignments which is extremely hard to untangle.
Fix this by restoring previous sorting behaviour.

Change-Id: I7164e6e06d47fcded3261752a8a0f587afc70274
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTreat wildcards as objects 46/96546/7
Robert Varga [Wed, 16 Jun 2021 09:11:59 +0000 (11:11 +0200)]
Treat wildcards as objects

The effort to properly specialize leafref values has created
opportunities for WildcardType to be reported as the return. Handle
these as Objects for now, but also issue FIXMEs for a follow-up proper
fix.

JIRA: MDSAL-668
JIRA: MDSAL-670
Change-Id: I4e8a6ff3aa23a3e94c1ec4a52726e9caf9e9c4ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate CodecDataObjectGenerator FIXME 45/96545/1
Robert Varga [Wed, 16 Jun 2021 09:18:31 +0000 (11:18 +0200)]
Update CodecDataObjectGenerator FIXME

We have an issue tracking the activation of Fixed generator, make sure
the FIXME is referencing it.

JIRA: MDSAL-443
Change-Id: Id5af6daa7ee777592b214085dbe61fecc4ac8305
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAssert schema tree class claim 06/96506/1
Robert Varga [Wed, 9 Jun 2021 23:33:47 +0000 (01:33 +0200)]
Assert schema tree class claim

'action' statement is displacing 'grouping' as per its claim on
schema tree namespace. 'rpc' historically does something radically
different, but we really want to go the 'action' route.

This change in behavior is already happening as part of CollisionDomain
mode of operation, here we add an explicit test for that scenario.

JIRA: MDSAL-666
Change-Id: Ie46b1234f5b01c66a8e3657ce984ec59d3a2475e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix union losing patterns 05/96505/2
Robert Varga [Wed, 9 Jun 2021 20:34:46 +0000 (22:34 +0200)]
Fix union losing patterns

Union typedefs need to generate type enforcement patterns for their
constituent types. Make sure that happens.

Change-Id: Id4512f17e1ca6b2f9a5157d3b44dd3d03d5dfcec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove ModuleGenerator.addQNameConstant() type safety 04/96504/1
Robert Varga [Wed, 9 Jun 2021 19:53:59 +0000 (21:53 +0200)]
Improve ModuleGenerator.addQNameConstant() type safety

Take an AbstractQName instead of a String, making further type safety
guarantees and reducing bytecode a bit.

Change-Id: I58dc0d3b9b2d28ebd55df4654da3efb6dae02da9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix augmentation numbering 03/96503/1
Robert Varga [Wed, 9 Jun 2021 19:49:05 +0000 (21:49 +0200)]
Fix augmentation numbering

We should be considering only the localName part of the AbstractQName,
otherwse differing QNames will not compare as equal -- wrecking the
algorithm.

Change-Id: I9dcd457121b619bb8ace3f15fd01e67295436c9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd generator references fo CollisionDomain 02/96502/1
Robert Varga [Wed, 9 Jun 2021 18:06:00 +0000 (20:06 +0200)]
Add generator references fo CollisionDomain

Having a generator reference is handy for diagnosing conflicts.

Change-Id: If5ff5b7c5862594cb07b7a1cdcece64f2ad2da6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd yang-ext:mount extension 98/96498/1
Robert Varga [Wed, 9 Jun 2021 08:54:38 +0000 (10:54 +0200)]
Add yang-ext:mount extension

We are gratiously refering to yang-ext:mount all over the place, without
the construct being actually defined. Add a proper definition so that
our data/schema processing can be correctly hooked into it.

JIRA: MDSAL-665
Change-Id: Ib6076060d693955be236d548e07fca1c88016b5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump yangtools to 7.0.2 49/96449/1
Robert Varga [Tue, 8 Jun 2021 07:13:20 +0000 (09:13 +0200)]
Bump yangtools to 7.0.2

Adopt released version instead of temporary snapshot.

Change-Id: I00fbc1099046cc3ecd229342169cc08e2a3ca50f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not use a static String reference in length enforcer 42/96342/1
Robert Varga [Fri, 21 May 2021 11:13:11 +0000 (13:13 +0200)]
Do not use a static String reference in length enforcer

LengthGenerator is making the mistake of having a static reference
to java.lang.String without FQCN. This breaks down if String is
overridden by definition context.

Fix this by using importedName(Type) to emit a properly-scoped
reference.

JIRA: MDSAL-664
Change-Id: I16b12865448bde807f0afd0d35e3145f8b6359c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReenable mdsal533 test 41/96341/1
Robert Varga [Mon, 24 May 2021 19:58:34 +0000 (21:58 +0200)]
Reenable mdsal533 test

For some reason we lost @Test here, make sure we reinstate it.

Change-Id: I879179761ff33e85dbb4579ed4643db6726b3efe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstreams 37/96337/1
Robert Varga [Mon, 24 May 2021 16:53:38 +0000 (18:53 +0200)]
Bump upstreams

Adop odlparent-9.0.2 and yangtools-7.0.2-SNAPSHOT to pick up their
bugfixes.

Change-Id: I2394c3bfcd300caeb16530db0783e544476d516c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix submodule resource resolution 86/96286/5
Ivan Hrasko [Thu, 20 May 2021 10:25:37 +0000 (12:25 +0200)]
Fix submodule resource resolution

Initial integration with yangtools-6.0.0 has changed the resource
resolution logic. Unfortunately the lambda instroduced in
Ifa9780fbdfb411b4613df0ee18407d85e81bd517 incorrectly passed 'module'
and not the requested entity to the resolver -- leading to all
submodules to open their module's resource instead.

Fix the lambda and also add proper asserts to check resources are being
open correctly.

JIRA: MDSAL-663
Change-Id: I293f20c15426490a97bb70b4303f0c7b23114c82
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix CollisionDomain chaining 09/96109/1
Robert Varga [Mon, 10 May 2021 19:21:37 +0000 (21:21 +0200)]
Fix CollisionDomain chaining

A simple augmentation of RPC input fails becase we end up having a
secondary (augment) being attached to another secondary (input), which
triggers a verify error.

Generalize the concept of having secondaries, so that we can have a
secondary -> secondary transition.

Change-Id: I2c1ca5b5473d3db56516385f4957ff11dcf512a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate yangtools to 7.0.1 91/96091/1
Robert Varga [Sun, 9 May 2021 05:12:38 +0000 (07:12 +0200)]
Update yangtools to 7.0.1

We have an upstream release, use it instead of snapshots.

Change-Id: I78f5726fb0754dcedc18cdebc680b12d948e82d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 9.0.1 84/96084/1
Robert Varga [Sat, 8 May 2021 19:48:01 +0000 (21:48 +0200)]
Bump odlparent to 9.0.1

Adopt bugfixes from upstream.

Change-Id: I781263f3803a00ade5b8d49e17c0ffa0155ad86e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRestore getter reference discriptions 78/96078/1
Robert Varga [Sat, 8 May 2021 16:58:24 +0000 (18:58 +0200)]
Restore getter reference discriptions

Previous update has lost propagation type method, make sure we restore
this functionality.

Change-Id: Iedb48d502525024adb9cc5b163384507255cbe47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump to odlparent-9.0.0/yangtools-7.0.1-SNAPSHOT 97/94297/90
Robert Varga [Tue, 22 Dec 2020 21:01:36 +0000 (22:01 +0100)]
Bump to odlparent-9.0.0/yangtools-7.0.1-SNAPSHOT

Aside from the usual mechanical updates, we need to also rewrite
mdsal-binding-generator-impl, as its mechanics relied completely on
TypeDefinition.getPath(), which is no longer available.

The rewritten component is a wee bit more navigable, making a number of
deficiencies clearly visible. These are marked as FIXMEs for future
improvements.

One such problem arises when we attempt to create a derived type from an
enumeration: here we ended up generating an empty DTO rather than
properly specializing the type. Attempting to retain compatibility would
be fruitless, as it would violate a number of method signatures.

Furthermore leafref resolution is made stricter, requiring that
references actually point to a leaf, not to a random location -- which
was true in abstract-topology@2013-02-08.yang test model.

Another change revolves around nested union types. These previously
ended up being flattened in the class hierarchy, i.e. siblings of the
generated type and enclosed in the top-level type. Refactored code
structure is showing this is inconsistent, as bits/enums end up not as
siblings, but rather normal enclosed types.

This patch leaves a bit of dead code, deactivated test cases as well as
a few uncaught codegen regressions. These will be rectified by follow-up
patches.

JIRA: MDSAL-503
Change-Id: I40c445aa1d3f79fd55f6e8007db1259d9a09c8d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove RpcRoutingStrategyTest 53/96053/1
Robert Varga [Sat, 8 May 2021 10:57:52 +0000 (12:57 +0200)]
Improve RpcRoutingStrategyTest

Rather than relying on mocking and reflection and overall ugliness,
refactor the test to work with proper parser, really making it an
integration thing.

Change-Id: I8efbbd56d1648e3bc663aaf4de96400ee21bfe58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCentralize union/leafref naming 21/96021/2
Robert Varga [Fri, 7 May 2021 13:41:58 +0000 (15:41 +0200)]
Centralize union/leafref naming

We have open-coded dependency between dom-codec and generator-impl where
union member naming is concerned. The entire glue here is rather funky
and flaky, make sure the construction is captured in BindingMapping and
use the magic from there.

Change-Id: I3e19f41b7bab8b8431beae37e4e712e09153e883
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake sure we re-export yangtools.util 12/96012/1
Robert Varga [Thu, 6 May 2021 08:47:30 +0000 (10:47 +0200)]
Make sure we re-export yangtools.util

ExceptionMapper is declared as a public element, we should be using
'requires transitive' to keep downstreams safe.

Change-Id: I8f2ffd4c2b7365675f3c62f19542bdf41060b1ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify YangSourceDefinition 82/95982/1
Robert Varga [Tue, 4 May 2021 10:32:18 +0000 (12:32 +0200)]
Simplify YangSourceDefinition

We can use asEffectiveStatement() instead of guessing, make the code
flow more obvious.

Change-Id: Ie249bcc05820f7670fab86e9b0e4cfd1dbfa43ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove binding-dom-codec assertions 66/95966/1
Robert Varga [Fri, 30 Apr 2021 15:44:33 +0000 (17:44 +0200)]
Improve binding-dom-codec assertions

We are using a plain checkState(boolean), improve it with a message,
to get some diagnostic when things go wrong.

Change-Id: Ided7ba1f546ea8b861cbb2ec99fae5a8305e97eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove mdsal-binding-java-api-generator asserts 63/95963/1
Robert Varga [Fri, 30 Apr 2021 09:18:48 +0000 (11:18 +0200)]
Improve mdsal-binding-java-api-generator asserts

Use proper assertNotNull() and also be more defensive about type
ordering.

Change-Id: If1ea743a85d8a4bc24db857efa9a8e2ddb2c8791
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove CompilationTest assertions 61/95961/1
Robert Varga [Wed, 28 Apr 2021 18:24:38 +0000 (20:24 +0200)]
Improve CompilationTest assertions

Annotation assertions could use a bit of love, fix that.

Change-Id: I10b5ea21d50a74c198f1565025e6fb4af6877b6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix context-reference test 60/95960/1
Robert Varga [Wed, 28 Apr 2021 17:33:08 +0000 (19:33 +0200)]
Fix context-reference test

The test relies on overly-broad definition of context reference, but we
should only be binding to yang-ext. Fix that.

Change-Id: I43d6beecf2af50f275408fb103b60fbe4633dbee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd an BitAndUnionTOEnclosingTest assert 45/95945/2
Robert Varga [Mon, 26 Apr 2021 19:20:18 +0000 (21:20 +0200)]
Add an BitAndUnionTOEnclosingTest assert

We want to assert the number of enclosed types here, not just blindly
search through them.

Change-Id: I0985842fb2f93847d84467fe86fcdbdd08419a27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump byte-buddy to 1.11.0 26/95826/1
Robert Varga [Mon, 19 Apr 2021 08:40:23 +0000 (10:40 +0200)]
Bump byte-buddy to 1.11.0

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.21
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.10.22
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.11.0

Change-Id: I1d31c7b5297fd28b13297aa44c03593770fc7409
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify mdsal-yanglib injection 97/95797/1
Robert Varga [Sat, 17 Apr 2021 19:28:16 +0000 (21:28 +0200)]
Simplify mdsal-yanglib injection

We now have constructor-based injection, hence we do not need a separate
OSGi proxy. Remove those proxies along with their shared substrate.

Change-Id: I923d7b09661d4d75bc1db4df66c7f8b751effed0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixup checkstyle 64/95764/1
Robert Varga [Tue, 13 Apr 2021 14:14:19 +0000 (16:14 +0200)]
Fixup checkstyle

Updated checkstyle is finding a few violations, fix them up.

Change-Id: Iaf95fde682ed8b1f0bcfd567b67aff90b1eb414a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove osgi.annotation declaration 63/95763/1
Robert Varga [Tue, 13 Apr 2021 14:18:07 +0000 (16:18 +0200)]
Remove osgi.annotation declaration

We are getting this declaration from odlparent, remove it.

Change-Id: Ifb5348fe98c7fb81a905ea31a995cf90cd2c7694
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSwitch to com.guicedee.services/javax.inject 62/95762/1
Robert Varga [Tue, 13 Apr 2021 14:00:44 +0000 (16:00 +0200)]
Switch to com.guicedee.services/javax.inject

odlparent is removing the declaration of this old artifact, switch
to using the GuicedEE version.

Change-Id: I5acddef14039fe6b1558748636a7c25348569008
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup yang model whitespace 53/95753/3
Robert Varga [Mon, 12 Apr 2021 16:39:57 +0000 (18:39 +0200)]
Cleanup yang model whitespace

We have a ton of trailing whitespace, clean it up.

Change-Id: Ib7f5ae567b83f5b5172386fc496728e8c48131c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix Mdsal302Test's name 50/95750/1
Robert Varga [Mon, 12 Apr 2021 11:28:57 +0000 (13:28 +0200)]
Fix Mdsal302Test's name

The method here has been copy&pasted, causing some confusion. Fix its
name.

Change-Id: If757faeed90dc40c059723d3f50070c1a6a78029
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate ExtendedTypedefTest 46/95746/1
Robert Varga [Mon, 12 Apr 2021 08:06:43 +0000 (10:06 +0200)]
Update ExtendedTypedefTest

Capture properties to make asserts a bit clearer.

Change-Id: I5deba6a41a24b7c64f0dcc2faf7f8f3510236402
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd 'var', 'yield' and 'record' to Java reserved words 33/84133/5
Robert Varga [Mon, 2 Sep 2019 15:50:50 +0000 (17:50 +0200)]
Add 'var', 'yield' and 'record' to Java reserved words

Update reserved words with:
- var, which is reserved since Java 10
- yield, which is reserved since Java 14
- record, which is reserved since Java 16

Change-Id: Ia3455cf60d5afa4b83dfb5cb92364a2d1a6bfb7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSkip java-api-generator tests when running on windows-type OS 84/95684/4
Oleksii Mozghovyi [Tue, 6 Apr 2021 20:06:27 +0000 (23:06 +0300)]
Skip java-api-generator tests when running on windows-type OS

Xtend code generation uses the "line.separator" system property to
generate proper line endings, and there is no possibility to override
this setting w/o modifying the system property. This change disables
some tests to avoid misleading failures when running those on the
windows type os.

Change-Id: I8c9b2776d45a149debe3948ef0d2ce8a682c79d6
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove Constant.toFormattedString() 88/95688/2
Robert Varga [Wed, 7 Apr 2021 11:08:19 +0000 (13:08 +0200)]
Remove Constant.toFormattedString()

This method is not really used anywhere and actually is a remnant of the
original PoC. Remove it.

Change-Id: I5e26ea57a98a24085e947ac6bec477d4b8c097bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup GeneratedTypeBuilder/enclosing mechanics 82/95682/3
Robert Varga [Tue, 6 Apr 2021 11:18:59 +0000 (13:18 +0200)]
Cleanup GeneratedTypeBuilder/enclosing mechanics

Rather than requiring a Builder to enclose types, use an already-built
type. This allows splitting out the product phases.

Change-Id: I8bcebb1a010272eadd065cff465d16bbc5992043
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove parent type references 81/95681/1
Robert Varga [Tue, 6 Apr 2021 11:52:28 +0000 (13:52 +0200)]
Remove parent type references

Requiring Constant, Enumeration, GeneratedType and TypeMember to
report its enclosing/parent type leads to circular dependencies, as
the parent type needs to report the objects as well. This leads to
the requirement to perform callouts from constructor -- utterly fusing
parents and children together.

As it turns out, though, these references are not used anywhere and
hence we can completely ditch them.

Change-Id: Ic9bfa6d0b69ffa3bdc1cd02c824405c9e22d0375
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove AbstractTypesTest 64/95664/1
Robert Varga [Sat, 3 Apr 2021 15:59:00 +0000 (17:59 +0200)]
Remove AbstractTypesTest

The test harness used here is quite funky and prone to errors if there
are things like vim temporary files. Use the method dedicated to this
particular uses case, making things simpler and more reliable.

Change-Id: I4320869672ee4949fb18b7cb18aed81a7d548fb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove asserts in AugmentRelativeXPathTest 32/95632/1
Robert Varga [Thu, 1 Apr 2021 10:37:25 +0000 (12:37 +0200)]
Improve asserts in AugmentRelativeXPathTest

Assertions are very simplistic here, leading to unhelpful reports when
things fail. Improve that.

Change-Id: I389392d1f3b93a62e7b765a96b3feb3bbd587156
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove asserts in IdentityrefTypeTest 27/95627/1
Robert Varga [Wed, 31 Mar 2021 20:45:26 +0000 (22:45 +0200)]
Improve asserts in IdentityrefTypeTest

We have a few useless iterations and indirect asserts. Replace them with
linear code and more closely matched asserts to aid failure diagnostics.

Change-Id: If75e20c56432f49113ac3dcd02b6e823026a0907
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove GenEnumResolvingTest asserts 26/95626/1
Robert Varga [Wed, 31 Mar 2021 20:27:30 +0000 (22:27 +0200)]
Improve GenEnumResolvingTest asserts

Use assertThat(instanceOf()) to make failures more descriptive.

Change-Id: I279bda5ff8622b46441e1caa4464c1cc7f95b4cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove Mdsal500Test assert 25/95625/1
Robert Varga [Wed, 31 Mar 2021 13:12:31 +0000 (15:12 +0200)]
Improve Mdsal500Test assert

We are performing a blind offset get, make sure we validate the name of
generated type to catch any mismatches.

Change-Id: I239df35502493e0f54db8524ed4e7714c87393c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix Mdsal554Test asserts 21/95621/2
Robert Varga [Wed, 31 Mar 2021 11:53:03 +0000 (13:53 +0200)]
Fix Mdsal554Test asserts

The assertions here are using the wrong order, causing confusion
on failures. Clean them up.

Change-Id: I2944ae69c854a76df5524f0c6e58a98b53a9d9b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify BinaryTypeTest 22/95622/1
Robert Varga [Wed, 31 Mar 2021 12:04:28 +0000 (14:04 +0200)]
Simplify BinaryTypeTest

We have a very simple utility method to achieve the same thing the test
is doing for models. Simplify it by using a common method.

Change-Id: Ib2311f0f9998f2f42a0b196b5b37fd63be46f048
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove UnionTypeDefTest asserts 19/95619/2
Robert Varga [Wed, 31 Mar 2021 11:18:25 +0000 (13:18 +0200)]
Improve UnionTypeDefTest asserts

Test structure here is less than optimal, having implicit assumptions
and very weak asserts. Improve the situation.

Change-Id: I6024b00de594df41201b6cd7f358b87fb3b2c55f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove GenerateInnerClassForBitsAndUnionInLeavesTest 16/95616/2
Robert Varga [Wed, 31 Mar 2021 10:13:19 +0000 (12:13 +0200)]
Improve GenerateInnerClassForBitsAndUnionInLeavesTest

The assertion structure here is less than optimal, make sure we have
proper size and type asserts, without going through global booleans.

Change-Id: I3609fe7ab6089385a296f623351d6e6bdace5229
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove asserts in Mdsal500Test 12/95612/1
Robert Varga [Tue, 30 Mar 2021 19:08:00 +0000 (21:08 +0200)]
Improve asserts in Mdsal500Test

We are accessing methods blindly here, assert size.

Change-Id: Ia46a31dae0ad63aa898b82a0b7efd32497a11393
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix Netty replication components 84/95584/3
Robert Varga [Sun, 28 Mar 2021 19:53:22 +0000 (21:53 +0200)]
Fix Netty replication components

We should have a public no-arg constructor, fix that. Also fix general
lifecycle issues in deregistration paths.

JIRA: MDSAL-662
Change-Id: I928f1f5486b6edc8a62ed006431b7c5f06ddf986
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove GroupingDefinitionDependencySort 79/95579/1
Robert Varga [Fri, 26 Mar 2021 14:07:22 +0000 (15:07 +0100)]
Improve GroupingDefinitionDependencySort

The sort class does not actually have any state, hence we can convert it
to a utility class with a single public static method.

Change-Id: I7896e625bc47e54b3126c4d5f47c433a1ebebcb4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove more test yangs 77/95577/1
Robert Varga [Fri, 26 Mar 2021 11:47:13 +0000 (12:47 +0100)]
Move more test yangs

We have a few superfluous directories with a single YANG file only.
Move the files so that we have flatter directory layout.

Change-Id: I4d9d01025d1a64f2e344d04bff2f1942310eba27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove bug8449.yang 63/95563/1
Robert Varga [Thu, 25 Mar 2021 21:32:13 +0000 (22:32 +0100)]
Move bug8449.yang

There is no need to have a dedicated directory for a single model,
simplify our layout, fixing Eclipse UT execution in the process.

Change-Id: I147c923a1137443b81a3715a89d3a67803bc264f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBindingGenerator methods return GeneratedTypes 62/95562/3
Robert Varga [Thu, 25 Mar 2021 15:47:47 +0000 (16:47 +0100)]
BindingGenerator methods return GeneratedTypes

The documentation is explicit here and implementation does exactly
this. Update return types to reflect this, which allows us to simplify
at least tests.

Since we are touching tests, improve their assertions by asserting the
number of generated types rather than blanket
assertFalse(types.isEmpty()).

Change-Id: I62a44f0b39f17c26334ade4af2a96337f3ad6504
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup Mdsal554Test 58/95558/1
Robert Varga [Thu, 25 Mar 2021 11:02:21 +0000 (12:02 +0100)]
Cleanup Mdsal554Test

We are shifting modules here, stop doing that. Also assert the number of
types generated before touching any offset.

Change-Id: I5f457fcab5340ad30d9246e92dddf7c473d42220
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup asserts in GeneratedTypesTest 57/95557/1
Robert Varga [Thu, 25 Mar 2021 10:55:54 +0000 (11:55 +0100)]
Cleanup asserts in GeneratedTypesTest

We are making some iffy assert choices here, leading to errors rather
than test failures. Refactor asserts a bit, so we have logically safe
code.

Change-Id: I2673ab81a93eae718a2cd8e99e67af91c8cd03e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix asserts in BindingGeneratorImplTest 56/95556/1
Robert Varga [Thu, 25 Mar 2021 10:31:47 +0000 (11:31 +0100)]
Fix asserts in BindingGeneratorImplTest

Assertions here are the 'assertTrue()' kind, where they really can be
much more expressive. Fix that, making failures easier to diagnose.

Change-Id: I4a244d9633e314bbf92b9d8cc1632c1058a59afd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused TypeProvider methods 55/95555/2
Robert Varga [Thu, 25 Mar 2021 08:34:36 +0000 (09:34 +0100)]
Remove unused TypeProvider methods

There are three methods related to source code, which are no longer
used by anyone:
- getConstructorPropertyName(SchemaNode node);
- getParamNameFromType(TypeDefinition<?> type);
- getTypeDefaultConstruction(LeafSchemaNode node);

These were useful for Config Subsystem a long time ago, but since its
removal they have no users. Their implementation is a rather big chunk
of unused code, which is a pure maintenance burden. Remove them.

Change-Id: Ic6419b0f65c9575dc593a3c32d01b53edffb8530
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCentralize Data/Listener/Service suffixes 51/95551/1
Robert Varga [Wed, 24 Mar 2021 13:57:24 +0000 (14:57 +0100)]
Centralize Data/Listener/Service suffixes

We have a central place for these strings in BindingMapping,
make sure we do not duplicate their definition.

Change-Id: I2c7e74830668cf9e3e0fd92ecadef0d3cc2a58d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoModernize DOMForwardedWriteTransactionTest 65/95365/2
Robert Varga [Fri, 26 Feb 2021 09:38:04 +0000 (10:38 +0100)]
Modernize DOMForwardedWriteTransactionTest

Use proper assertions instead of try/catch blocks, fail()s and
assertTrue()s.

Change-Id: Ife42d56c54f725d2cf842b429c552172dfce429d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix String length checker 31/95331/5
Robert Varga [Wed, 24 Feb 2021 00:11:08 +0000 (01:11 +0100)]
Fix String length checker

We are enforcing length restrictions on String.length(), which is
the wrong measure, as it returns the number of code units in the
String. We actually want to compare the number of code points, i.e.
we need to use String.codePointCount().

JIRA: MDSAL-661
Change-Id: I7291aabb67ec9d002cdeb52befd1723707113121
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools to 8.1.1/6.0.5 52/95352/1
Robert Varga [Wed, 24 Feb 2021 15:35:58 +0000 (16:35 +0100)]
Bump odlparent/yangtools to 8.1.1/6.0.5

Adopt latest versions.

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