yangtools.git
3 years agoGraduate most YangInstanceIdentifier-hosted methods 07/92907/1
Robert Varga [Tue, 6 Oct 2020 05:41:53 +0000 (07:41 +0200)]
Graduate most YangInstanceIdentifier-hosted methods

We have a number of @Beta methods, which have proven to be okay,
remove the @Beta moniker.

Change-Id: Ifdbeee6b0b360160a7ac312ef6a8d8f137b6a849
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix NumericalRestrictions.getRange() definition 06/92906/1
Robert Varga [Tue, 6 Oct 2020 05:26:31 +0000 (07:26 +0200)]
Fix NumericalRestrictions.getRange() definition

While the interface is not implented, we want the default method
to be accurate.

Change-Id: Iede28e13911437d10808a55be0cff348675cd7a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove RevisionAwareXPath 04/92904/11
Robert Varga [Mon, 5 Oct 2020 16:28:23 +0000 (18:28 +0200)]
Remove RevisionAwareXPath

Both 'must' and 'when' statements need to have their expressions
parsed now. This allows us to remove an indirection in the form
of RevisionAwareXPath, and just use
YangXPathExpression.QualifiedBound for result.

We have a number of non-compliant models in our test suite, which
are now fixed up.

JIRA: YANGTOOLS-1137
Change-Id: I89c6498f855b6f436052e186e159343d504e3fe4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor PatternEffectiveStatement 03/92903/4
Robert Varga [Mon, 5 Oct 2020 15:38:55 +0000 (17:38 +0200)]
Refactor PatternEffectiveStatement

Add PatternExpression so we do not end up confusing constraints with
actual arguments. This allows us to eliminate explicit implementations
of PatternConstraint, as we can easily have PatternEffectiveStatement
implement them.

This also means we can no longer ignore broken patterns, but rather
need to report them. Most obvious offenders are our aging test models.

JIRA: YANGTOOLS-1136
Change-Id: I875299b6b95947b90f0c75ee9a76c81e27b50dc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAlways use lazy leaf nodes 02/92902/3
Robert Varga [Mon, 5 Oct 2020 12:39:00 +0000 (14:39 +0200)]
Always use lazy leaf nodes

Remove the global knob which controls eager/lazy leaf nodes, meaning
we will always treat them as transient.

Change-Id: I88d453821dd6ee1909b5e138ab16da560ebabe74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate default method implementations to model.api 00/92900/2
Robert Varga [Mon, 5 Oct 2020 11:07:42 +0000 (13:07 +0200)]
Migrate default method implementations to model.api

Since we are bridging to EffectiveStatements, there are a few methods
we can implement by deferring to EffectiveStatement.argument().

JIRA: YANGTOOLS-1120
Change-Id: If3b0f3815f92641278d8696690835acac3cde221
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSplit out input/output schema nodes 95/92895/9
Robert Varga [Sun, 4 Oct 2020 20:41:52 +0000 (22:41 +0200)]
Split out input/output schema nodes

The need to specialize to statements is forcing our hand a little,
we need to have specialized SchemaNodes to cover input/output case.

This creates a ContainerLike schema node interface, which acts as
the common super-interface.

JIRA: YANGTOOLS-1119
Change-Id: I4c8480f34cdc42dccf8335a965ac4018b7453504
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSeparate out Module and Submodule interfaces 93/92893/8
Robert Varga [Sun, 4 Oct 2020 20:11:40 +0000 (22:11 +0200)]
Separate out Module and Submodule interfaces

Introduce ModuleLike to hold the common information and specialize
the two interfaces properly. This allows them to be properly tied
to EffectiveStatement world.

JIRA: YANGTOOLS-1119
Change-Id: I4eee11311c6aad70de16f235da935a42b84874e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReplace UniqueConstraint with UniqueEffectiveStatement 94/92894/3
Robert Varga [Sun, 4 Oct 2020 20:19:38 +0000 (22:19 +0200)]
Replace UniqueConstraint with UniqueEffectiveStatement

As noted in the FIXME, this @Beta class has served its purpose.
Rather than bridging it, perform a direct replacement with
UniqueEffectiveStatement.

JIRA: YANGTOOLS-1119
Change-Id: I022f940b859224a58b5d706fa5a63e8acd7f6c5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd EffectiveStatementEquivalent 85/91885/9
Robert Varga [Sun, 4 Oct 2020 17:25:42 +0000 (19:25 +0200)]
Add EffectiveStatementEquivalent

Our implementation classes provide both EffectiveStatement world
as well as SchemaNode world view in a single object. As we are
making the transition we need to formalize this contract, so
downstreams can operate on both old and new views.

To make this easier, we mark vast majority of constructs with a
new interface, EffectiveStatementEquivalent, which allows users
to get EffectiveStatement view of a particular SchemaNode. With
this interface users can provide a single EffectiveStatement-based
implementation and provide a convenience method, or directly ask
their users to perform the conversion.

A few statements are not transitioned yet, as their mapping is
ambiguous.

JIRA: YANGTOOLS-1119
Change-Id: I8aa6627912498faf8d88873f7db08fe0ab524adf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename UnknownSchemaNode.isAddedByAugmentation() 91/92891/4
Robert Varga [Sun, 4 Oct 2020 17:06:19 +0000 (19:06 +0200)]
Rename UnknownSchemaNode.isAddedByAugmentation()

As noted in the FIXME:, we want to unify handling and naming of
these methods with CopyableNode.

Change-Id: I95d104ef36d682a02a4e3fbac337eb8cfed3aef6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove legacy toString() overrides 90/92890/4
Robert Varga [Sat, 3 Oct 2020 20:28:01 +0000 (22:28 +0200)]
Remove legacy toString() overrides

This is preparation for unified toString(), once it gets specified.

Change-Id: I8a067e5aa41312dafb1e077b77b4f78deac1c099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoHide CompositeNodeDataWithSchema.addChild() 89/92889/3
Robert Varga [Sat, 3 Oct 2020 20:23:31 +0000 (22:23 +0200)]
Hide CompositeNodeDataWithSchema.addChild()

These methods have been deprecated and are no longer used from
the outside world, hide them.

Change-Id: I5d2281d1e287363fcd2751bcde79fb8c367cdb2c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove use of MockitoAnnotations.initMocks() 86/92886/1
Robert Varga [Sat, 3 Oct 2020 15:52:20 +0000 (17:52 +0200)]
Remove use of MockitoAnnotations.initMocks()

Use explicit runners instead.

Change-Id: Ic1c1aa967749fc3910cdd486ea760f09f85b331a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEnrich YinExportUtils 85/92885/3
Robert Varga [Sat, 3 Oct 2020 12:32:53 +0000 (14:32 +0200)]
Enrich YinExportUtils

Add ModuleEffectiveStatement-based exporter.

Change-Id: I03b6151ed06fb321f80574e8d9aea81f1ab08505
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove SchemaContextFactory 84/92884/6
Robert Varga [Sat, 3 Oct 2020 10:26:26 +0000 (12:26 +0200)]
Remove SchemaContextFactory

This has been superseded by EffectiveModelContextFactory three
releases ago, remove it now.

Change-Id: I0d0a2866fcb27694ec249a53ff44c6f6f981f76c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPropagate EffectiveModelContext to more places 83/92883/5
Robert Varga [Sat, 3 Oct 2020 10:23:33 +0000 (12:23 +0200)]
Propagate EffectiveModelContext to more places

We are bent on changing our code on effective statements, make sure
we propagate EffectiveModelContext to more places.

Change-Id: I7a06aba5fcd67adf0d55232700cf614247ce4d44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoInclude Uint.ZERO in lower saturation bounds 62/92862/1
Robert Varga [Fri, 2 Oct 2020 14:44:13 +0000 (16:44 +0200)]
Include Uint.ZERO in lower saturation bounds

This is a slight performance optimization, use constant zero for
zero values.

Change-Id: I4cc3e2e8656746b8fce7a43ddb42df8865221653
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 390508b6c2cffb9c8089f641758bc39e2ee19f2d)

3 years agoAdd Uint saturated converters 61/92861/1
Robert Varga [Mon, 28 Sep 2020 16:57:15 +0000 (18:57 +0200)]
Add Uint saturated converters

There are a number of places where we need to perform a saturated
conversion, i.e. when we have a 'long' count and need to put it into
a Uint32 field. Add methods to deal with that.

JIRA: YANGTOOLS-1135
Change-Id: Ia0bb2e9f0400d975ce1f4b150704dcf526d3bc82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 254b2d0b480ae2ddec8b5db9b97cb5fef084d93c)

3 years agoRemove BaseTypes.isInt8() and friends 58/92858/1
Robert Varga [Fri, 2 Oct 2020 14:24:40 +0000 (16:24 +0200)]
Remove BaseTypes.isInt8() and friends

These methods are only used in mdsal's binding generator, remove
them for rehosting.

JIRA: YANGTOOLS-1099
Change-Id: Ic80f9f3aa99d82ba0ad19fc5e9275032e1f46f84
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse Uint constants in base types 57/92857/1
Robert Varga [Fri, 2 Oct 2020 14:13:14 +0000 (16:13 +0200)]
Use Uint constants in base types

Rather than using valueOf(), use exposed ZERO and MAX_VALUE,
improving initialization speed just a little.

Change-Id: Ib6938c039bdf8773d6000f9eb6b56cf8f01ae1d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert uint tests to assertThrows() 56/92856/1
Robert Varga [Fri, 2 Oct 2020 13:28:32 +0000 (15:28 +0200)]
Convert uint tests to assertThrows()

We have a number of tests which can be consolidated, use assertThrows.
This flushes out a bad test case, which is corrected.

Change-Id: I3b0b760cb89a4dbd93ebe44af2ed917b0698fc31
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b355455a078fbe3043c34bbe4f1ceab39aef11a6)

3 years agoRemove util.OptionalBoolean 54/92854/1
Robert Varga [Thu, 1 Oct 2020 21:18:21 +0000 (23:18 +0200)]
Remove util.OptionalBoolean

This class is not used anywhere, remove it.

Change-Id: Ib14a80db37a5a1f51eb1ee608aaf117dbd3d5427
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSet description 84/92784/2
Robert Varga [Tue, 29 Sep 2020 14:25:15 +0000 (16:25 +0200)]
Set description

Upstream helpfully sets a generic description, which cascades for
example to Sonar. Add a proper description instead.

Change-Id: I7e98e101239fb4c3016680e35974cfc1a4b08da0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove use of TypeDefinition.getPath() 90/92590/3
Robert Varga [Tue, 22 Sep 2020 11:41:41 +0000 (13:41 +0200)]
Remove use of TypeDefinition.getPath()

Do not use SchemaPath when comparing types. Just check QName and
corresponding attributes.

JIRA: YANGTOOLS-1098
Change-Id: I748dccfc62d67ced6d2abba6f2b02054919d3e5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 8.0.0 77/92777/1
Robert Varga [Tue, 29 Sep 2020 13:08:28 +0000 (15:08 +0200)]
Bump odlparent to 8.0.0

Upstream version has been released, adopt it.

Change-Id: I3694b5339893854bc47203a89a62a7f2d40b321f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpgrade odlparent to 8.0.0-SNAPSHOT 56/92656/2
Robert Varga [Wed, 23 Sep 2020 23:40:50 +0000 (01:40 +0200)]
Upgrade odlparent to 8.0.0-SNAPSHOT

Pick up latest ugprades.

Change-Id: Id8dc14851e3ea27b352296a02e235d3ffd453a46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not rely on default charset for test resources 21/92721/1
Robert Varga [Fri, 25 Sep 2020 16:30:08 +0000 (18:30 +0200)]
Do not rely on default charset for test resources

Modernizer is pointing out a fair number of improvements, implement
them.

Change-Id: I35d072822c215b68c9cbb196756be95271233938
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd more use of assertThrows() 89/92589/2
Robert Varga [Tue, 22 Sep 2020 11:34:25 +0000 (13:34 +0200)]
Add more use of assertThrows()

This cleans up more tests so they take advantage of assertThrows().

Change-Id: I4e6807a7a1627c04f8e07713510049fa84ef5796
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse assertThrows() in more componments 69/92569/3
Robert Varga [Mon, 21 Sep 2020 16:25:42 +0000 (18:25 +0200)]
Use assertThrows() in more componments

Eliminate use of @Test(expected) and explicit flow control in favor
of assertThrows().

Change-Id: Icd97391178bbb1342ddb05a874297678fe51d1f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse assertThrows in yang-common 65/92565/2
Robert Varga [Mon, 21 Sep 2020 15:16:12 +0000 (17:16 +0200)]
Use assertThrows in yang-common

Migrate to from Test(expected=) to assertThrows(), which makes sonar
happier. It also improves accuracy of which call is actually tested.

Change-Id: I229af710b0946113a55d06134018d8554818e356
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse assertThrows in yang-common-netty 64/92564/2
Robert Varga [Mon, 21 Sep 2020 15:01:02 +0000 (17:01 +0200)]
Use assertThrows in yang-common-netty

Migrate to from Test(expected=) to assertThrows(), which makes sonar
happier.

Change-Id: I3e5efdd4d9f5a738404775047e37f5b7aa21a2f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix warnings when we are augmenting-in a list 29/92529/1
Robert Varga [Mon, 21 Sep 2020 10:48:07 +0000 (12:48 +0200)]
Fix warnings when we are augmenting-in a list

When we are targetting a non-configuration list we end up issuing
a warning because the augment content contains the list as well --
and is not suppressed. Add logic to suppress it.

JIRA: YANGTOOLS-1133
Change-Id: I55e43d39949db756634e86e4e570df6bbbce6c1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c6510cf99fff6bd27c1abcc66e78558c9f8df713)

3 years agoBump odlparent to 7.0.6 58/92558/2
Robert Varga [Mon, 21 Sep 2020 12:13:06 +0000 (14:13 +0200)]
Bump odlparent to 7.0.6

Pick up latest odlparent version.

Change-Id: I08e2ae6ba7cef95bafd515b1aa377ad2515a0b1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse assertThrows() in common-util 57/92557/2
Robert Varga [Mon, 21 Sep 2020 12:02:49 +0000 (14:02 +0200)]
Use assertThrows() in common-util

Using assertThrows() allows us to clean up some of the tests, so that
we do not have needed flow control and expected= tests.

Change-Id: I0b2ca1af3a50109ea68e0161c70f918b76275fb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse StandardCharsets 28/92528/1
Robert Varga [Mon, 21 Sep 2020 10:52:12 +0000 (12:52 +0200)]
Use StandardCharsets

Java 10 allows us to use a proper constant for charset.

Change-Id: Ie7706356bf5bcbde05e7632b099901d226f40cf1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd clarification around NormalizedNode being identifiable 02/92502/1
Robert Varga [Sat, 19 Sep 2020 13:32:16 +0000 (15:32 +0200)]
Add clarification around NormalizedNode being identifiable

While we do not have enough time to address the entire issue, update
at least documentation so as we have a bit more progress towards
splitting identifier from NormalizedNode.

JIRA: YANGTOOLS-1074
Change-Id: Icc742a1b1a5ab65fd01f13abfcba68af0e3eea43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDefine MaxAccess enumeration 92/92492/7
Robert Varga [Fri, 18 Sep 2020 22:06:18 +0000 (00:06 +0200)]
Define MaxAccess enumeration

RFC2578 specifies which strings are actually valid as max-access
arguments. Make sure we properly validate them and use an enum.

JIRA: YANGTOOLS-1134
Change-Id: I9e22dccb115f34ab50aaa8cf84e09d12713c69fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix SubIdStatement/ObjectIdentifier ranges 93/92493/8
Robert Varga [Fri, 18 Sep 2020 22:12:07 +0000 (00:12 +0200)]
Fix SubIdStatement/ObjectIdentifier ranges

RFC2578 makes it clear that each sub-identifier is an uint32 as
well as that there is at most 128 of them present in an ObjectIdentifier.

JIRA: YANGTOOLS-1134
Change-Id: Ic19baf8158c3e291c505c943bf16eae7cfd4ad58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove IetfYangSmiv2Namespace 87/92487/1
Robert Varga [Fri, 18 Sep 2020 20:49:04 +0000 (22:49 +0200)]
Remove IetfYangSmiv2Namespace

This namespace is useless, remove it.

JIRA: YANGTOOLS-1134
Change-Id: Ic285d7e68daf090b6a024f38a32de0c8e15414c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd RFC6643 parser support 85/92485/3
Robert Varga [Fri, 18 Sep 2020 15:54:47 +0000 (17:54 +0200)]
Add RFC6643 parser support

RFC6643 defines a way to map SMIv2 to YANG. This mapping retains
the original SMI details using YANG extensions, so that the resulting
model can be mapped back.

This patch adds semantic support for these extensions, so that the
semantics are supported out of the box.

JIRA: YANGTOOLS-1134
Change-Id: I494b2537e89e5a104debe486a9012d22d5c7b3aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4223bf8c4eae4a003b71554fbcc98b5377ddce2b)
(cherry picked from commit 1200789c3e9591882ef066ecc6bad7f8ff63a7f7)

3 years agoFix IRStatement formatting 30/92430/2
Robert Varga [Wed, 9 Sep 2020 12:22:06 +0000 (14:22 +0200)]
Fix IRStatement formatting

We should append a fragment rather than starting a new toString()
chain.

Change-Id: Ie54b70ed0faa7ae914c25bb8ea8c6152445496ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTake advantage of ANTLR keyword validation 03/92203/11
Robert Varga [Thu, 20 Aug 2020 09:44:42 +0000 (11:44 +0200)]
Take advantage of ANTLR keyword validation

We can guarantee keyword matches only valid identifiers, hence there
is little reason to perform additional validation in QName itself.

This patch punches a hole in the API for the sake of improved CPU
usage in the most common use case.

Change-Id: Ib190f44cbe29ed4dd62ab20e62254a9d23b78e10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMass-migrate to use EffectiveModelContext 17/92417/2
Robert Varga [Mon, 7 Sep 2020 11:36:25 +0000 (13:36 +0200)]
Mass-migrate to use EffectiveModelContext

This is the next step in migration: make sure most of our yang-data
constructs operate on EffectiveModelContext.

Change-Id: I85a314899bcd29ead0396a4b4ebd369f4e141014
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAllow module to be represented in different formats 15/92415/3
Robert Varga [Mon, 7 Sep 2020 09:02:42 +0000 (11:02 +0200)]
Allow module to be represented in different formats

We may need to allow for different source packaging. The default
is YangTextSchemaSource, which we always packaged. We may introduce
additional types at a later point.

Change-Id: I46dcde1052c36fbc5105a320ac3ec58186d24f61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ASTSchemaSource 11/92411/6
Robert Varga [Fri, 4 Sep 2020 13:50:44 +0000 (15:50 +0200)]
Remove ASTSchemaSource

ASTSchemaSource has been deprecated, remove it along with all
compatibility code.

Change-Id: Ib6b92056304b8f8d30bd82e7f4c334a26ba93108
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoIntroduce IRSchemaSource 05/92305/6
Robert Varga [Thu, 27 Aug 2020 09:51:02 +0000 (11:51 +0200)]
Introduce IRSchemaSource

Rather than using ASTSchemaSource, use a dedicated IRSchemaSource,
which ends up being the replacement for ASTSchemaSource. We are
undoing some work previously done, but it allows easier backporting.

JIRA: YANGTOOLS-1130
Change-Id: Ifdeaa0d053558eda12432264fb768ed0d821468f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove YangModelDependencyInfo.COLON_SPLITTER 04/92304/1
Robert Varga [Thu, 27 Aug 2020 09:09:10 +0000 (11:09 +0200)]
Remove YangModelDependencyInfo.COLON_SPLITTER

Now that we are operating on our explicit intermediate representation
we do not need to split identifiers. Remove the now-unused splitter.

JIRA: YANGTOOLS-1130
Change-Id: Ida081bfa8c143a3062ac22d4862923aef49426be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate DQUOT_START/SQUOT_START tokens 50/92250/2
Robert Varga [Sun, 23 Aug 2020 20:53:39 +0000 (22:53 +0200)]
Eliminate DQUOT_START/SQUOT_START tokens

Quoted strings are naturally terminated by end marker, potentially
preceded by DQUOT_STRING/SQUOT_STRING. This renders the corresponding
start tokens really just a academic completeness, costing us memory
while not bringing anything to the table.

Skip generation of these tokens, reducing memory usage by up to 4.5%.

JIRA: YANGTOOLS-1089
Change-Id: I0b7ce9bf292b0dd8475d63869ddfd8d2b86a387c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDisconnect IRStatement from ANTLR 46/92246/1
Robert Varga [Sun, 23 Aug 2020 10:44:21 +0000 (12:44 +0200)]
Disconnect IRStatement from ANTLR

While we currently allow instantiation only from ANTLR, we may end
up with other ways of instantiating the intermediate form. Make sure
IRStatement does not have a dependency on ANTLR.

JIRA: YANGTOOLS-1130
Change-Id: I4d28f7c4fd8457fe01e7eae967e0917c1a91b4e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate quotedString parser construct 44/92244/7
Robert Varga [Sun, 23 Aug 2020 07:10:02 +0000 (09:10 +0200)]
Eliminate quotedString parser construct

Double-quoted strings are very common and having a separate parser
construct is not giving us much for the memory footprint it incurs.

Inline the recursive definition into argument and adjust parsing
code to cope with the change. This results in memory usage improvement
of up to 3.7%.

JIRA: YANGTOOLS-1089
Change-Id: I9fce7d1ed9f8df4bcc602978c66fcfba7bbd8ed8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTreat empty double-quoted strings as single-quoted 45/92245/4
Robert Varga [Sun, 23 Aug 2020 08:24:43 +0000 (10:24 +0200)]
Treat empty double-quoted strings as single-quoted

Since the string is empty, there is nothing left to be done anyway
for double quotes. Converting the quotes has the slight benefit of
skipping some amount of inspection during assembly.

JIRA: YANGTOOLS-1130
Change-Id: Ie1ff0672f9556d1137f3a466085863ac65f574c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSwitch SchemaAwareApplyOperation error reporting 02/90002/3
Robert Varga [Wed, 27 May 2020 12:23:31 +0000 (14:23 +0200)]
Switch SchemaAwareApplyOperation error reporting

Switch to reporting IllegalStateException when the target schema
node is not as opposed to IllegalArgumentException. This makes it
clear that we have entered internal inconsistency rather than
the user doing something wrong.

Furthermore eliminate the possibility of throwing an unchecked
exception when the user has made a wrong reference -- opting for
a well-controlled checked exception instead.

JIRA: YANGTOOLS-1105
Change-Id: Icd3ddb03a721358d07427e1fddeec8a71e73b933
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFurther optimize YANG statement parsing 39/92239/1
Robert Varga [Sat, 22 Aug 2020 20:26:56 +0000 (22:26 +0200)]
Further optimize YANG statement parsing

Recursive definition of stringPart can easily end up with a large
number of retained objects -- i.e. we get StringPartContext for
each concatenation, with potentially small lists of three tokens.

Furthermore each unquotedString has ends up being typically defined
by a UnquotedStringContext containing a single StringPartContext,
which is clearly wasteful.

The grammar we are looking at is not that complex, hence we can
rewrite it without relying on recursion -- thus improving memory
footprint.

JIRA: YANGTOOLS-1089
Change-Id: I18eb1305d3e024d530552ac5cea0b5a928da0048
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix eclipse nullness warnings around Class 35/92235/5
Robert Varga [Sat, 22 Aug 2020 17:20:42 +0000 (19:20 +0200)]
Fix eclipse nullness warnings around Class

Eclipse warns about @NonNull mismatch in typical callers, fix these
warnings.

Change-Id: I81973fa08bcd9408c99f38a6d7df0083c3445526
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate StmtContext.getSchemaPath() 36/92236/4
Robert Varga [Sat, 22 Aug 2020 17:49:36 +0000 (19:49 +0200)]
Deprecate StmtContext.getSchemaPath()

We want to be identifying everyone who is touching this state,
as it ends up logically referencing the parent node and is going
away.

JIRA: YANGTOOLS-1131
Change-Id: I33a93bec07e6a3a12afc920eb6fe685fa4339f9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReparent BaseQNameStatementSupport 34/92234/3
Robert Varga [Sat, 22 Aug 2020 17:11:03 +0000 (19:11 +0200)]
Reparent BaseQNameStatementSupport

BaseQNameStatementSupport is a specialization of BaseStatementSupport,
reparent it as appropriate. This allows us to finally encapsulate
statement creation completely within BaseStatementSupport.

Since we are ending up with no users for the argument-specialized
subclasses of AbstractStatementSupport, remove these as well.

JIRA: YANGTOOLS-1121
Change-Id: Ief35ca52ff120fef15565a1b44423b95a2defce1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor AbstractEffectiveDocumentedNodeWithStatus 13/92013/11
Robert Varga [Mon, 10 Aug 2020 15:33:42 +0000 (17:33 +0200)]
Refactor AbstractEffectiveDocumentedNodeWithStatus

This is the final vestige of custom-built statements, make sure
to switch it over to require pre-built substatements. This forces
extensions to adopt BaseStatementSupport et al., which is actually
a good thing.

JIRA: YANGTOOLS-1123
Change-Id: Ib1debecae8d2dbb474cb1c8aa34f05d0e1a3ecad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ValueWithQName.getQname() 32/92232/7
Robert Varga [Fri, 21 Aug 2020 08:33:25 +0000 (10:33 +0200)]
Remove ValueWithQName.getQname()

This is mispelled method, remove it as we have a direct replacement.

Change-Id: I987b7bc056819d199a6963e131bd5f527d416345
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove DataSchemaContextTree.getChild() 30/92230/6
Robert Varga [Fri, 21 Aug 2020 08:29:01 +0000 (10:29 +0200)]
Remove DataSchemaContextTree.getChild()

This method has been superseded by findChild(), remove it now.

Change-Id: Ic478bce28e6c99d830ae2a42fca88c5bd3c970a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove QName.withModule() 31/92231/4
Robert Varga [Fri, 21 Aug 2020 08:29:50 +0000 (10:29 +0200)]
Remove QName.withModule()

AbstractQName.bindTo() provides a more general facility across
all of its subclasses. Remove the old withModule() method.

Change-Id: Iac2c258bbdc880187c7ba4e82ae948e25e9f8c88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove EffectiveStatement.findAll() 29/92229/2
Robert Varga [Fri, 21 Aug 2020 08:27:59 +0000 (10:27 +0200)]
Remove EffectiveStatement.findAll()

This method has been replaced by getAll(), which has the same
semantics. Remove it now.

Change-Id: I3e5bdc3ec903a9e57d5beb7d996bea9ea4c62691
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd an explicit intermediate YANG representation 53/92153/21
Robert Varga [Fri, 14 Aug 2020 10:55:12 +0000 (12:55 +0200)]
Add an explicit intermediate YANG representation

ANTLR classes are geared towards parsing and raw speed, without much
regards to memory usage. Most notably using ParseTree as our AST ends
up retaining separators and various metadata which we do not really
need.

Add a simplistic intermediate representation for our AST, which where
we pre-process ANTLR trees and de-duplicate strings. This leads to
elimination of 90% of objects, with corresponding reduction of memory
footprint.

JIRA: YANGTOOLS-1130
Change-Id: Idf057bbb1e29280a8e378529401023fb87d18923
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove QNameModule.getRevisionNamespace() 12/92212/1
Robert Varga [Fri, 21 Aug 2020 06:59:03 +0000 (08:59 +0200)]
Remove QNameModule.getRevisionNamespace()

This method is not used anywhere and is actually buggy, remove it.

Change-Id: I575b0a6814c80315c5eed26800d61e36bff0798a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up AbstractQName.checkLocalName() 11/92211/2
Robert Varga [Thu, 20 Aug 2020 18:40:12 +0000 (20:40 +0200)]
Clean up AbstractQName.checkLocalName()

Do not throw IAE on null, use NPE as usual.

Change-Id: I7cb34ffe5b6cb12408ca87088498295d4f5b4c1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpecial-case identifier lexer token 06/92206/2
Robert Varga [Thu, 20 Aug 2020 14:48:41 +0000 (16:48 +0200)]
Special-case identifier lexer token

An unquoted string can be an IDENTIFIER, which is the most common
case anyway. This token does not have to be further validated and
thus it makes sense to special-case it. This has the neat effect
of reducing the depth of our parse tree, too -- bringing memory
usage down by 6.6% versus the original fix.

JIRA: YANGTOOLS-1089
Change-Id: I63701719e90334558048201d70d8264ab9299efb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCorrect (Un)qualifiedQName javadoc 04/92204/2
Robert Varga [Thu, 20 Aug 2020 09:35:23 +0000 (11:35 +0200)]
Correct (Un)qualifiedQName javadoc

This adds a bit of documentation and correcting a mitsaken @return.

Change-Id: I56ed5aa57969fad5230c8b3a30503f162888ee22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a specialized token factory 07/92007/16
Robert Varga [Mon, 10 Aug 2020 12:07:00 +0000 (14:07 +0200)]
Add a specialized token factory

Our baseline parsing footprint is rather large. We can improve it
by looking at token component sizes and using distinct token classes.

Aside from CommonToken, which are using as fallbacks for text
handling, we introduce 4 specialized classes, three of them seeing
typical use.

Since these classes use smaller fields to hold lazy state, as well
as eliminate typical invariants, we end up saving around 39MiB (12%)
of AST size in a typical case from the field.

JIRA: YANGTOOLS-1128
Change-Id: I600ae6cbe755212e2d1a15ae3e6b369ed0b3b962
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd timing information about local file discovery 98/92198/1
Robert Varga [Thu, 20 Aug 2020 07:41:39 +0000 (09:41 +0200)]
Add timing information about local file discovery

Locating local files actually requires also pasing them to establish
their SourceIdentifier. Add output to establish timing of this step.

Change-Id: I7dec307a4ee8b5b394a929f6ce8cb63229f94485
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixup nullness in DataTreeCandidates 91/88491/7
Robert Varga [Wed, 18 Mar 2020 13:53:44 +0000 (14:53 +0100)]
Fixup nullness in DataTreeCandidates

getParent() non-nullness is implied by the depth check, which
unfortunately is not caught by automated tools. Reformulate it so
that we have an explicit guard.

Change-Id: I42415387529d5adab04a15cb07baf2eb4568231d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove TypeBuilder @Nullable annotation 96/88496/7
Robert Varga [Wed, 18 Mar 2020 14:23:17 +0000 (15:23 +0100)]
Remove TypeBuilder @Nullable annotation

SpotBugs is getting a bit confused and Eclipse also reports errors
around our use of base type here -- we cannot reasonably express
nullness without sacrificing method finality. Remove annotations
for now, we'll figure out this detail later.

Change-Id: If2f9d4925a2e3815be0e64d912dd14ebd886b6fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove AbstractRootStatement 12/92012/5
Robert Varga [Mon, 10 Aug 2020 15:24:59 +0000 (17:24 +0200)]
Remove AbstractRootStatement

This class is not used anywhere, remove it to reduce clutter.

Change-Id: Ide36ada46bd1ddcde119c7e90d42317db3cfce61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate AbstractEffectiveDocumentedNodeWithStatus design 53/91953/7
Robert Varga [Fri, 7 Aug 2020 12:06:41 +0000 (14:06 +0200)]
Update AbstractEffectiveDocumentedNodeWithStatus design

We have a number of improvements in mixins, reduce the amount of
memory we need for this abstract class.

Change-Id: I74d636d25bb3a959d7bb6e2c2c720f419c7c13fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused abstract classes 52/91952/7
Robert Varga [Fri, 7 Aug 2020 11:52:20 +0000 (13:52 +0200)]
Remove unused abstract classes

We do not need AbstractConstraintEffectiveStatement and
AbstractListConstraintEffectiveStatement anymore. Remove them.

Change-Id: Iaea7c91d4f738fc84384e66531cff2bee4faf513
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove EffectiveStatementBase 51/91951/7
Robert Varga [Fri, 7 Aug 2020 11:45:59 +0000 (13:45 +0200)]
Remove EffectiveStatementBase

This is a badly-designed class, integrate it into its only subclass.

Change-Id: I4ddf2ec785e295c1f854eacb906060b3d76ab94c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove YangStatementStreamSource.getYangAST() 35/92035/4
Robert Varga [Tue, 11 Aug 2020 12:41:37 +0000 (14:41 +0200)]
Remove YangStatementStreamSource.getYangAST()

This method has been deprecated, remove it now.

Change-Id: I6e8c90388887224e2112c48136dd4e8e00428426
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove an unneeded continue 63/92163/1
Robert Varga [Fri, 14 Aug 2020 16:29:28 +0000 (18:29 +0200)]
Remove an unneeded continue

We have an if/else branch, no need for another continue.

Change-Id: I4f463c1b23ae869f8d4cae649e82d0d9f4ba37d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9ff702d612e74ee280ddcb22862a31dff285f505)

3 years agoBump versions to 6.0.0-SNAPSHOT 61/92161/1
Robert Varga [Fri, 14 Aug 2020 16:13:47 +0000 (18:13 +0200)]
Bump versions to 6.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I36d948fbb5ab9cacc1ddf2d513887191300e9e70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTake advantage of keyword tokenization 52/92152/3
Robert Varga [Fri, 14 Aug 2020 09:09:05 +0000 (11:09 +0200)]
Take advantage of keyword tokenization

Now that the tokenization has been fixed, we can rely on keyword
context to provide us with neatly split prefix and local name --
hence we do not need to perform concat/split.

Change-Id: I5d8e37d2267fefa3c5eafc542e00df33142a0bae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRework YANG lexer/parser 39/92139/8
Robert Varga [Thu, 13 Aug 2020 18:15:06 +0000 (20:15 +0200)]
Rework YANG lexer/parser

The definitions in the parser and lexer are quite arcane and are
actually wrong, not allowing for a number of edge cases, which are
completely valid.

Furthermore the definition of IDENTIFIER is wrong, as it allows /
and : to appear in it -- effectively ruining the tokenization in
parser.

Refactor the lexer to perform correct tokenization in every situation.
This makes it more complicated, but also much more obvious as to
what is going on -- especially with regard as to what decisions
end up being parser's responsibility.

Refactor the parser so it recognizes YANG tokenization constructs,
notably quoted and unquoted strings, and assemble them from lexer
tokens.

JIRA: YANGTOOLS-1089
Change-Id: I34472bf0a7e262d4f633ce271952bbcd7639ef2f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReplace block comment with a non-greedy rule 37/92137/1
Robert Varga [Thu, 13 Aug 2020 18:09:10 +0000 (20:09 +0200)]
Replace block comment with a non-greedy rule

We do not need an explicit mode here, we can just use a non-greedy
match and move on. This simplifies things a bit.

Change-Id: Ieab6d9cec1b17c8d86cda49cfc46a258a569e5e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRework keyword parser rule 32/92032/5
Robert Varga [Tue, 11 Aug 2020 09:38:52 +0000 (11:38 +0200)]
Rework keyword parser rule

A keyword is either a plain identifier, or two identifiers concatenated
through a colon. Make this a bit clearer, aiding debugging of issues.

Also push KeywordContext down to
StatementContextVisitor.getValidStatementDefinition(), so that we can
improve efficiency once IDENTIFIER token has been fixed up.

Change-Id: Ic64285255564ae33f8ad208b9a3598ba20cd26fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor YANG statement parser structure 27/92027/3
Robert Varga [Tue, 11 Aug 2020 08:47:25 +0000 (10:47 +0200)]
Refactor YANG statement parser structure

Current definition leads to leading whitespace being considered
a part of the statement. This leads to misleading line/character
being reported as the start of the statement.

Fix this by introducing a top-level 'file', which encapsulates
at least one statement with its leading/trailing whitespace. The
other parts then come together naturally.

JIRA: YANGTOOLS-1129
Change-Id: I9f725b09eae6f8acf4397c97c60f99caaade798b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix AnyxmlSchemaLocationStatementSupport declaration 15/92015/2
Robert Varga [Mon, 10 Aug 2020 16:17:25 +0000 (18:17 +0200)]
Fix AnyxmlSchemaLocationStatementSupport declaration

We should not be operating on parameterized EffectiveStatement,
but rather of AnyxmlSchemaLocationEffectiveStatement itself.

Change-Id: I9130f57ced47d416d3d7f300e03eacd876bf0a27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix YangDataStatementSupport declaration 14/92014/2
Robert Varga [Mon, 10 Aug 2020 16:11:57 +0000 (18:11 +0200)]
Fix YangDataStatementSupport declaration

We should not be operating on parameterized EffectiveStatement,
but rather of YangDataEffectiveStatement itself.

Change-Id: I02797816e712b9a484dca694c77f4074ceb2b0da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix declaration of extension-related supports 11/92011/2
Robert Varga [Mon, 10 Aug 2020 15:13:10 +0000 (17:13 +0200)]
Fix declaration of extension-related supports

We should properly specialize these to UnrecognizedEffectiveStatement,
not just any old statement.

Change-Id: I4a09dd9d25040bf62142444566ca39c61b6c57fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix yangtools-docs references 34/91634/1
Robert Varga [Fri, 24 Jul 2020 15:12:03 +0000 (17:12 +0200)]
Fix yangtools-docs references

We are pointing at the wrong versions again, fix that up.

Change-Id: I14280df808a8d7d3cc9037dc3d51860f89018d18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix some util javadoc warnings 15/91615/1
Robert Varga [Fri, 24 Jul 2020 09:17:34 +0000 (11:17 +0200)]
Fix some util javadoc warnings

Clean up some warnings, progressing towards a warning-free build.

Change-Id: Ia199d771f409f25ffa1f8aadfd1814f13ee3806e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixup yang-model-api javadoc warnings 12/91612/1
Robert Varga [Fri, 24 Jul 2020 09:05:36 +0000 (11:05 +0200)]
Fixup yang-model-api javadoc warnings

There are a number of issues javadoc is complaining about, fix them
up.

Change-Id: I82e108faca800b80a85e00aab96cb8ec8fdc91e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 5.0.6-SNAPSHOT 38/91538/2
Robert Varga [Wed, 22 Jul 2020 13:18:32 +0000 (15:18 +0200)]
Bump versions to 5.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I8cc0583d3cf9f32a4ebc7cb971fe29d226196ac6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 7.0.5 34/91534/1
Robert Varga [Wed, 22 Jul 2020 12:15:25 +0000 (14:15 +0200)]
Bump odlparent to 7.0.5

Pick up odlparent with netty fix.

Change-Id: I1b469bcb1f34fab8dc82ed39b4d3ffe418d24099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRevert "Update YANG lexer/parser to accept free-standing '+'" 32/91532/1
Robert Varga [Wed, 22 Jul 2020 11:15:56 +0000 (13:15 +0200)]
Revert "Update YANG lexer/parser to accept free-standing '+'"

This reverts commit 04ed60d275521fd6e6ee57d5b1ce4e6a519d2e35, as it
causes a regression around "foo" +"foo" construct.

JIRA: YANGTOOLS-1089
Change-Id: Ib5af7a994c19bf99fb5cb2a875063d623cc6c3f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate SchemaNodeIdentifier design a bit 11/91511/3
Robert Varga [Tue, 21 Jul 2020 19:01:20 +0000 (21:01 +0200)]
Update SchemaNodeIdentifier design a bit

Using explicit instanceof checks is not very code friendly, as we
usually end up using either Absolute or Descendant identifier and
forcing an instanceof check is hiding things from the compiler.

Furthermore {first,last}NodeIdentifier are really only useful in
the Absolute case.

Update the design by moving utility methods to Absolute and
add four specialized classes. While this adds a bit of code
duplication and verbosity, the result is a bit better in that we
do not have explicit casts and checks.

Furthermore, in the case of a particular use, for example Absolute,
the code ends up dealing with two concrete implementations, leading
to bimorphic dispatch which is fully visible to JIT.

Change-Id: I2f3b7dc9ac3bf3d038e815f2406bd5c5629f8553
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SchemaNodeIdentifier.{first,last}Identifer() 08/91508/1
Robert Varga [Tue, 21 Jul 2020 15:29:46 +0000 (17:29 +0200)]
Add SchemaNodeIdentifier.{first,last}Identifer()

A number of operations involving SchemaNodeIdentifier are interested
in either the first or the last part of it. Add methods to efficiently
access them.

Change-Id: I0ecb9ee2d4ce0aba7ca7c302a751c273555456e9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SchemaNodeIdentifier.Absolute.intern() 02/91502/2
Robert Varga [Tue, 21 Jul 2020 12:02:19 +0000 (14:02 +0200)]
Add SchemaNodeIdentifier.Absolute.intern()

We will be using SchemaNodeIdentifiers in a lot of contexts, some
of which involve dynamic wiring lookups. In these contexts we want
the ability to squash an Absolute schema node identifier into a
JVM-wide single instance -- hence we get benefits of cached hash
code and instance-shortcuts on equals().

Change-Id: I2144ba659a783d585e59103dde3e6d292a63ec48
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 5.0.5-SNAPSHOT 95/91395/1
Robert Varga [Fri, 17 Jul 2020 15:54:52 +0000 (17:54 +0200)]
Bump versions to 5.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: I35d576671154998adba1643361ce0dc86ad576cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump to odlparent-7.0.4 35/91235/5
Robert Varga [Sat, 11 Jul 2020 14:22:25 +0000 (16:22 +0200)]
Bump to odlparent-7.0.4

Pick up latest upgrades from upstream.

Change-Id: I9843867449ac5f0eaf16d562df493cb13b495f4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse modifiable List when resolving relative xpath 18/91318/9
Tomas Cere [Tue, 14 Jul 2020 13:05:18 +0000 (15:05 +0200)]
Use modifiable List when resolving relative xpath

When we have split the path into its components, we can end up
compressing them further. Make sure the list is actually mutable.

JIRA: YANGTOOLS-1125
Change-Id: I1d4cd66d2efbb1955bb189763ea09fefeba93d25
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up predicates prior to xpath normalization 29/91329/2
Tomas Cere [Wed, 15 Jul 2020 08:43:57 +0000 (10:43 +0200)]
Clean up predicates prior to xpath normalization

Path splitting is not equipped to ignore step predicates, which leads
it to do arrive at the wrong path. Remove any predicates before
embarking on resolving the reference.

JIRA: YANGTOOLS-1126
Change-Id: Ia32836ad1acec0762d9baa7ded5f65fa72f39b93
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
3 years agoUpdate approval link 86/91286/2
Robert Varga [Sun, 12 Jul 2020 21:22:14 +0000 (23:22 +0200)]
Update approval link

YANGTOOLS does have an approval link -- it is not easy to find,
but it is linked from graduation review.

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