yangtools.git
2 years agoRelease yangtools v7.0.15
jenkins-releng [Thu, 24 Mar 2022 12:37:52 +0000 (12:37 +0000)]
Release yangtools

2 years agoAdd convenience methods for XML codec 36/100236/1
Robert Varga [Thu, 24 Mar 2022 00:07:31 +0000 (01:07 +0100)]
Add convenience methods for XML codec

Codecs are at yang.data.api layer, add methods to initialize them with
YangInstanceIdentifier.

JIRA: YANGTOOLS-1412
Change-Id: Id9ce9af904fba55a0781a0c5e53ed253484664ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4cd2b06b8c376671c3ce7a0de43442843ac09f39)

2 years agoAdd DataSchemaContextNode/SchemaInferenceStack integration 35/100235/1
Robert Varga [Wed, 23 Mar 2022 13:29:23 +0000 (14:29 +0100)]
Add DataSchemaContextNode/SchemaInferenceStack integration

The removal of SchemaNode.getPath() opens a functionality gap, where it
becomes impossible to initialize a SchemaInferenceStack via use of
DataSchemaContextTree. Add enterChild/enterPath methods which maintain
or return a SchemaInferenceStack, so that cognizant callers can use them
to talk to other schema-informed APIs.

JIRA: YANGTOOLS-1412
Change-Id: Ia3562909e322992a3ee84fd0b3f2f0cc7ce5183d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6e3a97a77736137f798bd712ae2652e13df07935)

2 years agoClean up DataSchemaContainerTree 34/100234/1
Robert Varga [Mon, 21 Mar 2022 17:52:03 +0000 (18:52 +0100)]
Clean up DataSchemaContainerTree

Clean up the class hierarchy and mark things for future improvement,
deprecating unintentionally-public methods and providing guidance.

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

2 years agoFix ChoiceNodeContextNode's byQName indexing 29/100229/3
Robert Varga [Wed, 23 Mar 2022 17:31:39 +0000 (18:31 +0100)]
Fix ChoiceNodeContextNode's byQName indexing

When we are traversing by provided QName, we are meant to encounter
each ContextNode significant to PathArgument construction. This works
for all cases except for 'choice->case->choice', where
ChoiceNodeContextNode's internal indexing does not account for itself:
it ends up storing the second ChoiceNodeContextNode under the
ChoiceSchemaNode's QName -- and therefore it fails to find it by its
consituents' QNames.

This has impact primarily on instance-identifier parsers, as evidenced
by the corresponding JSON-based unit test.

Fix this by properly overriding getQNameIdentifiers() to provide the
internal table's keySet().

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

2 years agoRecognize 'choice' in 'choice' with YANG 1.1 28/100228/3
Robert Varga [Wed, 23 Mar 2022 13:23:10 +0000 (14:23 +0100)]
Recognize 'choice' in 'choice' with YANG 1.1

RFC7950 allows for 'choice' to appear directly in another 'choice'.
Make sure we allow for that possibility. This also requires
disconnecting shorthands from global state -- they are version-specific
after all.

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

2 years agoFix SchemaTreeNamespace population via augment 54/100154/2
Sangwook Ha [Wed, 16 Mar 2022 16:39:14 +0000 (09:39 -0700)]
Fix SchemaTreeNamespace population via augment

This change adds 4 test cases to reproduce:
  - Deviation of a case node with case statement
  - Deviation of a case node without case statement
  - Deviation of an augmented case node with case statement
  - Deviation of an augmented case node without case statement

The only test case fails is the last one (deviation of an augmented
case node without case statement). There is another way to depreduce
the root cause, which is to use 'augment' instead of deviate.

The problem is that the implicit case statement does not trigger
onStatementAdded() and hence it does not get registered in the
namespace.

Fixing this issue changes behaviour in testDuplicityInAugmentTarget2(),
i.e. the schema tree overlap previously reported through
SchemaTreeIndexingException (when we are already building effective
view) gets flagged earlier with a SourceException, pointing to both the
place where the conflict occurs and which source statement is causing
it.

JIRA: YANGTOOLS-1408
Change-Id: I7c26399b07aaa142b5ab8191dab97e738118a14a
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 710d9e5c81cde651ad0c1093fe93ab9e6f899e1e)

2 years agoTolerate children not being present 33/99933/1
Robert Varga [Wed, 2 Mar 2022 08:15:03 +0000 (09:15 +0100)]
Tolerate children not being present

Augment's children are subject to deviations at augment target, hence
we need to check for their presence. Also add some sorely-missing
documentation as to what this class actually does.

JIRA: YANGTOOLS-1404
Change-Id: I98cce6b2a8bff74658a16553f93eb8049dd038b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 81f38342831f259f93e0d35f3f1ddc6f0e90b91f)

2 years agoBump versions to 7.0.15-SNAPSHOT 04/99704/1
Robert Varga [Sun, 13 Feb 2022 08:50:12 +0000 (09:50 +0100)]
Bump versions to 7.0.15-SNAPSHOT

This starts the next development iteration.

Change-Id: Idcd6e91c03f20204751f029c2ffe8955afbf93ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd a uses/refine test 10/99610/1
Robert Varga [Tue, 8 Feb 2022 13:24:14 +0000 (14:24 +0100)]
Add a uses/refine test

Improve the test model to also check refine target.

JIRA: YANGTOOLS-1393
Change-Id: Ie9a45310112ad4fea9f2ff7ffd5d7eaf088596b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3f7c8ed26d2830e8b3a59f518164117339b9fc3e)

2 years agoDo not enforce augments in unsupported nodes 48/99648/2
Robert Varga [Tue, 1 Feb 2022 12:28:53 +0000 (13:28 +0100)]
Do not enforce augments in unsupported nodes

If our parent uses node is not supported by features, we should not be
trying to enforce the augmentation dependency, as it will not be
present.

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

2 years agoDisable uses/augment statements of unsupported paths 40/99640/3
Robert Varga [Sun, 6 Feb 2022 18:28:26 +0000 (19:28 +0100)]
Disable uses/augment statements of unsupported paths

Uses statements should propagate unsupported-by-features statements
as unsupported-to-build statements.

JIRA: YANGTOOLS-1393
Change-Id: Ie373b3f0cf7539219b68d1e7b52f6d348ff246e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0e0a54e3b39d7fcc26709fea86a694d8a6cad41b)

2 years agoRevert "Revert "Bump versions to 7.0.14-SNAPSHOT"" 71/99471/1
Robert Varga [Wed, 26 Jan 2022 14:46:09 +0000 (15:46 +0100)]
Revert "Revert "Bump versions to 7.0.14-SNAPSHOT""

This reverts commit 7ee8df5381bc2627a1f8132a1b3d0ed434c9dc77,
reinstating the version bump.

Change-Id: I3b0368280303c04788a0cb8ed74e67403ed6eb7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Bump versions to 7.0.14-SNAPSHOT" 70/99470/1
Robert Varga [Wed, 26 Jan 2022 14:45:50 +0000 (15:45 +0100)]
Revert "Bump versions to 7.0.14-SNAPSHOT"

This reverts commit 53e486d56b103b93ebbfeff5b08da63d6e2599f6, as we
have not performed the release yet.

Change-Id: Ibccdb5e92267d5d0933896417c2f8e5eedaa4c1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 7.0.14-SNAPSHOT 66/99466/1
Robert Varga [Wed, 26 Jan 2022 12:47:56 +0000 (13:47 +0100)]
Bump versions to 7.0.14-SNAPSHOT

This starts the next development iteration.

Change-Id: Idde5f104ea1a88ca5472aff1cb9d527a2caaf137
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd SoftSchemaSourceCache 64/99464/2
Robert Varga [Wed, 26 Jan 2022 10:04:39 +0000 (11:04 +0100)]
Add SoftSchemaSourceCache

GuavaSchemaSourceCache has a rather ugly design, which cannot be easily
scaled. Introduce a simpler SoftSchemaSourceCache as its replacement.

JIRA: YANGTOOLS-1391
Change-Id: I0de9092885ede3efff9d76d48ec14b85a69818b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove AbstractSchemaSourceCache.offer() 63/99463/1
Robert Varga [Wed, 26 Jan 2022 09:47:46 +0000 (10:47 +0100)]
Improve AbstractSchemaSourceCache.offer()

The argument is guaranteed to be non-null, document that with an
annotation.

Change-Id: I5bdad698ad2c09a813b1165c70c10d21b950e2f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSimplify GuavaSchemaSourceCache.offer() a bit 57/99457/1
Robert Varga [Mon, 24 Jan 2022 16:35:30 +0000 (17:35 +0100)]
Simplify GuavaSchemaSourceCache.offer() a bit

We do not have to access the source id multiple times and can lower
cognitive load with an early return.

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

2 years agoClean up GuavaSchemaSourceCacheTest 56/99456/1
Robert Varga [Tue, 25 Jan 2022 15:49:50 +0000 (16:49 +0100)]
Clean up GuavaSchemaSourceCacheTest

This is a rather ancient test, clean it up with try-with-resources
block plus a few other niceties.

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

2 years agoBump odlparent to 9.0.13 50/99450/1
Robert Varga [Tue, 25 Jan 2022 21:54:28 +0000 (22:54 +0100)]
Bump odlparent to 9.0.13

Pick up latest fix from upstream.

Change-Id: I20a7e25fcd0a550f129e1b1c9c7a993666940afa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse representation class for casting 49/99449/1
Robert Varga [Mon, 24 Jan 2022 16:30:54 +0000 (17:30 +0100)]
Use representation class for casting

We have an unchecked cast supressed here. Use Class.cast() to get
rid of it.

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

2 years agoBump versions to 7.0.13-SNAPSHOT 72/99372/1
Robert Varga [Wed, 19 Jan 2022 07:04:07 +0000 (08:04 +0100)]
Bump versions to 7.0.13-SNAPSHOT

This starts the next development iteration.

Change-Id: I865e5fd6e14abc9f61a9327febe7730548d44ad7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.12 66/99366/1
Robert Varga [Tue, 18 Jan 2022 18:59:04 +0000 (19:59 +0100)]
Bump odlparent to 9.0.12

Used a fixed-up version of compiler-maven-plugin.

Change-Id: Ia1dadae7b4af8ba6936b25a8f1a50258a2162de6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.11 40/99340/3
Robert Varga [Mon, 17 Jan 2022 21:22:34 +0000 (22:22 +0100)]
Bump odlparent to 9.0.11

Pick up latest upgrades from upstream.

Change-Id: I94e66ee818a39828e0df3d541a6817c2b304720d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDeprecate ImmutableNodes.fromInstanceId() with deepestElement 60/99260/1
Robert Varga [Mon, 10 Jan 2022 12:25:59 +0000 (13:25 +0100)]
Deprecate ImmutableNodes.fromInstanceId() with deepestElement

The two methods allowing an override of the deepest element have only a
single user, which is broken by their semantics. Deprecate them for
removal, so that we flush out anyone else still relying on them.

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

2 years agoBump versions to 7.0.12-SNAPSHOT 36/99236/1
Robert Varga [Mon, 10 Jan 2022 08:27:02 +0000 (09:27 +0100)]
Bump versions to 7.0.12-SNAPSHOT

This starts the next development iteration.

Change-Id: Ia09424786bcfb92b8e1d5330790ce34b4e789b29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDeprecate SemVer import mode 38/99038/1
Robert Varga [Thu, 21 Oct 2021 08:48:35 +0000 (10:48 +0200)]
Deprecate SemVer import mode

Semantic version imports are not used by anyone and have a rather
convoluted implementation. Deprecate them along with their supporting
elements.

JIRA: YANGTOOLS-1354
Change-Id: I6b41c3407d51833cb13445517e896be39b371ac8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1fff58dc4bee0df39b9c600f2291f98b18d7dc55)

2 years agoBump odlparent to 9.0.10 26/99226/1
Robert Varga [Sun, 9 Jan 2022 17:04:52 +0000 (18:04 +0100)]
Bump odlparent to 9.0.10

Pick up latest upgrades from upstream.

Change-Id: Idb182da59822f408640750cc6c5cb4d09ea3fc5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd SchemaNodeIdentifier-based constructor 35/99135/1
Robert Varga [Wed, 22 Dec 2021 07:25:29 +0000 (08:25 +0100)]
Add SchemaNodeIdentifier-based constructor

We are deprecating SchemaPath, provide a proper constructor allowing
downstreams to use it instead of the SchemaPath-driven one.

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

2 years agoCorrect and/or/div/mod in path expressions 32/99032/1
Robert Varga [Sun, 19 Dec 2021 09:35:17 +0000 (10:35 +0100)]
Correct and/or/div/mod in path expressions

The grammar is creating implicit lexer tokens for and/or/div/mod, which
take precedence overt NCName. Make sure we define these tokens
explicitly and allow them to be an alternative wherever NCName is
valid.

JIRA: YANGTOOLS-1387
Change-Id: I4f4f26fe0f8bc27614b769b465a76696a49ad7c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1a7e93a50d22944771fe2ea4fc18c24fcf3aae11)

2 years agoBump versions to 7.0.11-SNAPSHOT 16/99116/1
Robert Varga [Sun, 19 Dec 2021 08:16:29 +0000 (09:16 +0100)]
Bump versions to 7.0.11-SNAPSHOT

This starts the next development iteration.

Change-Id: I11c4612de5f1246e8d57a8dfa5fbeee709afe854
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 7.0.10-SNAPSHOT 15/99115/1
Robert Varga [Sun, 19 Dec 2021 08:15:54 +0000 (09:15 +0100)]
Bump versions to 7.0.10-SNAPSHOT

Missing bump since previous release, fix that.

Change-Id: Ibc41fd5a0c56c6db1ca3d7890c0b407252f1ad1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.9 07/99107/1
Robert Varga [Sun, 19 Dec 2021 07:49:16 +0000 (08:49 +0100)]
Bump odlparent to 9.0.9

Pick up latest upgrades from upstream.

Change-Id: Ic3c88f0feb1cfa89c1ebaffa2e467579929db075
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTrigger onStatementAdded() for replicas 86/99086/1
Robert Varga [Wed, 15 Dec 2021 17:22:27 +0000 (18:22 +0100)]
Trigger onStatementAdded() for replicas

When a statement is introduced through StmtContext.replicaAsChildOf(),
the corresponding statement support should be notified of this fact, so
it can properly do its thing. This makes it consistent with
Mutable.childCopyOf().

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

2 years agoDeviations should get disabled if target is unsupported 59/99059/1
Robert Varga [Fri, 17 Dec 2021 07:16:25 +0000 (08:16 +0100)]
Deviations should get disabled if target is unsupported

Deviate's InferenceAction should pay attention to unavailable target
nodes, so we disable the deviation.

JIRA: YANGTOOLS-1370
Change-Id: Id0d8c3a64f91060cb21e807402742341ea98f492
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 70a13e29e0bec19bd48bd3fe48102a465294caf2)

2 years agoAugments should get disabled if target is unsupported 49/98949/2
Robert Varga [Wed, 24 Nov 2021 10:43:31 +0000 (11:43 +0100)]
Augments should get disabled if target is unsupported

AugmentInferenceAction should pay attention to unavailable target
nodes, so we disable the augmentation.

JIRA: YANGTOOLS-1370
Change-Id: Ib1f0bde83a90e4bb45a7c4fa1fc62af205f4ea6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 43fb7cd8d8bd9330988c02566ef376d00eb7b461)

2 years agoImplement ModelStatement.toString() 57/98957/1
Robert Varga [Wed, 8 Dec 2021 11:20:26 +0000 (12:20 +0100)]
Implement ModelStatement.toString()

Make sure we codify hashCode()/equals()/toString() methods in
AbstractModelStatement -- fixing a major usability issue with our
objects and improving consistency.

JIRA: YANGTOOLS-1378
Change-Id: I60c233c978ac4315e9c7c79a2ff96751108671cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 87a0921a2ecdadfabb01f2d47f2c15a3341529a2)

2 years agoDelay modifiers during their processing 56/98956/1
Robert Varga [Sun, 12 Dec 2021 20:11:51 +0000 (21:11 +0100)]
Delay modifiers during their processing

When we are invoking actions, we are also iterating over them, hence
we have to stop modifiers being added -- otherwise we'll get a CME.
Add the minimal machinery to make this work.

JIRA: YANGTOOLS-1381
Change-Id: I44c04d7bdafe9fddb0bddd01e5cbb4912d356723
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3d0ba7cc365c4f8dc2c8e52945e75d20bc3ddd51)

2 years agoCache CopyType.values() 50/98950/2
Robert Varga [Sun, 12 Dec 2021 08:46:45 +0000 (09:46 +0100)]
Cache CopyType.values()

We are on critical path accessing values, which end up being cloned
by the implementation. Let's amortize that by remembering the array.

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

2 years agoDeprecate SchemaNodeUtils for removal 09/98909/1
Robert Varga [Wed, 8 Dec 2021 12:50:44 +0000 (13:50 +0100)]
Deprecate SchemaNodeUtils for removal

This class has been deprecated in 7.0.0, mark that fact and reinforce it
by forRemoval=true.

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

2 years agoDefer mutatesEffectiveCtxPath() hookOnto() 15/98815/1
Robert Varga [Tue, 23 Nov 2021 12:45:27 +0000 (13:45 +0100)]
Defer mutatesEffectiveCtxPath() hookOnto()

When we are resolving statements along schema tree axis we may end up
hitting a statement which is already resolved as unsupported. In that
case we would end up derefencing a known-null action. Defer
initialization until the action is set.

JIRA: YANGTOOLS-1370
Change-Id: I5dbc7c047cbbb78b015c4d09c8b271bb218fef4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 02d8511d8b1e4277a7069d1cf105269d2305f432)

2 years agoIntern PatternExpressions 11/98811/1
Robert Varga [Fri, 3 Dec 2021 15:14:22 +0000 (16:14 +0100)]
Intern PatternExpressions

Some of the patterns out there are widely duplicated, expecially in
Junos models. Since a PatternExpression is an Immutable object, it can
easily be interned and thus shared across reactors, eliminating ~33K
duplicate objects.

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

2 years agoReflect supported features in effective model 32/98632/1
Robert Varga [Mon, 22 Nov 2021 07:14:21 +0000 (08:14 +0100)]
Reflect supported features in effective model

We currently do not capture the set of supported features in
EffectiveModelContext aside from applying their effects. Improve this
by not exposing unsupported features in the effective model, so that
users can understand the set of supported features by simply looking
for all FeatureEffectiveStatements.

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

2 years agoAdd Empty.value() 09/98509/1
Robert Varga [Sun, 14 Nov 2021 18:32:58 +0000 (19:32 +0100)]
Add Empty.value()

Introduce a more friendly name for returning the empty instance. The new
method is 'value()' and 'getInstance()' is deprecated.

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

2 years agoAdd QNameModule documentation 08/98508/1
Robert Varga [Sun, 14 Nov 2021 18:40:49 +0000 (19:40 +0100)]
Add QNameModule documentation

QNameModule is a widely-used class, make sure it is documented.

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

2 years agoCorrect bundle-parent's coordinates 67/98267/1
Robert Varga [Tue, 2 Nov 2021 07:25:55 +0000 (08:25 +0100)]
Correct bundle-parent's coordinates

We are inheriting SCM section from odlparent, make sure we add an
override.

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

2 years agoRequire java.compiler in yang-data-api 70/98070/1
Robert Varga [Fri, 29 Oct 2021 11:33:20 +0000 (13:33 +0200)]
Require java.compiler in yang-data-api

We are using immutables.org and allow @Generated to be emitted, hence
we need to ensure it is visible to users.

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

2 years agoUse VarHandle for toStringCache 69/98069/1
Robert Varga [Thu, 28 Oct 2021 12:11:14 +0000 (14:11 +0200)]
Use VarHandle for toStringCache

We are using VarHandle for hashCode, there let's do the same for
toStringCache.

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

2 years agoAllow rebinding the prefix of an UnresolvedQName 71/98171/2
Robert Varga [Wed, 27 Oct 2021 21:12:14 +0000 (23:12 +0200)]
Allow rebinding the prefix of an UnresolvedQName

There are callers who are dealing with prefix being optional, possibly
added (or changed) in a later context. Add the ability to do that
without re-validating the local name.

JIRA: YANGTOOLS-1359
Change-Id: I099589d8a579f854dcc0ae1740027e7af24470bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 840bcc965c8eeb566d8cebd870f35e1be85cc617)

2 years agoAdd SchemaPath.of(SchemaNodeIdentifier) 59/98159/1
Robert Varga [Wed, 27 Oct 2021 00:20:07 +0000 (02:20 +0200)]
Add SchemaPath.of(SchemaNodeIdentifier)

SchemaNodeIdentifier depends on SchemaPath, which is a bad idea from
flexibility perspective. Since the methods are deprecated, add their
non-cached counterparts in SchemaPath.

JIRA: YANGTOOLS-1358
Change-Id: I8fc6897940a172b06cf309f1a40b56e4e00a6030
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4cea93f6402296296b1a0551241eaa4e16ae6f03)

2 years agoFix YANG export with duplicate imports 06/98006/1
Robert Varga [Thu, 26 Aug 2021 15:04:48 +0000 (17:04 +0200)]
Fix YANG export with duplicate imports

When we have two submodules not agreeing on the prefix used to import a
module, we get a nasty splat from StatementPrefixResolver. Fix this by
detecting when this is happens and skip to full resolution magic.

JIRA: YANGTOOLS-1313
Change-Id: I99cc3ebc2f560590d05b51287d08429aaf7d6582
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Dominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
(cherry picked from commit d08e5552beb9180f582bf419fdcf120052876411)

2 years agoBump odlparent to 9.0.8 94/97994/1
Robert Varga [Tue, 19 Oct 2021 20:49:24 +0000 (22:49 +0200)]
Bump odlparent to 9.0.8

Adopt latest fixes from upstream.

Change-Id: I2f5e98a50d07b5b355bdee0540f9db41536478ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.7 80/97980/1
Robert Varga [Tue, 19 Oct 2021 15:26:34 +0000 (17:26 +0200)]
Bump odlparent to 9.0.7

Adopt latest fixes from upstream.

Change-Id: I3e2af7be36f6c7ac7e95e45dbe3287c9c7eecbbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump maven-verifier to 1.7.2 63/97963/1
Robert Varga [Sun, 17 Oct 2021 19:18:19 +0000 (21:18 +0200)]
Bump maven-verifier to 1.7.2

This modernizes the components used and removes the need for an
exclusion.

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

2 years agoDeprecate EffectiveStmtCtx.Current.original() 26/97926/1
Robert Varga [Sat, 16 Oct 2021 09:32:28 +0000 (11:32 +0200)]
Deprecate EffectiveStmtCtx.Current.original()

These methods are used to pass information to getOriginal(Definition)
methods, which themselves are deprecated for removal. Mirror that
decision so we do not end up exposing things we do not need.

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

2 years agoDeprecate AddedByUsesAware 25/97925/1
Robert Varga [Sat, 16 Oct 2021 09:28:31 +0000 (11:28 +0200)]
Deprecate AddedByUsesAware

isAddedByUses() is used only by mdsal's binding components, which should
be able to get by without this guidance. Deprecate the interface along
with its support bits.

JIRA: YANGTOOLS-1351
Change-Id: Ic8b07b995f49cece48d1a90ed51723485d88120d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1d4620040587f510d1b5f0ce99b13c54350ef6eb)

2 years agoDeprecate DerivableSchemaNode 24/97924/1
Robert Varga [Sat, 16 Oct 2021 09:05:44 +0000 (11:05 +0200)]
Deprecate DerivableSchemaNode

This interface exposes a single method, which in turn is only used
by mdsal-binding-generator. That component should be able to work
without this method, hence we deprecate it with the intent to remove
as soon as practical.

JIRA: YANGTOOLS-1350
Change-Id: Ie7bd65e5301012bcb24703bd36c0a8d149f62d74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6edbe2d43f3b16f8dfdbe70bc4808c23b712f619)

2 years agoAdd more deprecations around SchemaPath 23/97923/1
Robert Varga [Sat, 16 Oct 2021 09:13:04 +0000 (11:13 +0200)]
Add more deprecations around SchemaPath

We have a few constructs which provide bridging to SchemaPath, which
are now triggering warnings. Deprecate them, so that we suppress
warnings and give users some time to adjust.

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

2 years agoDeprecate AugmentationSchemaNode.getOriginalDefinition() 22/97922/1
Robert Varga [Sat, 16 Oct 2021 08:56:14 +0000 (10:56 +0200)]
Deprecate AugmentationSchemaNode.getOriginalDefinition()

This method is on its way out, mark them as deprecated, so downstreams
are aware of that.

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

2 years agoFix StatementContextBase.childCopyOf() 70/97870/3
Robert Varga [Mon, 11 Oct 2021 12:15:45 +0000 (14:15 +0200)]
Fix StatementContextBase.childCopyOf()

Most of our StmtContext implementations are derived from
StatementContextBase, but notably ReplicaStatementContext is not -- and
we do not handle it during copy operations.

Update the dispatch code to short circuit to replicaAsChildOf(), which
takes care of the details.

JIRA: YANGTOOLS-1346
Change-Id: I65f9713d5c06bbe251a4b27fb0745dd905c36976
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3b4308a5a4988fb66839c8d2724c13e0ae1b2e9c)

2 years agoAdd a few more utilities to EffectiveModelContext 63/97163/2
Robert Varga [Thu, 30 Sep 2021 14:02:06 +0000 (16:02 +0200)]
Add a few more utilities to EffectiveModelContext

Locating modules by name/namespace is useful, provide a simple bridge on
top of SchemaContext.findModules().

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

2 years agoIntroduce HierarchicalIdentifier to replace Path 65/97165/1
Robert Varga [Sat, 2 Oct 2021 15:04:00 +0000 (17:04 +0200)]
Introduce HierarchicalIdentifier to replace Path

Path is always combined with Identifier, and it really is an extension
of Identifier contract. Add a new interface to capture that contract
and deprecate Path, so we get out of java.nio.file.Path's way.

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

2 years agoImprove SchemaInferenceStack error reporting 84/97684/1
Robert Varga [Wed, 29 Sep 2021 13:34:37 +0000 (15:34 +0200)]
Improve SchemaInferenceStack error reporting

Include a description of parent's identity when we fail to locate
its child. This makes it easier to understand what is going on in most
failure situations.

The message now ends with something like
- not present in schema parent (namespace)parentName
- not present in grouping (namespace)groupingName
- not present in module (namespace)moduleName
or similar.

Also expand the test suite to cover negative scenarios around
enterChoice().

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

2 years agoDeprecate concents.{Codec,Deserializer,Serializer} 56/97656/1
Robert Varga [Mon, 27 Sep 2021 15:29:15 +0000 (17:29 +0200)]
Deprecate concents.{Codec,Deserializer,Serializer}

These are not really useful, deprecate them for removal.

JIRA: YANGTOOLS-1335
Change-Id: Ie3fae2c7b82e5292f18dd43d2a3f04603b707d29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDeprecate util.Immutables for removal 62/97162/2
Robert Varga [Mon, 27 Sep 2021 13:46:34 +0000 (15:46 +0200)]
Deprecate util.Immutables for removal

This class is rather incompete in its mission and it is not used
anywhere. Deprecate it for removal.

JIRA: YANGTOOLS-1330
Change-Id: I54ad2666e1b7660e5d93d90ff924de1e640df754
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1dc00960a5ccc7434d06688f1140e59ca010192c)

2 years agoPublish identifier matches 56/97156/2
Robert Varga [Thu, 16 Sep 2021 00:59:09 +0000 (02:59 +0200)]
Publish identifier matches

Our private matches are useful for other parsers which need to handle
YANG's identifier ABNF production. Document and publish them from
YangNames.

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

2 years agoDeprecate ClassBasedPropertyBuilder 61/97161/2
Robert Varga [Mon, 27 Sep 2021 12:57:13 +0000 (14:57 +0200)]
Deprecate ClassBasedPropertyBuilder

This interface is not used anywhere, deprecate it for removal.

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

2 years agoDeprecate ProductAwareBuilder 60/97160/1
Robert Varga [Mon, 27 Sep 2021 12:57:38 +0000 (14:57 +0200)]
Deprecate ProductAwareBuilder

This interface is not used anywhere, deprecate it for removal.

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

2 years agoFix Decima64.valueOf(String) 63/97463/1
Robert Varga [Sun, 12 Sep 2021 17:31:32 +0000 (19:31 +0200)]
Fix Decima64.valueOf(String)

When we have a maximum-length string we end up reporting running out of
fraction limit. Fix this by correctly accounting for the period.

JIRA: YANGTOOLS-1321
Change-Id: I40b70400004d39a923b536db8b47784d3659bd4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5d46adb7935241534c69b00a13593f3e8d4ec7d6)

2 years agoFix CanonicalValueViolation.getMessage() 62/97462/1
Robert Varga [Mon, 13 Sep 2021 02:32:11 +0000 (04:32 +0200)]
Fix CanonicalValueViolation.getMessage()

We should not be looking at the tag but rather at message. This fixes
anonymous exceptions being thrown from Decimal64's value support.

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

2 years agoFix EmptyLeafListEffectiveStatement.getOriginal() 57/97457/1
Robert Varga [Sun, 12 Sep 2021 15:44:12 +0000 (17:44 +0200)]
Fix EmptyLeafListEffectiveStatement.getOriginal()

We should not be referencing LeafSchemaNode, but LeafListSchemaNode.

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

2 years agoBump versions to 7.0.9-SNAPSHOT 48/97448/1
Robert Varga [Sat, 11 Sep 2021 13:16:36 +0000 (15:16 +0200)]
Bump versions to 7.0.9-SNAPSHOT

This starts the next development iteration.

Change-Id: I9529682d5171dcd4b126e709aa80a0b23346c0c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix YangErrorInfo.value 47/97447/1
Robert Varga [Sat, 11 Sep 2021 09:20:50 +0000 (11:20 +0200)]
Fix YangErrorInfo.value

YangErrorInfo is transporting a child of a container, which means it
should not be a plain NormalizedNode, but DataContainerChild instead.

Change-Id: Iec207864854ac3d9afd961635170967bd5cc73aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.6 27/97427/1
Robert Varga [Wed, 8 Sep 2021 14:41:25 +0000 (16:41 +0200)]
Bump odlparent to 9.0.6

Adopt latest upgrade.

Change-Id: I4a58797bd45c98d4cea5114415d1a4a0ec9c6773
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDeprecate UnknownSchemaNode.getExtensionDefinition() 55/97155/2
Robert Varga [Mon, 6 Sep 2021 22:34:25 +0000 (00:34 +0200)]
Deprecate UnknownSchemaNode.getExtensionDefinition()

This method is not really useful, as its equivalent can easily be
achieved via SchemaContext lookup. Deprecate it for removal.

JIRA: YANGTOOLS-1319
Change-Id: Ia8f04e4843438988c999d966b72cb078b3f905e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 21591c31b5ac5e09697f3da891363b8b9a1c0cf8)

2 years agoCorrect argument type documentation 05/97405/1
Robert Varga [Mon, 6 Sep 2021 14:43:20 +0000 (16:43 +0200)]
Correct argument type documentation

We have switched to using yang.common.Empty instead of java.lang.Void
due to nullability. Unfortunately not all javadocs were correct updated,
this corrects that mistake.

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

2 years agoUse DefaultWithDataTree.WithSubstatements for lists 02/97402/1
Robert Varga [Mon, 6 Sep 2021 11:25:59 +0000 (13:25 +0200)]
Use DefaultWithDataTree.WithSubstatements for lists

AbstractListEffectiveStatement is duplicating WithSubstatements
functionality, make sure we inherit it.

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

2 years agoDo not retain reference to StatementMap 54/97154/1
Robert Varga [Thu, 2 Sep 2021 16:28:38 +0000 (18:28 +0200)]
Do not retain reference to StatementMap

Once we have finished iterating, we do not need to retain a reference to
the StatementMap. Promote Regular's iterator to a named class and clear
the reference as soon as we are done. Eliminates a YKP's report of a
possible leak.

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

2 years agoFix a javadoc typo 58/97358/1
Robert Varga [Mon, 30 Aug 2021 12:02:45 +0000 (14:02 +0200)]
Fix a javadoc typo

The word is 'schema', not 'screma'.

Change-Id: I2509b6708f47b583019cbfc002d5fe6011771eb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd support for yang-data inference 56/97356/6
Robert Varga [Mon, 30 Aug 2021 09:46:53 +0000 (11:46 +0200)]
Add support for yang-data inference

We will be needing inference abilities across yang-data. Add support for
entering in yang-data and also navigating within it.
YAngDataEffectiveStatement is updated to fully support schema tree and
data tree lookups.

JIRA: YANGTOOLS-1297
Change-Id: I1a10165017070a9430d5c9e43b3a705bc75c4d02
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove SchemaInferenceStack test coverage 57/97357/2
Robert Varga [Mon, 30 Aug 2021 10:30:16 +0000 (12:30 +0200)]
Improve SchemaInferenceStack test coverage

Add a few unit tests to improve coverage. Also fix error reporting and
javadoc.

Change-Id: I8338829a89e3fe07e944cf4eb3c576a48f87d3fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDeprecate SchemaPath 54/97354/2
Robert Varga [Mon, 30 Aug 2021 08:54:26 +0000 (10:54 +0200)]
Deprecate SchemaPath

SchemaPath has only a few remaining users, with two different concepts
added to cover the two significant use cases. Add pointers to
replacements and deprecate SchemaPath.

JIRA: YANGTOOLS-1238
Change-Id: I21b98fef8112b0773c342fc83356cca9f3b64188
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTerminally deprecate SchemaNode.getPath() 53/97353/1
Robert Varga [Sun, 29 Aug 2021 09:01:21 +0000 (11:01 +0200)]
Terminally deprecate SchemaNode.getPath()

This method has been on its slow way out. An alternative addressing
construct is presented through EffectiveStatementInference and
SchemaInferenceStack, so all downstreams should be able to migrate with
relative ease now. Add a stern warning with terminal deprecation with
the intent to remove in yangtools-8.

JIRA: YANGTOOLS-1071
Change-Id: Idfbff326eff741fb53af74f35238b999b812993e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect EffectiveStatementMixins documentation 52/97352/2
Robert Varga [Sat, 28 Aug 2021 14:44:57 +0000 (16:44 +0200)]
Correct EffectiveStatementMixins documentation

The correct type to use for no argument is Empty, not Void.

Change-Id: I68456096336d7e0d93139600375c9d8479dbb6ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove InferredStatementContext.childCopyType 24/95224/12
Robert Varga [Thu, 18 Feb 2021 08:18:41 +0000 (09:18 +0100)]
Remove InferredStatementContext.childCopyType

This field is costing us object size in both 32bit and uncompressed
64bit mode. Since the field only encodes 2 bits, move this storage
to StatementContextBase.copyHistory, saving 8/8/0/0 bytes.

JIRA: YANGTOOLS-1256
Change-Id: Ifeb2cefd0449a4d9112f31a4c511a63dc5b0fb10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRequire SCR in yang-{data,parser}-impl 04/96704/2
Robert Varga [Mon, 28 Jun 2021 19:35:00 +0000 (21:35 +0200)]
Require SCR in yang-{data,parser}-impl

We need OSGi with SCR, otherwise we end up without activated services.
Make sure we have the appropriate annotation.

Change-Id: I5c7e67a531bb7b4e4c48de1872bcfc320557073f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd support for RFC8639 extensions 48/97348/5
Robert Varga [Fri, 27 Aug 2021 12:18:29 +0000 (14:18 +0200)]
Add support for RFC8639 extensions

We have an internal YANG extension defined in rfc8639. Teach the parser
to correctly recognize it.

JIRA: YANGTOOLS-1314
Change-Id: I96c30c9728e61cadbc550b0b96d925719593c0d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 7.0.8-SNAPSHOT 14/97314/1
Robert Varga [Tue, 24 Aug 2021 11:08:42 +0000 (13:08 +0200)]
Bump versions to 7.0.8-SNAPSHOT

This starts the next development iteration.

Change-Id: Ibf0ccd22eb887cb73d5fd0aafc36705d53262f0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.5 11/97311/1
Robert Varga [Tue, 24 Aug 2021 11:07:18 +0000 (13:07 +0200)]
Bump odlparent to 9.0.5

Pick up the stray fixup for bcutil.

Change-Id: Ibcc8b09b92c1530175f6a08c7a273fe1b41fc786
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 7.0.7-SNAPSHOT 99/97299/1
Robert Varga [Mon, 23 Aug 2021 16:36:30 +0000 (18:36 +0200)]
Bump versions to 7.0.7-SNAPSHOT

This starts the next development iteration.

Change-Id: I838d40475d06cc0c490b3943c121926f6b885746
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.4 98/97298/1
Robert Varga [Mon, 23 Aug 2021 16:22:48 +0000 (18:22 +0200)]
Bump odlparent to 9.0.4

Pick up latest fixes from upstream.

Change-Id: I0504633d43bf8d39f18fbd226da06bb4244c8dfa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 7.0.6-SNAPSHOT 62/97262/3
Robert Varga [Thu, 19 Aug 2021 13:47:48 +0000 (15:47 +0200)]
Bump versions to 7.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I29e015353b17caa388834d59c30ff8c36da1f4b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump odlparent to 9.0.3 60/97260/1
Robert Varga [Thu, 19 Aug 2021 13:26:49 +0000 (15:26 +0200)]
Bump odlparent to 9.0.3

Pick up latest fixes from upstream.

Change-Id: Ib9d74aa33ada2e5108f9725cbb62eca75c24720b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAllow refine to change 'default' in leaf-list 57/97257/2
Robert Varga [Thu, 19 Aug 2021 12:36:51 +0000 (14:36 +0200)]
Allow refine to change 'default' in leaf-list

RFC7950 allows 'default' to be specified for 'leaf-list's, which we
recognize. Unfortunately the definition of refine statement does not
take this into account. Fix that and add an explicit test.

JIRA: YANGTOOLS-1312
Change-Id: I0c3ba7ca7cabba486c7226d520ce82a7ec2d194b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRetrofit YangNetconfError for {min,max} elements 48/97248/3
Robert Varga [Wed, 18 Aug 2021 21:53:33 +0000 (23:53 +0200)]
Retrofit YangNetconfError for {min,max} elements

We pretty much everything we need for a proper report, add the basic
infrastructure.

JIRA: YANGTOOLS-1311
Change-Id: I9ac9b0a8000c2862ac4f4b50abd7ffdca118149a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExpand UniqueConstraintTest 56/97256/1
Robert Varga [Thu, 19 Aug 2021 10:11:22 +0000 (12:11 +0200)]
Expand UniqueConstraintTest

Add a few asserts for the YangNetconfError reported.

JIRA: YANGTOOLS-1306
Change-Id: I262d85b910ec12729fb44bf2bfbb843dcab8d15b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup TestModel a bit 55/97255/1
Robert Varga [Thu, 19 Aug 2021 10:08:11 +0000 (12:08 +0200)]
Cleanup TestModel a bit

Add two FIXMEs and inline a unneeded constant.

Change-Id: Ic19101dff22b4953d45df110a8209593bd49fbe3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRetrofit YangNetconfError into Unique*Exception 88/96688/8
Robert Varga [Sun, 27 Jun 2021 19:20:21 +0000 (21:20 +0200)]
Retrofit YangNetconfError into Unique*Exception

Add a basic bridge to YangNetconfError. This allows NETCONF WG
protocols, like NETCONF and RESTCONF, to report unified complete
information about failure causes.

JIRA: YANGTOOLS-1306
Change-Id: Id8134275fe1b304db88466ad2c6733a48871503e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd DataTreeCandidateInputOutputTest 36/97236/2
Robert Varga [Tue, 17 Aug 2021 11:54:19 +0000 (13:54 +0200)]
Add DataTreeCandidateInputOutputTest

We have completely untested DataTreeCandidateInputOutput, add some
coverage.

Change-Id: Ib9691949f05678415f8d6c6ec35ae9eb2e3bf29d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix yang-data-codec-binfmt dependencies 37/97237/1
Robert Varga [Tue, 17 Aug 2021 19:35:37 +0000 (21:35 +0200)]
Fix yang-data-codec-binfmt dependencies

There is slight confusion between model-api and data-api, we should be
using the latter.

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