yangtools.git
38 hours agoAdd DataTreeConfiguration recursive verification knob 70/116470/1 master
Robert Varga [Wed, 7 May 2025 06:17:28 +0000 (08:17 +0200)]
Add DataTreeConfiguration recursive verification knob

Recursive verification is enabled based on TreeType, i.e. there is
currently no way to enable it for TreeType.OPERATIONAL.

Add an explicit knob to control it, so users can have operational
datastore with full verification.

JIRA: YANGTOOLS-1669
Change-Id: Id7095fdaaad6eda59eeef5abb348974a70dea8c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 days agoExpose DOMSourceXMLStreamReader 58/116458/2
Robert Varga [Tue, 6 May 2025 05:48:48 +0000 (07:48 +0200)]
Expose DOMSourceXMLStreamReader

We have a need to traverse DOMSource as reader in a downstream of
yang-data-codec-xml. Expose the hidden reader, allowing it to be used.

JIRA: YANGTOOLS-1668
Change-Id: I126e1a305a630ace93e36332423e38bde705679e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 days agoImprove a note 19/116419/1
Robert Varga [Sun, 4 May 2025 13:31:51 +0000 (15:31 +0200)]
Improve a note

Separate the analysis picture with a new line, so it is more readable.

Change-Id: I77f8c97f814eff61979714c85ffea27505a1d8fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 days agoImprove binding.contract.Naming 18/116418/1
Robert Varga [Sun, 4 May 2025 12:59:42 +0000 (14:59 +0200)]
Improve binding.contract.Naming

We have a ton of under-documented things in this class, let's make some
small progress in addressing that.

Change-Id: I31244330822b076944dff7661c97fa7e279ddb1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoTest min-elements/max-elements mismatch 82/116382/10
Robert Varga [Wed, 30 Apr 2025 10:27:29 +0000 (12:27 +0200)]
Test min-elements/max-elements mismatch

While the mismatch between min-elements and max-elements is caught in
ElementCountConstraint, it is reported via an IAE.

This patch improves the logic to catch the mismatch early, pointing to
the offending parent statement.

JIRA: YANGTOOLS-1664
Change-Id: I18f472abf0210d6545b0ec9017e6e8a3350632cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoValidate max-elements argument 09/116409/4
Robert Varga [Fri, 2 May 2025 11:10:56 +0000 (13:10 +0200)]
Validate max-elements argument

max-elements' argument has to be a positive value, enforce that. Also
improve interning to cover common values (1, 2).

JIRA: YANGTOOLS-1666
Change-Id: Iebad35c7825aa218405c0d80406384f39429d239
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoValidate min-elements argument 10/116410/3
Robert Varga [Fri, 2 May 2025 11:20:39 +0000 (13:20 +0200)]
Validate min-elements argument

min-elements' argument has to be a non-negative value. Make sure we
enforce that invariant and intern most common values (0, 1, 2).

JIRA: YANGTOOLS-1665
Change-Id: Icc37bef084d94e2e615bf2f5663d274c9fb65048
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoSeal ElementCountConstraint 08/116408/1
Robert Varga [Fri, 2 May 2025 10:01:40 +0000 (12:01 +0200)]
Seal ElementCountConstraint

Modernize the class a bit, making it sealed and improving the equals()
method.

Change-Id: I9e546b95adf1caba2a6a43089be0c6d10b68fd09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 days agoImprove ElementCountConstraint messages 07/116407/1
Robert Varga [Fri, 2 May 2025 09:59:39 +0000 (11:59 +0200)]
Improve ElementCountConstraint messages

Add a proper message for violations, adding a FIXME for max-elements
improvement.

JIRA: YANGTOOLS-1664
Change-Id: Id6cf120122288226e0246816554aa18c1fb4c7f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoBump versions to 14.0.14-SNAPSHOT 90/116290/1
Robert Varga [Sat, 19 Apr 2025 14:44:47 +0000 (16:44 +0200)]
Bump versions to 14.0.14-SNAPSHOT

This starts the next development iteration.

Change-Id: I0c270d3ff0f3acbf1720f90d82a1d4ebb54669cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoRelease yangtools v14.0.13
jenkins-releng [Sat, 19 Apr 2025 13:10:26 +0000 (13:10 +0000)]
Release yangtools

2 weeks agoMigrate yang-parser-spi to bnd-parent 89/116289/1
Robert Varga [Sat, 19 Apr 2025 12:44:51 +0000 (14:44 +0200)]
Migrate yang-parser-spi to bnd-parent

This is a simple migration.

Change-Id: Id98e0d8fcfc12da7428f9ac4e297813ef61f0dc0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDrop use of checker-qual from binding-data-codec-spi 87/116287/1
Robert Varga [Sat, 19 Apr 2025 09:39:32 +0000 (11:39 +0200)]
Drop use of checker-qual from binding-data-codec-spi

Our use of @GuardedBy is incorrect: it should be @Holding. Let's drop
checker-qual completely, so as not to leak it to users.

Change-Id: Iea0b3e5874110d6206da35625764b207128b75a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 weeks agoDo not use GuardedBy in binding-data-codec-osgi 85/116285/1
Robert Varga [Sat, 19 Apr 2025 08:16:53 +0000 (10:16 +0200)]
Do not use GuardedBy in binding-data-codec-osgi

We have a single use of checker, which leaks to users. Remove it, as it
is not really useful.

Change-Id: Idde6207c7b71b436db32da8eeb962e841e3f6c29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoBump versions to 14.0.12-SNAPSHOT 50/116250/1
Robert Varga [Mon, 14 Apr 2025 12:09:51 +0000 (14:09 +0200)]
Bump versions to 14.0.12-SNAPSHOT

This starts the next development iteration.

Change-Id: I0b8f38855bdb3a56bc72ef43239bfce7bf6307f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoRelease yangtools v14.0.12
jenkins-releng [Mon, 14 Apr 2025 10:38:54 +0000 (10:38 +0000)]
Release yangtools

3 weeks agoMigrate binding-model to bnd-parent 48/116248/1
Robert Varga [Mon, 14 Apr 2025 09:07:51 +0000 (11:07 +0200)]
Migrate binding-model to bnd-parent

Switch to using more modern packaging.

Change-Id: I8d4bc9d92c81de6f44fdafff8bf8788124b6ba7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoBump odlparent to 14.0.9 78/116078/12
Robert Varga [Wed, 26 Mar 2025 13:15:24 +0000 (14:15 +0100)]
Bump odlparent to 14.0.9

Pick up modularized Guava, adding dependency on checker-qual, as it is
no longer pulled in transitively.

Change-Id: I65d9781b767e548dd1b41d1a7b332348a8a1925c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoEnforce dependencies in bnd-parent 40/116240/1
Robert Varga [Sun, 13 Apr 2025 11:05:20 +0000 (13:05 +0200)]
Enforce dependencies in bnd-parent

Our modern bundles should have their dependencies sorted, enforce that
from bnd-parent.

Change-Id: I06a21ee27391795e73ca384878dfdbe174cd7db8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoFix binding-reflect dependencies 39/116239/1
Robert Varga [Sun, 13 Apr 2025 11:04:18 +0000 (13:04 +0200)]
Fix binding-reflect dependencies

We are using concepts, be sure to mention that in pom.xml.

Change-Id: Ifd7bc8be56fbcc6a7745830065fd4889af394f1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoFix binding-loader dependencies 38/116238/1
Robert Varga [Sun, 13 Apr 2025 11:01:22 +0000 (13:01 +0200)]
Fix binding-loader dependencies

We are using concepts, be sure to mention that in pom.xml.

Change-Id: If2e09838e2f0cd2955bb9438208527dd57b15295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 weeks agoFeat: Enable Dependabot 25/116025/2
Anil Belur [Sun, 23 Mar 2025 06:34:30 +0000 (16:34 +1000)]
Feat: Enable Dependabot

Enable dependabot to work together with the Github2Gerrit workflow
ensuring workflows are updated with the latest releases.

Change-Id: I01a45ecc78439365dd6fdd324c6522510b7ae4fb
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
5 weeks agoBump byte-buddy to 1.17.5 32/116132/1
Robert Varga [Tue, 1 Apr 2025 15:27:01 +0000 (17:27 +0200)]
Bump byte-buddy to 1.17.5

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.3
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.4
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.5

Change-Id: Iea5bd5447a307d661ebb7ec9c541d3e44240b0ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoHide JUnit5 tests 03/116103/1
Robert Varga [Thu, 27 Mar 2025 16:33:09 +0000 (17:33 +0100)]
Hide JUnit5 tests

We have a number of warnings in the build, hide tests to make those
warnings go away.

Change-Id: Ic4a3d37157901a18277561d307a8d31d7504073e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoHide tests in concepts 02/116102/1
Robert Varga [Thu, 27 Mar 2025 15:30:28 +0000 (16:30 +0100)]
Hide tests in concepts

We have a ton of warnings related to JUnit5, fix them by hiding the
tests.

Change-Id: Iccc6a1d05096ab28accbaa2b31302bb79fa60b98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoExclude checker from OSGi imports 89/116089/5
Robert Varga [Thu, 27 Mar 2025 09:18:18 +0000 (10:18 +0100)]
Exclude checker from OSGi imports

We have no use of checker in OSGi. Filter it out instead of using
optional imports.

Change-Id: I93ab225f07488a4796b8a787e1d5a30aae6efadf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoClean up OpenConfigStatements 01/116101/1
Robert Varga [Thu, 27 Mar 2025 14:08:45 +0000 (15:08 +0100)]
Clean up OpenConfigStatements

We have @SuppressFBWarnings which can be easily rectified using
switching annotations. Do that to reduce proliferation.

Change-Id: I8da1838958008c5086044b090f672d6b02a74eb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd test for YangBinaryOperator serialization 00/116100/1
Robert Varga [Thu, 27 Mar 2025 13:20:11 +0000 (14:20 +0100)]
Add test for YangBinaryOperator serialization

We really would want to keep SpotBugs happy, but not at the cost of a
regression. Add a test to make sure we are okay on this front.

Change-Id: I24f089c24a3ffad8ad09711d8413ebad71c9d968
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd MissingSchemaForClassException.readResolve() 99/116099/1
Robert Varga [Thu, 27 Mar 2025 13:01:00 +0000 (14:01 +0100)]
Add MissingSchemaForClassException.readResolve()

Ditch use of @SuppressFBWarnings, opting for a checkstyle suppression.

Change-Id: I52260fdf77a2e63c192e722eea35d34ca5f21f4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove SuppressFBWarnings from YangLocationPath 98/116098/1
Robert Varga [Thu, 27 Mar 2025 12:47:00 +0000 (13:47 +0100)]
Remove SuppressFBWarnings from YangLocationPath

Just override readResolve() to return this and be done with it.

Change-Id: I85b1dd9cb99dcd101854551c06bf028ef673255d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove SuppressFBWarnings from AbstractRegistration 96/116096/4
Robert Varga [Thu, 27 Mar 2025 11:12:34 +0000 (12:12 +0100)]
Remove SuppressFBWarnings from AbstractRegistration

SuppressFBWarnings in this class is annoying: we do not want to make
@SuppressFBWarnings available to downstreams, but our use here leads
to subclasses having it visible.

This adds a fake method to manipulate the field, plus a
package-protected caller to fool SpotBugs enough to not need a
suppression.

Change-Id: I226c3476cebf74a2bcf805170daa61224959efb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove SuppressFBWarnings from AbstractQNameStep.equals() 94/116094/3
Robert Varga [Thu, 27 Mar 2025 10:50:35 +0000 (11:50 +0100)]
Remove SuppressFBWarnings from AbstractQNameStep.equals()

Define an equalsImpl() contract instead of equalityClass(), allowing us
to get rid of the suppression.

Change-Id: If6d8a747ffc393d09ffd1dc75119f7afe9316a47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove suppression from NodeTypeStepWithPredicates 95/116095/3
Robert Varga [Thu, 27 Mar 2025 10:54:02 +0000 (11:54 +0100)]
Remove suppression from NodeTypeStepWithPredicates

Current SpotBugs does not seem to report this issue anymore, remove the
suppression.

Change-Id: Ib370c70ea6d05dddf1a4ebceaa92d0faecb55025
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoEliminate SuppressFBWarnings from YangStmtMapping 90/116090/1
Robert Varga [Thu, 27 Mar 2025 10:25:14 +0000 (11:25 +0100)]
Eliminate SuppressFBWarnings from YangStmtMapping

We really do not want to expose the suppression annotation. This
achieves that goal by a simple removal of @NonNullByDefault.

Change-Id: I1324377b0cb09ac3265919978b9724465753bdbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoDo not user checker Regex in yang-data-codec-gson 86/116086/1
Robert Varga [Thu, 27 Mar 2025 08:44:44 +0000 (09:44 +0100)]
Do not user checker Regex in yang-data-codec-gson

This is not useful, really. We also fix an non-optional import of
checker.

Change-Id: I21c6f70df3159820e391738e1b736a9bd602576c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoDrop use of checker.regex.qual.Regex in rfc7950 parser 83/116083/1
Robert Varga [Thu, 27 Mar 2025 07:55:58 +0000 (08:55 +0100)]
Drop use of checker.regex.qual.Regex in rfc7950 parser

This annotation is not really useful, remove it. This also fixes
reliance on specific checker version.

Change-Id: Ic640102db125de515c1f847756c5ca677b50e7db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoDrop use of checker.regex.qual.Regex in rfc6643 model 82/116082/1
Robert Varga [Thu, 27 Mar 2025 07:49:24 +0000 (08:49 +0100)]
Drop use of checker.regex.qual.Regex in rfc6643 model

This annotation is not really useful, remove it.

Change-Id: Iea15fdba5a088d4120ef644231fd08e3b8481f32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoDrop use of checker.regex.qual.Regex in binding-spec 81/116081/1
Robert Varga [Thu, 27 Mar 2025 07:39:51 +0000 (08:39 +0100)]
Drop use of checker.regex.qual.Regex in binding-spec

This annotation is not really useful, remove it. This also fixes
reliance on specific checker version.

Change-Id: I263a4abe5ef196d0fb920b59ce058fbdf6fae734
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove unneeded surefire configuration 80/116080/1
Robert Varga [Thu, 27 Mar 2025 07:31:22 +0000 (08:31 +0100)]
Remove unneeded surefire configuration

Our add-opens is not effective here, as it points to the wrong module.
Remove it, as it does not seem to impact anything.

Change-Id: Ic11f7c29fd7eb417418e3c7f9a88c42393b814d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoDrop use of RegEx in common/* 77/116077/3
Robert Varga [Wed, 26 Mar 2025 22:10:45 +0000 (23:10 +0100)]
Drop use of RegEx in common/*

This annotation is not really useful, drop it.

Change-Id: I7909e4128f2bef6a8e54f948dab64bb346a3ad42
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove use of checker.qual in concepts 79/116079/2
Robert Varga [Thu, 27 Mar 2025 07:04:54 +0000 (08:04 +0100)]
Remove use of checker.qual in concepts

We are only using @NonNegative, drop that use and remove dependency on
checker annotations.

Change-Id: I6029cdd5d16644b6d6d3fed22f13bc62bf60f032
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoClean up tests 72/116072/2
Robert Varga [Wed, 26 Mar 2025 13:26:19 +0000 (14:26 +0100)]
Clean up tests

We have warnings coming from tests being public. Hide them.

Change-Id: I3080c8cc3618d4a711814343defecb1d05d40102
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoFix odl-yangtools-xpath-api description 43/116043/2
Robert Varga [Mon, 24 Mar 2025 20:09:09 +0000 (21:09 +0100)]
Fix odl-yangtools-xpath-api description

We are missing a critical declaration, add it.

Change-Id: I0740971627a295fadada3c0345da895e37986c39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump versions to 14.0.12-SNAPSHOT 90/115790/1
Robert Varga [Sat, 8 Mar 2025 01:41:13 +0000 (02:41 +0100)]
Bump versions to 14.0.12-SNAPSHOT

This starts the next development iteration.

Change-Id: If0c2c0431e231ab7e41b55961b401ffae4ecc677
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRelease yangtools v14.0.11
jenkins-releng [Fri, 7 Mar 2025 17:47:38 +0000 (17:47 +0000)]
Release yangtools

2 months agoConvert binding-data-codec-spi to bnd-parent 79/115779/1
Robert Varga [Fri, 7 Mar 2025 16:48:25 +0000 (17:48 +0100)]
Convert binding-data-codec-spi to bnd-parent

Another simple conversion, and again we make checker-qual optional.

Change-Id: I895c14ea8e2e7b236b530cf6c55d5dc1aa11b168
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-repo-spi to bnd-parent 78/115778/1
Robert Varga [Fri, 7 Mar 2025 16:27:57 +0000 (17:27 +0100)]
Convert yang-repo-spi to bnd-parent

This is another simple conversion. Also make checker-qual import
optional, as it is a purely-internal thing.

Change-Id: Ic4a47acbba6b675657885b99b5c8ff3003db6295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-repo-api to bnd-parent 77/115777/1
Robert Varga [Fri, 7 Mar 2025 16:07:34 +0000 (17:07 +0100)]
Convert yang-repo-api to bnd-parent

This is a trivial conversion.

Change-Id: Iab03936982dac8b95ce81a776e24e8a3b0042850
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert binding-runtime-spi to bnd-parent 76/115776/1
Robert Varga [Fri, 7 Mar 2025 15:50:30 +0000 (16:50 +0100)]
Convert binding-runtime-spi to bnd-parent

Update packaging and improve documentation a bit.

Change-Id: Iec305d6f7a509079b0096a12c4cf95daf6f8bf47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove an unneeded suppression 74/115774/2
Robert Varga [Fri, 7 Mar 2025 15:16:05 +0000 (16:16 +0100)]
Remove an unneeded suppression

SpotBugs is no longer flagging NP_NONNULL_RETURN_VIOLATION, remove the
suppression.

Change-Id: I412e271c70c2b8d533447faced91642921369293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix a typo 75/115775/1
Robert Varga [Fri, 7 Mar 2025 15:36:58 +0000 (16:36 +0100)]
Fix a typo

We have two spaces here, remove one of them.

Change-Id: I01e5bab80fe442c76ebaf14ee6b3c3304da6bce9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump byte-buddy to 1.17.2 71/115771/1
Robert Varga [Fri, 7 Mar 2025 13:13:33 +0000 (14:13 +0100)]
Bump byte-buddy to 1.17.2

https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.0
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.1
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.17.2

Change-Id: I317c260fa6ddc778d2a881ed0dfdb1fadfeed425
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump odlparent to 14.0.8 68/115768/3
Robert Varga [Fri, 7 Mar 2025 12:06:01 +0000 (13:06 +0100)]
Bump odlparent to 14.0.8

Pick up the triemap downgrade from upstream.

Change-Id: I117fbc23af3c93db524ee9d0acc15af62ba1a2de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSwitch codegen to target Java 21 74/114674/3
Robert Varga [Fri, 7 Mar 2025 12:41:12 +0000 (13:41 +0100)]
Switch codegen to target Java 21

We are targeting Java 17 here, let's switch to using Java 21.

Change-Id: I0a772c0f0eed8fce4ea6814c4828c063f5dfc572
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump xtend to 2.38.0 69/115769/2
Robert Varga [Fri, 7 Mar 2025 12:06:45 +0000 (13:06 +0100)]
Bump xtend to 2.38.0

https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2025/02/26/version-2-38-0

Change-Id: Ic9e0e080769df016c8ef682ea5a5cd09c3e1130f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRevert "Bump versions to 15.0.0-SNAPSHOT" 67/115767/1
Robert Varga [Fri, 7 Mar 2025 12:00:08 +0000 (13:00 +0100)]
Revert "Bump versions to 15.0.0-SNAPSHOT"

This reverts commit 64f0cfb527cc54b25405dbcbae6b0c585889a157, as we need
to quickly spin a release.

Change-Id: I631079a486c48a27d8a5fe8a1c9e2a900345fc98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump versions to 15.0.0-SNAPSHOT 65/115665/1
Robert Varga [Thu, 27 Feb 2025 08:42:53 +0000 (09:42 +0100)]
Bump versions to 15.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: Iae9ca9118a8033f8c54b33487e2ebec282b8deda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump versions to 14.0.11-SNAPSHOT 27/115627/1
Robert Varga [Tue, 25 Feb 2025 15:19:53 +0000 (16:19 +0100)]
Bump versions to 14.0.11-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia6cde3f8da1187d693216c2df372b4f4dd5050ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRelease yangtools v14.0.10
jenkins-releng [Tue, 25 Feb 2025 13:00:08 +0000 (13:00 +0000)]
Release yangtools

2 months agoAdd DataObjectIdentifier.Builder.toReferenceBuilder() 10/115410/7
Robert Varga [Fri, 14 Feb 2025 11:31:28 +0000 (12:31 +0100)]
Add DataObjectIdentifier.Builder.toReferenceBuilder()

We have a use case where we start off with a DataObjectIdentifier, but
want to create a wildcard reference to something underneath it.
The only way to achieve this is to bridge to InstanceIdentifier's
builder -- which is cumbersome and not straightforward.

This patch adds a method that makes it much easier: now we can switch to
lenient DataObjectReferenceBuilder with a simple method.

JIRA: YANGTOOLS-1661
Change-Id: I9932251e9faf80059fe043eaed491019c514a767
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMove YT1660Test 20/115620/2
Robert Varga [Tue, 25 Feb 2025 11:44:04 +0000 (12:44 +0100)]
Move YT1660Test

The test landed in the wrong package. Correct that. Since we are moving
things, also clean up the error message.

JIRA: YANGTOOLS-1660
Change-Id: Id32c81ddd07f0954987175d56ca60dd2290d63a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd DataObjectReference.{find,get}FirstKey() 09/115409/4
Robert Varga [Fri, 14 Feb 2025 11:30:45 +0000 (12:30 +0100)]
Add DataObjectReference.{find,get}FirstKey()

Previous installation failed to provide the usual methods for user, this
patch fixes that up.

JIRA: YANGTOOLS-1660
Change-Id: Ic700e573342d64dda69115da81d92a3a84ed8fae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not import java.io.Serial 19/115619/1
Robert Varga [Tue, 25 Feb 2025 10:22:18 +0000 (11:22 +0100)]
Do not import java.io.Serial

Just use a FQCN, which is simpler.

Change-Id: Id31cf5d92091137b34a95d87fc821f72ba3467f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFilter do not import javax.inject 97/115597/1
Robert Varga [Mon, 24 Feb 2025 13:46:06 +0000 (14:46 +0100)]
Filter do not import javax.inject

A slight wrinkle here: we do not use javax.inject in OSGi, therefore we
should not be importing it.

JIRA: YANGTOOLS-1659
Change-Id: I737258623596196a12566fcd658c60c44a887d77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoResync yang-data-demo, part one 56/115556/2
Robert Varga [Thu, 20 Feb 2025 22:02:27 +0000 (23:02 +0100)]
Resync yang-data-demo, part one

binding-test-model -> binding-codegen copy of the two yang-data
examples.

Change-Id: Iea96aaa4420e4f9273fcdf431e39891dbc0f2f9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove tooling interactions 55/115555/1
Robert Varga [Thu, 20 Feb 2025 21:49:19 +0000 (22:49 +0100)]
Improve tooling interactions

Number of things:
- explicitly request Locale.ROOT + UTF-8
- disable annotation processing
- improve diag format

Change-Id: I3d628675831a3b5b89238b5096ed62b9479c3120
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate binding-codegen test to NIO2 53/115553/1
Robert Varga [Thu, 20 Feb 2025 19:24:45 +0000 (20:24 +0100)]
Migrate binding-codegen test to NIO2

This also performs major clean ups:
- eliminate duplication in YangModuleInfoCompilationTest
- migrate callers of assertTrue()

Change-Id: I8b02dff19eede2a6db1db150708eb11842d78f47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoTest/Reproduce behavior described in MDSAL-713 88/106388/8
Šimon Ukuš [Tue, 6 Jun 2023 08:00:46 +0000 (10:00 +0200)]
Test/Reproduce behavior described in MDSAL-713

A (possibly) faulty behavior was found during the work on MDSAL-713
described in the JIRA issue. The problem is in the inconsistency of
statement reporting as being introduced by augmentation.
While substatements of DeclaredCaseEffectiveStatement,
that was introduced by augmentation, are reported as being introduced
by augmentation, the substatements of UndeclaredCaseEffectiveStatemet,
which was introduced by augmentation, are NOT reported that way.

This change introduces a test that aims to reproduce such behavior.

JIRA: MDSAL-713
Change-Id: I97f7e5aad613c2ee11f60935af9d5db5f352fdea
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump versions to 14.0.10-SNAPSHOT 94/115194/1
Robert Varga [Sat, 8 Feb 2025 18:41:03 +0000 (19:41 +0100)]
Bump versions to 14.0.10-SNAPSHOT

This starts the next development iteration.

Change-Id: I9960dc995b389075751fd2b49645e56420c37c09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRelease yangtools v14.0.9
jenkins-releng [Sat, 8 Feb 2025 16:27:14 +0000 (16:27 +0000)]
Release yangtools

2 months agoBump odlparent to 14.0.7 92/115192/2
Robert Varga [Sat, 8 Feb 2025 14:34:51 +0000 (15:34 +0100)]
Bump odlparent to 14.0.7

Pick up the fix from upstream.

Change-Id: Ib64404d46d0a512e7611e71b1cbae28a2c0f068c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoCI: Enable Gerrit Verify workflows with GHA 31/114731/3
Anil Belur [Wed, 11 Dec 2024 03:05:47 +0000 (13:05 +1000)]
CI: Enable Gerrit Verify workflows with GHA

This is a pre-req to move Jenkins jobs to GHA.

Change-Id: I693df6145d278f12e75f70a11314854fd0ccf56b
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
2 months agoCI: Enable Github2Gerrit workflow 30/114730/2
Anil Belur [Wed, 11 Dec 2024 03:05:16 +0000 (13:05 +1000)]
CI: Enable Github2Gerrit workflow

This allows Github devs/users to contribute to the repo using the
Github workflow.

Change-Id: Ibaf3b3dc7509b681b5e81e3dbcad91fa6bfae070
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
2 months agoBump versions to 14.0.9-SNAPSHOT 87/115187/1
Robert Varga [Fri, 7 Feb 2025 17:34:46 +0000 (18:34 +0100)]
Bump versions to 14.0.9-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie2b411c6385f96716c87a5d376b8a8e6c67ed62e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRelease yangtools v14.0.8
jenkins-releng [Fri, 7 Feb 2025 16:09:51 +0000 (16:09 +0000)]
Release yangtools

2 months agoConvert yang-parser-reactor to bnd-parent 64/115164/1
Robert Varga [Fri, 7 Feb 2025 14:38:45 +0000 (15:38 +0100)]
Convert yang-parser-reactor to bnd-parent

This is another trivial conversion.

Change-Id: I954feabcf5dc57580de7b5d51b2396a14cf7aee1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert odlext-parser-support to bnd-parent 63/115163/1
Robert Varga [Fri, 7 Feb 2025 14:33:56 +0000 (15:33 +0100)]
Convert odlext-parser-support to bnd-parent

This is another trivial conversion.

Change-Id: I546c130085a7436045c4fc7fdae11729a0a56158
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert rfc8819-parser-support to bnd-parent 62/115162/1
Robert Varga [Fri, 7 Feb 2025 14:30:21 +0000 (15:30 +0100)]
Convert rfc8819-parser-support to bnd-parent

This is another trivial conversion.

Change-Id: Id4026e03fb55cf0e699209e8afd24d972a2b5e49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert rfc8639-parser-support to bnd-parent 61/115161/1
Robert Varga [Fri, 7 Feb 2025 14:18:53 +0000 (15:18 +0100)]
Convert rfc8639-parser-support to bnd-parent

This is another trivial conversion.

Change-Id: Ie99146d6bfa33a88cb2348d06d692a93a1a4ef92
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert rfc8528-parser-support to bnd-parent 60/115160/2
Robert Varga [Fri, 7 Feb 2025 14:12:23 +0000 (15:12 +0100)]
Convert rfc8528-parser-support to bnd-parent

This is another trivial conversion.

Change-Id: I424345d226533c3762c2a5c584503e3fd396e348
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert rfc8040-parser-support to bnd-parent 58/115158/2
Robert Varga [Fri, 7 Feb 2025 14:06:11 +0000 (15:06 +0100)]
Convert rfc8040-parser-support to bnd-parent

This is another trivial conversion.

Change-Id: Iddb1e5a22addc5e0bca8c93ca0b81e9b020c72c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix export warnings in rfc6241-parser-support 59/115159/2
Robert Varga [Fri, 7 Feb 2025 14:09:06 +0000 (15:09 +0100)]
Fix export warnings in rfc6241-parser-support

We need to re-export org.opendaylight.yangtools.yang.parser.spi.

Change-Id: I2312dbc9923161efa7a2bf3e7037483bda8b9143
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump odlparent to 14.0.6 12/114812/16
Robert Varga [Mon, 6 Jan 2025 12:54:02 +0000 (13:54 +0100)]
Bump odlparent to 14.0.6

Pick up latest upgrades from upstream.

Change-Id: I9da3d674e5717623ae34262cdc0da999fe9e480f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate rfc7952-parser-support to bnd-parent 52/115152/1
Robert Varga [Fri, 7 Feb 2025 10:52:54 +0000 (11:52 +0100)]
Migrate rfc7952-parser-support to bnd-parent

This is a trivial migration.

Change-Id: I5c3df0f087ab963e1512439011fec7958989c84d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate rfc6643-parser-support to bnd-parent 51/115151/1
Robert Varga [Fri, 7 Feb 2025 10:42:11 +0000 (11:42 +0100)]
Migrate rfc6643-parser-support to bnd-parent

This is a trivial migration.

Change-Id: I28ccbfce41840e32b060e0fdab02590fa7fbec96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate rfc6536-parser-support to bnd-parent 50/115150/1
Robert Varga [Fri, 7 Feb 2025 10:29:19 +0000 (11:29 +0100)]
Migrate rfc6536-parser-support to bnd-parent

This is a trivial migration.

Change-Id: I0c9d750b1860130d26c93b0e00840374fa30fef9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert rfc6241-parser-support to bnd-parent 49/115149/2
Robert Varga [Fri, 7 Feb 2025 08:47:46 +0000 (09:47 +0100)]
Convert rfc6241-parser-support to bnd-parent

This is another straightforward conversion.

Change-Id: Ia15d95930dc54f079d6b5bcdd29eae8108243132
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-parser-api to bnd-parent 48/115148/2
Robert Varga [Fri, 7 Feb 2025 08:42:05 +0000 (09:42 +0100)]
Convert yang-parser-api to bnd-parent

Another simple conversion.

Change-Id: Ibcb829fd1836c1e565ff57b4aa4dc3c0f6945b12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd DataObjectReference.firstKeyOf() 23/115123/5
Olivier Dugeon [Thu, 6 Feb 2025 13:33:17 +0000 (14:33 +0100)]
Add DataObjectReference.firstKeyOf()

InstanceIdentifier class has been mark as deprecated since 14.0.0.
A .toLegacy() method has been introduced to
DataObjectReference class in order to ease the transition.

There is a glaring omission, which is forcing downstream users to bounce
DataObjectReferences through .toLegacy(): firstKeyOf().

Introduce DataObjectReference.firstKeyOf() as the generalization of
InstanceIdentifier.firstKeyOf(), with the implementation residing in
AbstractDataObjectReference.

While we are at it, we improve the documentation a bit and improve
argument checks, so as not to get defeated by raw type overrides.

JIRA: YANGTOOLS-1656
Change-Id: Ibea2e8eec664927f652f963fda2ce06d738941c4
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-data-util to bnd-parent 39/115139/3
Robert Varga [Thu, 6 Feb 2025 16:44:34 +0000 (17:44 +0100)]
Convert yang-data-util to bnd-parent

The first part of this is obvious -- change pom.xml, update
module-info.java, add package-info.java's to hold @Export.

The second part is less obvious: since we now explicitly control
exports, we can from 'impl' from 'impl.context'. This is a safe
operation, as we do not expose this package in JPMS nor in OSGi.

Change-Id: Iaea72ca0db8dc9deae2538e109e5b6668dcbe4b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert binding-runtime-api to bnd-parent 46/115146/2
Robert Varga [Thu, 6 Feb 2025 19:50:31 +0000 (20:50 +0100)]
Convert binding-runtime-api to bnd-parent

Add a documentation and explicit export anchor, using more modern OSGi
integration.

Change-Id: I3ed50609856d074f0b74a5997dea03ef100d5bc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-data-codec-gson to bnd-parent 45/115145/2
Robert Varga [Thu, 6 Feb 2025 19:22:33 +0000 (20:22 +0100)]
Convert yang-data-codec-gson to bnd-parent

Improve the manifest and documentation a bit.

Change-Id: Ia8585c9d9fdc415737023763260df1aee4e6398f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-data-codec-xml to bnd-parent 44/115144/2
Robert Varga [Thu, 6 Feb 2025 18:52:05 +0000 (19:52 +0100)]
Convert yang-data-codec-xml to bnd-parent

Improve the manifest and documentation a bit.

Change-Id: I9bf212f7ef06ba8335d5f01bb7fd463539b6baeb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert yang-data-codec-binfmt to bnd-parent 43/115143/2
Robert Varga [Thu, 6 Feb 2025 18:22:36 +0000 (19:22 +0100)]
Convert yang-data-codec-binfmt to bnd-parent

This is a trivial conversion, with the added twist of fixing up all
javadocs and enabling enforcement.

Change-Id: Ia2476a2bcf80402896a08ae965cb28b45f1474c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove FIXME 42/115142/2
Robert Varga [Thu, 6 Feb 2025 18:21:25 +0000 (19:21 +0100)]
Improve FIXME

Add the literal XML fragment to enable linting.

Change-Id: Ic7f4d26250daa3e28dfe9c7a0bced537e9f48544
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate yang-data-tree-api to bnd-parent 27/115127/1
Robert Varga [Thu, 6 Feb 2025 13:33:41 +0000 (14:33 +0100)]
Migrate yang-data-tree-api to bnd-parent

This is mostly a trivial conversion, improving documentation very
slightly.

Change-Id: I59549275865c8669cbf3af46834ecac653c13a0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse correct annotation in data.tree.api.DataTree 26/115126/1
Robert Varga [Thu, 6 Feb 2025 13:27:10 +0000 (14:27 +0100)]
Use correct annotation in data.tree.api.DataTree

We are using SpotBugs @Nullable here by mistake. Switch to using JDT
version.

Change-Id: I9ece015097920684445a0b08429a86c52c329806
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate yang-data-spi to bnd-parent 25/115125/1
Robert Varga [Thu, 6 Feb 2025 13:24:40 +0000 (14:24 +0100)]
Migrate yang-data-spi to bnd-parent

This is a simple migration.

Change-Id: If08f6d956c845924ba145199d428f342aeaa1769
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUpdate yang-data-api description 24/115124/1
Robert Varga [Thu, 6 Feb 2025 13:22:47 +0000 (14:22 +0100)]
Update yang-data-api description

We are using just the artifactId, this patch adds a bit more descriptive
description.

Change-Id: I258ea9b3014d5a7271791720813cf4b4d147f93a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoModernize yang-parser-rfc7950 a bit 22/115122/2
Robert Varga [Thu, 6 Feb 2025 12:46:01 +0000 (13:46 +0100)]
Modernize yang-parser-rfc7950 a bit

Use AssertJ instead of the more obvious uses of Hamcrest.

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