Robert Varga [Tue, 2 Jul 2024 15:38:41 +0000 (17:38 +0200)]
Fixup binding-bundle-parent reference
We need to also use the correct artifactId, not just the path.
Change-Id: I76d4f99e89c4c6bb390aeda6bfdc4ab238ff4166
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 2 Jul 2024 13:52:07 +0000 (15:52 +0200)]
Introduce BindingInstanceIdentifier.Step
The identifier is composed a number of steps -- just as exposed from
DataObjectIdentifier, but slightly more general.
JIRA: YANGTOOLS-1577
Change-Id: I14d808664a11a3ea144af65df0f6ab3c467e3358
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 2 Jul 2024 13:46:46 +0000 (15:46 +0200)]
Sharpen ChildOf type argument
ChildOf's parent cannot be any old Object, it has to be a DataContainer
-- improving usage safety.
JIRA: YANGTOOLS-1577
Change-Id: I024247b40b9209ef980759fe7eba8d0e504a9bc9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 13:49:11 +0000 (15:49 +0200)]
Clean up binding-model stuff a bit
Re-introduce mockito-configuration and reorder module-info.java
references.
JIRA: YANGTOOLS-1576
Change-Id: Idde312f750f6865551a28a14b7fecd66e3d51709
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 09:10:10 +0000 (11:10 +0200)]
Merge binding-model-{api,ri}
Splitting model-api from model-ri does not make much sense at this
point. Merge the two into binding-model, which properly depends on
binding-spec, just as model-ri used to.
JIRA: YANGTOOLS-1576
Change-Id: I13d5c592b6b60edcc264d9885376f83a2ccb9368
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 12:46:35 +0000 (14:46 +0200)]
Rename binding-parent to binding-bundle-parent
We are going to have a 'binding-bnd-parent', so let's keep consistent
naming here.
JIRA: YANGTOOLS-1576
Change-Id: I267a62a20f5e4f6ab4f3610521058956d08eff3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 12:43:35 +0000 (14:43 +0200)]
Remove yang-ext
The bits of yang-ext.yang that are relevant to yangtools have been split
out to odl-codegen-extensions.yang. Remove this packaging.
JIRA: YANGTOOLS-1576
Change-Id: Ied18a3eb3360707ce4f1c8d5f5bb13e5324c1ede
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 12:41:20 +0000 (14:41 +0200)]
Do not declare binding-parent
binding-parent is an entry point into yangtools, just as artifacts
does. Do not declarete it in artifacts.
JIRA: YANGTOOLS-1576
Change-Id: Ia9efb6c0f58f2d3cc4a47017405b513d5e8e559d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 12:21:18 +0000 (14:21 +0200)]
Migrade binding-reflect to bnd-parent
Modernize the packaging method, using explict Export annotation.
JIRA: YANGTOOLS-1576
Change-Id: I1b4ee2c2fbdc38d0851b6acc545e3ce9bf753a8e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 12:13:20 +0000 (14:13 +0200)]
Improve binding-codegen tests
Remove uneeded exception throws, turning them into assertion failures.
JIRA: YANGTOOLS-1576
Change-Id: Ic1ee8b17df995e33fd9ee821e677ceaa22bd26bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 11:41:59 +0000 (13:41 +0200)]
Migrate binding-{reflect,spec} to JUni5
Migrate and modernize tests, improving assertions a bit.
JIRA: YANGTOOLS-1576
Change-Id: Id29dfe2b8c1c1ca78639bd9a12aebad905d5831e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 30 Jun 2024 08:55:32 +0000 (10:55 +0200)]
Clean up TypeMemberComment
We have a javadoc warning and an opporunity to simplify equals().
Change-Id: I5cf610d44f89f4b97ef272f09444f5104dfa46a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 13:45:33 +0000 (15:45 +0200)]
Rework Grouping mapping
Having interfaces generated for grouping extend DataObject brings in
a lot of chaos, as it implies Grouping is addressable, which it is not.
We have a lower-impact contract, DataContainer, which gives similar
facilities, but is does not imply the interface can be used in
DataObjectStep.
Introduce binding.Grouping as a DataContainer specialization and switch
interfaces generated for groupings to use that.
JIRA: YANGTOOLS-1577
Change-Id: I9c63400281098a25974feb46ae33101793f3248b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 14:52:52 +0000 (16:52 +0200)]
Refactor binding.DataRoot
DataRoot is really a (currently unaddressable) DataContainer. Make it
generic, forcing specialization, and extend DataContainer.
This ends up cleaning up some sites, which are using generic capture
<R extends DataRoot & DataObject> to express a generated type -- those
now become <R extends DataRoot<R>>.
We also get the goodies of terminal specialization like OpaqueObject,
like an accurate implementedInterface().
JIRA: YANGTOOLS-1577
Change-Id: Ie37fad4b7274e06dbf412c6d3a1cee3d6a6c98c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 14:04:34 +0000 (16:04 +0200)]
Migrate DefaultBindingGeneratorTest
Use JUnit5, ditching MockitoExtension, as it is not used. Also migrate
away from Hamcrest, as JUnit5 provides everything we need.
Change-Id: I2bb59dac4c8a9cb0842d393fa8b79647b4952bbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 11:31:01 +0000 (13:31 +0200)]
Clean up use of Augmentation generics
Augmentation is a subclass of DataObject, therefore we do not need to
use a generic & DataObject.
Change-Id: I477389347b0a082c04ea2d9a63e6d4e0db6d23f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 11:24:37 +0000 (13:24 +0200)]
Clean up binding-spec use of EntryObject
We have a few leftovers referencing either KeyAware or unnecessarily
mixing in DataObject. Clean all of them up.
JIRA: YANGTOOLS-1609
Change-Id: I8d25ae590a17bdffa4f0c9fa2270976ec86afabc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 11:17:13 +0000 (13:17 +0200)]
Simplify BindingStreamEventWriter
Since we have EntryObject we can improve a few method signatures, as it
captures the KeyAware/DataObject base.
JIRA: YANGTOOLS-1609
Change-Id: Ibea61933108ca0941c0a20029bce2ad5cf10dc19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 29 Jun 2024 10:01:36 +0000 (12:01 +0200)]
Fix union treatment of instance-identifier
Fix the stringValue() detection logic to recognize
BindingInstanceIdentifier.
JIRA: YANGTOOLS-1577
Change-Id: I8dd80fc1fa4c22fbac0d76083994e034c8b95532
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 17:29:07 +0000 (19:29 +0200)]
Introduce binding.EntryObject
We are using KeyAware with conjunction with DataObject, leaving
generated code to connect the two. This is unfortunate, as that
conjuction is really a kind of DataObject, similar to ChildOf.
Introduce a dedicated type, EntryObject, which combines DataObject and
KeyAware, providing a nice marker for generated interfaces. This also
allows us to further specialize KeyAware and seal its class hierarchy,
reducing potential confusion.
JIRA: YANGTOOLS-1609
Change-Id: I11a1d1c678c5e7f4397d1a2ddf420067559b2dbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 22:15:38 +0000 (00:15 +0200)]
Improve data codec dispatch
Isolate everything except Object.class, so that we properly look up
pass-through types. This leaves NOOP_CODEC relying at least on
BuiltInTypes, although that is not a complete solution.
JIRA: YANGTOOLS-1602
Change-Id: Ic46328d47924910dc425f50b5cd77ca1bb111b31
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 23:16:25 +0000 (01:16 +0200)]
Eliminate unneeded use of InstanceIdentifier
Codec should operate on DataObject{Identifier,Reference}, relying on
users to covert DataObjectRefences to InstanceIdentifiers when they need
them.
JIRA: YANGTOOLS-1577
Change-Id: I718aee3f9bd23fb220140087ab1869ead19f7207
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 22:45:08 +0000 (00:45 +0200)]
Adjust CompositeValueCodec to BindingInstanceIdentifier
Composite values are also being encoded via BindingInstanceIdentifier,
make sure we adjust the checks. Also modernize to Java 21 standards.
Change-Id: I404010b685974503317580f2214410fc5e589596
JIRA: YANGTOOLS-1577
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 22:24:14 +0000 (00:24 +0200)]
Fix BuiltInType mapping
The checks in BuiltInType need to be updated to reflect
InstanceIdentifier's diminished role.
JIRA: YANGTOOLS-1577
Change-Id: I20d44cdb5d24fbf958a1d15799a7981301e009d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 16:46:56 +0000 (18:46 +0200)]
Switch mapping to BindingInstanceIdentifier
BindingInstanceIdentifier requires an exact path. This patch switches
the representation to BindingInstanceIdentifier and exposes the
appropriate codec methods.
JIRA: YANGTOOLS-1577
Change-Id: I1b50a687e67a20a1c6c5d6fbea2edecf5ed9807a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 17:57:45 +0000 (19:57 +0200)]
Fix InstanceIdentifier compatibility
We need to override the deprecated builder() methods to preserve the
return type.
JIRA: YANGTOOLS-1577
Change-Id: Ibe55fdff236b0f214ca72e37434aea68c0a59242
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 17:46:15 +0000 (19:46 +0200)]
Fix DataObjectReference.toLegacy()
We should be guaranteeing a @NonNull return here.
JIRA: YANGTOOLS-1577
Change-Id: I80cb9c6ccfbd972fc22d27f5bff603d2a59b31eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 16:37:09 +0000 (18:37 +0200)]
Improve DataObjectReference.toString()
InstanceIdentifier.toString() is quite verbose and unreadable. This
patch introduces a nicer output scheme, where each step is on its own
line and we compress package references.
JIRA: YANGTOOLS-1577
Change-Id: I7bc944e9f9462490880a8f5adefdf00e282a19f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 15:44:21 +0000 (17:44 +0200)]
Add DataObjectReference.toIdentifier()
We need the ability to bridge a DataObjectReference, notably
InstanceIdentifier, to DataObjectIdentifier. This patch adds a
toIdentifier() method and implements it.
JIRA: YANGTOOLS-1577
Change-Id: I66a281a040f416160993cba89e12630a5130e928
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 09:30:44 +0000 (11:30 +0200)]
Add DataObject{Identifier,Reference}.Builder(.WithKey)
This patch adds a proper Builder definition and specialized
implementations, which produce DataObject{Identifier,Reference} and not
InstanceIdentifier as such.
This also eliminates the notion that a Builder has a hashCode/equals
contract.
JIRA: YANGTOOLS-1577
Change-Id: Ie3fe06264f58a6985123034f439f413fce0d251b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 10:41:44 +0000 (12:41 +0200)]
Bump Xtend to 2.35.0
https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/02/27/version-2-34-0
https://eclipse.dev/Xtext/releasenotes.html#/releasenotes/2024/05/28/version-2-35-0
Change-Id: Ic9239a565e96d727b876d6c7f809916f76219ee2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 07:48:40 +0000 (09:48 +0200)]
Use DataObjectIdentifier for action references
Every action is invoked on a particular instance of a DataObject -- the
path cannot be inexact. Express this by using DataObjectIdentifier
instead of InstanceIdentifier.
JIRA: YANGTOOLS-1577
Change-Id: Iaa4de116a983a4b902951f14fe5e46f9135d710f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 07:26:52 +0000 (09:26 +0200)]
Refactor AbstractDataObjectReference.toString()
Use proper contract() name and only print out steps, as everything else
is derived from them. Also make InstanceIdentifier.contract() dynamic
based on wildcarded flag.
JIRA: YANGTOOLS-1576
Change-Id: If1c8bfd2dc063cbb8af3f0ddcccce5389b17c1d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Jun 2024 06:51:57 +0000 (08:51 +0200)]
Add odl-yangtools-binding-codec feature
This packages binding-codec-* artifacts into their own feature.
JIRA: YANGTOOLS-1576
Change-Id: Ic78c446a240b3784c95e2dd819d184b3272d0871
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 21:23:57 +0000 (23:23 +0200)]
Add odl-yangtools-binding-runtime feature
Baseline Binding runtime needs to be packaged. Unlike
odl-mdsal-binding-runtime, this packaging does not include
binding-data-codec parts of runtime.
JIRA: YANGTOOLS-1576
Change-Id: I3331f293ba8c8858792cdacf9fb0d8f386d1e10f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 22:00:46 +0000 (00:00 +0200)]
Use DataObjectReference in binding-data-codec-api
Users should not care about the particular implementation of
DataObjectReference, but InstanceIdentifier is special in that it is a
legacy.
This patch adds a DataObjectReference.toLegacy() method to perform
down conversion to it.
JIRA: YANGTOOLS-1577
Change-Id: I1702de86112eb87cc349c8eac95b3d6c27fac641
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 20:56:32 +0000 (22:56 +0200)]
Move InstanceIdentifier.pathArguments
Move the field into AbstractDataObjectReference, allowing providing for
more bits completed for the DataObjectIdentifier class hierarchy.
JIRA: YANGTOOLS-1577
Change-Id: I334779d1d8143d93afd99a9b1cf25631208e4db6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 18:46:32 +0000 (20:46 +0200)]
Expose DataObjectReference.lastStep()
Each reference needs to have a target type, carried in its last step.
Expose this fact via a lastStep() method.
JIRA: YANGTOOLS-1577
Change-Id: I7562383089127aeb7796c81e0b28f686b1d70d8e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 18:00:52 +0000 (20:00 +0200)]
Eliminate InstanceIdentifier.hashCode()
Do not memoize InstanceIdentifier.hashCode(), allowing the
implementation to reside in AbstractDataObjectReference.
JIRA: YANGTOOLS-1577
Change-Id: I6ddc7a274195ca4e904c14cb8bbc77f5f609f792
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 17:23:03 +0000 (19:23 +0200)]
Do not use InstanceIdentifier.getPathArguments()
Use steps() instead. Also add assert on isExact().
JIRA: YANGTOOLS-1608
Change-Id: I87f2848d21efb2aabe8219af29572dd53702f3ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jun 2024 15:24:16 +0000 (17:24 +0200)]
Split out odl-codegen-extensions
We do not want the entirety of odl-ext, as most of it is related to
MD-SAL things. Split out odl-codegen-extensions.yang, which carries the
only extension we are using.
JIRA: YANGTOOLS-1576
Change-Id: Ief7ddddfc23c5087b69a1f72f9d6e0173654e0a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 26 Jun 2024 10:26:54 +0000 (12:26 +0200)]
Revert "Unify ORv1 and IIv5"
This reverts commit
fc4e74fa556965d77d9bdab94332aa96813e9492, as it
causes a sizing regression.
JIRA: YANGTOOLS-1608
Change-Id: I6b3c52119b2af0e09fbadab4d713e3c37417bca2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 23:08:27 +0000 (01:08 +0200)]
Deprecate serial forms before IIv5
We do not emit these, mark them as deprecated, so they stand out as
something we can remove sooner than the entire InstanceIdentifier class.
JIRA: YANGTOOLS-1608
Change-Id: I410b43364aa426ab5ae880e6ba37db8c468da860
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 23:03:46 +0000 (01:03 +0200)]
Unify ORv1 and IIv5
The format is the same, just the resolved class differs. Let's take
advantage of that.
JIRA: YANGTOOLS-1608
Change-Id: I0fd9e3410fc6d411d87f1d91833ffc7135df4e58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 22:55:07 +0000 (00:55 +0200)]
Use InstanceIdentifier.unsafeOf() in serialization path
Do not trust consistency of read data -- establish class identity, hash
and wildcard from the list of arguments only.
JIRA: YANGTOOLS-1608
Change-Id: Id96f5081bde1a6525f5db140a8eb5ce7db533e03
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 22:42:50 +0000 (00:42 +0200)]
Switch to using IIv5
Switch InstanceIdentifier to emit IIv5 and gut IIv4 of writeout
capabilities.
JIRA: YANGTOOLS-1608
Change-Id: I7fc86453538dab844642bd242b121291afd96ba5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 22:36:51 +0000 (00:36 +0200)]
Add yang.binding.IIv5
IIv4 and previous have a rather unfortunate design in that we carry a
ton of state derived from steps -- and we trust that state.
IIv5 rectifies this by only serializing steps and deriving properties
from steps -- thus the derived state is accurate.
JIRA: YANGTOOLS-1608
Change-Id: I32bfd4542d000da70081d1d7b27f035a22c55a3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 20:52:23 +0000 (22:52 +0200)]
Clean up InstanceIdentifier steps creation
We are being quite inefficient in the way we are allocating steps:
- we use Iterables.concat() with a singleton argument
- we use Iterables.concat() with a freshly-built list
This patch refactors to consistently use either:
- AppendIterable to hold the single appended item, or
- an ImmutableList
when we are building an Iterable which makes into into an
InstanceIdentifier. The access for Builder.equals() is explicitly
separated out and uses Iterables.concat() or the internal buffer
JIRA: YANGTOOLS-1608
Change-Id: I7b54d0b746891ab57b97c75f4a124e9b580fc503
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 18:42:48 +0000 (20:42 +0200)]
Finish public DataObjectReference class hierarchy
Introduce private binding.impl package and drop the basic design of
InstanceIdentifier-independent implementations.
JIRA: YANGTOOLS-1608
Change-Id: I6e8e3c04adc65d75f989c8e26e5124d46242352a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 15:24:19 +0000 (17:24 +0200)]
Introduce yangtools.binding.lib
We have a number of classes which are used by generated code as baseline
library classes.
Introduce a new yangtools.binding.lib package to hold these, so we have
a clean separation of the user-facing contracts and their
implementations.
JIRA: YANGTOOLS-1576
Change-Id: I5a8789ccee43e86ddbe66eaa702daedde23f3522
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 16:16:49 +0000 (18:16 +0200)]
Fix DataObjectReference javadoc
We have two @returns here, fix them up.
JIRA: YANGTOOLS-1608
Change-Id: I31e2ad52a3451fe35f7354a332509c9b8ea0adee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 14:29:47 +0000 (16:29 +0200)]
Introduce yangtools.binding.meta
Split out interfaces used for metadata discovery to separate package,
signalling these are ancillary to the codegen primary task.
JIRA: YANGTOOLS-1576
Change-Id: Ia988e11090d7b37a0faeb12aee96a058b688045c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 12:40:43 +0000 (14:40 +0200)]
Add odl-yangtools-binding-spec
Add basic packaging of the binding specification, essentially mirroring
what odl-mdsal-binding-base used to be.
JIRA: YANGTOOLS-1576
Change-Id: I8e3137093de5aa8a65bc2dee987b1e9741a4c0ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 11:08:19 +0000 (13:08 +0200)]
Rename binding-ri to binding-generator
'binding-ri' does not really reflect the singleton nature of this code.
Rename it back to binding-generator.
JIRA: YANGTOOLS-1576
Change-Id: I746802c3f653731cfe871c0fc47aadeba9b9cd3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 Jun 2024 11:04:08 +0000 (13:04 +0200)]
Fix OSGiModuleInfoSnapshotImpl
We should be using Uint64, not UnsignedLong.
JIRA: YANGTOOLS-1576
Change-Id: Ie4dc2c240a0d6bbe6f22fcc19df64184a49e754c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Jun 2024 22:15:43 +0000 (00:15 +0200)]
Introduce DataObject{Identifier,Reference}
InstanceIdentifier has way cluttered API, combining multiple aspects,
without giving useful guarantees.
We introduce DataObjectReference, which captures the addressing
capabilities of an InstanceIdentifier.
We also introduce DataObjectIdentifier, which guarantees isExact() is
true -- and forms the baseline BindingInstanceIdentifier.
Finally, we also the baseline 'WithKey' trait, so it is readily
available as the impact of the target type.
JIRA: YANGTOOLS-1577
Change-Id: Ieb87705f65c2032fdb499cdd74b55c5994718566
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Jun 2024 20:33:13 +0000 (22:33 +0200)]
Improve type wiring
Take ownership of Java mapping of YANG built-in types. This takes shape
as binding.contract.BuiltInType, which contains constants for each known
type.
This also splits the meaning of 'InstanceIdentifier' where type system
is concerned -- the definition in BaseYangTypes should become
BindingInstanceIdentifier.
JIRA: YANGTOOLS-1577
Change-Id: I38fd4eb69c1bc700bd99bf230526eb015c7e1c7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Jun 2024 20:15:05 +0000 (22:15 +0200)]
Take ownership of yangtools.yang.binding package
Maintaining this package separately will not work reasonably. This patch
moves back InstanceIdentifier et al., but retains DataObjectStep et al.
in yangtools.binding package. yang.binding gets dummy serialization
proxies instead.
JIRA: YANGTOOLS-1576
Change-Id: I3e605ca364508c026bac18099fae68c9facdcf87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 24 Jun 2024 17:19:18 +0000 (19:19 +0200)]
Fix binding-runtime-osgi module name
Use yangtools, not mdsal, matching the package we are exporting.
JIRA: YANGTOOLS-1576
Change-Id: Ia99210baa5be71bdfb53adde80da722168ba5155
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 23 Jun 2024 11:54:07 +0000 (13:54 +0200)]
Update DataObjectStep class hierarchy
KeylessStep is not the only non-ExactDataObjectStep we will have.
Prepare for that eventuality by splitting out KeylessStep.matches()
into InexactDataObjectStep.
JIRA: YANGTOOLS-1576
Change-Id: I7dc8272a6016d4df5122fe1e61c77e53388eff11
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 21 Jun 2024 15:08:44 +0000 (17:08 +0200)]
Rename binding-runtime-dynamic to binding-loader
Rename the artifact and adjust the exported packages.
JIRA: YANGTOOLS-1576
Change-Id: Ib6ffd9b30dc9b14c381a9adb41b2134a14a3d1dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 21 Jun 2024 10:45:07 +0000 (12:45 +0200)]
Rename mdsal.binding.dom.codec.api
Use yangtools.binding.data.codec.api as the new name, ditching the
'mdsal' moniker.
JIRA: YANGTOOLS-1576
Change-Id: I2bf6e8be065e44dfd4e16f8ed14c4ac1369db755
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 21 Jun 2024 10:42:22 +0000 (12:42 +0200)]
Rename mdsal.binding.dom.codec.impl
Rename this package to yangtools.binding.data.codec.impl and adjust
callers.
JIRA: YANGTOOLS-1576
Change-Id: I47212c195d49eb5d0829991cc214cc01710c4437
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 21 Jun 2024 10:35:16 +0000 (12:35 +0200)]
Rename mdsal.binding.dom.codec.spi
Rename this package to yangtools.binding.data.codec.spi and adjust
callers.
JIRA: YANGTOOLS-1576
Change-Id: Ia6ee14999b7cbbb54bc82e63204e4e93709961f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 21 Jun 2024 10:09:32 +0000 (12:09 +0200)]
Rename package in binding-codegen
Use yangtools.binding.codegen instead of the rather verbose
mdsal.binding.java.api.generator.
JIRA: YANGTOOLS-1576
Change-Id: I36e00904baccaada83707ac3a885711ee6df5ee7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 18:21:01 +0000 (20:21 +0200)]
Rename binding-util to binding-reflect
Rename the artifact, the module and the package exposed, adopting it to
org.opendaylight.yangtools namespace.
JIRA: YANGTOOLS-1567
Change-Id: Iaa1a2bdbe03527220e1fe5c41df70a5672b634ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 18:00:34 +0000 (20:00 +0200)]
Enable binding-data-codec-osgi build
Fixup checkstyle and adapt to current situation.
JIRA: YANGTOOLS-1576
Change-Id: Ia358135e5b6836416736021a51f204eff7acca6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 17:52:55 +0000 (19:52 +0200)]
Enable binding-runtime-osgi build
This is a more invasive patch, as it also imports most bits and pieces
from mdsal.git/dom/mdsal-dom-schema-osgi as it existed as of commit
29d0b0b9d5f68d22bdc655a054b22dcf7f69c5f5.
JIRA: YANGTOOLS-1576
Change-Id: Ia0e00b64289d69ae4bc155adef199b55f6172e4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 16:31:59 +0000 (18:31 +0200)]
Rename binding-lib
binding-lib is not a good name. binding-spec is a better one, allowing
us to drop the .lib suffix in packages -- resulting in better
ergonomics.
JIRA: YANGTOOLS-1576
Change-Id: I29a52002f64f595b752dad8dba15a93fd9e789f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 16:29:58 +0000 (18:29 +0200)]
Enable binding-data-codec-dynamic build
Fixup checkstyle warnings and enable build.
JIRA: YANGTOOLS-1576
Change-Id: Id8e37b44dea08a09b8201339f9aa35caaefadd40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 15:45:20 +0000 (17:45 +0200)]
Fix binding-data-codec-spi artifactId
We have a mismatch in naming here, fix that up.
JIRA: YANGTOOLS-1576
Change-Id: Idd91b5f6deaf697eaa71d166e37f12be9f6d7576
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 15:43:03 +0000 (17:43 +0200)]
Enable binding-runtime-spi build
Fixup checkstyle warnings and enable build.
JIRA: YANGTOOLS-1576
Change-Id: Iba71cdc15cecf8dc764abb79a033b5f87e5b11f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 15:35:48 +0000 (17:35 +0200)]
Enable binding-test-model build
The test model requires yang-ext for now for the augment-identifier
extension. Add both to the build.
JIRA: YANGTOOLS-1576
Change-Id: I9d0aaa3a2792a1f0a07acfda334c6adae80e98f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 14:04:38 +0000 (16:04 +0200)]
Rename opendaylight.mdsal.binding.runtime.spi
Rename opendaylight.mdsal.binding.runtime.spi to
opendaylight.yangtools.binding.runtime.spi.
JIRA: YANGTOOLS-1576
Change-Id: I35b24e8ecbc08e1db7da5b973551aeb0ea7609dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 13:55:55 +0000 (15:55 +0200)]
Rename opendaylight.mdsal.binding.runtime.api
Rename opendaylight.mdsal.binding.runtime.api to
opendaylight.yangtools.binding.runtime.api.
JIRA: YANGTOOLS-1576
Change-Id: Ie2b08520c5726a2452732f6fcf53e1a4c78caba8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 13:08:34 +0000 (15:08 +0200)]
Rename opendaylight.mdsal.binding.model.ri
Rename opendaylight.mdsal.binding.model.ri to
opendaylight.yangtools.binding.model.ri.
JIRA: YANGTOOLS-1576
Change-Id: I2c10421aa1b1bd923b22fff48e37b4d05815ff11
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 12:27:23 +0000 (14:27 +0200)]
Rename opendaylight.mdsal.binding.model.api
Rename opendaylight.mdsal.binding.model.api to
opendaylight.yangtools.binding.model.api.
JIRA: YANGTOOLS-1576
Change-Id: I699ea8c7bc97128f87bd9159b8683e282a955645
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 12:15:38 +0000 (14:15 +0200)]
Rename org.opendaylight.yangtools.yang.binding
Rename org.opendaylight.yangtools.yang.binding to
org.opendaylight.yangtools.binding.lib and adjust downstreams.
JIRA: YANGTOOLS-1576
Change-Id: I489acc8d0e6e8c126ae0e5eadfdf9acfc3c68f58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jun 2024 11:48:14 +0000 (13:48 +0200)]
Introduce odl-bytebuddy
YANG Binding requires ByteBuddy in dynamic environments, so let's
package it.
JIRA: YANGTOOLS-1576
Change-Id: I44bf6cf56bd215b9a78da23356054a8e171e60e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Jun 2024 20:30:15 +0000 (22:30 +0200)]
Plug binding/ into the build
This is the first step, with just yang-binding being brought to the
party. This requires we also start maintaining the ByteBuddy dependency.
As we are not quite ready with binding-test-model, the components which
need it are not enabled yet.
JIRA: YANGTOOLS-1576
Change-Id: I7a45ccf7b808b393a4151e5694dfc2eba6dc0b5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 19 Jun 2024 09:05:58 +0000 (11:05 +0200)]
Adopt binding/ components
The artifacts are going to be released from YANG Tools, lets perform
some house cleaning:
- change groupId to org.opendaylight.yangtools, which we must do because
of our Maven Central namespace assignment
- rename yang-binding to binding-lib (which it really is)
- rename mdsal-binding-dom-codec to binding-data-codec-dynamic (not dom)
- rename mdsal-binding-java-api-generator to binding-codegen (it is
generating code)
- rename mdsal-binding-runtime-* to binding-runtime-
- rename mdsal-binding-loader to binding-runtime-dynamic (it is
interfacing the dynamic, JIT-supported parts of a JVM)
- rename mdsal-binding-spec-util to binding-util (now that there is no
correspoding binding-api)
- rename mdsal-binding-test-model to binding-test-model
JIRA: YANGTOOLS-1576
Change-Id: Ie6d4e64d472cd42314e62c1035d8fad6039cfafa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 3 Jun 2024 17:40:43 +0000 (19:40 +0200)]
Bump versions to 14.0.0-SNAPSHOT
This starts the next major development iteration.
Change-Id: I530979d8f1f01d17720f69f9e7eb924a349eb9e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 3 Jun 2024 17:29:23 +0000 (19:29 +0200)]
Remove unneeded serialVersionUID fields
SpotBugs now recognizes records are special, hence we can remove the
workaround.
Change-Id: If237583a2bc340f14f9b4180ea5756494a259b22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 3 Jun 2024 17:35:17 +0000 (19:35 +0200)]
Bump versions to 13.0.5-SNAPSHOT
This starts the next development iteration.
Change-Id: I91385d77a436ec34d5f6d5fbaea7296bfa9b887a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Mon, 3 Jun 2024 15:51:52 +0000 (15:51 +0000)]
Release mdsal
Robert Varga [Tue, 28 May 2024 12:16:16 +0000 (14:16 +0200)]
Bump upstreams
Adopt:
- odlparent-13.1.3
- yangtools-13.0.6
Change-Id: Iba9db31ef9900b60a766c1f5c4558a17e50001cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 5 May 2024 12:11:12 +0000 (14:11 +0200)]
Bump versions to 13.0.4-SNAPSHOT
This starts the next development iteration.
Change-Id: Id72d4d09cb11ca514e07d4d957d4a6d3674801b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Sun, 5 May 2024 03:40:52 +0000 (03:40 +0000)]
Release mdsal
Robert Varga [Sat, 4 May 2024 22:38:00 +0000 (00:38 +0200)]
Bump upstreams
Adopt:
- odlparent-13.1.2
- yangtools-13.0.5
Change-Id: Icf1bdfdeee82da4991aff6302a1ed1de7dec688d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 22 Apr 2024 09:55:48 +0000 (11:55 +0200)]
Bump yangtools to 13.0.4
Adopt the single fix from upstream.
Change-Id: I36b11da370af4dcc04f8c0a3ca6e9fff29dd66ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Apr 2024 11:53:43 +0000 (13:53 +0200)]
Bump versions to 13.0.3-SNAPSHOT
This starts the next development iteration.
Change-Id: I247882cc078d49b8410bc033f9e0bd3c09568c5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Tue, 16 Apr 2024 09:52:17 +0000 (09:52 +0000)]
Release mdsal
Robert Varga [Mon, 15 Apr 2024 11:00:36 +0000 (13:00 +0200)]
Bump upstreams
Adopt:
- odlparent-13.1.1
- yangtools-13.0.3
Change-Id: I2bc3240a8b2bf3915d7379fc700da6bb46908922
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 12 Jan 2024 01:36:57 +0000 (02:36 +0100)]
Eliminate CodecItemFactory
This is a useless indirection, as we can simply pass the required
information down to where the case class is needed.
JIRA: MDSAL-815
Change-Id: I7413f33d0c4a76e29b180ef34623e7a0607c784f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Apr 2024 11:56:12 +0000 (13:56 +0200)]
Fixup checkstyle
Upgraded checkstyle is finding more violations, fix them up.
Change-Id: I96ab46cc8f370b39dd287d3a1717952a5685dce5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 14 Mar 2024 08:41:53 +0000 (09:41 +0100)]
Bump versions to 13.0.2-SNAPSHOT
This starts the next development iteration.
Change-Id: Icc2713325cddcd655991c4e2d00be786370ea407
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jenkins-releng [Thu, 14 Mar 2024 05:47:17 +0000 (05:47 +0000)]
Release mdsal
Robert Varga [Tue, 12 Mar 2024 21:37:39 +0000 (22:37 +0100)]
Verify revision string
yang.common.Revision has a guaranteed format, hence if toString() does
not match, it is not an IAE, but rather a VerifyException pointing out a
violation of our expectations.
Change-Id: Ieabc84f40df3c56bcc7690c2c277cd95583bf1de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 12 Mar 2024 17:07:04 +0000 (18:07 +0100)]
Migrate users of deprecated yang.common methods
QNameModule and QName have deprecated a few methods, migrate to their
replacements.
Change-Id: I458a58177db17efc0ae866b62ff77288ca910475
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 12 Mar 2024 14:47:34 +0000 (15:47 +0100)]
Bump upstreams
Adopt:
- odlparent-13.0.11
- yangtools-13.0.2
This unfortunately breaks Xtend's magic 'get' prefix handling, so fix
that up.
Change-Id: I639738394f26c3bedaea82518e2e4d395e430022
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>