Robert Varga [Mon, 4 Mar 2024 13:45:51 +0000 (14:45 +0100)]
Bump byte-buddy to 1.14.12
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.12
Change-Id: I4f31638b4094d7e43226d0a20122b7d22ef80fed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
870e09f2d8fb0cb2b5fb50192fe7efea3370fa1b)
Robert Varga [Fri, 23 Feb 2024 22:30:47 +0000 (23:30 +0100)]
Do not generate prime when not needed
In case we do not have any properties we end up emitting a local
variable which we'll never use -- generating a compiler warning.
Improve InterfaceTemplate to check for this condition and emit the
prime only if there are actually at least one property.
Change-Id: I3341ca075e8c7c0b671a76f226b7bdb99cb12465
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
37ba772acba4cf4f56e3814c073c64f096f94d02)
Robert Varga [Mon, 5 Feb 2024 09:58:36 +0000 (10:58 +0100)]
Improve RpcProviderService.registerRpcImplementations()
Each Rpc exposes its contract via implementedInterface(). Use this
information to make registerRpcImplementations() more user friendly.
JIRA: MDSAL-854
Change-Id: Iec6b3f65207078304380b1e3050da00c644c4ce4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b36a95a80b1d42191d070beb376a2495d8fd1923)
Robert Varga [Fri, 19 Jan 2024 13:12:27 +0000 (14:12 +0100)]
Clean up constant reference
We have two methods with the same name, make sure we use the right
constant when referencing it.
JIRA: MDSAL-852
Change-Id: I7628d2c997e3c62895984d6d85672c65ff9f0ce7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
114cc6781dcce3101ff893d39786eef2c7ea5646)
Robert Varga [Sat, 13 Jan 2024 19:29:25 +0000 (20:29 +0100)]
CommitInfo forward compatibility
This patch refactors EmptyCommitInfo to implement the future CommitInfo
interaface -- carrying uuid/time information and being Serializable.
JIRA: YANGTOOLS-1554
Change-Id: Ibe5070b17fe50fc8aa7f75a7483aa9f0e9ef5139
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
730b24538dfa113ea18ab874d932d5726aef96ce)
Robert Varga [Wed, 27 Dec 2023 00:13:01 +0000 (01:13 +0100)]
Capture collection type class
Improve CodeHelpers safety by not losing Class type.
Change-Id: I585afdbda3328b018764627631dff7c8df372c01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2840f8a13a244834a831614d96a1411b3add3286)
Robert Varga [Thu, 18 Jan 2024 06:56:56 +0000 (07:56 +0100)]
Override Rpc/Action invoke method
Add a plain @Override method for Rpc/Action's invoke method, so that it
is manifested in the generated type.
JIRA: MDSAL-852
Change-Id: I7db7c9036bdb3051ae48a903b66df933fb338fae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
078d561c79e3fcf57b2bfd5d6b50c4502288781a)
Robert Varga [Thu, 18 Jan 2024 16:41:27 +0000 (17:41 +0100)]
Use Locale.ROOT for toUpperCase
We can just assert this is the root locale, not a some particular
language.
Change-Id: Ibce067abf252162740a9c6ed88a3beff99f455b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f2572480048c7d2017ee88f65a22b2eabe0dd46b)
Robert Varga [Thu, 28 Dec 2023 21:48:23 +0000 (22:48 +0100)]
Bump byte-buddy to 1.14.11
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.10
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.11
Change-Id: I14982abcc38545c72afce2abf9ffcd613534f5c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
c3613aa89ab5619abc59ac6e0e6890a9041249c7)
Robert Varga [Thu, 28 Dec 2023 20:05:11 +0000 (21:05 +0100)]
Bump versions to 12.0.5-SNAPSHOT
This starts the next development iteration.
Change-Id: Ic5ec8f0870a16c1860d1f2c924ff5591f22ef1d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Thu, 28 Dec 2023 11:36:56 +0000 (11:36 +0000)]
Release mdsal
Robert Varga [Fri, 24 Nov 2023 15:00:17 +0000 (16:00 +0100)]
Remove SuppressFBWarnings from InstanceIdentifier
Define readObject()/writeObject() methods that enforce Serializable
Proxy pattern, which in turn silences SpotBugs.
Change-Id: Ic7c5f523adc5e0df7e9a2767f93fcadd3bc77c8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
32bc2210ab6b6fcc6b7c5459d86352006250414a)
Robert Varga [Sat, 16 Dec 2023 14:12:38 +0000 (15:12 +0100)]
Fix wrong annotation use
Use JDT annotation instead of SpotBugs, reducing our exposure.
Change-Id: I1fc1e13c5ae476a456a1ffd4db7182f118985945
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f052b186f3f1c7c314ab71a8cd0b4df4c00fda1e)
Robert Varga [Tue, 19 Dec 2023 12:49:28 +0000 (13:49 +0100)]
Move binding.model.api documentation
Package documentation resides in the wrong file, move it.
Change-Id: I77d1c5f3b411df7ebb855ccaeb6c7c8d9d1184cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e71e1be48c76398867c75d098e00b76ddf271cd8)
Robert Varga [Tue, 26 Dec 2023 20:50:19 +0000 (21:50 +0100)]
Skip SpotBugs for generated code
SpotBugs-4.8.3 allows us to explicitly exclude classes from analysis,
take advantage of this facility to suppress Spotbugs on all classes
generated from YANG models.
Change-Id: I81a09e7ba7a1bac9ad1884b36f0bd98a7a3ecde3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e04be15a9540ad113a48aa1f08c8382813cf882b)
Robert Varga [Tue, 26 Dec 2023 20:17:38 +0000 (21:17 +0100)]
Bump upstreams
Adopt:
- odlparent-13.0.10
- yangtools-11.0.5
Also sprinkle @SuppressFBWarnings as needed.
Change-Id: I1649b1e2289f0a6ea2d8919f340dcc8e0b0579f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
9f23891d96e635e1cd30c699f9b72b9336fc9d06)
Robert Varga [Thu, 28 Dec 2023 08:40:13 +0000 (09:40 +0100)]
Use constructor injection in mdsal-singleton-dom-impl
Upgraded SpotBugs complains about
UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR, fix that by using constructor
injection.
Change-Id: I812feea91e0a13e7978d4d89b2ca2ee863c2187d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 Dec 2023 23:33:28 +0000 (00:33 +0100)]
Use constructor injection in mdsal-replicate-netty
We really do not want to retain references here, use simple constructor
injection instead.
Change-Id: I72a9f6f2e80d19f57d6c113132e173e569fb4ef9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e60ce63d3a25e6138fd04297ac370109ac8d4909)
Robert Varga [Tue, 26 Dec 2023 23:12:58 +0000 (00:12 +0100)]
Use constructor injection for OSGi codec services
We can easily use constructor injection, which eliminates the need for
an explicit field.
Change-Id: I292169b1dd98dd0341a2b5067495bbc79a1c41e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d3c0035fc97dea4008850d58fd719c41af1265ca)
Robert Varga [Tue, 26 Dec 2023 22:33:01 +0000 (23:33 +0100)]
Use constructor injection in OSGiDOMSchemaService
Constructor injections makes listenerFactory a final field, which is
exactly what we want.
Change-Id: Idc88f704e30a1bf00e367b31e0c8f168dd9761e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
18cc77eca8b2440cb8c1f22db62c845c6fd7b9ae)
Robert Varga [Tue, 26 Dec 2023 23:52:34 +0000 (00:52 +0100)]
Do not leak SpotBugs from yang-binding
We do not want to pollute user-visible classes with @SuppressFBWarnings,
as that is a purely-internal thing.
Isolate the single method requiring suppression into its own
package-private class.
Change-Id: I200ef79c512063f531f1dd18ed0148439c850563
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
99dd61f2037307d1b59f72a47e89d845f138acde)
Robert Varga [Sat, 9 Dec 2023 12:37:24 +0000 (13:37 +0100)]
Clean up DataTreeIdentifier a bit
Use a simple hashCode() implementation and instanceof pattern to
simplify equals().
Change-Id: I1312468eb97fad1991366f04970b3c2db27b6ff0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ccf116abaf3eb6615f9391344ab692fb9734f2ff)
Robert Varga [Sat, 9 Dec 2023 10:51:14 +0000 (11:51 +0100)]
Use compareAndExchange() to set closeFuture
Java 9+ gives us a convenient way to ensure null-safety in this CAS
operation -- compareAndExchange() returns the witness value, i.e.
we get the value instead of a plain boolean false.
Change-Id: I636b0f084170d42bbd99490577917afefe5145e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b61b30a4b2be38c8629bf9c5d66d05609db3be1c)
Robert Varga [Sat, 9 Dec 2023 13:18:03 +0000 (14:18 +0100)]
Add (DOM)DataTreeIdentifier serialization proxies
Further evolution of these two classes will require allowing for two
distinct specializations.
In order to be able to do that, we need to disconnect them from their
serial form.
This patch instroduces serialization proxies, which know how to write
out and read in these objects without referencing their class name.
JIRA: MDSAL-845
Change-Id: I2b50d3aa5f752d6181dab991a5a8282b079b16df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
9286037f2852d197c4384511fce97c551e2b8dc3)
Robert Varga [Thu, 7 Dec 2023 02:38:45 +0000 (03:38 +0100)]
Make sure listeners are immutable
We guarantee DOMNotificationRouter.listeners to be immutable. Make sure
the field has the correct type to prevent confusion.
Change-Id: Ia4b86c00bdd0517182d4ec0ad63b7f903d3c4ee7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6278245ab37ad9764d4a88c337e8a87631d2c5c9)
Robert Varga [Wed, 6 Dec 2023 18:28:21 +0000 (19:28 +0100)]
Bump Xtend to 2.33.0
https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2023/11/21/version-2-33-0
Change-Id: I926f2981d05af6f3cc7da5825377312dfe574c83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6b482af5ec8675f46684edca113ea9df8c099383)
Robert Varga [Mon, 30 Oct 2023 21:21:28 +0000 (22:21 +0100)]
Bump versions to 12.0.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I22fefd3c8ae76998cd879391b322adeb61a0c9b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 30 Oct 2023 16:12:11 +0000 (17:12 +0100)]
Bump upstreams
Adopt:
- odlparent-13.0.7
- yangtools-11.0.4
Change-Id: Iaa314dfdca3513a67d9a1b8cb895554172071441
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 21 Oct 2023 03:43:30 +0000 (05:43 +0200)]
Make LambdaTarget a record
We have a FIXME for efficiency improvement, address it.
Change-Id: If09bdb15b83b5e83114435456f4e4d1df4344e0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 18 Oct 2023 16:08:52 +0000 (18:08 +0200)]
Migrate rfc6991-ietf-yang-types to JUnit5
We have a single test here, which is trivial to migrate.
Change-Id: I871dc1813c59159300c9561a539cce299d7e8700
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 18 Oct 2023 16:04:42 +0000 (18:04 +0200)]
Migrate rfc6991-ietf-inet-types to JUnit5
This is a trivial migration, except we also migrate hamcrest assertions
to assertInstanceOf().
Change-Id: I812ec1c4a885c9912afea41135ed767ce6436c0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 18 Oct 2023 15:57:41 +0000 (17:57 +0200)]
Migrate ietf-type-util to JUnit5
This is a straightforward automated conversion.
Change-Id: I307c021985090c59e8d41fc833427c0da9e7842f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
matus.matok [Thu, 20 Jul 2023 07:26:31 +0000 (09:26 +0200)]
Fix links in README
Fixed the links in README.md to use the correct markdown syntax.
JIRA: MDSAL-832
Change-Id: Iba195c6ee9191480b8cfb4c888fb82904ba3f37a
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
Robert Varga [Tue, 17 Oct 2023 12:18:08 +0000 (14:18 +0200)]
Bump byte-buddy to 1.14.9
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.9
Change-Id: I254907a6467e8d3d76d165bd4f3c22a379545eb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Šimon Ukuš [Wed, 22 Mar 2023 14:43:40 +0000 (15:43 +0100)]
Add docs for model registration with OSGi
JIRA: MDSAL-9
Change-Id: Id0c6c2071c14977caad31743253bbae8b6436755
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Robert Varga [Sun, 1 Oct 2023 23:29:00 +0000 (01:29 +0200)]
Bump upstreams
Adopt:
- odlparent-13.0.5
- yangtools-11.0.3
Change-Id: Ic5ae3e0bfa2359087ad4c8818794746489ab2e20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 29 Sep 2023 16:03:18 +0000 (18:03 +0200)]
Fix NotificationListenerInvokerTest on Java 19+
We cannot mock MethodHandle, as it is a sealed class on Java 19+. Adjust
the test to use String.toString() as the source of the MH.
Change-Id: Ieab28fdec5c703c2fcad8b14cd95ea3f49bd2a21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 17 Sep 2023 11:53:18 +0000 (13:53 +0200)]
Bump versions to 12.0.3-SNAPSHOT
This starts the next development iteration.
Change-Id: Id25ee91d56adadb4dda0b0dbb57555a5f0a31b7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Sun, 17 Sep 2023 09:11:11 +0000 (09:11 +0000)]
Release mdsal
Robert Varga [Sat, 16 Sep 2023 11:11:17 +0000 (13:11 +0200)]
Bump byte-buddy to 1.14.8
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.8
Change-Id: Ica0c4632f81b6d11303409303ebe30245b63cc22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 16 Sep 2023 11:10:35 +0000 (13:10 +0200)]
Bump yangtools to 11.0.2
Pick up fixes and improvements from upstream.
Change-Id: I25d4724ac546438db4470925bb73e30c7f9cccea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Sep 2023 19:59:41 +0000 (21:59 +0200)]
Make AbstractPingPongTransactionChain.close() idempotent
Expend one byte of state to track close() method, making sure it is
idempotent.
JIRA: MDSAL-838
Change-Id: Ie7bccb2c12ad9eadd948fc15244cc2b2b150a256
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Sep 2023 20:13:23 +0000 (22:13 +0200)]
Migrate callers of deprecated DataTreeCandidateNode methods
DataTreeCandidateNode has deprecated a number of methods, migrate its
callers.
Change-Id: Ie190e4bfa6c4e37c3f242d9b6220a5dcc9e3d20d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 17:52:31 +0000 (19:52 +0200)]
Migrate mdsal-dom-api to JUnit5
Migrate and clean up tests.
Change-Id: Id437ae4ca4e93ca2b8ec38ed46a760fe2db4d157
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 19:19:39 +0000 (21:19 +0200)]
Migrate mdsal-common-api to JUnit5
This is mostly a trivial conversion, but we also expand the test suite
to increase coverage and assertions.
Change-Id: I6ad81c99cc153e2fee3cd937dba42371a98ea047
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 17:35:26 +0000 (19:35 +0200)]
Migrate mdsal-binding-api to JUnit5
Remove DataObjectModificationTest and migrate other tests to use JUnit5.
Change-Id: Ie341ae97344066a0627225e7ee56162bc27927ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 19:26:19 +0000 (21:26 +0200)]
Bump versions to 12.0.2-SNAPSHOT
This starts the next developement iteration.
Change-Id: I1cab2e06404eb6de3fb589fb07ba34f1695f98b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Wed, 30 Aug 2023 14:41:47 +0000 (14:41 +0000)]
Release mdsal
Robert Varga [Wed, 30 Aug 2023 12:07:25 +0000 (14:07 +0200)]
Bump upstreams
Adopt:
- odlparent-13.0.4
- yangtools-11.0.1
Change-Id: I292e6adbf213017d4dc9316e32ba60111ad7e60b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 13:06:45 +0000 (15:06 +0200)]
Fix mdsal-binding-dom-adapter checkstyle
Upgraded checkstyle is finding a few issues, fix them up.
Change-Id: Ifdafb339f112749b891ef288420e28af124b306e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 08:35:26 +0000 (10:35 +0200)]
Fix mergeParentStructure{Merge,Put} with augmentations
We need to pay attention to the result of normalization, as
AugmentationResult points to the parent YangInstanceIdentifier --
and hence we should just use it instead of peeling its last component.
JIRA: MDSAL-837
Change-Id: I7f108a6dff96a010f029b38b2cbba5548551b56e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Aug 2023 09:47:20 +0000 (11:47 +0200)]
Clean up dependencies
We have quite a few warnings about used undeclared dependencies, clean
them up.
Change-Id: I768629694f426f99aaa32a53d19b18642b88a0bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 29 Aug 2023 19:11:37 +0000 (21:11 +0200)]
Split out OperationInvocation
This should be a top-level class, even when it is a utility. Changes the
logger identity, but fixes a Sonar warning.
Change-Id: Id7777ac73b8e765df86349384f5f911f48562c00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 29 Aug 2023 18:59:56 +0000 (20:59 +0200)]
Qualify nested interfaces
Fix Sonar warnings stemming from differing import policies:
Eclipse requires these references to be imported, whereas Sonar flags
them.
Use qualified refernces to eliminate the ambiguity.
Change-Id: Iac509fdd28b7520220a9f171b0d5fff0df306663
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 29 Aug 2023 18:58:51 +0000 (20:58 +0200)]
Merge if() statements
There is no point in having nested if() statements, merge them,
eliminating a Sonar warning.
Change-Id: I9a1e325c6366446858fe47fd4956d0754f9b9f19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 29 Aug 2023 18:57:32 +0000 (20:57 +0200)]
Bind to org.eclipse.jdt.annotation
We are using these annotations with scope=compile, hence we can safely
binding to the classes at runtime. Fixes a few Sonar warnings.
Change-Id: I793b847d9d25086e32158f333d8c5c155e554568
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 29 Aug 2023 07:06:32 +0000 (09:06 +0200)]
Bump xtend to 2.32.0
https://eclipse.dev/Xtext/xtend/releasenotes.html#/releasenotes/2023/08/27/version-2-32-0
Change-Id: I1179a8129e379fe833a6e6487d22d6c7abad5362
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 28 Aug 2023 11:43:11 +0000 (13:43 +0200)]
Bump byte-buddy to 1.14.7
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.6
https://github.com/raphw/byte-buddy/releases/tag/byte-buddy-1.14.7
Change-Id: Ia547a6bc735f5efa6d0420dc0261442f077e815d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 12:14:27 +0000 (14:14 +0200)]
Remove CommonDataObjectCodecContext.namespace()
This method is not used anywhere, remove it. This cascades to
CommonDataObjectCodecPrototype.getNamespace(), which is also unused and
removed -- trimming down the overall memory cost and the need to make up
a namespace.
Change-Id: Iefe432de785d0c7400dd5be87797c849e56c2f9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 11:42:31 +0000 (13:42 +0200)]
Unify yangPathArgumentChild()
We have two implementations which are doing essentially the same thing
-- except ChoiceCodecContext performs lookup twice. Reduce the amount of
codec duplication.
JIRA: MDSAL-805
Change-Id: I834bf66d92f8bf3ad8621be28ba3fbb39f52f9fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 11:27:33 +0000 (13:27 +0200)]
Unify streamChild() implementations
The two implementations we have perform essentially the same thing, tie
them together.
JIRA: MDSAL-805
Change-Id: I303ae152987b4d478862874b4d9ee3fc8db4f7db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 08:03:04 +0000 (10:03 +0200)]
Revert "Convert model.ietf.rfc8040 to JPMS"
This reverts commit
f22f321bc45e37db18af4d3b1056d6fb24f29943. We are not
ready for this just now.
Change-Id: If9f58fb27747aef2c02bd9e291322d15b7be1ac7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 10:00:28 +0000 (12:00 +0200)]
Unify getStreamChild() implementations
We have two implementations, which essentially do the same thing. Unify
them in DataContainerCodecContext.
JIRA: MDSAL-805
Change-Id: I97db0a356c51472a30b206151426921f5ad550cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 11:12:15 +0000 (13:12 +0200)]
Fix mdsal-binding-dom-codec dependencies
We are using JDT annotations, declare that.
Change-Id: I1c4a6d112da9015fb3885e40c33bf27cd31246ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 10 Jul 2023 09:43:40 +0000 (11:43 +0200)]
Remove superfluous documentation
DataContainerCodecContext implements contracts, there is no need to
re-state the same contract.
Change-Id: Ie1694ff61c61933df8811dcc39b23eca41cf6319
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Jul 2023 00:51:22 +0000 (02:51 +0200)]
Convert model.ietf.rfc8040 to JPMS
Rather than being an automatic module, make this an explicit module.
Change-Id: Ifa58df2d9a3279252a1fb453fc7a3b7b49f1c620
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 Jul 2023 00:13:32 +0000 (02:13 +0200)]
Remove PMD/CPD configuration
We do not have PMD/CPD plugins configured, there is no need to disable
them.
Change-Id: I05a7ed5978eb54440b6d6009a9ea26af9b29926e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 4 Jul 2023 19:32:17 +0000 (21:32 +0200)]
Do not require ListeningExecutorService
SerializedDOMDataBroker can easily operate on any Executor with the
help of Futures.submit(). Drop the requirement to have a
ListeningExecutorService and operate on plain Executor.
Change-Id: I5e5bc1f0c7bfa93f443bc18755d48beafc22f7f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 29 Jun 2023 21:31:58 +0000 (23:31 +0200)]
Sharpen DataContainerCodecContext generics
Now that RootCodecContext is gone, we can sharpen T to require
CompositeRuntimeType, eliminating a bit of weirdness.
Change-Id: I9f430ceeaa59baedcb7ea2b0e69ad279964eb6ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 29 Jun 2023 20:51:28 +0000 (22:51 +0200)]
Fold RootCodecContext into BindingCodecContext
RootCodecContext exists only for two purposes:
- return for an empty YangInstanceIdentifier lookup
- ease of InstanceIdentifier lookup
In order to fulfill these two roles, it ends up twisting the
BindingDataObjectCodecTreeNode contract in rather nonsensical ways,
preventing a number of further evolutions of the API.
Fold its functionality into BindingCodecContext, eliminating it from the
class hierarchy.
Change-Id: I44a49b78ed9ae418c5c85e48e9441fa1ec1e9862
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 30 Jun 2023 08:11:01 +0000 (10:11 +0200)]
Bump versions to 12.0.1-SNAPSHOT
This starts the next development iteration.
Change-Id: I7a73013e69e31b3bea46a44afa9e5e7a05b4a711
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Thu, 29 Jun 2023 22:25:23 +0000 (22:25 +0000)]
Release mdsal
Robert Varga [Thu, 29 Jun 2023 19:01:03 +0000 (21:01 +0200)]
Add interfaces for (Normalized)YangData codec
We are lacking the ability to transcode yang.binding.YangData to
NormalizedYangData. This patch adds the baseline interfaces required
along with disabled tests.
JIRA: MDSAL-805
Change-Id: I026240e553ffe3415466f94cb1e3f206eb5a3a0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 29 Jun 2023 14:47:16 +0000 (16:47 +0200)]
Split up CodecDataObjectAnalysis
CodecDataObjectAnalysis contains two things: the indexing of children
and then the generated class. We need to split these up, so we can
actually plugin in YangData (which needs to former) into the mix.
JIRA: MDSAL-805
Change-Id: Ic38cbf1be4b4011ae5dd983d1826e020a67620c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 29 Jun 2023 14:39:19 +0000 (16:39 +0200)]
Reduce unchecked warnings
We do not need DataObject specialization, which solves a few warnings
around casting.
JIRA: MDSAL-805
Change-Id: I1d4ef9938ae75bff182e4f1bfad8d7caaae4a313
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Jun 2023 16:23:02 +0000 (18:23 +0200)]
Split out BindingDataContainerCodecTreeNode
DataContainer contract is well-known and used all over the place. Split
it out so it can be implemented separately. This also reworks codec's
internal type hierarchy to make place for
BindingDataContainerCodecTreeNodes which are not DataObjects.
JIRA: MDSAL-805
Change-Id: I225bb02f2c2a1d9caa6e435a4c2ef8f8f62574bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 29 Jun 2023 12:07:41 +0000 (14:07 +0200)]
Reuse cached factory
We can take advantage of local factory to get the loader. This
simplifies things a bit.
Change-Id: Ic1b71c553bc2640697163a544809e1f5de873979
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 29 Jun 2023 11:18:03 +0000 (13:18 +0200)]
Fix YangDataRuntimeTypes not being available
CompositeRuntimeType children are always indexed only through
SchemaTree, which means we need to make another pass to get at
YangDataRuntimeTypes.
JIRA: MDSAL-805
Change-Id: I68cfc7fad2c1a7cb3333e48e9b435bc681992641
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 28 Jun 2023 09:47:28 +0000 (11:47 +0200)]
Do not require DataObject for streaming
DataContainer is completely sufficient, require just that.
JIRA: MDSAL-805
Change-Id: Iff55143f2c3bcc8a4b678649285f170f0353db5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 28 Jun 2023 09:20:20 +0000 (11:20 +0200)]
Reduce explicit casts in DataObjectStreamerGenerator
Use instanceof patterns to reduce casts.
Change-Id: I3d1e0f8ea5d4b14135e1604b6f902d9e5193941c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 28 Jun 2023 07:23:49 +0000 (09:23 +0200)]
Fixup dom-codec a bit
With all the moves we can tighten formatting a bit. Also remove a site
with raw types.
Change-Id: Id3b13500598a595517dbbfe9f98893517cd77aa2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Jun 2023 22:06:41 +0000 (00:06 +0200)]
Rename CaseNodeCodecContext
'CaseCodecContext' is a better name, matching the CaseCodecPrototype we
already have.
Change-Id: I5b3f8501e92f65824d63da282b54b10751424208
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Jun 2023 19:20:37 +0000 (21:20 +0200)]
Split up DataObjectCodecPrototype
Having a type-based dispatch during createInstance() is not exactly
nice. This patch splits up DataObjectCodecPrototype.createInstance()
into individual prototypes, so that we have a prototype for pretty-much
each CodecContext type.
This also improves type safety, as CodecContexts now can be directly
instantiated (and create a prototype internally).
Change-Id: If740949bc15890f0ce4bfa5b59cda030b33e66a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Jun 2023 19:04:40 +0000 (21:04 +0200)]
Rename ContainerNodeCodecContext
A better name is 'ContainerLikeCodecContext', mirroring binding to
ContainerLikeRuntimeType.
Change-Id: Ie2579010a4b7da15df8192c0bd8690b84d769ccd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Jun 2023 19:02:53 +0000 (21:02 +0200)]
Rename NonPresenceContainerNodeCodecContext
'StructuralContainerCodecContext' is a better name overall.
Change-Id: I8cec640b209b96929f1a9bc33bbfa6af3dde81e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Jun 2023 15:38:01 +0000 (17:38 +0200)]
Split up OpaqueNodeCodecContext
We have two specializations, make promote them to top-level classes and
rename OpaqueNodeCodecContext to AbstractOpaqueCodecContext.
Change-Id: Ibe18324a5e5a408cfcf8bbbe6b77065f19a3bfa5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 21:48:01 +0000 (23:48 +0200)]
Promote RuntimeType interface hierarchy
Basic types have stood the test of time so far, drop @Beta annotations.
Change-Id: Icd8e8957706eb78678715a17653615de4b09d948
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 20:25:29 +0000 (22:25 +0200)]
Promote BindingIdentityCodec
There is nothing @Beta about this interface anymore, remove the
annotation.
Change-Id: I6e8bedbc73b704566fce5ce06a9fb9316573cf5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 20:11:40 +0000 (22:11 +0200)]
Add CodecWithPath documentation
Document the two parts of this record.
Change-Id: Ia665ccda22f53944f760e1b3f22816e96b40faf1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 20:09:15 +0000 (22:09 +0200)]
Drop @Beta from BindingCodecTree methods
These methods are well-established, they are no longer @Beta.
Change-Id: I83770212cc6de6adf3d9f9c4d7880d923d5da00f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 18:33:35 +0000 (20:33 +0200)]
Do not use BindingReflections in mdsal-binding-dom-codec-api
The exact mechanics of now an Action's QNameModule is resolved should
not be dependent on reflection. Eliminate this assumption from API and
shift it down to implementation.
JIRA: MDSAL-781
Change-Id: I6c3a18c41ee8189c315be3cc2888c092f06bb6ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 18:16:25 +0000 (20:16 +0200)]
Reduce use of BindingReflections in BindingNormalizedNodeSerializer
BindingNormalizedNodeSerializer's codec implementation can easily
process some of these methods and we therefore do not have to use
BindingReflections to acquire their NodeIdentifiers.
JIRA: MDSAL-781
Change-Id: If928d896e785fe8782ddbde7fb898464c40adb17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 18:03:02 +0000 (20:03 +0200)]
Remove BindingReflections.getQName(BaseIdentity)
All users (including downstreams) have been eliminated, remove this
method.
JIRA: MDSAL-781
Change-Id: I66a7dc55d86be4e863cff675f4feb230c5e4c531
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 18:36:32 +0000 (20:36 +0200)]
Fix output's NodeIdentifier
We are mis-representing the output as input, fix that.
Change-Id: Ic5eee44575e42b30ad60d75c3dd3256426ca9137
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 13:03:02 +0000 (15:03 +0200)]
Clean up dependencies
Clean up dependencies of mdsal-trace-impl, mdsal-eos-binding-api,
mdsal-dom-spi and mdsal-rfc8294-netty.
Change-Id: Ic3be075e80a2700207abe3628d4d3f972818e64c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 12:42:24 +0000 (14:42 +0200)]
Improve binding-parent
Require basic things for generated code and make sure
maven-dependency-plugin does not trip over optional parts.
Change-Id: I98d11bd165f5f85d324d27039e4c1b75974ee3ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 11:48:45 +0000 (13:48 +0200)]
Do not require spotbugs transitively
Clean up dependencies, eliminating unused declared dependencies on
spotbugs-annotations. Also clean up dependency confusion between
mdsal-binding-dom-adapter and mdsal-binding-test-utils.
Change-Id: Iaa6681c3e53ca8b9bd9e63abecf199b316fa9b4d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 12:12:25 +0000 (14:12 +0200)]
Update documentation links
Used HTTPS and point to correct relase of Guava.
Change-Id: I578a1dd4d3ed0b957f0aeba3425f974fe2a2cc2d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Jun 2023 08:36:01 +0000 (10:36 +0200)]
Bump upstreams
Adopt
- odlparent-13.0.3
- yangtools-11.0.0
Change-Id: Ie3277c61866d649a8c8c8bbde9320a0375cd65ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 22 Jun 2023 15:53:32 +0000 (17:53 +0200)]
Do not use BindingReflections in ModuleInfoSnapshotBuilder
We have YangModuleInfos, which expose both the root package and the
corresponding namespace. Use that information to resolve QNameModule
for a particular root without relying on reflective access.
JIRA: MDSAL-783
Change-Id: If8b14cb49118f5d97c65783f29f1aa77bcc4eada
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>