Robert Varga [Sat, 8 Jan 2022 09:27:46 +0000 (10:27 +0100)]
Bump odlparent to 8.1.6
Pick up additional upgrades from upstream.
Change-Id: I7aed8f18cb265b88282b4365a709b939ffd9ed4d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 24 Dec 2021 08:17:05 +0000 (09:17 +0100)]
Bump versions to 6.0.10-SNAPSHOT
This starts the next development iteration.
Change-Id: I1c68f647f6cdb13276fd4de10a37f90ff5bb4bc4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Dec 2021 21:58:45 +0000 (22:58 +0100)]
Bump odlparent to 8.1.5
Pick up latest fixes from upstream.
Change-Id: Ide1ee7d6001cef1f4c5b88bd8951f0f8a08ead95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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)
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)
(cherry picked from commit
298e7fb20a7b4c08598e2d59c5a30ae28b484ba1)
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)
(cherry picked from commit
6f56510d0c0706a7b4a3e02c893e9e2eaccd09be)
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)
Robert Varga [Wed, 1 Dec 2021 12:21:49 +0000 (13:21 +0100)]
Bump versions to 6.0.9-SNAPSHOT
This starts (belatedly) the next development iteration.
Change-Id: I0e42206f85ab3930e4a887f06681ef5c9f3c53a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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)
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)
(cherry picked from commit
cedd80e0824797be84a4d1024c1653be80932be4)
Robert Varga [Tue, 19 Oct 2021 16:48:53 +0000 (18:48 +0200)]
Bump odlparent to 8.1.4
Pick up latest upgrades from upstream. Also fix a checkstyle violation
in javadocs.
Change-Id: Iad359253a21e96a82e7a4b1cd55bde3264f1cdd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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)
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)
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>
(cherry picked from commit
0125f41acf8764d48c8a78d71a34647631811853)
Robert Varga [Wed, 7 Jul 2021 09:55:33 +0000 (11:55 +0200)]
Bump versions to 6.0.8-SNAPSHOT
This starts the next development iteration.
Change-Id: I679854656753126c959f8c11bbf12e4e1c532989
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Jul 2021 09:05:38 +0000 (11:05 +0200)]
Revert "Fix mandatory enforcer failure on augmented nodes"
This reverts commit
6bcc983bf8875a85e329991f60127b6a6d29cb57. The commit
was reverted on master pending rework.
Change-Id: I5764983d72f4a9d1d461c0066cfa129d1ee14eb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 25 Jun 2021 16:00:14 +0000 (18:00 +0200)]
Add YangError.getErrorTag()
Error tags are well-defined and mandatory-to-include in NETCONF/YANG
error handling model. Make sure we expose this information from
YangError (and by extension from YangInvalidValueException).
JIRA: YANGTOOLS-1301
Change-Id: Ie914fda40b04facf56c5d644c41b3c91a8948dcd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
54ada00ff849ed9c8391d6e3ca1764cb9c84e53f)
Robert Varga [Fri, 25 Jun 2021 15:27:39 +0000 (17:27 +0200)]
Report ErrorType.APPLICATION from codecs
Codecs are cross-referencing an already-parsed value with YANG
constraints, which puts them squarely to Content layer of NETCONF
protocol -- and that implies ErrorType.APPLICATION.
JIRA: YANGTOOLS-1300
Change-Id: Icd6d2fbfbda554bc09978725d33f927d87d526ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f590327d054f08b91cea58020c164b44afa9ee2a)
Robert Varga [Tue, 18 May 2021 08:28:13 +0000 (10:28 +0200)]
Fix mandatory enforcer failure on augmented nodes
Changes the way mandatory nodes are extracted from the schema.
Previously all mandatory nodes were approached as direct children of
the parent node. Even if they came from an augmentation which caused
"missing mandatory descendant" exceptions.
This patch preserves both options of building data nodes containing
augmented mandatory nodes.
- setting the mandatory node as a direct child of the parent node
- setting the mandatory node as an AugmentationNode to the parent node
However the former option seems to be incorrect and might be removed
in the future major release.
JIRA: YANGTOOLS-1276
Change-Id: Ifcc2e0d141e18f74173f15e293b16cbd297a5af6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
(cherry picked from commit
7862271a33b14d21ebf1e72aacd05d3e4687c6b1)
Robert Varga [Tue, 25 May 2021 08:11:05 +0000 (10:11 +0200)]
Deprecate schema-aware builders
Schema-aware builders do not add much in terms of functionality, as they
are very limited in what they offer in terms of validation (no values)
and are also hard to use, as the corresponding schema needs to be looked
up separately.
Deprecate all entrypoints for removal.
JIRA: YANGTOOLS-1290
Change-Id: Ia4635d17bb5cef125e95ea187d9546de75cf8b31
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 May 2021 08:07:24 +0000 (10:07 +0200)]
Fix up yang-data-impl module-info.java
We are relying on rfc8528.data.api, make sure we require it transitively.
Change-Id: I214c3a2470b7439cea83258205a9a00bcbf8832f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 25 May 2021 05:33:01 +0000 (07:33 +0200)]
Bump odlparent to 8.1.3
Pick up latest batch of fixes from upstream.
Change-Id: I3b219c3f5f0961105a4ad8768b19ad57dba304a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 6 May 2021 05:53:05 +0000 (07:53 +0200)]
Bump versions to 6.0.7-SNAPSHOT
This starts the next development iteration.
Change-Id: I9c6ae2e8f9e4ab5aba5f822a40e5bb3e6e6d38cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 5 May 2021 21:23:07 +0000 (23:23 +0200)]
Bump odlparent to 8.1.2
Pick up latest fixes/upgrades from upstream.
Change-Id: I2dd74794de0851968dcfb47d3730f2716a05e6f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ivan Hrasko [Thu, 22 Apr 2021 16:29:02 +0000 (18:29 +0200)]
Transform QName value in identity leaf
Leafs with identityref point to the identity's QName. Since we are
remapping namespaces, these need to be included as well.
JIRA: YANGTOOLS-1277
Change-Id: I2885dd59bcdd85cfe4f29edceaf68cb27ed7dca7
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7042ef1344f1c38b730132e5bcb12592fcd9e9b0)
Robert Varga [Wed, 21 Apr 2021 05:47:24 +0000 (07:47 +0200)]
Do not subclass YangTextSchemaSource in yang-parser-impl
We have a readily-available URL-based implementation, reuse it instead
of rolling our own.
JIRA: YANGTOOLS-1275
Change-Id: I43a6215e8dbe678966c80d3d05dde5a44c8e7833
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3310cd312a6419064b7a2850865e434970ba5a67)
Robert Varga [Wed, 21 Apr 2021 05:36:22 +0000 (07:36 +0200)]
Do not subclass YangTextSchemaSource in yang-repo-fs
We have a readily-available File-based implementation, reuse it instead
of rolling our own.
JIRA: YANGTOOLS-1275
Change-Id: I0a6604b83cb1aa216e61f5f5be97f93d2d1dd0e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d23aa17bf81deed1dc7208d00bd15400954edf9c)
Robert Varga [Tue, 20 Apr 2021 20:47:43 +0000 (22:47 +0200)]
Forward symbolic source in YinDomSchemaSource
When we are transforming a source, we should also be forwarding symbolic
name requests.
JIRA: YANGTOOLS-1275
Change-Id: I0aa0420aee4c51d9c006f28b3e669eabc89c1787
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
738badcf0d51117f00d1ee585e546eeb454e22cc)
Robert Varga [Tue, 20 Apr 2021 20:41:47 +0000 (22:41 +0200)]
Expose symbolic name in YangTextSchemaContextResolver
We have a perfectly reasonable symbolic name available here, make sure
we propagate it, aiding debugging.
JIRA: YANGTOOLS-1275
Change-Id: I60162a10da9356896cea5cb5abc2a233dea38c12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
824faeb0e75906de57ca1d90a39f4cc86334933c)
Robert Varga [Tue, 20 Apr 2021 20:31:59 +0000 (22:31 +0200)]
Propagate symbolic name through transformations
Transformation to IRSchemaSource ends up losing source symbolic name,
leading to anonymous sources. Make sure we propagate any source
symbolic name.
JIRA: YANGTOOLS-1275
Change-Id: I219d4bffa66c1262683db1b6af886a052c644cde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0e5d5323491caa4308d582bdb3d941c214146a22)
Robert Varga [Mon, 19 Apr 2021 19:41:10 +0000 (21:41 +0200)]
Improve ImmutableAugmentationNodeBuilder defensiveness
The check for nested augmentations is rather ugly and will trigger
a secondary UnsupportedOperationException -- simply because we are
accessing getNodeType() even for AugmentationNodes.
Fix the thinko by performing an explicit check first, which also makes
things a wee bit faster.
Change-Id: I001c8d3b7c4a53ddb2c45d7c9157f7b1081dc992
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1e24596294bdc2a57a808b77a2d9862198e4f46e)
Samuel Kontris [Thu, 25 Feb 2021 18:09:20 +0000 (19:09 +0100)]
Restore unrecognized statement defensiveness
We are in a bad place here, as we are trying to come up with
something that passes for a QName based on zero understanding
of argument structure.
Previous cleanup of the logic here, done in YANGTOOLS-1191
omitted a possible source of errors -- when the value contains
something resembling a qualified node identier to the point
of actually resolving to a module -- but the localname part
is not actually valid.
Fix this by going through UnqualifiedQName.tryCreate(), just
as we do in the unqualified case.
The test model is a simplified version of tailf yang models
(specifically "tailf-ncs-devices@2020-02-04.yang" model), where
the argument structure is actually a descendant schema node
identifier.
JIRA: YANGTOOLS-1261
Change-Id: I885828221382f5689b491f26161b35987dfd4482
Signed-off-by: Samuel Kontris <samuel.kontris@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Feb 2021 12:00:02 +0000 (13:00 +0100)]
Bump versions to 6.0.6-SNAPSHOT
This starts the next development iteration.
Change-Id: I80366df9e6fa0274bd8e88204bf5c067ba905579
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Feb 2021 15:15:34 +0000 (16:15 +0100)]
Un-deprecate CopyableNode, AddedByUsesAware
These traits seem to provide a useful inference summary, related to
DerivableSchemaNode. Un-deprecate them for now to reduce noise for
valid uses which have no alternative.
Also add FIXMEs to reconsider overall design of these interfaces,
as better semantic integration allows for more consistent use.
Change-Id: I3d238f9c6f8d74769506202777efb82277546e63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
76943f2ec79511177e9fddc4c2f4a888ccfb0b09)
Robert Varga [Wed, 24 Feb 2021 08:47:30 +0000 (09:47 +0100)]
Fix StringStringCodec length check
RFC7950 specifies that string length is counted in unicode
characters. String.length() returns the length in code units of
UTF-16, which are not the same thing.
Use String.codePointCount() to get correct results for strings
containing characters from outside of Unicode BMP.
JIRA: YANGTOOLS-1224
Change-Id: I6ff9557d61449625be975eaca00ad235bf429155
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
cbadacd601e11552b749edfaaa19b64b9804e55f)
Robert Varga [Tue, 23 Feb 2021 15:50:18 +0000 (16:50 +0100)]
Bump odlparent to 8.1.1
Pick up latest upgrades from upstream.
Change-Id: I5cafb096b67910ec6f530aeef2b6639e2036b30b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Feb 2021 22:42:02 +0000 (23:42 +0100)]
Use simple requireNonNull()
StatementContextBase.addPhaseCompletedListener() is the heart of
inference and the checkNotNull() here is taking sourceReference().
Acquiring source reference is an indirection, which may actually
got through a forwarding chain. While we could use and if/throws,
let's just use plain requireNonNull.
JIRA: YANGTOOLS-652
Change-Id: I77d5b1dcc8b6b575d01ced0850d7081909b57964
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
cd04351669d5921088a73a275954ba78336c1a44)
Robert Varga [Wed, 17 Feb 2021 16:59:51 +0000 (17:59 +0100)]
Require antlr in yang-parser-rfc7950
This 'requires' was missing, but it seems we have gotten it from
transitive dependencies. Make sure we properly require it.
Change-Id: I114ff425aeb82bd6d20490485692512e2e576285
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Feb 2021 21:19:46 +0000 (22:19 +0100)]
DataSchemaContextTree should expose EffectiveModelContext
There is no point hiding the context stored underneath, expose it
to users, so they may better integrate.
Change-Id: I269943567208539c2b2fcdf90067f6b08490a689
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
63d347cb162f08a589eb4d5ad5c325a48c1e827e)
Robert Varga [Wed, 10 Feb 2021 16:40:41 +0000 (17:40 +0100)]
Improve SchemaInferenceStack.enterSchemaTree()
We can guarantee a return of SchemaTreeEffectiveStatement, make
sure we show that to the users, allowing their dispatch to be
more neatly bracketed.
JIRA: YANGTOOLS-1231
Change-Id: If805a2a612c23157422bea717f9dfada9ac0f093
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3e91ac02b8fba476fd273bf2357359f9f8473b4d)
Robert Varga [Wed, 10 Feb 2021 13:51:13 +0000 (14:51 +0100)]
Fix missing location in error reports
There are two places where we fail to propagate location:
- one is a pure omission
- one is a case of bad format
Fix both sites, improving our error reporting.
Change-Id: I65b52c69a6d6d7bb0fd8a9bc3956a2dab51d81c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
33c07eff30a65dd0889cc08dc88ddad72039321d)
Robert Varga [Mon, 1 Feb 2021 20:06:02 +0000 (21:06 +0100)]
Do not synchronize around ReactorStmtCtx.schemaPath
The reactor is inherently single-threaded, hence there is no point
in guarding this single field. Remove synchronization and add a few
markes for future improvement.
JIRA: YANGTOOLS-1218
Change-Id: Ic5017bb589ae5086bf8310995d7c03c80e12678a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0735f709c996762a2ac65338459c465bffc4dbcf)
Robert Varga [Wed, 27 Jan 2021 10:06:52 +0000 (11:06 +0100)]
Make CopyHistory implement CopyableNode
We have a few call sites checking the same thing. Make a strong
connection between CopyableNode and CopyHistory -- centralizing
checks and providing an opportunity for optimization.
CopyHistory.contains() now exists only for testing purposes.
JIRA: YANGTOOLS-1215
Change-Id: Ibc9cebe4bee6c5818570c52415c3d8a5ba1ff19d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
62c350eff478deeaa90ab0304cdc9c3623c01c83)
Robert Varga [Sat, 23 Jan 2021 12:42:08 +0000 (13:42 +0100)]
Bump versions to 6.0.5-SNAPSHOT
This starts the next development iteration.
Change-Id: Ib0b629a90b8dbb35a131e035d35f166d02653684
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 11 Dec 2020 00:56:29 +0000 (01:56 +0100)]
Fix somar complaints in equals methods
Sonar does not like if/else chains, simplify equals to simple
expressions.
Change-Id: I27087e85514a70bd3becde2fb5d41bcc11f6b8e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
864ad54598f5b24526c143b69e977e00adf74957)
Robert Varga [Wed, 13 Jan 2021 22:42:17 +0000 (23:42 +0100)]
Fix a javadoc typo
The word is 'tractable'.
Change-Id: I9ba56cd654948d0014939050cde8e71dbceb3974
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
76d5c50ff307655dac4401a94a82bfb352f57d87)
Robert Varga [Thu, 14 Jan 2021 18:15:47 +0000 (19:15 +0100)]
AnyxmlSchemaLocationNamespace should be statement-local
Having this tree-scoped is wrong, correct that mistake.
Change-Id: I7b710a501ca2b564597938b7d32b0be98104b4ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
80ef652b35c8c19478927b368e120934fd647a86)
Robert Varga [Sun, 17 Jan 2021 08:31:53 +0000 (09:31 +0100)]
Add a missing space
Fix the error message that would be produced if we were actually
hitting RootStatementContext.reparent().
Change-Id: Ica8d43617e0ae9183342d21d24c30eda26e969be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
42350f3621f7e73283761a720c0162f1c1c25491)
Robert Varga [Sun, 17 Jan 2021 13:02:03 +0000 (14:02 +0100)]
Add guava to yang-parser-spi requirements
This is just another edit, we really need to do an audit.
Change-Id: I27dcc75d07d38d9c7e94c70d4cdfeb6d954b4c48
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
34e1427fe005d38e0ba7422bdfa1a8bd3e311d87)
Robert Varga [Wed, 13 Jan 2021 16:03:03 +0000 (17:03 +0100)]
Update module-info.java
Add explicit requires, as Eclipse does not trust these coming from
upstreams.
Change-Id: I8ea7bd2c9b8b930f4069fbece86df40f76dbb370
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
27709b9466a704c93cdabf06ccd902becb8bbbf5)
Robert Varga [Wed, 25 Nov 2020 09:14:21 +0000 (10:14 +0100)]
Narrow down SuppressFBWarnings in ModelProcessingPhase
We are suppressing a single null assignment, make sure we minimize
the scope of suppression.
Change-Id: Ie7b62be11964df2553268eb9f49cca1e2c8538b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f271abeab81db4ae7808d5824b16dcf289023fc1)
Robert Varga [Mon, 18 Jan 2021 23:43:16 +0000 (00:43 +0100)]
module-info.java audit, part one
Add explicit requires on upstream dependencies, not relying on their
transitive requires (although they are obvious from functionality
break down perspective).
Change-Id: I70b8c4e4edf7e9f9955922bc6ba5b1c1171be260
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
bd014b23b55d73933945a7c5b19fad030d606843)
Robert Varga [Thu, 21 Jan 2021 13:03:27 +0000 (14:03 +0100)]
Adopt odlparent-8.1.0
Pick up latest version, which introduces OSGi R7 and a few other
relevant updates.
Change-Id: I2ee2bded604ce7a8aedc5dcc9de1b03930c4e70f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 7 Jan 2021 11:26:03 +0000 (12:26 +0100)]
Bump versions to 6.0.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I72ed5b3760374711a9a219870a830c6f65b510bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 7 Jan 2021 11:25:05 +0000 (12:25 +0100)]
Fix versions to 6.0.3-SNAPSHOT
There was a typo in previous patch, fix that.
Change-Id: I56c798f19d411a1d61efea0e8e963c274b28e6b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 7 Jan 2021 10:15:10 +0000 (11:15 +0100)]
Bump odlparent to 8.0.3
Pick up latest fixes from upstream.
Change-Id: Ife5e5f86e79839022a5242182b2491784d4424a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ca97ea8ac111ae03cf10a08c5fa1053618fdf92f)
Robert Varga [Mon, 4 Jan 2021 13:32:29 +0000 (14:32 +0100)]
Add ByteBufUtils.writeUint{8,16,32,64}
Plain ByteBufUtils.write() methods are hiding the width argument,
hence can potentially break binary encodings on type change.
Add explicit methods, so that the intent is documented and actually
breaks when incorrect type is applied.
Change-Id: I26e14048b4d4d44ea5044ff852650b18ca90012f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e9bae1b48acf842fade92b5bcaf9e69b38b02c32)
Robert Varga [Mon, 7 Dec 2020 09:24:48 +0000 (10:24 +0100)]
Migrate getDataChildByName() users
These users are using getDataChildByName() in its nullable capacity,
migrate them to dataChildByName().
JIRA: YANGTOOLS-1183
Change-Id: Id2cdf95804b1faf6189863de9f96253ab459ed6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a25a8add2e3b3a38cf76ab963da9a89ff5326a55)
Robert Varga [Sun, 6 Dec 2020 13:05:18 +0000 (14:05 +0100)]
Add DataNodeContainer.dataChildByName()
This is a non-deprecated equivalent of getDataChildByName(), allowing
easy migration of nullable users.
JIRA: YANGTOOLS-1183`
Change-Id: Iaf2336fdbfb6533fe759ea4a359b7458e20c79fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7574750a4555d7cb0bcd127b5e5e43a9aecb7d00)
Robert Varga [Mon, 14 Dec 2020 11:25:51 +0000 (12:25 +0100)]
Bump versions to 6.0.3-SNAPSHOT
This starts the next development iteration.
Change-Id: I615d8b1e322fe3b2ff350c10f0123c303a0733c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 11 Dec 2020 13:27:53 +0000 (14:27 +0100)]
Bump odlparent to 8.0.2
Pick up the fixed-up version.
Change-Id: I4c2da6bb969388ac8581b4a6323a741a9174067c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 11 Dec 2020 00:27:45 +0000 (01:27 +0100)]
Convert yang-data-jaxen to OSGi DS
We do not need a dependency on osgi.core here, just use component
annotations.
Change-Id: If19fd9722e7c09088a5dc8839ef774813a4a217d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2ffac169b97ad0b8294635d8f27874d24fae28aa)
Robert Varga [Thu, 10 Dec 2020 11:48:16 +0000 (12:48 +0100)]
Make sure SmtmtNamespaceContext uses belongs-to prefix
For xpath parsing we nee to make sure we take into account the
prefix under which 'belongs-to' module is known to the submodule.
JIRA: YANGTOOLS-1201
Change-Id: Id38d76443d23eecef09f1f927c44218363a3a1d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
bb9c8c8751e338d2e683063144d1d5810b22eee7)
Robert Varga [Tue, 8 Dec 2020 21:27:30 +0000 (22:27 +0100)]
Use correct key-arg splitting
The splitter we have operates on spaces and trims results to get
rid of whitespace -- probably as a consequence of us historically
having bugs there.
We currently break if someone uses double-quoted whitespace trimming,
as we do not treat '\n' as a separator and then attempt to interpret
it as a node-identifier.
Add an explicit SEP equivalent CharMatcher and use a Splitter on that,
resulting in '\t' and '\n' being correctly trimmed.
JIRA: YANGTOOLS-1200
Change-Id: Ifa3085fffcbbe24204e9d6c0d86ed8c41bd61065
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5fe0d9e2a63cc9cf3be8c39f32305cf9e2a8be4e)
Robert Varga [Sun, 6 Dec 2020 16:16:39 +0000 (17:16 +0100)]
Fix implementation nullness guarantees
We are promising @NonNull in the contract, make sure implementations
do the same.
Change-Id: Ib895ffedc48c221ab4a98a4a318101bc3df46bc4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7b90edc623bb972e58d38643bfedb21e53bc7bdb)
Robert Varga [Sun, 6 Dec 2020 12:37:39 +0000 (13:37 +0100)]
Add UnqualifiedQName.tryCreate()
This a better approach to performing a lazy check, as it captures
the valid string in a well-known construct.
JIRA: YANGTOOLS-1191
Change-Id: I7ffe00602d3d83189d9c3f8a59365648aa36720d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 30 Nov 2020 16:30:24 +0000 (17:30 +0100)]
Do not use exceptions for branching
UnrecognizedEffectiveStatementImpl is mis-using
StmtContextUtils.qnameFromArgument() to attempt to create a QName,
suppressing reported exceptions.
Use a custom-tailored lookup, which utilizes
AbstractQName.isValidLocalName() and thus side-steps exceptions.
JIRA: YANGTOOLS-1191
Change-Id: Iecea9f446730e4e7840b962a95844ce5128dfb9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1bbcdd2d6510d420b916c26f54c60a1c2e1607df)
Robert Varga [Fri, 4 Dec 2020 13:27:21 +0000 (14:27 +0100)]
Fix YangModeledAnyxmlEffectiveStatementImpl.isMandatory()
We have a bug in forwarding here, fix that.
Change-Id: I6f71c2df71b4922a45edc41ac19a8fdb71122b3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6852285ee3d78c5ed2eeba3182458bd59b47d537)
Robert Varga [Tue, 1 Dec 2020 13:42:15 +0000 (14:42 +0100)]
Fire AbstractPrerequisite listeners as soon as they resolve
We seem to be stuck with listeners not firing, leaving references
which need to be cleared. Ensure we fire phase listeners as soon
as they are satisfied -- repurposing tryApply() for its logical
purpose.
JIRA: YANGTOOLS-1192
Change-Id: I87d1700e2cc80bfa3fbb5be9a8dc938d6fe55c17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d70f2e9f13755ea7c3aac1f0c8d8a6b0b0861368)
Robert Varga [Fri, 27 Nov 2020 10:29:19 +0000 (11:29 +0100)]
Eliminate AbstractEffectiveModule.schemaTreeNamespace
We already have DefaultWithDataTree.WithSubstatements's indices,
hence there is no point in re-doing the same work.
Eliminate duplication and defer to our superclass.
JIRA: YANGTOOLS-1188
Change-Id: I9fd775be737ef603be7ae2a914dda2c2d87bf8a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d8119ea5b4ead35fc3dfad489e80e49a034226f6)
Robert Varga [Fri, 27 Nov 2020 04:05:37 +0000 (05:05 +0100)]
Fix StmtContext.produces{Declared,Effective} signatures
We have bad signatures here, one of which is needlessly verbose,
the other one is actually plain wrong as it confuses X,Y for A,D.
Fix them up, which removes the need to go throw raw access to make
them work.
Change-Id: I6bfd995c8b4064b99eb673fa30c4ab8f3d52dd5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 25 Nov 2020 02:34:26 +0000 (03:34 +0100)]
Speed up StmtContextUtils.getModuleQNameByPrefix()
We are looking up root twice here. Cache the lookup for reuse,
skipping one traversal.
Change-Id: I4ead06fa82b2ef822cbee0a2761bd90674bc1676
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
61f49cd2ff55f24af91c232d3a82ab3f2b565255)
Robert Varga [Tue, 24 Nov 2020 12:19:56 +0000 (13:19 +0100)]
Fixup collections return implementations
Adjust nullness annotations to fix Eclipse-reported errors.
Change-Id: I664c651e9bf10fd9d91bae00cc31edf86f9fda0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5d35db7723bb19c00955c580b21df9552de9fea0)
Robert Varga [Sun, 22 Nov 2020 15:21:35 +0000 (16:21 +0100)]
Speed up SchemaTracker.startContainerNode()
Eclipse spotted a potential shortcut in expression, make sure we
take it.
Change-Id: Ief68daa77ac98de3698b9df0627061353055434f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
45d29b94e9f05a6067a4c1e3531ae4fa9f6a1eed)
Robert Varga [Fri, 20 Nov 2020 20:16:16 +0000 (21:16 +0100)]
Add MinMaxElementsValidationFailedException
The refactor we've done makes switch exceptions easy, migrate
MinMaxValidation to a dedicated exception.
JIRA: YANGTOOLS-1177
Change-Id: I005575c93d5683b7fb42428d06f6f052152bc1d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ec2ef458dbc67b4caad24ab2baab047f53921312)
Robert Varga [Fri, 20 Nov 2020 20:05:16 +0000 (21:05 +0100)]
Report a dedicated exception on unique failure
Rather than using plain IllegalArgumentException, report a dedicated
exception derived from SchemaValidationFailedException. Also refactor
UniqueValidation a bit.
Change-Id: If24d97aebab516a461f673c169fa41f9447e0413
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ba3080a178abe5f76b45fa88f442990c62ca5d43)
Robert Varga [Fri, 20 Nov 2020 19:55:11 +0000 (20:55 +0100)]
Fix ListModificationStrategy child handling
We have an obviously bad cast here, correct that.
JIRA: YANGTOOLS-1180
Change-Id: I706a5335e899e182e4651e9134f608a6e7094c37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
398d1aa8ca1cc91eff5bb6062fbf228eefca4da3)
Robert Varga [Fri, 20 Nov 2020 15:54:59 +0000 (16:54 +0100)]
Hide UniqueValidator methods
Our contract is quite crisp, make sure we hide static utility
methods.
JIRA: YANGTOOLS-1177
Change-Id: I9718b7a05cc44906d710a93beaaddd8c12ae93bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b5b5f129a8e81f47f45ee09cc22c62e3fd05904a)
Robert Varga [Wed, 18 Nov 2020 14:41:30 +0000 (15:41 +0100)]
Add UniqueValidation
This is a simplement implementation with a stateless external enforcer,
similar to what MinMaxElementsValidation does. The test suite is split
out of If3b94a085be034de28e341ac900142b021cd2a88 and adapted a bit.
JIRA: YANGTOOLS-1177
Change-Id: I3914497981db0281ab8f32dee12a102ce729022e
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
52e49d63e73b995ea10bbeefb62df9c6101b44c3)
Robert Varga [Thu, 19 Nov 2020 21:30:20 +0000 (22:30 +0100)]
Split out AbstractValidation
MinMaxElementsValidation performs a useful role as a template for
how we can create simple subtree validations. Split the common bits
into AbstractValidation and elinate code duplication by doing some
trickery.
JIRA: YANGTOOLS-1177
Change-Id: I5adbed16e85f9752a0ce5061b0159c8124583346
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ffe8f4ea13bd2bab97514aa1d6ee257a1d7b39ff)
Robert Varga [Wed, 18 Nov 2020 14:58:36 +0000 (15:58 +0100)]
Unify ModificationApplyOperation.toString()
Not all ModificationApplyOperation subclasses provide useful
information in toString(). Make sure all of them do.
JIRA: YANGTOOLS-1176
Change-Id: Id93f2899dcedd8c289b093c1e126c09108eefb4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
53a726edb6deb453584d289b8d6dec12cb0d18c8)
Robert Varga [Wed, 18 Nov 2020 14:24:24 +0000 (15:24 +0100)]
Reduce list/map/entry strategy confusion
Lists with a key are called 'Map' and contain 'MapEntry'
Lists without a key are called a 'List' and do not have an entry
strategy (yet).
Change-Id: I0321eaebf1541a86778c63a2eaa68bdffcd8672a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
37380a5c65e213bc5f34b521d8f8e7d315df7465)
Robert Varga [Wed, 18 Nov 2020 12:33:10 +0000 (13:33 +0100)]
Fix get{Min,Max}Elements() usage
These return a nullable, UTs should be using
assertEquals(Object, Object) to compare them.
Change-Id: I6d6aefc94695c5118b4ec4552f64bb45b45dcdc8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
de729828fea23328647b2cc169fad665e9934bee)
Robert Varga [Wed, 18 Nov 2020 12:49:09 +0000 (13:49 +0100)]
Clean up argument checking
We have a few nullness reports, use coerceArgument() when we
are implying a requirement.
Change-Id: I9854f77eeb28945a6cac9fe86695a145eab0687d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0b4969972e9facb9d0d1aa515e24b9a7073127ee)
Robert Varga [Wed, 18 Nov 2020 12:46:36 +0000 (13:46 +0100)]
Remove an orElse(null) indirection
We do not need to update foundNode() if we do not find anything,
hence sync on optional directly. Improves interactions and solves
an Eclipse warning.
Change-Id: Ibc553d50d48ccd22480bdc33163364bc8a509c83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
8c0f44e010826c36a232df28385dc591c7f878fd)
Robert Varga [Wed, 18 Nov 2020 12:12:55 +0000 (13:12 +0100)]
Fix annotation imports
We are propagating @NonNull towards our users and are using
@SuppressFBWarnings (which we don't propagate).
JIRA: YANGTOOLS-934
Change-Id: I9e6fc6edb79b7d29f98201b074ca32295b33f646
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2385aa7f0e3fb820348fd6ebe60b007444400d8a)
Robert Varga [Wed, 18 Nov 2020 11:24:25 +0000 (12:24 +0100)]
Correct NonNull annotation
We are using the wrong annotation here, fix that.
Change-Id: Ic3c68239f41ada9dfdcc68f9861ce0a142442d89
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
8371a88e6a404e38e1ecdfbe7faed84f8fba955b)
Robert Varga [Mon, 16 Nov 2020 19:49:10 +0000 (20:49 +0100)]
Convert yang-data-impl to a JPMS module
This is a mostly straightforward conversion except we need to move
some files around to allow them to be loaded by external libraries
during UT.
JIRA: YANGTOOLS-1175
Change-Id: Iacecd4157e34c58d35bd2dc495eb178d7e3c86a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2fb9e7cb0aaeac0792f918190803b2041c192611)
Robert Varga [Mon, 16 Nov 2020 23:03:20 +0000 (00:03 +0100)]
Fixup rfc8528-data-api module-info
We depend on annotations, make sure to express that.
Change-Id: Ifbd45b538808382228631635d24bd0dac273406c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
cb8db2cc29fe3f6487c7358c6e3196ad74b427b8)
Robert Varga [Mon, 16 Nov 2020 20:16:24 +0000 (21:16 +0100)]
Drop dependency on javax.xml.bind
All we need is a lenient Base64 decoder. Drop the dependency
on javax.xml.bind and use plain java.base-provided one.
JIRA: YANGTOOLS-1174
Change-Id: If02fce547142f3d5b17d8529716d5b266a50a3a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a434c624a2a57ddb213af160bdd7341c7fe39e97)
Robert Varga [Mon, 16 Nov 2020 23:01:10 +0000 (00:01 +0100)]
Fixup yang-data-api module-info
We have a couple of dependencies we want to express explicitly,
do that now.
Change-Id: I1e40cab18f0ab10ff08764f6df15dcdf3ec1a23f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
15fae756ece7396333a9ae9a4f53f72b3a03138d)
Robert Varga [Fri, 13 Nov 2020 22:05:42 +0000 (23:05 +0100)]
Do not use @NonNullByDefault in ItemOrder
Using @NonNullByDefault limits usability, remove it again.
JIRA: YANGTOOLS-1170
Change-Id: I656c04203f48406142977fb6aaa2cab8bb435f78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
88a74a9c6ff86c58f80455a8327acb235ab7a60f)
Robert Varga [Fri, 13 Nov 2020 12:30:50 +0000 (13:30 +0100)]
Add ItemOrder concept
This is a generalized contract for container-like classes, expressing how contained
items contribute to equality contract of the container.
The defined values are ItemOrder.Ordered and ItemOrder.Unordered. For convenience,
these are also exposed as ItemOrder.itemOrder(), reporting the implemented class
of ItemOrder.
JIRA: YANGTOOLS-1170
Change-Id: Ic67926c2146696ecb4be6f664720e842f363c6b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
c0efc51f8eaec305de6524c8f98b30e20730feb7)
Robert Varga [Thu, 5 Nov 2020 16:16:01 +0000 (17:16 +0100)]
Graduate ChildSchemaNodeNamespace as SchemaTreeNamespace
This is a @Beta construct in yang-parser-rfc7950, but it provides
a crucial link between statements and namespaces.
In terms of semantic change, this is a direct replacement for the SPI
idea that there is a SchemaNodeIdentifierNamespace. While that namespace
allowed lookup based on SchemaNodeIdentifier, while
SchemaTreeNamespace follows QName addressing -- i.e. we are changing
the addressing mode and allowing more flexible walks.
This is a strictly speaking API-breaking change, but since it enables
reactor/parser-rfc7950 interactions and is allowed under @Beta API
change rules, we will backport this to otherwise stable branches.
Existence of this namespace allows us to neatly tie it with
OnDemandSchemaTreeStorageNode.
JIRA: YANGTOOLS-1168
Change-Id: I9b1c30d21f7021d4c21f3e5a519f6cd1539871ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6682a8e2a8c02ed7a66bddb8b7a86009ffbbb98d)
Robert Varga [Wed, 11 Nov 2020 20:58:03 +0000 (21:58 +0100)]
Import annotations to yang-parser-rfc7950
Do not rely on upstreams for these, use them explicitly.
Change-Id: Id0a5216d2612fd516861ce9b0155283ff8ef4d2b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7f6bc373cf34fc17511ac6ac7efce630822ec74a)
Robert Varga [Fri, 6 Nov 2020 10:54:05 +0000 (11:54 +0100)]
Bump versions to 6.0.2-SNAPSHOT
This starts the next development iteration.
Change-Id: I6e2beb8719a845c84d832cff3464d03cefd1c958
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 6 Nov 2020 10:07:26 +0000 (11:07 +0100)]
Bump odlparent to 8.0.1
Pick up latest upgrades, allowing us to ditch a few declarations.
Change-Id: I5ace375fd8d746f13fa7eb83a525203503b3cf33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 5 Nov 2020 16:42:29 +0000 (17:42 +0100)]
Remove unused SourceSpecificContext methods
These package-private methods are not used, remove them.
Change-Id: I245f4c7d874d5cd3c716f9685fc9f5a4c54679c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 5 Nov 2020 11:53:04 +0000 (12:53 +0100)]
Fix PhaseModificationInNamespacePath effects
PhaseModificationInNamespacePath is a set of requirements, working
along the parent->child axis. As we are resolving individual steps
we have to mark each as being impacted by this mutation, not only
the ultimate target.
This ensures that parent statements are not allowed to complete
until the mutation is resolved one way or another -- thus ensuring
proper parent/child phase completion transitions.
JIRA: YANGTOOLS-1160
Change-Id: I87cd682d32cb9ce3397883f2ac1a61a0bc9c8664
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 4 Nov 2020 18:48:09 +0000 (19:48 +0100)]
Refactor StatementContextBase.effective access
In order to correctly synchronize substatement and stage completion
view, we need all accesses from StatementContextBase towards its
.effective field guarded.
This patch audits all callers and instantiates an
ensureEffectiveSubstatements() guard around all accesses.
We also introduce effectiveChildrenToComplete(), which communicates
the effective children which should be processed.
InferredStatementContext returns as empty list from this method
if it is not materialized. This acts as an explicit guard, which
is extensible with local state later.
JIRA: YANGTOOLS-784
Change-Id: I235bc15d315ddee71c20f3875412d8d05803a716
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>