yangtools.git
2 months agoRemove AbstractDataObjectCodecContext 68/112568/3
Robert Varga [Mon, 15 Jul 2024 15:42:51 +0000 (17:42 +0200)]
Remove AbstractDataObjectCodecContext

AbstractDataObjectCodecContext brings in bits of
CommonDataObjectCodecContext implementation into the picture, but it
really is its only specialization. Merge the two classes, adjusting
CodecDataObject accordingly.

JIRA: YANGTOOLS-1577
Change-Id: Iffe9b1981db6df974ab1a454f81aeaeca74c5656
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAllow ModuleRuntimeTypes to be looked up 66/112566/2
Robert Varga [Mon, 15 Jul 2024 14:22:05 +0000 (16:22 +0200)]
Allow ModuleRuntimeTypes to be looked up

We need the ability to lookup module root runtime type in order to
properly perform codec lookups -- for example when looking up a
top-level leaf.

JIRA: YANGTOOLS-1577
Change-Id: Ie2fd4b910d598b05c1d35bdb5489b8efb3f86bdb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAllow returning DataObjectReferences 65/112565/1
Robert Varga [Mon, 15 Jul 2024 12:05:03 +0000 (14:05 +0200)]
Allow returning DataObjectReferences

toBinding() promises a DataObjectReference, hence we can remove the
check for KeylessStep -- resulting in DataObjectReference.

JIRA: YANGTOOLS-1577
Change-Id: I342f5b8d815542b558b1d088162c95feb49f0ca1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFixup BindingInstanceIdentifierCodec 64/112564/1
Robert Varga [Mon, 15 Jul 2024 11:45:36 +0000 (13:45 +0200)]
Fixup BindingInstanceIdentifierCodec

The argument here should be final, fix that.

JIRA: YANGTOOLS-1577
Change-Id: I2312307b80db570eae33849d2403848c176514f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix XSD pattern specifics 65/111365/13
Peter Suna [Fri, 12 Apr 2024 08:22:16 +0000 (10:22 +0200)]
Fix XSD pattern specifics

Replace XSD multi character escape and substraction group pattern
with compatible Java regex.

Create a test to reproduce the issue with converting XSD patterns
into Java-compatible regex.

JIRA: YANGTOOLS-1571
Change-Id: Iab302638c3a436058f6de1d5dd5abd6e76fc411c
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
2 months agoUpdate InstanceNotification mapping 94/112494/13
Robert Varga [Mon, 8 Jul 2024 18:42:21 +0000 (20:42 +0200)]
Update InstanceNotification mapping

InstanceNotification is capturing its parent, which can reasonably be
Grouping, which is not a DataObject.

The situation is not dissimilar to that of RpcInput/RpcOutput for
actions. There we generate a data anchor at the place of definition for
wide reuse -- but generate an interface for each instantiation in
non-grouping.

In this case, though, we cannot generate a DataObject, as we are
inherently tied to an instance identifier.

We therefore go the 'like a grouping' route, generating a reusable
interface, which is then inherited by all concrete instantiations.

JIRA: YANGTOOLS-1577
Change-Id: I54383bc2fe1d060d20911861297ec59d49ddbfc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUse Grouping as fieldsFrom() argument 18/112518/2
Robert Varga [Tue, 9 Jul 2024 13:28:04 +0000 (15:28 +0200)]
Use Grouping as fieldsFrom() argument

fieldsFrom() is using DataObject, which has other implications than just
a grouping. Since we now have a dedicated construct, use that to mark
what is possible to pass down.

JIRA: YANGTOOLS-1577
Change-Id: If8ab18f26ac09ddc88cadc64fa4efddf15a821bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefactor NotificationGenerator 04/112504/5
Robert Varga [Tue, 9 Jul 2024 03:21:26 +0000 (05:21 +0200)]
Refactor NotificationGenerator

We really have three generators in one. Let's properly specialize them
at instantiation. We will need this to generate more species of things.

JIRA: YANGTOOLS-1577
Change-Id: I2a7e2ab075464722ffe8458078966822da96b29e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUse a switch with patterns in AbstractCompositeGenerator 03/112503/3
Robert Varga [Tue, 9 Jul 2024 02:44:11 +0000 (04:44 +0200)]
Use a switch with patterns in AbstractCompositeGenerator

We have a plain cascade dispatch, use switch with patterns instead,
making things a tad cleaner.

JIRA: YANGTOOLS-1577
Change-Id: If96a34beb5e3ed3ab9947f7102330f19ff7aa501
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSeparate out DataObjectIdentifier.Builder 02/112502/1
Robert Varga [Tue, 9 Jul 2024 01:56:41 +0000 (03:56 +0200)]
Separate out DataObjectIdentifier.Builder

This builder guarantees its result is a DataObjectIdentifier, as it
guards its contents from becoming wildcarded.

JIRA: YANGTOOLS-1577
Change-Id: I61b2bf5bc91bce24f02f6ef938b4c55f2a3bb33f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove DataTreeCandidateNodes.empty() 88/112488/1
Robert Varga [Mon, 8 Jul 2024 10:29:20 +0000 (12:29 +0200)]
Remove DataTreeCandidateNodes.empty()

An empty node does not make sense and is not used anywhere -- remove it.

JIRA: YANGTOOLS-1630
Change-Id: Ifc21888070e64a9dcb8f86485cf9018988b65b66
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd the ability to store versioning information 63/112163/4
Robert Varga [Fri, 14 Jun 2024 11:58:43 +0000 (13:58 +0200)]
Add the ability to store versioning information

Introduce data.tree.api.VersionIInfo and allow it to be attached to
internal version tracking during commit() time. This information can
be retried via DataTreeSnapshot.readVersionInfo().

JIRA: YANGTOOLS-1554
Change-Id: I26f78feec4c97bc488c3ddf5914cdc0a22b72eef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd CandidateNode.Compacted 72/112472/2
Robert Varga [Sun, 7 Jul 2024 17:10:21 +0000 (19:10 +0200)]
Add CandidateNode.Compacted

A Compacted event indicates the underlying MVCC tracking data has been
prune. For most users this is just as Unmodified, but state replication
machines need to see this even separately.

JIRA: YANGTOOLS-1631
Change-Id: I9da0ccc06ba8c64f54dcffee9c25a657fa3d68be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoIntroduce DataTreeCandidate.CandidateNode 66/112466/6
Robert Varga [Sun, 7 Jul 2024 10:37:10 +0000 (12:37 +0200)]
Introduce DataTreeCandidate.CandidateNode

DataTreeCandidateNode's design dates back to Java 7 days, which shows in
its layout -- users need to understand behaviours implied by
ModificationType and do not get much other help.

This patch introduces CandidateNode, which is a sealed interface
exposing the bare basics and a number of non-sealed specializations to
handle all the different cases that may occur.

This allows users to use enhanced switch statements to differentiate
between the cases, working quite nicely with Java 21.

We also re-structure the SPI implementations to reduce confusion and
prepare for interop -- allowing us to share code via
AbstractDataeTreeCandidateNode.

Baseline implementations are explosed via
data.tree.spi.ImmutableCandidateNodes and its methods.

JIRA: YANGTOOLS-1630
Change-Id: I9f2cb5365f527acd9ecb1b684de2f09abe9083db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix OpaqueObject contract 63/112463/3
Robert Varga [Sat, 6 Jul 2024 16:05:27 +0000 (18:05 +0200)]
Fix OpaqueObject contract

OpaqueObject, while it represents a YANG modeled data tree, does not
expose its underlying structure -- and therefore it is not a
binding.DataContainer.

Promote OpaqueObject into a top-level BindingObject contract,
maintaining exposed implementedInterface(), without DataContainer
implication.

Furthermore do not capture ChildOf relationship in generated interfaces,
as that implies DataObject, again implying DataContainer -- and we do
not want that.

JIRA: YANGTOOLS-1577
Change-Id: Ic3baa0df23e7ca5642ca70624a2f6b6e0710b9d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd PropertyStep 62/112462/3
Robert Varga [Sat, 6 Jul 2024 13:00:45 +0000 (15:00 +0200)]
Add PropertyStep

PropertyStep identifies a terminal node in the DataContainer tree
structure -- i.e. something which is not a DataContainer. An
ExactPropertyStep is a valid BindingInstanceIdentifier.Step.

This also adds a PropertyIdentifier as a BindingInstanceIdentifier
subclass -- combinding a DataObjectIdentifier and a ExactPropertyStep.

This ends up almost completing the binding-spec level of changes, except
it highlights the problem that an OpaqueObject is a DataContainer: and
that should not be the case.

JIRA: YANGTOOLS-1577
Change-Id: Ia45cc327b4767d8317468ddef7b4c06f497c3d04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoPromote ScalarTypeObject 59/112459/1
Robert Varga [Fri, 5 Jul 2024 21:10:12 +0000 (23:10 +0200)]
Promote ScalarTypeObject

ScalarTypeObject has passed its @Beta lifecycle, promote it to a stable
contract.

Change-Id: I871e7ddbc8ad4be46fc002e71b14b783dae1a241
JIRA: YANGTOOLS-1576
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd AbstractEntryObject 52/112452/7
Robert Varga [Fri, 5 Jul 2024 15:47:13 +0000 (17:47 +0200)]
Add AbstractEntryObject

Add AbstractEntryObject and teach codegen to take advantage of it in
generated EntryObject implementations. This lowers the number of
distinct implementations of KeyAware.key() contract, reducing boiler
plate code and hopefully helping the JVM a tiny bit.

JIRA: YANGTOOLS-1626
Change-Id: I27022ce385cc02431172f0bedd0cd68e29943ea7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefactor key tracking 56/112456/1
Robert Varga [Fri, 5 Jul 2024 18:21:56 +0000 (20:21 +0200)]
Refactor key tracking

Make BuilderGenerator verify the returned type is a
GeneratedTransferObject. This allows us to remove a cast in
AbstractBuilderTemplate.

Also relocate key property extraction into AbstractBaseTemplate, where
we eschew creating a dedicated comparator.

JIRA: YANGTOOLS-1626
Change-Id: I6c28499f052b901289492108710a095f852b8814
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoEntryObject implies Augmentable 51/112451/8
Robert Varga [Fri, 5 Jul 2024 15:22:13 +0000 (17:22 +0200)]
EntryObject implies Augmentable

EntryObjects are always Augmentable, express that in the base interface
specification. We update BindingTypes.extractAugmentableTarget() to also
recognize this implication -- and extract the first from specialization.

JIRA: YANGTOOLS-1609
Change-Id: Ida98a65c18d6c608ec78c9cc8cd4ac9454e891d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRework Augmentation type extraction 54/112454/4
Robert Varga [Fri, 5 Jul 2024 17:07:42 +0000 (19:07 +0200)]
Rework Augmentation type extraction

Rather than relying on reflection and comparison of FQCN, expose the
appropriate BindingTypes method. This also drops @Beta annotation from
the two methods.

Change-Id: Ib4841e581d6152f32296913effef1fa8b7efbf41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAbstractAugmentable is not @Beta 50/112450/3
Robert Varga [Fri, 5 Jul 2024 15:21:06 +0000 (17:21 +0200)]
AbstractAugmentable is not @Beta

Remove the annotation, as this is a fully-functional construct. Also
make sure we force users to implement their own
hashCode()/equals()/toString() methods.

JIRA: YANGTOOLS-1626
Change-Id: I2d2f981e3a828096d82d55de0791437cfdafe709
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUpdate KeyStep documentation 43/112443/3
Robert Varga [Thu, 4 Jul 2024 15:01:20 +0000 (17:01 +0200)]
Update KeyStep documentation

Reference EntryObject instead of KeyAware.

JIRA: YANGTOOLS-1577
Change-Id: I8500f4709d26f9bad5986da37e987474ad6f4374
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not use KeyAware in BindingMap 42/112442/3
Robert Varga [Thu, 4 Jul 2024 14:59:52 +0000 (16:59 +0200)]
Do not use KeyAware in BindingMap

We are using EntryObjects, use key() method from there rather than from
KeyAware.

JIRA: YANGTOOLS-1577
Change-Id: Ib9cf83dfdbd3743f92bbfb38581eacae1ee58607
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove InstanceIdentifier.AbstractPathArgument 40/112440/2
Robert Varga [Thu, 4 Jul 2024 14:42:17 +0000 (16:42 +0200)]
Remove InstanceIdentifier.AbstractPathArgument

This class has been previously deprecated for removal and is no longer
used. Remove it.

JIRA: YANGTOOLS-1577
Change-Id: I3dca6be0c7b6d8099f01d6c19a5d68810313f4ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDeprecate yang.binding.InstanceIdentifier 39/112439/1
Robert Varga [Thu, 4 Jul 2024 14:39:52 +0000 (16:39 +0200)]
Deprecate yang.binding.InstanceIdentifier

This class is being replaced by DataObject{Reference,Identifier}, mark
this fact.

JIRA: YANGTOOLS-1577
Change-Id: I2c2e2f8cca2f73673be754d9226a236634b3669b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump odlparent to 14.0.0 35/112435/1
Robert Varga [Thu, 4 Jul 2024 10:49:34 +0000 (12:49 +0200)]
Bump odlparent to 14.0.0

Use a released version of odlparent again.

Change-Id: I0dbb78dcb2fe960bb0482de3703128f84c16d79a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix InstanceIdentifier.toReference() return 29/112429/1
Robert Varga [Wed, 3 Jul 2024 09:33:10 +0000 (11:33 +0200)]
Fix InstanceIdentifier.toReference() return

Guarantee a non-null object here.

JIRA: YANGTOOLS-1577
Change-Id: I0d4361c36ea7eb7b50523f61215b48a5aad45e1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoClean up Sonar warnings 21/112421/2
Robert Varga [Tue, 2 Jul 2024 14:44:41 +0000 (16:44 +0200)]
Clean up Sonar warnings

This makes a pass at fixing up minor issues reported by Sonar.

JIRA: YANGTOOLS-1576
Change-Id: I629b2504d374310965fa92bbfc4ea1d23d4b0935
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFixup binding-bundle-parent reference 23/112423/1
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>
2 months agoIntroduce BindingInstanceIdentifier.Step 19/112419/1
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>
2 months agoSharpen ChildOf type argument 18/112418/1
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>
2 months agoClean up binding-model stuff a bit 98/112398/1
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>
2 months agoMerge binding-model-{api,ri} 89/112389/3
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>
2 months agoRename binding-parent to binding-bundle-parent 96/112396/1
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>
2 months agoRemove yang-ext 95/112395/1
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>
2 months agoDo not declare binding-parent 94/112394/1
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>
2 months agoMigrade binding-reflect to bnd-parent 93/112393/1
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>
2 months agoImprove binding-codegen tests 92/112392/2
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>
2 months agoMigrate binding-{reflect,spec} to JUni5 91/112391/2
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>
2 months agoClean up TypeMemberComment 88/112388/2
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>
2 months agoRework Grouping mapping 85/112385/5
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>
2 months agoRefactor binding.DataRoot 86/112386/2
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>
2 months agoMigrate DefaultBindingGeneratorTest 84/112384/1
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>
2 months agoClean up use of Augmentation generics 82/112382/1
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>
2 months agoClean up binding-spec use of EntryObject 81/112381/1
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>
2 months agoSimplify BindingStreamEventWriter 80/112380/1
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>
2 months agoFix union treatment of instance-identifier 79/112379/1
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>
2 months agoIntroduce binding.EntryObject 68/112368/6
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>
2 months agoImprove data codec dispatch 71/112371/4
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>
2 months agoEliminate unneeded use of InstanceIdentifier 74/112374/1
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>
2 months agoAdjust CompositeValueCodec to BindingInstanceIdentifier 73/112373/2
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>
2 months agoFix BuiltInType mapping 72/112372/1
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>
2 months agoSwitch mapping to BindingInstanceIdentifier 67/112367/5
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>
2 months agoFix InstanceIdentifier compatibility 70/112370/2
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>
2 months agoFix DataObjectReference.toLegacy() 69/112369/2
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>
2 months agoImprove DataObjectReference.toString() 66/112366/3
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>
2 months agoAdd DataObjectReference.toIdentifier() 65/112365/3
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>
2 months agoAdd DataObject{Identifier,Reference}.Builder(.WithKey) 62/112362/9
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>
2 months agoBump Xtend to 2.35.0 63/112363/1
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>
2 months agoUse DataObjectIdentifier for action references 60/112360/1
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>
2 months agoRefactor AbstractDataObjectReference.toString() 59/112359/1
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>
2 months agoAdd odl-yangtools-binding-codec feature 58/112358/1
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>
2 months agoAdd odl-yangtools-binding-runtime feature 41/112341/5
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>
2 months agoUse DataObjectReference in binding-data-codec-api 42/112342/3
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>
2 months agoMove InstanceIdentifier.pathArguments 40/112340/5
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>
2 months agoExpose DataObjectReference.lastStep() 39/112339/7
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>
2 months agoEliminate InstanceIdentifier.hashCode() 38/112338/6
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>
2 months agoDo not use InstanceIdentifier.getPathArguments() 37/112337/1
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>
2 months agoSplit out odl-codegen-extensions 36/112336/2
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>
2 months agoRevert "Unify ORv1 and IIv5" 98/112298/1
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>
2 months agoDeprecate serial forms before IIv5 95/112295/1
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>
2 months agoUnify ORv1 and IIv5 94/112294/1
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>
2 months agoUse InstanceIdentifier.unsafeOf() in serialization path 93/112293/1
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>
2 months agoSwitch to using IIv5 92/112292/1
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>
2 months agoAdd yang.binding.IIv5 91/112291/1
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>
2 months agoClean up InstanceIdentifier steps creation 90/112290/1
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>
2 months agoFinish public DataObjectReference class hierarchy 89/112289/2
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>
2 months agoIntroduce yangtools.binding.lib 87/112287/4
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>
2 months agoFix DataObjectReference javadoc 86/112286/2
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>
2 months agoIntroduce yangtools.binding.meta 85/112285/4
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>
2 months agoAdd odl-yangtools-binding-spec 78/112278/3
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>
2 months agoRename binding-ri to binding-generator 77/112277/3
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>
2 months agoFix OSGiModuleInfoSnapshotImpl 76/112276/1
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>
2 months agoIntroduce DataObject{Identifier,Reference} 73/112273/4
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>
2 months agoImprove type wiring 72/112272/3
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>
2 months agoTake ownership of yangtools.yang.binding package 71/112271/3
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>
2 months agoFix binding-runtime-osgi module name 70/112270/1
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>
2 months agoUpdate DataObjectStep class hierarchy 58/112258/2
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>
3 months agoRename binding-runtime-dynamic to binding-loader 56/112256/3
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>
3 months agoRename mdsal.binding.dom.codec.api 52/112252/2
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>
3 months agoRename mdsal.binding.dom.codec.impl 51/112251/2
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>
3 months agoRename mdsal.binding.dom.codec.spi 50/112250/2
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>
3 months agoRename package in binding-codegen 49/112249/1
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>
3 months agoRename binding-util to binding-reflect 48/112248/6
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>
3 months agoEnable binding-data-codec-osgi build 47/112247/5
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>
3 months agoEnable binding-runtime-osgi build 46/112246/4
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>
3 months agoRename binding-lib 45/112245/2
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>
3 months agoEnable binding-data-codec-dynamic build 44/112244/2
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>
3 months agoFix binding-data-codec-spi artifactId 43/112243/2
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>