yangtools.git
4 years agoForce path expression parsing consume all data 45/86545/3
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>
4 years agoMark yang-maven-plugin as thread-safe 14/86414/1
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>
4 years agoFix a method reference 13/86413/1
Robert Varga [Fri, 13 Dec 2019 08:15:36 +0000 (09:15 +0100)]
Fix a method reference

This was missed during upgrade to EffectiveModelContext, fix that.

Change-Id: I9dcb2b97d9648a527b156811568e9bf650a8165a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump versions to 4.0.4-SNAPSHOT 31/86331/3
Robert Varga [Tue, 10 Dec 2019 17:14:48 +0000 (18:14 +0100)]
Bump versions to 4.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: If6e6b987d6db1d7bb6ccf1e6956e27b7f5457cbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd yang-common-netty 22/86022/5
Robert Varga [Wed, 27 Nov 2019 10:07:31 +0000 (11:07 +0100)]
Add yang-common-netty

This adds common utilities for dealing with Uint8 types with ByteBufs,
along with some convenience nullness-handling methods.

JIRA: YANGTOOLS-1047
Change-Id: Idf5bef51db30c5397d440e2648fe9c417735aae2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse immutables.org annotations only 30/86330/2
Robert Varga [Tue, 10 Dec 2019 17:05:29 +0000 (18:05 +0100)]
Use immutables.org annotations only

odlparent support has been refactored to allow better footprint,
take advantage of that.

Change-Id: Ic40ae632ac9c31cb6dffd5b893d04598ab3d9687
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 6.0.2 29/86329/2
Robert Varga [Tue, 10 Dec 2019 17:04:46 +0000 (18:04 +0100)]
Bump odlparent to 6.0.2

This picks up the latest fixes and improvements.

Change-Id: I88c54a002c5c99501c2abb0a1f84b59d90643cff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove intermediate checking maps 84/85984/8
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>
4 years agoEliminate childNodes map 63/85963/18
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>
4 years agoCompute mustConstraints lazily 62/85962/11
Robert Varga [Mon, 25 Nov 2019 14:40:50 +0000 (15:40 +0100)]
Compute mustConstraints lazily

We usually do not access unknown nodes (which are mostly empty
anyway). This patch moves their computation to first access.

JIRA: YANGTOOLS-1041
Change-Id: Idd47d93bd2cfd05816d311e3d9271b6173b2faad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCompute unknown nodes lazily 60/85960/15
Robert Varga [Mon, 25 Nov 2019 13:26:29 +0000 (14:26 +0100)]
Compute unknown nodes lazily

We usually do not access unknown nodes (which are mostly empty
anyway). This patch moves their computation to first access.

JIRA: YANGTOOLS-1041
Change-Id: I85b286b4ce8477c2999aeeb34ee76ed32e597cef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCentralize must contraint definitions 61/85961/11
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>
4 years agoCentralize unknownNodes 59/85959/10
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>
4 years agoRefactor AbstractEffectiveModule 70/85970/10
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>
4 years agoFix XPath binary expressions 00/86000/4
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>
4 years agoSquash self-steps when parsing expression 01/86001/3
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>
4 years agoDetect duplicate groupings in operation definitions 87/85987/1
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>
4 years agoSpeed up confict detection 85/85985/3
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>
4 years agoRework EffectiveStatementBase statement order restoration 67/85967/1
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>
4 years agoRemove Collection2.filter() from EffectieStatementBase 64/85964/1
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>
4 years agoAdd AbstractEffectiveDocumentedNodeWithoutStatus 57/85957/2
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>
4 years agoTarget statement hiding FIXMEs 58/85958/1
Robert Varga [Mon, 25 Nov 2019 13:14:10 +0000 (14:14 +0100)]
Target statement hiding FIXMEs

This just attaches a concrete version to hide the statements from
public view.

Change-Id: Ib2989ff512b4f94c5d14541ce0b6b5f2aa24e653
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoResync javadoc links 74/85874/1
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>
4 years agoSeparate out {Identity,Equality}QueuedNotificationManager 13/83713/22
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>
4 years agoNormalize predicate order in ImmutableNodes.fromInstanceId() 88/85588/3
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>
4 years agoExpose underlying schema from DataContainerNormalizationOperation 86/85586/2
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>
4 years agoRename ListItemNormalization 85/85585/1
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>
4 years agoDeprecate LoggingThreadUncaughtExceptionHandler for removal 45/85545/1
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>
4 years agoFix reported string duplication warnings 96/85496/2
Robert Varga [Fri, 1 Nov 2019 15:51:38 +0000 (16:51 +0100)]
Fix reported string duplication warnings

Sonar is not happy about duplicated strings. This fixes up duplication
by either specializing the string or moving access to a common method.

Change-Id: Ie4f6ef642a68258c3d8e4f622b96ec95759bad55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unused logger from ArgumentUtils 95/85495/2
Robert Varga [Fri, 1 Nov 2019 15:45:11 +0000 (16:45 +0100)]
Remove unused logger from ArgumentUtils

sonar is flagging this unused logger, remove it.

Change-Id: I5abe9aa119bc1cda5b20ac9a007828d583ddffe0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd yang-data-codec-binfmt packaging 21/85421/15
Robert Varga [Mon, 28 Oct 2019 22:11:45 +0000 (23:11 +0100)]
Add yang-data-codec-binfmt packaging

This packages the utility codec in odl-yangtools-codec, so that
it is widely available to downstream users.

JIRA: YANGTOOLS-1035
Change-Id: I9200915bbeeade00bbbadfae8e02568546e1a0e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExtend yang-data-codec-binfmt test suite 23/85423/17
Robert Varga [Tue, 29 Oct 2019 02:12:13 +0000 (03:12 +0100)]
Extend yang-data-codec-binfmt test suite

Improve coverage to test various values serialization, improving
coverage above 80%.

JIRA: YANGTOOLS-1035
Change-Id: I8accf50944bcceafe9ca09d6ebdfc75c41d35791
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImport yang-data-codec-binfmt test suite 22/85422/14
Robert Varga [Fri, 1 Nov 2019 11:13:19 +0000 (12:13 +0100)]
Import yang-data-codec-binfmt test suite

This imports the test suite and ensures all versions are covered.

JIRA: YANGTOOLS-1035
Change-Id: Ic14370343ff4637284d9338b90a451e2ee81b872
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove useless throws 82/85482/5
Robert Varga [Fri, 1 Nov 2019 11:32:07 +0000 (12:32 +0100)]
Remove useless throws

We trust the utility classes are not going to be instantiated,
hence we do not need to throw UOE.

JIRA: YANGTOOLS-1035
Change-Id: Iecece4dc8a169dfb0bc80e1e914ec7ae2f4d7e9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoModernize a few descriptions 81/85481/2
Robert Varga [Fri, 1 Nov 2019 10:18:24 +0000 (11:18 +0100)]
Modernize a few descriptions

Description is visible in bundle info, make sure we add a a few
words about what we are actually providing in these.

Change-Id: I56d4263a1baedbc94dc10f9e2b3f1c2267ed77b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge branch 'master' of ../controller
Anil Belur [Fri, 1 Nov 2019 06:59:39 +0000 (12:29 +0530)]
Merge branch 'master' of ../controller

- Pull in classes for src/test

./node
./node/utils
./node/utils/QNameFactoryTest.java
./node/utils/transformer
./node/utils/transformer/NormalizedNodePrunerTest.java
./node/utils/stream
./node/utils/stream/NormalizedNodeStreamReaderWriterTest.java
./node/utils/stream/SerializationUtilsTest.java
./node/utils/stream/LithiumWriteObjectMappingTest.java
./node/utils/stream/SampleNormalizedNodeSerializable.java

Change-Id: I896ea34d6cad7167669f5d9f1be7cb1307a9b9e0

4 years agoClean up public entrypoints 19/85419/6
Robert Varga [Mon, 28 Oct 2019 20:58:58 +0000 (21:58 +0100)]
Clean up public entrypoints

This API is centered around NormalizedNodeStreamVersion, which
defines versions supported by this artifact. An enum cannot really
be rehosted in an API-friendly way, which really makes it an
API entrypoint. Embrace that, eliminating NormalizedNodeInputOutput,
which acted in the same way.

JIRA: YANGTOOLS-1035
Change-Id: I8878bf6df3348981eb9165380844374885176ab1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoHide QNameFactory 18/85418/5
Robert Varga [Mon, 28 Oct 2019 20:10:30 +0000 (21:10 +0100)]
Hide QNameFactory

This cache is an implementation, hide it and remove the deprecated
cache.

JIRA: YANGTOOLS-1035
Change-Id: I097a5b768db643564935cb13cf274eb0e443712e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoInstantiate yang-data-codec-binfmt 54/85454/4
Robert Varga [Thu, 31 Oct 2019 15:54:23 +0000 (16:54 +0100)]
Instantiate yang-data-codec-binfmt

This instantiates the artifact to hold the incoming controller
code, removing superfluous imports.

JIRA: YANGTOOLS-1035
Change-Id: Ide2213d6f8a224df1e339a8efc405cc7783fe130
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge branch 'master' of ../controller
Anil Belur [Thu, 31 Oct 2019 14:28:57 +0000 (19:58 +0530)]
Merge branch 'master' of ../controller

Change-Id: I3611c067a26521829ae9212e4be1ed44acbd7dd2

4 years agoAdd static ArgumentUtils XPath integration 25/85425/12
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>
4 years agoAdd YangXPathExpression.getYangVersion() 43/85443/4
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>
4 years agoExpose minimum YANG version for YangFunction 32/85432/2
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>
4 years agoAdd a FIXME guide to YANGTOOLS-784 34/85334/5
Robert Varga [Tue, 22 Oct 2019 20:41:21 +0000 (22:41 +0200)]
Add a FIXME guide to YANGTOOLS-784

This just drops some clarification into code as I am in the area.
This needs to be cleaned up when the issue is addressed.

JIRA: YANGTOOLS-784
Change-Id: I988c43731480a399d6d8faa71fb00fa1acaa8d7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReinstate "Check for nested augmentations" 33/85333/5
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>
4 years agoAdd lenient JsonParserStream 55/85355/1
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)
(cherry picked from commit be62b4e0494ae2b551373760c4da1b03ff19df83)

4 years agoAdd OperationAsContainer @NonNull annotations 29/85229/2
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>
4 years agoBump versions to 4.0.3-SNAPSHOT 57/85257/2
Robert Varga [Sun, 20 Oct 2019 08:24:59 +0000 (10:24 +0200)]
Bump versions to 4.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Idf713e64dae9a78c043aefa8d5075386d6be4672
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 6.0.1 92/85192/2
Robert Varga [Thu, 17 Oct 2019 22:40:25 +0000 (00:40 +0200)]
Bump odlparent to 6.0.1

This bumps odlparent to 6.0.1, picking up latest updates.

Change-Id: Ib0ee6b87c716e436c3cc009eba07022feebd3d3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix foldable trigraphs 96/85196/1
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>
4 years agoCleanup code smells reported by sonar 94/85194/1
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>
4 years agoUse careful byte-masking/shifting in Mg Input
Robert Varga [Mon, 14 Oct 2019 08:16:02 +0000 (10:16 +0200)]
Use careful byte-masking/shifting in Mg Input

We really want to operate on byte and not int, the bytes are to
be treated as unsigned, which gets wrecked by sign extension.

Introduce an explicit mask(byte, byte) method and use it where
we are potentially sign-extending.

JIRA: CONTROLLER-1919
Change-Id: I0484f440c1589859fb268947f5a80a2b4969451e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse careful byte-masking/shifting in Mg Input
Robert Varga [Mon, 14 Oct 2019 08:16:02 +0000 (10:16 +0200)]
Use careful byte-masking/shifting in Mg Input

We really want to operate on byte and not int, the bytes are to
be treated as unsigned, which gets wrecked by sign extension.

Introduce an explicit mask(byte, byte) method and use it where
we are potentially sign-extending.

JIRA: CONTROLLER-1919
Change-Id: I0484f440c1589859fb268947f5a80a2b4969451e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd utility converters 97/85097/5
Robert Varga [Sun, 13 Oct 2019 08:40:36 +0000 (10:40 +0200)]
Add utility converters

This adds toUint{8,16,32,64} methods to ease conversion between
Uint types.

JIRA: YANGTOOLS-1033
Change-Id: I010a9103e2115e7808aa7d04ea9a5b41ab12ddd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd Uint constants 96/85096/3
Robert Varga [Sun, 13 Oct 2019 08:33:56 +0000 (10:33 +0200)]
Add Uint constants

This adds TWO/TEN constants to all Uint types as well some more
javadocs.

JIRA: YANGTOOLS-1032
Change-Id: I66cce018e99fdbf4c4824415fe23f112f7e6ab53
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate old MD-SAL APIs for removal
Robert Varga [Tue, 1 Oct 2019 17:05:29 +0000 (19:05 +0200)]
Deprecate old MD-SAL APIs for removal

These APIs are slated for removal in Aluminium, make sure our
warning is more stern.

JIRA: CONTROLLER-1917
Change-Id: Ib4f7dcfd5183b87dd10b9ce2b773a59a548892c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDisable slf4j SSL link 54/85054/1
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>
4 years agoRemove CheckedFuture from RemoteSchemaProvider
Robert Varga [Thu, 10 Oct 2019 12:05:49 +0000 (14:05 +0200)]
Remove CheckedFuture from RemoteSchemaProvider

The API contract we are implementing is defined in terms of
ListenableFuture, hence we can drop the use of CheckedFuture.

Change-Id: I9d99b2e42c3995c4c11b44e595a81a93b2b31b7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd type-bound equals() to common int types 31/85031/3
Robert Varga [Thu, 10 Oct 2019 10:36:57 +0000 (12:36 +0200)]
Add type-bound equals() to common int types

This adds additional Object.equals() flavors to bind to smaller methods
when the objects are known to be of matching types (but still nullable).

JIRA: YANGTOOLS-1030
Change-Id: I4c750e135069692682ba65b21503345fc682051a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix Decimal64.equals() 30/85030/2
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>
4 years agoBump yangtools to 4.0.1
Robert Varga [Tue, 20 Aug 2019 14:37:51 +0000 (16:37 +0200)]
Bump yangtools to 4.0.1

This bumps yangtools to 4.0.1 as part of Magnesium MRI.

Change-Id: I1ac7d3f856af310f4e8015875223d30eac3a8276
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 4.0.1
Robert Varga [Tue, 20 Aug 2019 14:37:51 +0000 (16:37 +0200)]
Bump yangtools to 4.0.1

This bumps yangtools to 4.0.1 as part of Magnesium MRI.

Change-Id: I1ac7d3f856af310f4e8015875223d30eac3a8276
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAddress Java-9-dependent FIXMEs 46/83746/3
Robert Varga [Mon, 19 Aug 2019 07:35:14 +0000 (09:35 +0200)]
Address Java-9-dependent FIXMEs

Since we are building for Java 11, we can use proper StringBuilder
instead of StringBuffer.

Change-Id: I1971f91e661f411560a52af0df759915278aa154
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse varhandles in InMemoryDataTree 33/84233/5
Robert Varga [Thu, 5 Sep 2019 19:38:45 +0000 (21:38 +0200)]
Use varhandles in InMemoryDataTree

We are publishing only current state, so we should be fine accessing
it through getAcquire() memory semantics.

JIRA: YANGTOOLS-1024
Change-Id: I63286a347b9305a01eb1899e310995737dfa6e7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove InMemoryDataTreeModification.isSealed() performance 61/82561/7
Robert Varga [Tue, 18 Jun 2019 21:32:22 +0000 (23:32 +0200)]
Improve InMemoryDataTreeModification.isSealed() performance

The check for the modification being sealed does not need to really
establish a barrier between individual accesses. Use VarHandles to
express that the check needs to be ordered only before seal().

JIRA: YANGTOOLS-1025
Change-Id: I86433a95c3321e3bcabec9bba0f5a772556e1af4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMinimize antlr configuration 95/84995/3
Robert Varga [Tue, 8 Oct 2019 19:56:33 +0000 (21:56 +0200)]
Minimize antlr configuration

Now hat the configuration is pretty much what the default would be,
make sure we do not override properties we do not have to.

Change-Id: Ib845fd83d2fd68ad13e73934b620f9204f4f013c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoLeafEffectiveStatement should be a DataTreeEffectiveStatement 88/84988/3
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>
4 years agoRemove maven.compiler.release overrides 92/84992/4
Robert Varga [Tue, 8 Oct 2019 19:22:12 +0000 (21:22 +0200)]
Remove maven.compiler.release overrides

Now that the antlr configuration has been fixed, we can remove
the invalid overrides.

Change-Id: Id2f063a6b74be2a2e9081153ed22c275980c4114
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup yang-data-impl antlr configuration 94/84994/1
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>
4 years agoCleanup yang-xpath-impl antlr configuration 93/84993/1
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>
4 years agoCleanup yang-parser-rfc7950 antlr configuration 90/84990/2
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>
4 years agoRemove jacoco/surefire configration 89/84989/1
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>
4 years agoClose JSON root context when the writer is closed 82/84982/1
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)

4 years agoUse ReusableNormalizedNodeReceiver
Robert Varga [Fri, 27 Sep 2019 05:12:32 +0000 (07:12 +0200)]
Use ReusableNormalizedNodeReceiver

This simplifies some APIs by using ReusableStreamReceiver, as it
is an API-level construct rather than a particular implementation.

Change-Id: Id9d14d512ac7150a3e71c104577546e219cd86d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRepresent large number types as strings 75/84775/11
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>
4 years agoShortcut Collections.sort() 61/84961/1
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>
4 years agoSpecialize JSONInstanceIdentifierCodec 21/84921/1
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>
4 years agoBump versions to 4.0.2-SNAPSHOT 75/84875/1
Robert Varga [Wed, 2 Oct 2019 12:12:32 +0000 (14:12 +0200)]
Bump versions to 4.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: Ic8984f84bd1c3258cd4084110d5486085c498cbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix Uint64 cache lookup 73/84873/1
Robert Varga [Wed, 2 Oct 2019 11:13:13 +0000 (13:13 +0200)]
Fix Uint64 cache lookup

Looking up a value which has its 32 least significant bits set to
zero will lead to Uint64.ZERO being returned. This also affects other
values which have LSB bits set so that they match cache length.

Fix this by comparing the long value with cache length, so we get
an accurate check.

JIRA: YANGTOOLS-1028
Change-Id: I33bf061e5ff486beaf034cab7827f93e93003489
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoConvert yang-common to a JPMS module 19/84019/6
Robert Varga [Tue, 27 Aug 2019 21:03:20 +0000 (23:03 +0200)]
Convert yang-common to a JPMS module

This drops plugin configuration in favor of declaring a module. It
allows us to ditch metainf-services as ServiceLoader bindings are
now explicit.

Change-Id: Ie160bbf551f4bbca424978215400c78d4b305334
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake concepts an explicit module 20/83920/7
Robert Varga [Thu, 22 Aug 2019 18:05:03 +0000 (20:05 +0200)]
Make concepts an explicit module

This adds module-info, turning concepts into a full-pledged module.

Change-Id: I3225cb148364818ff2ff1c0abac0ebf90c4f198c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove AbstractRegistration.isClosed() performance 60/82560/6
Robert Varga [Tue, 18 Jun 2019 21:23:03 +0000 (23:23 +0200)]
Improve AbstractRegistration.isClosed() performance

The check for the registration being closed does not need to be
ordered with other access, except close(). Using VarHandles, we
can express the check in terms for getAcquire().

Change-Id: Idf685e8adafbe102c4c65f735d872a1f4b801188
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump versions to 4.0.1-SNAPSHOT 48/84848/1
Robert Varga [Tue, 1 Oct 2019 12:21:01 +0000 (14:21 +0200)]
Bump versions to 4.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I91bf47f8d49bb07de626fb059e22a67234c2974d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix EffectiveStatement namespace access 36/84836/4
Robert Varga [Tue, 1 Oct 2019 09:05:48 +0000 (11:05 +0200)]
Fix EffectiveStatement namespace access

We really want to use empty maps and optionals in this interface
contract -- do that now.

Change-Id: Ibfc72d29ff24c592e2a81ad894bb0b9f8f683f6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove DataTreeCandidateNodes.fromNormalizedNode() 31/84831/3
Robert Varga [Tue, 1 Oct 2019 08:35:10 +0000 (10:35 +0200)]
Remove DataTreeCandidateNodes.fromNormalizedNode()

This has been replaced by written(), remove it now.

Change-Id: Ie4e939cef75240a72556df7599d492dc2033db39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeprecate DataSchemaContextTree.getChild() for removal 32/84832/2
Robert Varga [Tue, 1 Oct 2019 08:37:29 +0000 (10:37 +0200)]
Deprecate DataSchemaContextTree.getChild() for removal

This strengthens deprecation, preparing for its removal.

Change-Id: I97e8fbe1953d103eceb1fa37181f2caa84820d90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove AugmentToChoiceNamespace 35/84835/2
Robert Varga [Tue, 1 Oct 2019 08:44:33 +0000 (10:44 +0200)]
Remove AugmentToChoiceNamespace

This namespace has been deprecated for removal, as it is not used
anywhere. Remove it now.

Change-Id: Ia199971ab5651fbf4eac74528668b74fd738e403
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove ImplicitCaseSchemaNode 34/84834/2
Robert Varga [Tue, 1 Oct 2019 08:42:44 +0000 (10:42 +0200)]
Remove ImplicitCaseSchemaNode

As noted in deprecation noticed, this class is a former remnant,
we can remove it safely.

Change-Id: I9c730a14299a318664eab76b70ea72aee439f964
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPush out FIXMEs to 5.0.0 33/84833/4
Robert Varga [Tue, 1 Oct 2019 08:34:46 +0000 (10:34 +0200)]
Push out FIXMEs to 5.0.0

This another round of pushing out FIXMEs.

Change-Id: I4163a08d275ff4c608bc0678a220c6436a215d4d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSwitch BasicCodeGenerator to use EffectiveModelContext 16/84816/2
Robert Varga [Mon, 30 Sep 2019 18:13:17 +0000 (20:13 +0200)]
Switch BasicCodeGenerator to use EffectiveModelContext

This rolls out EffectiveModelContext to codegen plugins, so they
can take advantage of it.

JIRA: MDSAL-435
Change-Id: I94d7385d29962e281a55b5e0522f7bc198648175
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake DataTree take EffectiveModelContext 15/84815/4
Robert Varga [Mon, 30 Sep 2019 15:46:13 +0000 (17:46 +0200)]
Make DataTree take EffectiveModelContext

This deprecates setSchemaContext() in favor of
setEffectiveModelContext(), so that users are encouraged to
migrate.

JIRA: MDSAL-435
Change-Id: If859130e204a058f89c2fee04d4be69969215399
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAllow startAnyxmlNode() to handle differing object models 07/84807/6
Robert Varga [Mon, 30 Sep 2019 09:40:29 +0000 (11:40 +0200)]
Allow startAnyxmlNode() to handle differing object models

Anyxml can have a number of underlying object models, with the most
common being DOMSource. This changes the entrypoint to work the same
as anydata, allowing implementations to support different models.

Change-Id: I06ec1e5d46e7bc2287b239ea97811d58544c8c2b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExpose EffectiveModelContext from YangParserTestUtils 14/84814/3
Robert Varga [Mon, 30 Sep 2019 15:41:27 +0000 (17:41 +0200)]
Expose EffectiveModelContext from YangParserTestUtils

We want to start using effective statements for as many operations
as possible -- make sure it is convenient to do so.

JIRA: MDSAL-435
Change-Id: I480475f40356d097c6769253aac0b18453d94153
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPush out FIXMEs to 5.0.0 11/84811/3
Robert Varga [Mon, 30 Sep 2019 14:45:32 +0000 (16:45 +0200)]
Push out FIXMEs to 5.0.0

We are not going to address these in 4.0.0 timeframe, push them out
to 5.0.0.

Change-Id: I73b9ba42c552c88758866d325b76fe9aebc3b569
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRename MountPointStreamWriter to StreamWriterMountPointExtension 06/84806/1
Robert Varga [Mon, 30 Sep 2019 09:37:28 +0000 (11:37 +0200)]
Rename MountPointStreamWriter to StreamWriterMountPointExtension

This better reflects the fact this is not a standalone interface,
but rather is an extension to NormalizedNodeStreamWriter.

Change-Id: I8cc0b9d91c95e227877b75e6a333ca830e1e0eeb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRename NormalizedMetadataStreamWriter to StreamWriterMetadataExtension 05/84805/1
Robert Varga [Mon, 30 Sep 2019 09:32:47 +0000 (11:32 +0200)]
Rename NormalizedMetadataStreamWriter to StreamWriterMetadataExtension

Naming here is quite inconsistent -- we should be explicit about this
interface being a NormalizedNodeStreamWriter extension.

Change-Id: I44fb52d06899785c6e9c8d1eb405343f89908160
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoIntegrate AnydataExtension 96/84096/3
Robert Varga [Fri, 30 Aug 2019 12:50:06 +0000 (14:50 +0200)]
Integrate AnydataExtension

anydata is the same as anyxml, it should be integrated into
NormalizedNodeStreamWriter. Also update FIXME around
startAnyxmlNode() and domSourceValue().

Change-Id: Ia39515a884d1a6883fce72444b8371c4d9f7b9c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake DataTreeTip.prepare() throw a checked exception 01/84801/3
Robert Varga [Mon, 30 Sep 2019 08:02:45 +0000 (10:02 +0200)]
Make DataTreeTip.prepare() throw a checked exception

Not all validation can be done during validate() phase, hence
allow validation failures to be reported cleanly.

Change-Id: I88dbe90c2e4b2fc79fad836939183fa43151ae6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix StoreTreeNode.getChild() return type 99/84799/3
Robert Varga [Mon, 30 Sep 2019 07:57:50 +0000 (09:57 +0200)]
Fix StoreTreeNode.getChild() return type

We should be returning Optional<? extends T> here, so that the
interface can be properly specialized.

Change-Id: Ia3a84c6426e924299a10ea03d435fb584b685c47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExpose EffectiveModelContext from YangTextSchemaContextResolver 98/84798/3
Robert Varga [Mon, 30 Sep 2019 05:22:03 +0000 (07:22 +0200)]
Expose EffectiveModelContext from YangTextSchemaContextResolver

This is another step towards migrating away from SchemaContext.

JIRA: MDSAL-435
Change-Id: I1fc6cca79fdfdcbcb45092a402b5b1f3ea9ab206
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>