Robert Varga [Sun, 29 Dec 2019 08:47:18 +0000 (09:47 +0100)]
Use findTargetNode() in findDataSchemaNode()
This removes a bit of duplication by sharing the code path with
relative resolver.
Change-Id: Icb619aca8d87ade490066fd8c6abe0d2a96dec96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
57a7f87c3115454aba47299d797da48a1227c9b2)
Robert Varga [Sat, 28 Dec 2019 10:09:37 +0000 (11:09 +0100)]
Issue an info message when a config=true list does not have keys
RFC7950 section 7.8.2 places an explicit requirement that lists
representing configuration (i.e. config=true) must define at least
one key.
This restriction does make sense in contexts like NETCONF, but is
generally not needed in OpenDaylight. Since it hurts model
interoperability, add a message pointing this violation out.
JIRA: YANGTOOLS-957
Change-Id: If29078e51aa1ec55fa070f263755f15147ad835f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e9061a5ad89661154190aa7703b1de95a5fb528e)
Robert Varga [Wed, 25 Dec 2019 20:58:24 +0000 (21:58 +0100)]
Fix PathExpressionParser predicate path handling
Handling of a predicate was wrong in that the right-handside
involving a current() call did not correctly predicates.
This turns out to be a simple typo in two places, fix it and add
an explicit test.
JIRA: YANGTOOLS-1053
Change-Id: I54bac10cdd508503ad896edd628ffa436173ca6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
90457a20b9d0f6a7652563781d04c19002d29a4e)
Robert Varga [Wed, 25 Dec 2019 11:23:09 +0000 (12:23 +0100)]
Fix InterningLeafSetNodeBuilder check
The instanceof check is wrong, as pointed out by SpotBugs, as we
want to check for LeafListSchemaNode not LeafSetNode.
Change-Id: If538beca159c100621d5661dc8dced5c1051dfe9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 24 Dec 2019 21:55:41 +0000 (22:55 +0100)]
Trim deref() argument
When we are evaluating a deref() call we need to make sure we
strip the string completely, otherwise we would arrive at incorrect
path.
JIRA: YANGTOOLS-1050
Change-Id: I36b45677243bcb8ccbf91f8813f082dbddee2a6a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2e7e6dc6ee82447a286e4df18415de4bff6c2b4e)
Robert Varga [Mon, 23 Dec 2019 19:06:56 +0000 (20:06 +0100)]
Correct deref() leafref handling
deref() invocation requires the target node to actually be examined,
derefenced and any subsequent path evaluated on top of it.
We correct the implementation to account for correct derefence and
add a UT for a confusing test case. This is implemented using
YangParserTestUtils in a separate internal artifact, hence future
test cases are easy to implement.
JIRA: YANGTOOLS-1050
Change-Id: I0777da339577f93ecc2786f5beab40b29554fe0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2ef2f65082021eab8213c4a9e0d71a2cc42a6962)
Robert Varga [Mon, 24 Jun 2019 16:01:16 +0000 (18:01 +0200)]
Allow Errata 5617 expressions in leafref
This updates PathExpression interface to allow expressing
leafref paths which start with a deref(...) function call,
as proposed by https://www.rfc-editor.org/errata/eid5617.
This unfortunately necessitates breaking the API contract of this
interface, as the original object model could not express these.
JIRA: YANGTOOLS-968
Change-Id: I3a193d338de5a82b95d2dd6cc5200e77032e67d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
(cherry picked from commit
2788395b6edecb26c9c2e59b2ab94275e8276987)
Robert Varga [Sun, 22 Dec 2019 10:20:29 +0000 (11:20 +0100)]
Force path expression parsing consume all data
We really need to make sure we do not end up ignoring part of the
expression just because our rules are not exhaustive. This adds
the appropriate test and fix in grammar.
JIRA: YANGTOOLS-1049
Change-Id: I85278f0cd109897459be1db029fafbc95e203201
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
8dc8c85e43be7c78a8aa4081d970e924b9757b3f)
Robert Varga [Fri, 13 Dec 2019 08:16:25 +0000 (09:16 +0100)]
Mark yang-maven-plugin as thread-safe
The plugin can be executed in multiple projects concurrently,
mark it as such.
Change-Id: I600e733299a7db87dc8040bef89c97ecf9f5f568
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b8a6ab55af0f9894736bfbf0d4c0bae7dda4f249)
Robert Varga [Wed, 11 Dec 2019 20:34:09 +0000 (21:34 +0100)]
Fix JDK11 compilation
This fixes up a javac inference problem, which is completely fine
as we can drop down to java.lang.Object, which we'll be casting
anyway.
Change-Id: I5ce990970607a917d20130a0ecf71a107b3cc0ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Dec 2019 17:52:11 +0000 (18:52 +0100)]
Bump versions to 3.0.8-SNAPSHOT
This starts the next development iteration.
Change-Id: I800560d1a06de2b0b45ee0af6a3685732a613e3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Dec 2019 17:51:16 +0000 (18:51 +0100)]
Bump odlparent to 5.0.4
This picks up the latest fixes.
Change-Id: Iecf40d92d46d68b746b02e2817aabd2de28a3b2c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 Nov 2019 16:57:27 +0000 (17:57 +0100)]
Remove intermediate checking maps
We are enforcing schema tree validity, which is a superset of
the intermediate checks being done in these constructors. Remove
these maps.
JIRA: YANGTOOLS-1043
Change-Id: I88c6b00794fcc31970571bd72a0f57ecb9bd9a19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6ba759ce6949dfa7ebbaf90a2a937674f3c52542)
Robert Varga [Mon, 25 Nov 2019 15:06:50 +0000 (16:06 +0100)]
Eliminate childNodes map
Both AbstractEffectiveDocumentedDataNodeContainer and
AbstractEffectiveModule are subclasses of
AbstractSchemaEffectiveDocumentedNode, which contains schema tree
index.
As all DataSchemaNodes have to strictly be a subset of the schema
tree, we can ditch the dedicated index and simply perform a lookup
on the schema tree followed by a check for DataSchemaNode.
JIRA: YANGTOOLS-1043
Change-Id: I79d5b8ceeb6c16aef162eda9c2a8430b7a9c98f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3a3b4422017da67c4f37c06b2e286c3a69c6d0c1)
Robert Varga [Mon, 25 Nov 2019 14:11:16 +0000 (15:11 +0100)]
Centralize must contraint definitions
A number of statemnts can contain must expressions, which we are
tracking separately in each class. This adds common superclasses
to hold the common definition, reducing the amount of duplication.
JIRA: YANGTOOLS-1040
Change-Id: Id5733b62838f484350094456452c7a1d0039f3f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0d63e62a11945ade7371bb4667cf65409336f54c)
Robert Varga [Mon, 25 Nov 2019 12:54:17 +0000 (13:54 +0100)]
Centralize unknownNodes
We have a number of statements which collect unknown nodes, which
are specified by DocumentedNode. Centralize them as close as possible
in the utility class hierarchy.
JIRA: YANGTOOLS-1040
Change-Id: I337fb684b557269926e641d86d6afd609b2dce57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
805ce8dc5e98b90427de0cc49fad70d7054635a6)
Robert Varga [Tue, 26 Nov 2019 11:27:57 +0000 (12:27 +0100)]
Refactor AbstractEffectiveModule
AbstractEffectiveModule has a number of special cases in its
constructor, effectively adding behavior based on expected subclass.
Furthermore its layout does not correctly propagate declared/effective
substatements towards superclass, leading to partially-populated
data/schema tree namespaces.
This patch moves the special handling bits to subclasses, making
AbstractEffectiveModule properly agnostic of whether it is used as
a ModuleEffectiveStatement or SubmoduleEffectiveStatement.
For the mechanics of including submodule effective statements into
the main module we introduce ModuleStmtContext, which performs the
semantic addition, thus all StmtContexts are properly visible as if
they were declared in the main module.
JIRA: YANGTOOLS-1042
Change-Id: Ice9609c2db82981ec9156d076f8a02bc637181b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
32b112dc64848d9c1cf0ea227109ca9a1265e2e7)
Robert Varga [Tue, 26 Nov 2019 23:54:43 +0000 (00:54 +0100)]
Fix XPath binary expressions
AntlrXPathParser.parseRelationalExpr() is consuming acquiring
the operator twice, which leads to iterator state mismatch:
Caused by: java.util.NoSuchElementException
at java.util.ArrayList$Itr.next (ArrayList.java:999)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.nextOperator (AntlrXPathParser.java:640)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.parseRelationalExpr (AntlrXPathParser.java:561)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.parseRelational (AntlrXPathParser.java:431)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.parseEquality (AntlrXPathParser.java:310)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.parseAnd (AntlrXPathParser.java:299)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.parseExpr (AntlrXPathParser.java:281)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser.parseExpr (AntlrXPathParser.java:261)
at org.opendaylight.yangtools.yang.xpath.impl.AntlrXPathParser$Qualified.parseExpression (AntlrXPathParser.java:151)
Fix this by properly reusing operator we have already acquired.
JIRA: YANGTOOLS-1045
Change-Id: I757412278eae2d92ff2422782d666cce5bca0720
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d1af6cd6063d8ee88caa09a78989dcedea9139d6)
Robert Varga [Wed, 27 Nov 2019 00:17:33 +0000 (01:17 +0100)]
Squash self-steps when parsing expression
There is no point to repeat self-reference steps, make sure we
skip them when creating a location path. This results in slightly
smaller expressions as well as more obvious comparisons.
JIRA: YANGTOOLS-1045
Change-Id: If681dce2a6bc7155965fed91c47f19f2c541805a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
63b3f4804b408d86a27a6dbe80c21ea7cca921b0)
Robert Varga [Tue, 26 Nov 2019 17:13:47 +0000 (18:13 +0100)]
Detect duplicate groupings in operation definitions
It seems we have been missing a namespace check here, fix that.
Change-Id: Ic6e99dfab8c6c3cfef64e519ffd84a0d6fc242a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
10f235e5787693ee88c187782a9f37f25f45fae4)
Robert Varga [Tue, 26 Nov 2019 17:01:15 +0000 (18:01 +0100)]
Speed up confict detection
Instead of using Set.contains() before issuing an Set.add() and
ignoring its value, we just add the statement and check the return
value -- if it returns false, we know we have detected a conflict.
Change-Id: I3113c344056b9d745c1cdcccd6d61f68cbe9eafa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
caad8dd49ee920d4484205af127d1c09bc81b8c9)
Robert Varga [Tue, 26 Nov 2019 10:03:27 +0000 (11:03 +0100)]
Rework EffectiveStatementBase statement order restoration
Rather than relying on mutation of effective substatements when we
are building an effective statements (and thus requiring StmtContext
to be StatementContextBase), use simple filtering to implement
statement ordering.
This limits the scope of mutable state, explains what is going
on and allows use of different StmtContext implementations.
JIRA: YANGTOOLS-1042
Change-Id: I84a2517ef0ce666fbc2f2c6faa3b0d0a43eef6eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
75276bc6d944ff002de8149108d60603349d49c6)
Robert Varga [Tue, 26 Nov 2019 08:30:26 +0000 (09:30 +0100)]
Remove Collection2.filter() from EffectieStatementBase
We use the filtered collection only to iterate in a for loop, hence
it is more efficient to move the filter into the loop itself,
eliminating an intermediate collection.
Change-Id: I0cc944b3cedd0758d713f394f2d3360d44c26e66
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3c0a8648375738abf50bc93cce5537af85cdec74)
Robert Varga [Mon, 25 Nov 2019 12:07:44 +0000 (13:07 +0100)]
Add AbstractEffectiveDocumentedNodeWithoutStatus
We have a number of statements which are specified to be DocumentedNode,
but not DocumentedNode.WithStatus. These are handled by subclassing
DeclaredEffectiveStatementBase and repeated logic looking up description
and reference.
Introduce AbstractEffectiveDocumentedNodeWithoutStatus, which acts as
a plain DocumentedNode implementation without also implying WithStatus
and retrofits this class to all users.
JIRA: YANGTOOLS-1040
Change-Id: Ied1794c4fbd8ca27a4add1d2245fdfb10d8104cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
96d12ee2688b296760c29597d44140a34ca762cf)
Robert Varga [Wed, 20 Nov 2019 08:01:55 +0000 (09:01 +0100)]
Resync javadoc links
This re-synchronizes links to upstreams to match odlparent.
Change-Id: Ibc514a9aa5eb5f068561772b91061567796ed171
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e387afabb5c8713c2421d3e33ce1ae4efbf5a04a)
Robert Varga [Fri, 16 Aug 2019 16:00:47 +0000 (18:00 +0200)]
Separate out {Identity,Equality}QueuedNotificationManager
There are use cases where we would like to use QNM on equality, i.e.
we do not realy have a listener instance, but rather a key to somewhere
else. That other place operates on equality, which makes it incompatible
with the current semantics.
This splits out the baseline queueing logic in from NotificationManager
interface, so that it can be reused to implement different execution
concepts.
QueuedNotificationManager is realized on top of it, so that the baseline
interface is implemented in AbstractQueuedNotificationManager and then
specialized to different lookups.
JIRA: YANGTOOLS-1038
Change-Id: I1123d21664a20ff380ccb7db7096801915491f6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
807d0868fa0e9b81332ea12d8fe19f81f88efc08)
Robert Varga [Mon, 4 Nov 2019 10:46:40 +0000 (11:46 +0100)]
Deprecate LoggingThreadUncaughtExceptionHandler for removal
This class creates leaks SLF4J API as an API dependency, which is
rather wrong. Deprecate it for removal.
Change-Id: I29c43855742928782851a45e9b76b9ea4d74aad3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
30b71099adfe2de0e671e18481cdd4c2dfae118e)
Robert Varga [Tue, 5 Nov 2019 13:04:56 +0000 (14:04 +0100)]
Normalize predicate order in ImmutableNodes.fromInstanceId()
The only user of this method is NETCONF, which requires predicates
to be ordered in the order of key definition, as per XML encoding
rules.
Make sure we re-create NodeIdentifierWithPredicates in the schema
definition order if the provided order does not already match it.
JIRA: YANGTOOLS-1037
Change-Id: I57c389eeecb9680062be8b56c834eb569e7d3d3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
4f869bbe2f963d9168eb659bc1761bfd174e6ab3)
Robert Varga [Tue, 5 Nov 2019 12:19:21 +0000 (13:19 +0100)]
Expose underlying schema from DataContainerNormalizationOperation
For the purposes for normalizing data child order we will need to
access the underlying schema in a type-safe manner -- this adds
the mechanics to do so.
JIRA: YANGTOOLS-1037
Change-Id: Id52bd0988405429fbee87a88bb2c9d1de093fb30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ee532866b58374349522c42e77f575fb9f99ba03)
Robert Varga [Tue, 5 Nov 2019 12:06:28 +0000 (13:06 +0100)]
Rename ListItemNormalization
This is a confusing name, as it should match the NormalizedNode-speak,
i.e. MapEntry* and UnkeyedListEntry*. This fixes up the names, so it is
clear what node a particular class refers to.
JIRA: YANGTOOLS-1037
Change-Id: I82d57efa13b5571a4d8ca92d81b3c0955811aa7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ff6881c0f70e27c4f9a717a3d923afa07a5fe580)
Robert Varga [Tue, 29 Oct 2019 21:44:25 +0000 (22:44 +0100)]
Add static ArgumentUtils XPath integration
YANG parser needs to interpret when/must expressions so that they
can be used by downstreams in their effective view.
We add static binding of rfc7950.stmt to an implementation of
YangXPathParserFactory. This makes it clear we do not need to
actually store URIs to make things useful, hence we deprecate
URIStringToImportPrefix namespace.
JIRA: YANGTOOLS-966
Change-Id: Iaf771ad5e0bcdd058fe537ed67d5c9e4e6556e81
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
74ce3034bd665b107918ca25693760d6aa629ef9)
Robert Varga [Wed, 30 Oct 2019 20:21:10 +0000 (21:21 +0100)]
Add YangXPathExpression.getYangVersion()
Retrofit awareness of features contained in a particular expression,
so that runtime can properly evaluate them.
Also update parser to intercept RuntimeExceptions and turn them into
checked XPathExpressionExceptions.
JIRA: YANGTOOLS-1036
Change-Id: I7beab757d6f8fa45f9064a77b6c20f2076903b8e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ff01f3e5609c9527cfcc6823c3c20683fa6fc3a6)
Robert Varga [Wed, 30 Oct 2019 13:44:56 +0000 (14:44 +0100)]
Expose minimum YANG version for YangFunction
Not all YangFunctions are available when we are operating in RFC6020
mode. This patch exposes the minimum YANG version from YangFunction,
so it can be checked at runtime.
JIRA: YANGTOOLS-1036
Change-Id: Ieedd58202dd14be9da7cd079c5180e92450c9e5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d360dda9dc1fd55ecb6bf02be98e385948270068)
Robert Varga [Tue, 22 Oct 2019 20:20:00 +0000 (22:20 +0200)]
Reinstate "Check for nested augmentations"
This reverts commit
02fa7531709e3c4599bc9ec23dc605a21a711bc1, effectively
re-applying
759e69d85991edb987a760165adb83fa3f2ab67b.
We also add the mechanics needed to walk the copy history backwards, as
needed to understand the copy process.
JIRA: YANGTOOLS-956
Change-Id: I96b3afb30fdcd326ef9b780ff02ccc7f1c94e07e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
801a53da5a59219883bb1141d2e8191c11b65f47)
serngawy [Tue, 15 Oct 2019 20:00:59 +0000 (16:00 -0400)]
Add lenient JsonParserStream
It is beneficial to have the JSON parser ignore unknown constructs,
so that all other data gets parsed successfully.
This patch adds JsonParserStream.createLenient() to return such
parsers.
JIRA: YANGTOOLS-1034
Change-Id: I5ec9dbbf6dc52270bf83d7c4ed6c4d16181f74a7
Signed-off-by: serngawy <m.elserngawy@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
50ba8458e9b8eb48cd47ecf8d0a0f6fb1d83d812)
Robert Varga [Sat, 19 Oct 2019 07:05:46 +0000 (09:05 +0200)]
Add OperationAsContainer @NonNull annotations
This makes working with the class easier a bit.
Change-Id: Ica69b5517b5feb9a55c20dbb9fe465ad9081ba23
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1da8c1070b926b27cc0028173038235a43c5c4bb)
Robert Varga [Sat, 19 Oct 2019 07:52:48 +0000 (09:52 +0200)]
Bump versions to 3.0.7-SNAPSHOT
This starts the next development iteration.
Change-Id: Ib1e4da0d9ab30bd0d64887990b276df815750e72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 19 Oct 2019 06:32:05 +0000 (08:32 +0200)]
Bump odlparent to 5.0.3
This picks up latest updates.
Change-Id: I7c52bc99029342c2381635952a0f7be02a64a813
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 18 Oct 2019 08:22:27 +0000 (10:22 +0200)]
Fix foldable trigraphs
Sonar correctly points out the expression can be simplified, this
patch does exactly that.
Change-Id: I0ea51d18d551be0f4bd416d7b18da3eb543e0244
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
71892d4c8f435650eeef99f276884f7c2a3d57bd)
Robert Varga [Fri, 18 Oct 2019 08:02:28 +0000 (10:02 +0200)]
Cleanup code smells reported by sonar
We are duplicating code here, so introduce a check-and-cast method
and use that from the 5 callsites.
Change-Id: Ic1b734f62cb2d79b8dd28a1fcee76cbffea72c33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
8e1209717df9fe7dfd9bb7a8be1e245e12501ba3)
Robert Varga [Fri, 11 Oct 2019 12:01:15 +0000 (14:01 +0200)]
Disable slf4j SSL link
slf4j does not provide apidocs over TLS, link HTTP site instead.
Change-Id: I2158c043a2d9e810a329587159fc6af9d57d8e56
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2a357e7ca8e27873ef49e3bb1f754c92fcea1ca9)
Robert Varga [Thu, 10 Oct 2019 10:29:23 +0000 (12:29 +0200)]
Fix Decimal64.equals()
There is a typo here, which would end up not comparing objects
properly.
Change-Id: I5cfe31887b109bbe7be6e564078f250ea6b61747
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3670f3b1080d917bd1bec4611e75a9b345b06023)
Robert Varga [Tue, 8 Oct 2019 11:21:14 +0000 (13:21 +0200)]
LeafEffectiveStatement should be a DataTreeEffectiveStatement
This is a conflicting model, which should understand it has conflicting
children.
JIRA: YANGTOOLS-857
Change-Id: I1bca05f9a3f053419d518ef2c9966978901b419f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3c57ac547d198bf5cb6d358519789a028cd63623)
Robert Varga [Tue, 8 Oct 2019 19:31:44 +0000 (21:31 +0200)]
Cleanup yang-data-impl antlr configuration
This fixes up a long-standing issue with how antlr is configured,
fixing javadoc plugin interaction in the process.
Change-Id: I5c6ad385196f237b5a5eae110948cbf2ae2792e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
598731773fb790c059d300266b2732278b99c11a)
Robert Varga [Tue, 8 Oct 2019 19:28:16 +0000 (21:28 +0200)]
Cleanup yang-xpath-impl antlr configuration
This fixes up a long-standing issue with how antlr is configured,
fixing javadoc plugin interaction in the process.
Change-Id: I4c94aa50c44dc5fc6268d94739e50ef27e868cde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7c2f7b53352ed27c745e661579132eea66f4c25e)
Robert Varga [Tue, 8 Oct 2019 17:08:15 +0000 (19:08 +0200)]
Cleanup yang-parser-rfc7950 antlr configuration
This fixes up a long-standing issue with how antlr is configured,
fixing javadoc plugin interaction in the process.
Change-Id: Ia077b7b2f777203baea8aad3400abd484e3e6801
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
9887727e92d3674d7cd77563f74683382a58f6a3)
Robert Varga [Tue, 8 Oct 2019 15:33:03 +0000 (17:33 +0200)]
Remove jacoco/surefire configration
This configuration does not seem to serve any purpose, remove it.
Change-Id: I1b0c714fbb9f347011d6e4869d64886fecf11c62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2aee8b76e88757d440620f7bec11bef23f0559e1)
Robert Varga [Mon, 7 Oct 2019 15:19:34 +0000 (17:19 +0200)]
Close JSON root context when the writer is closed
We should be closing the root context when we are closed, not when
a its child is closed -- otherwise it would be impossible to write
multiple children of the root context.
Since we are in the area, also centralize some QName/ContainerNode
creation.
JIRA: YANGTOOLS-1029
Change-Id: I599fb5ad1ad8e36a441dff761984d5406e401d55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f8e3d9af24d8d5d1eeca6a714d29f9822537a773)
Mario Abraham [Fri, 27 Sep 2019 09:00:08 +0000 (11:00 +0200)]
Represent large number types as strings
A value of the int64, uint64 and decimal64 type is
represented as a JSON string related to rfc 7951.
Issue-ID: YANGTOOLS-1027
Change-Id: Ic6aea0a0f97e042ed40d2e0be323557750401621
Signed-off-by: Mario Abraham <mario.abraham@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
af02c59d72a4f6af9361ea2842c35e634f6454e4)
Robert Varga [Sat, 5 Oct 2019 11:16:57 +0000 (13:16 +0200)]
Specialize JSONInstanceIdentifierCodec
We do not want to force RFC7951 to instantiate the old lhotka-02
codec if we are not using it. Make JSONInstanceIdentifierCodec
an abstract class and specialize it as
Lhotka02JSONInstanceIdentifierCodec, so we have two distinct
concrete classes.
Change-Id: Icb30d97ec9134e8dc368775e48b93ef042ed9121
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f8325877a6b29e3791b3dd945881b9cf1e648ea4)
Robert Varga [Mon, 7 Oct 2019 09:12:01 +0000 (11:12 +0200)]
Shortcut Collections.sort()
We have a concrete List implementation, hence we can use List.sort()
directly.
Change-Id: I4baa0f41ee34479b5a915d6e3670029553b48b82
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6c70f2b315960611004245950729daa5fa2aa5c0)
Robert Varga [Fri, 27 Sep 2019 09:45:56 +0000 (11:45 +0200)]
Add odl-guava dependency
odl-yangtools-util is pulling in guava, is should depend on
odl-guava to get it.
Change-Id: I7514cf9fe69fa14e042c95bbcc93e4882ac1ae0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 15 Sep 2019 22:10:56 +0000 (00:10 +0200)]
Take advantage of ValueNode in NormalizedNodes
We can perform a single instanceof check instead of two to check
for LeafNode and LeafSetEntryNode. Also cleanup checks to remove
superfluous type arguments.
Change-Id: Id9964088ff0751217175cf1a8c6f13009a0276e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
383c8a118c7bf009c268ced6c2db555244054e04)
Robert Varga [Sun, 15 Sep 2019 22:07:49 +0000 (00:07 +0200)]
Cleanup requireNonNull() use in NormalizedNodes
Take advantage of the non-null return to save a tiny bit of bytecode.
Change-Id: Ie43b7ccc15dd96cd320eb74c0b0a2d5a0dd8a4da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
e36fb827370e197a732dac43e123fe780e521303)
Robert Varga [Sun, 15 Sep 2019 22:02:02 +0000 (00:02 +0200)]
Add missing @Override
LoggingNormalizedNodeStreamWriter.domSourceValue() is missing
an annotation for some reason. Fix that.
Change-Id: I01741c2a28de11f2a86562e588db15882dbe0912
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
32de8441a7c05a0d0cc988280d24621fcfedfb16)
Robert Varga [Fri, 13 Sep 2019 04:45:17 +0000 (06:45 +0200)]
Bump version to 3.0.6-SNAPSHOT
This starts the next development iteration.
Change-Id: I011ffc0ec1186161d81a440c507f2319066d0b47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 22 Aug 2019 15:13:01 +0000 (17:13 +0200)]
Bump odlparent to 5.0.2
This bumps odlparent references to pick latest fixes.
Change-Id: I2eeae6371f6c97ea5fb2333d7a3daccf8c248685
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 23 Aug 2019 19:30:14 +0000 (21:30 +0200)]
Update TypeDefinitionAwareCodec
Note that the factory can return null, annotate as such and document
that @Nullable should be eliminated.
Change-Id: I63c4703ef9b63ce1a7fccb70b32beb23398be748
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
69552d59a2aa31f39501f15e15ded6a67484195b)
Robert Varga [Thu, 12 Sep 2019 15:16:05 +0000 (17:16 +0200)]
Add NodeIdentifierWithPredicates.containsKey()
This is a useful check, which can be performed via getValue()
and checking for null return, but implementations can perform
it a wee bit more quickly.
Change-Id: I2182870ca3cfba082c6cebafe947643d5e191f4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
553dadbff0756bb7555545cd264916f6f2bd2101)
Robert Varga [Thu, 5 Sep 2019 09:35:19 +0000 (11:35 +0200)]
Migrate Class.newInstance() user
Class.newInstance() is deprecated since Java 9, migrate to explicit
constructor invocation.
Change-Id: Ifc2e67aa4a56a9ccc306eb540100ebc299eb00c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ba34613f883014ecc308f83d8786a08624f910c5)
Robert Varga [Mon, 2 Sep 2019 15:25:37 +0000 (17:25 +0200)]
Optimize immutable lookups
We have a number of private Set/Map/Lists which we are using for
lookups. These typically are backed by Immutable implementations,
hence we can propagate the type knowledge to improve bytecode
generation and make JIT's life easier.
Change-Id: I7f90393b8bc76196deced50f1800c3f99424fa1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
9e0e66b8a190dbd7f2903f1b4457fe4a1660254a)
Robert Varga [Wed, 28 Aug 2019 20:40:14 +0000 (22:40 +0200)]
Remove references to YangInstanceIdentifier.EMPTY
The constant is going away, update javadocs to reflect that.
Change-Id: Ie0415cbd1afd375b14a6c62d097f288ed2193613
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2db0dd5c85bdf1e125362809b3b504b5090f9f98)
Robert Varga [Wed, 28 Aug 2019 18:21:39 +0000 (20:21 +0200)]
Deprecate YangInstanceIdentifier.EMPTY
This runtime constant forces instantiation of a subclass, leading
to a SpotBugs warning. A static accessor works just as well --
hence YangInstanceIdentifier.empty()
Change-Id: I67b562b176f17d3c327b4589b673017f513f98f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a30bea3eefedbde31d9cf0c1ac7cdb3f8cdd190b)
Robert Varga [Tue, 27 Aug 2019 14:13:19 +0000 (16:13 +0200)]
Optimize ImmutableNodes.leafNode()
This eliminates instantiation of a temporary builder and shortcuts
to creating the leaf node directly.
Change-Id: I66256b46ef0de1aa3745bb90e70d41a2bd29d419
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b6ba37de8e39888262a2bfa21d804cd233990e89)
Robert Varga [Mon, 26 Aug 2019 12:32:46 +0000 (14:32 +0200)]
Add utility PotentialSchemaSource constructor
It is useful for users to use pre-defined acquisition costs, this
adds a utility so users do not have to call Costs.getValue().
Change-Id: Ib44352784076493a317dcee0aa64d108301a6305
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6a3098e0916f4850629cb11730ab008794b17d30)
Robert Varga [Thu, 22 Aug 2019 13:02:53 +0000 (15:02 +0200)]
Fix a theoretical IM_BAD_CHECK_FOR_ODD
While the size of a collection cannot be negative, this keeps
SpotBugs happy about the check.
Change-Id: Ic84a9f147b9d933efc66766617f6271fcf1eddc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 22 Aug 2019 12:57:38 +0000 (14:57 +0200)]
Rely on framework to unregister XPathParserFactory
This simplifies the code a bit while also squashing two SpotBug
violations.
Change-Id: Ie3f146568510a949e3c7d332c95c59b90f17c7b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 22 Aug 2019 10:41:27 +0000 (12:41 +0200)]
Fix checkstyle
This fixes issues found by checkstyle.
Change-Id: Iecab9171c2d4d63cf564139c714a4552d069636b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 20 Aug 2019 12:17:21 +0000 (14:17 +0200)]
Expand MapAdaptor javadoc
This fixes a few warnings around javadoc completes of MapAdaptor.
Change-Id: I6bb7b6354530b4ad47a07b4b0358c720b80b4230
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 16 Aug 2019 17:01:18 +0000 (19:01 +0200)]
Generalize ForwardingIdentityObject
Wrapping objects in identity comparison is useful, and there
seems to be no readily-avaible utility. This introduces an
extension to ForwardingObject and a simple utility class to
implement its construct.
JIRA: YANGTOOLS-1016
Change-Id: If0d7a2f731b0a294570f8ba39ce5da7236e2c752
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6a039ee1b2179eb5b77ca30a366e866970806547)
Anna Bencurova [Thu, 15 Aug 2019 12:17:34 +0000 (14:17 +0200)]
Fix schema-ref traversal
When traversing schema-mount definitions, we need to account for
schema-ref being a choice and hence its children are not directly
reachable.
JIRA: YANGTOOLS-1015
Change-Id: Iaa9ddbf33c172c433cb323166e5b1bcea5eea649
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Aug 2019 09:25:58 +0000 (11:25 +0200)]
Remove javadoc plugin version override
odlparent is using a newer plugin, remove the unneeded override.
Change-Id: I6afb495233e3959364c45eb3189cabe20ebdcf5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
66390f4c28b45b740bfd73f84ea17494e822ac1e)
Robert Varga [Tue, 6 Aug 2019 08:39:43 +0000 (10:39 +0200)]
Apply modernization
This fixes up use of old constructs pointed out by maven modernizer
plugin.
Change-Id: I3f926678763f72b195ae961ce7f220a1845fef52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Aug 2019 16:04:11 +0000 (18:04 +0200)]
Move Decimal64.toInt() method
This utility is only used in nested class, move it to keep SpotBugs
happy under Java 11.
Change-Id: I405718bf3db9ebcdd972ae5a71c47570c424f730
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Aug 2019 06:23:59 +0000 (08:23 +0200)]
Fix checkArgument constructor
This adds a missing argument and removes the need for synthetic
accessors.
Change-Id: I7e293036b35b86c9ac555f2880747748b8c35443
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Aug 2019 14:14:49 +0000 (16:14 +0200)]
Fix checkstyle errors
Upgraded checkstyle plugin is finding some more errors, fix them
up.
Change-Id: Id58302b1dcd0574fa94340965c15259621a9156d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Aug 2019 14:14:49 +0000 (16:14 +0200)]
Fix checkstyle errors
Upgraded checkstyle plugin is finding some more errors, fix them
up.
Change-Id: I755c73be82230cb1a1a22fd776322b7a1d2afc4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 29 Jul 2019 15:25:54 +0000 (17:25 +0200)]
Teach DataSchemaContextNode about anydata
We failed to account for anydata nodes, which should behave the
same way as anyxml nodes.
Change-Id: Id8a2aff60921094e149f58c8b7bba1822587c96f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 29 Jul 2019 09:10:20 +0000 (11:10 +0200)]
Bump version to 3.0.5-SNAPSHOT
This starts the next development iteration.
Change-Id: Iaf21895aadee2433c1bba42e0b3fa8097f4ae8e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 29 Jul 2019 08:41:59 +0000 (10:41 +0200)]
Revert "Check for nested augmentations"
This reverts commit
759e69d85991edb987a760165adb83fa3f2ab67b.
JIRA: YANGTOOLS-956
Change-Id: I3c80751043a101de77292bc91e0c1c4178d16f44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 19 Feb 2019 10:22:49 +0000 (11:22 +0100)]
Check for nested augmentations
When we are augmenting an already-conditional-augmented node from
the same module, we should inherit the previous when statement.
JIRA: YANGTOOLS-956
Change-Id: Ia3c04d60f4975bd721406b26aa4c2e7d8b05122b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Jul 2019 15:59:35 +0000 (17:59 +0200)]
Add support for writing mountpoints to JSON
This adds basic support for emitting mountpoints into JSON documents,
as otherwise we cannot translate XML-to-JSON, which hampers the usual
use case of NETCONF-to-RESTCONF transformation.
JIRA: YANGTOOLS-1013
Change-Id: I9e29050384ba344804538d4155175908c9ed6697
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Jul 2019 15:53:15 +0000 (17:53 +0200)]
Add rename fixmes to NormalizedNodeStreamWriterExtensions
The extension for Anydata is known as AnydataExtension, it makes
sense to keep naming consistent. Drop a few FIXMEs to that effect.
Change-Id: Ic2b848cd96d0d32a540bb2d10d82a80e0f0d2648
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Jul 2019 15:40:19 +0000 (17:40 +0200)]
Add DatastoreIdentifier
This is a type-safe manifestation of RFC8342 datastore identity
for the purposes of yang-data-api. While this identifier not
immediately used in any contracts, it will be required for
RFC8525/RFC8528 interoperation where codecs are concerned.
JIRA: YANGTOOLS-1012
Change-Id: Ief45ed176d5751dc22249d3c40da2473f648bbc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Jul 2019 13:28:19 +0000 (15:28 +0200)]
Package RFC8528 extensions in odl-yangtools-data-api
These are pulled into the implementation package, whereas we really
want to have them in the api package.
Change-Id: Ibfaa05586da9e7b8abb2aea13db24775ba285ffc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Jul 2019 16:48:27 +0000 (18:48 +0200)]
Add MountPointNormalizedNodeWriter
With the advent of MountMointNode a NormalizedNode tree can contain
nested mount point data, which is not quite a regular node.
This patch introduces a utility NormalizedNodeWriter, which can
either filter or forward MountPointNodes through a NormalizedNode
stream.
JIRA: YANGTOOLS-1010
Change-Id: Ie8cf6efa0874864461aa761b8a9c6e74a250bbac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Jul 2019 15:18:47 +0000 (17:18 +0200)]
Teach InstandIdToNodes about AnydataNode
This mirrors the capability of anyxml nodes, hence the data can
be queried.
Change-Id: Ib4b1f13ebbc1a6b8eb8b41ab6cc918d5533a59b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Jul 2019 10:23:33 +0000 (12:23 +0200)]
Add NodeIdentifierWithPredicates.getValue()
Acquiring a particular value is useful for code which extracts
values out of a YangInstanceIdentifier -- as these mirror corresponding
leaves.
Change-Id: I6a1613315489cb0219225b344f266cf31cd88815
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Jul 2019 23:58:44 +0000 (01:58 +0200)]
Add AbstractMountPointContextFactory
This factory has model-specific information about RFC8528, so that
it is able to form an accurate view of mount points defined by inline
data.
Change-Id: I3350403c3fb3e1e074649536511eb7935f0ff6c9
JIRA: YANGTOOLS-1010
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 18 Jul 2019 05:37:50 +0000 (07:37 +0200)]
Bump versions for 3.0.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I1c5be6a304bbdbae706fb39b4cbcb6b9510cca25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jul 2019 13:23:14 +0000 (15:23 +0200)]
Refactor MountPoint-related definitions
At data-api level we have an opinionated view of how
the underlying mount point looks like and unify the semantics
of a mount point.
Notably we have a MountPointContext, which provides an entrypoint
into the mount point resolution process, which can be dynamically
constructed from inlinee parser data.
This simplifies things by quite a bit, getting rid of unneeded
abstractions in the process.
JIRA: YANGTOOLS-1007
Change-Id: I6419d13b8a84a4cdf5cc7707dba039c33f8d3f39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jul 2019 13:10:10 +0000 (15:10 +0200)]
Move MountPointChild to rfc8528-data-api
This concept encapsulates a potential NormalizedNode and is needed
for mount point schema resolution. Move it to data-api.
Change-Id: I26917007488070dbb664eaaf82d11eeae62ae425
JIRA: YANGTOOLS-1007
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jul 2019 09:56:50 +0000 (11:56 +0200)]
Special-case schema-mount nodes
We need to recognize yangmnt:schema-mounts before we start emitting
the mount point data, as it may be required for nested mountpoint
resolution.
JIRA: YANGTOOLS-1007
Change-Id: Iee2b3ab7ddc4f2ae2416d01a8554fc7ec11cc6ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Jul 2019 08:36:38 +0000 (10:36 +0200)]
Move YangLibraryConstants
These constants are only needed at data-api layer, move them.
JIRA: YANGTOOLS-1007
Change-Id: I2f53b5dcf8302d833e252f1022396ddbc5d0cb94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 10 Jul 2019 22:22:25 +0000 (00:22 +0200)]
Add ImmutableMountPointNormalizedNodeStreamWriter
This is an immutable writer, which is able to receive mount points
from a stream and turns them into MountPointNodes.
JIRA: YANGTOOLS-1010
Change-Id: I1c89c757b25ac58632d8183df12e77427511ee9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Jul 2019 20:12:32 +0000 (22:12 +0200)]
Eliminate MountPointSchemaResolver
MountPointSchemaResolver really deals with mount point data
instantiation. This means is really needs to live at the data-api
layer instead of model-api layer -- but it turns out we have a
mirror in MountPointNodeFactory, hence we just converge on that
interface instead.
JIRA: YANGTOOLS-1007
Change-Id: I69f1d2c11239f48d22a0d2d184604e5518e50354
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Jul 2019 20:14:23 +0000 (22:14 +0200)]
Include RFC85258 API documentation
This was missed, add the corresponding sections.
JIRA: YANGTOOLS-1007
Change-Id: Icc6a2c20f350ef29deacec90a579ba61d329e7aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 26 Jun 2019 13:06:12 +0000 (15:06 +0200)]
Add XML support for parsing schema-mount data
When we cannot find a direct descendant of a particular schema,
we can still interpret it as a schema-mounted element, if the
corresponding schema allows for that.
JIRA: YANGTOOLS-1007
Change-Id: I1e595fafcc0aa1cd41c2cc6afc469d5152953dc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 9 Jul 2019 20:29:38 +0000 (22:29 +0200)]
Add MountPointNode and its specializations
MountPointNode is a utility construct to carry a NormalizedNode
tree with mount point content attached.
JIRA: YANGTOOLS-1010
Change-Id: Ie33cd6e566584191d20f942eeb87ce6145e30717
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 10 Jul 2019 19:25:17 +0000 (21:25 +0200)]
Introduce MountPointIdentifier
For the purposes of streaming mount points out, we need to form
a proper identifier namespace -- MountPointIdentifier does exactly
that, improving type-safety.
This is a first step in a larger-scale refactor to clean up the
interactions between the parser and the writer.
JIRA: YANGTOOLS-1007
Change-Id: Ie3d0125c3e6c4ff795f3492b025fa00bc2b145b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>