yangtools.git
2 years agoFix mandatory enforcer failure on augmented nodes 34/96234/12
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>
2 years agoAdd SchemaInferenceStack.ofSchemaPath() 38/96438/1
Robert Varga [Mon, 7 Jun 2021 09:13:36 +0000 (11:13 +0200)]
Add SchemaInferenceStack.ofSchemaPath()

RESTCONF models are using groupings to communicate serialized data,
for which we need an alternative instantiation, which uses the legacy
SchemaPath interpretation.

Change-Id: I4dec567ade0705a9af7497d53689a286858c411e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove failed cache entries 09/96409/7
Tomas Cere [Wed, 2 Jun 2021 12:08:25 +0000 (14:08 +0200)]
Remove failed cache entries

We need to remove these from the cache once their corresponding
future fails, otherwise these would not be recomputed.

JIRA: YANGTOOLS-1293
Change-Id: Ic1c58392e7948f4a5fb144df6e8782ea0ffcab11
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix {Input,Output}EffectiveStatement definition 82/96382/4
Robert Varga [Thu, 27 May 2021 22:32:45 +0000 (00:32 +0200)]
Fix {Input,Output}EffectiveStatement definition

{Rpc,Action}EffectiveStatements are DataTreeAwareEffectiveStatements
which can contain input/output statements only. This implies
{Input,Output}EffectiveStatement is a DataTreeEffectiveStatement such
that it can be looked up.

JIRA: YANGTOOLS-1291
Change-Id: I6f469a790ae901e4b492af0558354d39b5b9068e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix DataTree indexing 83/96383/2
Robert Varga [Thu, 27 May 2021 22:34:47 +0000 (00:34 +0200)]
Fix DataTree indexing

Our indexing is broken here, as if we have a schema tree statement
which is not propagated to data tree, we should be indicating a
difference in maps. Fix that up.

JIRA: YANGTOOLS-1292
Change-Id: I19d80a11ef7114b0908766fa19df51604ca83f2e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate SchemaAwareXMLStreamNormalizedNodeStreamWriter 81/96381/1
Robert Varga [Thu, 27 May 2021 21:29:14 +0000 (23:29 +0200)]
Update SchemaAwareXMLStreamNormalizedNodeStreamWriter

We have two message typos, fix them up.

Change-Id: I7cb6ed993a7682c261b66f357c88bde0e67b810b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFixup yang-data-impl dependencies 79/96379/1
Robert Varga [Thu, 27 May 2021 11:59:09 +0000 (13:59 +0200)]
Fixup yang-data-impl dependencies

Fix warnings around used/declared dependencies.

Change-Id: I3a7b89beb51b2414916a137a13f6f0255e9cf25a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd schema-aware builders 78/96378/3
Robert Varga [Thu, 27 May 2021 09:40:23 +0000 (11:40 +0200)]
Add schema-aware builders

The removal of schema-aware builders was a bit premature, as RESTCONF
uses them quite extensively and is not ready to migrate. Resurrect them
and make sure we have them better organized.

JIRA: YANGTOOLS-1249
Change-Id: I900e7905c9451b71fcce2a495aa771a96f760c40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd support for parsing JSON/XML notifications 43/96343/1
Robert Varga [Mon, 24 May 2021 19:05:55 +0000 (21:05 +0200)]
Add support for parsing JSON/XML notifications

This is functionality which we are working around in NETCONF, but we
support RPCs/Actions natively. Bring things on par by creating the
appropriate proxy and fitting it to both JSON and XML parser streams.

JIRA: YANGTOOLS-1289
Change-Id: I2c99b9c079da732d0684a083a8284504fdb66c35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRestore special-case handling of NotificationDefinition 34/96334/1
Robert Varga [Mon, 24 May 2021 10:59:39 +0000 (12:59 +0200)]
Restore special-case handling of NotificationDefinition

We have historically had a weird special case for parsing notifications,
where we would expect the stack to be initialized to point to the
notification and then to enter it as an alternative to normal data tree.

This functionality is used in NETCONF, restore it back in a slightly
better format than before. Also drop a FIXME so we expose the
functionality in a more structure way in the future.

JIRA: YANGTOOLS-1288
Change-Id: I9237cf558525e4028626cfe7f67d76bbabebab4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse odlparent-9.0.2 33/96333/1
Robert Varga [Mon, 24 May 2021 09:42:28 +0000 (11:42 +0200)]
Use odlparent-9.0.2

Pick up latest upgrades and fixes from upstream.

Change-Id: Id61344ae65e222c488dacd7d61fa610b17f5d1eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 7.0.2-SNAPSHOT 85/96085/1
Robert Varga [Sun, 9 May 2021 04:47:00 +0000 (06:47 +0200)]
Bump versions to 7.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie715edcbfb0d27dd80553c24f12072bfce8f1c0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 9.0.1 83/96083/1
Robert Varga [Sat, 8 May 2021 17:00:10 +0000 (19:00 +0200)]
Bump odlparent to 9.0.1

odlparent-9.0.1 contains a few upgrades and fixes, adopt it.

Change-Id: I258e54a23b938aba619fd95587f0f09f06b8dfb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCorrect yang-maven-plugin-spi dependencies 22/96022/1
Robert Varga [Fri, 7 May 2021 13:54:49 +0000 (15:54 +0200)]
Correct yang-maven-plugin-spi dependencies

Guava was missing, leading to a warning. Fix that.

Change-Id: I9b835f8f68721023e79d518bdfcfebb225be1e41
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-data-codec-binfmt to an explict module 19/96019/1
Robert Varga [Fri, 7 May 2021 11:07:59 +0000 (13:07 +0200)]
Convert yang-data-codec-binfmt to an explict module

This is a simple component and conversion is straightforward. Switch
from being an automatic module to being an explicit module.

JIRA: YANGTOOLS-1287
Change-Id: I131b3104c4d65632057f8367e5681fef358c9928
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-data-transform into an explicit module 18/96018/1
Robert Varga [Fri, 7 May 2021 10:51:52 +0000 (12:51 +0200)]
Convert yang-data-transform into an explicit module

We do not rely on anything complex, just perform the straightforward
transformation, adjusting dependencies in the process.

JIRA: YANGTOOLS-1286
Change-Id: I3e385958268937a11f04a693a9a145caba3422d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix SchemaInferenceStack.exitToDataTree() 78/95978/3
Robert Varga [Sun, 2 May 2021 14:21:32 +0000 (16:21 +0200)]
Fix SchemaInferenceStack.exitToDataTree()

When we are exiting along data tree axis we need to make sure we skip
any choice/case node hierarchy, so that we arrive at the correct data
tree parent -- even if we arrived via the schema tree.

JIRA: YANGTOOLS-1283
Change-Id: I9d84f59447971fcdfb0cc187e5d2c4a35579bfa6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SchemaInferenceStack.enterTypedef() 67/95967/4
Robert Varga [Fri, 30 Apr 2021 17:42:22 +0000 (19:42 +0200)]
Add SchemaInferenceStack.enterTypedef()

This method got left out, unfortunately, leading to an inability to
resolve leafrefs inside typedefs where a default namespace is needed.

JIRA: YANGTOOLS-1282
Change-Id: Ia89fce3f7edffa6e68b268d08a0ca5e3c3800d17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTurn yang-model-export into a JPMS module 46/95946/2
Robert Varga [Tue, 27 Apr 2021 09:13:32 +0000 (11:13 +0200)]
Turn yang-model-export into a JPMS module

This is a simple component, add a module-info and clean up dependencies.

JIRA: YANGTOOLS-1281
Change-Id: Ief7bd386198cef51b64a7a7ca11398f2e3c88ba2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix a versioning typo 47/95947/1
Robert Varga [Tue, 27 Apr 2021 09:19:38 +0000 (11:19 +0200)]
Fix a versioning typo

Previous patch has introduced SHAPSHOT not, SNAPSHOT, fix that.

Change-Id: I6e9de230b0b21f61110bf1f51266c03ddbecfab4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a simple unit test for declaration references 19/95919/5
Robert Varga [Sun, 25 Apr 2021 19:43:57 +0000 (21:43 +0200)]
Add a simple unit test for declaration references

We do not have an explicit test for retaining references, add it.

JIRA: YANGTOOLS-1193
Change-Id: Iba0c656e458db53fbf8a74185addf2be1e2c7f65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 7.0.1-SNAPSHOT 18/95918/2
Robert Varga [Sun, 25 Apr 2021 19:33:47 +0000 (21:33 +0200)]
Bump versions to 7.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I1f9b2561886e44d8ddb10e6ac7953893b76cf645
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPopulate codec/ directory 17/95917/2
Robert Varga [Sun, 25 Apr 2021 18:25:43 +0000 (20:25 +0200)]
Populate codec/ directory

Move yang-data-codec-* artifacts to a dedicated top-level directory,
making navigation slightly easier.

JIRA: YANGTOOLS-1149
Change-Id: I3275f23059319e334ef6bbee388ecfeead4b334f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove yang-common(-netty) 16/95916/1
Robert Varga [Sun, 25 Apr 2021 18:17:57 +0000 (20:17 +0200)]
Move yang-common(-netty)

These are common infrastructure, move it out of the legacy yang/
directory.

JIRA: YANGTOOLS-1149
Change-Id: Id12c7e999de1e076108bc6f8d20295cf9b331ec5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove data extensions to data/ 15/95915/1
Robert Varga [Sun, 25 Apr 2021 15:15:39 +0000 (17:15 +0200)]
Move data extensions to data/

A few artifacts were left out during initial population, move tehm now.

JIRA: YANGTOOLS-1145
Change-Id: Ia6c0455f33b5e841985d7fb078eec9e1aa8ac5c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPopulate parser/ hierarchy 13/95913/5
Robert Varga [Sun, 25 Apr 2021 10:40:21 +0000 (12:40 +0200)]
Populate parser/ hierarchy

YANG parser has a large number of artifacts, as it is highly modular.
Move them to a dedicated top-level directory.

JIRA: YANGTOOLS-1149
Change-Id: Ic8d236ec64ec044f85c52fc81ab004e6fb5fd84b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPopulate xpath/ hierarchy 12/95912/3
Robert Varga [Sun, 25 Apr 2021 10:34:16 +0000 (12:34 +0200)]
Populate xpath/ hierarchy

Move yang-xpath-* artifacts own xpath/ top-level directory. This will
make it easier to navigate and more approachable.

JIRA: YANGTOOLS-1149
Change-Id: Ifef9804237a48ed8f8ea548dc52c9f13aa975f13
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPopulate model/ hierarchy 10/95910/4
Robert Varga [Sun, 25 Apr 2021 09:05:58 +0000 (11:05 +0200)]
Populate model/ hierarchy

Move yang-model-api and all the other *model-* artifacts own model/
top-level directory. This will make it easier to navigate and more
approachable.

JIRA: YANGTOOLS-1149
Change-Id: I259419798f07ebf9fdd94f808d38867956132c09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPopulate data/ hierarchy 09/95909/2
Robert Varga [Sun, 25 Apr 2021 08:44:10 +0000 (10:44 +0200)]
Populate data/ hierarchy

Move yang-data-{api,impl,transform,util} to their own data/ top-level
directory. This will make it easier to navigate and more approachable.
Also update README.md a bit.

JIRA: YANGTOOLS-1149
Change-Id: I907576ba0f505aa9a2db12db4811ed7b753cb5f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not pretty-print body class 08/95908/1
Robert Varga [Sun, 25 Apr 2021 08:38:48 +0000 (10:38 +0200)]
Do not pretty-print body class

If ForeignData.body() can be pretty-printed we can side-step printing
out the object model type, as it should be apparent from the internal
representation.

JIRA: YANGTOOLS-1203
Change-Id: Ib5c0752c565bda47af4dd397efcca28969acce09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove NormalizedNode formatting capabilities 59/95459/30
Konstantin.Nosach [Fri, 12 Feb 2021 12:31:57 +0000 (14:31 +0200)]
Improve NormalizedNode formatting capabilities

Add NormalizedNode.prettyTree(), which acts as a conduit to a
human-readable String representing the tree. The tree is hidden behind a
toString()/Supplier<String>, so it is usable with logging.

Since this is a generally-useful concept, which can span different kinds
of structures, capture it as PrettyTree/PrettyTreeAware as well.

JIRA: YANGTOOLS-1203
Change-Id: I6f2c98bc3048a086063846699ec73e0f2ac02b33
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoOptimize QName.toString() a bit 07/95907/2
Robert Varga [Sat, 24 Apr 2021 10:01:24 +0000 (12:01 +0200)]
Optimize QName.toString() a bit

Append simple characters, not strings.

Change-Id: I6812f05c3cb3749f3ce9ed72f14238be5b55fe21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd NormalizedNode.contract() 01/95901/4
Robert Varga [Fri, 23 Apr 2021 13:18:29 +0000 (15:18 +0200)]
Add NormalizedNode.contract()

NormalizedNode hierarchy is defined in terms of interfaces with a
multitude of possible implementations. Attempting to dispatch among them
without sealed classes is an exercise in futility, but we can actually
mark the top-level contracts as needed.

This makes it very clear which interfaces can be reasonably implemented
and allows a proper dispatch on classes. Furthermore it improves safety
by explicitly not allowing mixes which would otherwise be possible.

JIRA: YANGTOOLS-1203
Change-Id: I177f158423807b83d83f375c69c6985880eaed91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove an unneeded warning suppression 00/95900/1
Robert Varga [Fri, 23 Apr 2021 13:17:01 +0000 (15:17 +0200)]
Remove an unneeded warning suppression

Eclipse is point this out, fix a warning about a warning.

Change-Id: Ibce86752af6459ff1c5a04c2fd2a99c5f1011a04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate dependenciy declarations 43/95743/10
Robert Varga [Sun, 11 Apr 2021 10:27:18 +0000 (12:27 +0200)]
Update dependenciy declarations

Dependency checking is finding a large number of consistency problems,
fix some of them up.

Change-Id: I99e1deabb0c324dd07767fed9ef8181a52aa8793
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCentralize substatement validators 99/95899/2
Robert Varga [Fri, 23 Apr 2021 07:29:09 +0000 (09:29 +0200)]
Centralize substatement validators

Most statement supports have a constant validator and we end up
duplicating things. Furthermore we are ending up with megamorphic
dispatch which could easily be squashed into a simple field read.

AbstractStatementSupport now requires an explicit SubstatementValidator,
which it stores in a field, thus reducing the number of
StatementSupport.substatementValidator() instances.

Change-Id: I4d7f6247403ee64b65ddcd81ac91a5e8eef20539
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAll StatementSupports must support DeclarationReference 85/95885/5
Robert Varga [Thu, 22 Apr 2021 11:51:42 +0000 (13:51 +0200)]
All StatementSupports must support DeclarationReference

Make sure we force all StatementSupport classes to implement
attachDeclarationReference(), without a default no-op implementation.
Also fix all implementation to comply with this requirement.

JIRA: YANGTOOLS-1193
Change-Id: I06d1de989dc967d27477dbf49111f792706a4799
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoStmtContext should not care about semantic versions 86/95886/5
Robert Varga [Thu, 22 Apr 2021 15:04:04 +0000 (17:04 +0200)]
StmtContext should not care about semantic versions

Semantic version imports are part of configuration, not an explicit
build mode. Move them out, so that participating supports just pick them
up from configuration -- and hence we do not need to wire them through
StmtContext.

Change-Id: I020f50964484a72103123de57854924b1d3760f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTransform QName value in identity leaf 88/95888/2
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>
3 years agoRefineEffectiveStatement is not a SchemaNode 93/95893/1
Robert Varga [Thu, 22 Apr 2021 23:36:18 +0000 (01:36 +0200)]
RefineEffectiveStatement is not a SchemaNode

Refines are taking immediate effect and do not exist directly in
SchemaNode view of the world. Do not implement SchemaNode, which makes
things a tad easier.

JIRA: YANGTOOLS-1279
Change-Id: If8b30e6bbf87ed0de79d07e620f694de552460ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove UnrecognizedStatement implementations 92/95892/1
Robert Varga [Thu, 22 Apr 2021 23:29:22 +0000 (01:29 +0200)]
Move UnrecognizedStatement implementations

These are very simple, move them to yang-model-ri.

Change-Id: I4be5ad177c6595754ef8cf7c1843791e046235af
JIRA: YANGTOOLS-1241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate yang-parser-api 90/95890/7
Robert Varga [Thu, 22 Apr 2021 19:43:26 +0000 (21:43 +0200)]
Update yang-parser-api

Current API is hosted in yang.model.parser.api package, which is a
mouthful, with 'model' being the redundant component, really.

Introduce a new set of APIs in yang.parser.api package, improving
documentation as well as clarifying a few concepts. Since
YangParserConfiguration is a new concept, we move it directly to its new
home.

JIRA: YANGTOOLS-1274
Change-Id: I2149c9d88a7724059b4cc5c56fbc6c192164c99a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRetain DeclarationReference in DeclaredStatements 88/94088/7
Anton Tregubov [Mon, 7 Dec 2020 08:35:10 +0000 (11:35 +0300)]
Retain DeclarationReference in DeclaredStatements

Previous patches have introduced a way for a DeclaredStatement
implementation to expose location where the declaration has been
observed, as well as the prerequisite wiring in
yang-parser-{api,spi,impl,reactor}.

The only remaining bit is for the implementations to opt-in into the
infrastructure provided -- and that is done in this patch for all base
YANG statements.

JIRA: YANGTOOLS-1193
Change-Id: I598406a8e5698fc68410e9c4b6f0ae63846f8cc2
Signed-off-by: Anton Tregubov <tregubov@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTeach YANG parser to retain DeclarationReference 76/95876/12
Robert Varga [Wed, 21 Apr 2021 13:49:56 +0000 (15:49 +0200)]
Teach YANG parser to retain DeclarationReference

DeclaredStatement is exposing DeclarationReference as optional
additional information. yang-parser-reactor has knowledge of this
information during its execution to aid diagnosing model errors, so we
just need a mechanism for to bridge this information to statement
implementations.

Add the end-to-end glue code for yang-parser-{api,rfc7950} users
to request this information be retained and that intent to be
communicated to individual StatementFactories. Each StatementFactory
needs to opt-in by providing the appropriate decorator via the substrate
provided in yang-model-spi's AbstractRefStatement.

This necessitates completely abandoning the idea that a StatementSupport
is completely stateless -- that has not been true ever since we
introduced support for semantic version imports.

JIRA: YANGTOOLS-1193
Change-Id: I6a10feb682bb720349e927ea171593e663278eea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove SourceIdentifier documentation 83/95883/2
Robert Varga [Thu, 22 Apr 2021 11:12:33 +0000 (13:12 +0200)]
Improve SourceIdentifier documentation

Use proper anchors to point to RFC documents.

Change-Id: Idb113471759f466ff8353941ed22879c37503214
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused constructor 81/95881/1
Robert Varga [Wed, 21 Apr 2021 17:42:38 +0000 (19:42 +0200)]
Remove unused constructor

We have a single constructor which is not being used anywhere, remove it
to reduce confusion.

Change-Id: Ib3a6d6f7760243b1ba890ca45b49a22e6daf22d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd missing final statements 80/95880/1
Robert Varga [Wed, 21 Apr 2021 17:41:08 +0000 (19:41 +0200)]
Add missing final statements

AbstractResumentStatement behaviour should not be changed, make sure we
express that design intent.

Change-Id: Id75bfbdb1698094acf4632f8cfb13607c5ddf992
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup whitespace in RootStatementContext 79/95879/1
Robert Varga [Wed, 21 Apr 2021 17:40:01 +0000 (19:40 +0200)]
Cleanup whitespace in RootStatementContext

We have arguments at wrong offset, fix that.

Change-Id: I73bcfc87a69e6bd57af076e2c0003d1911225d88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd YangParserConfiguration 75/95875/2
Robert Varga [Wed, 21 Apr 2021 10:45:08 +0000 (12:45 +0200)]
Add YangParserConfiguration

We are heading towards more flexible parser, where some features can be
enabled or disabled. To support that world we need some sort of a
configuration object. This patch introduces such a concept.

JIRA: YANGTOOLS-1193
Change-Id: I7763df6615348d87044646fef46ff0dfda744436
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove OSGiYangParserFactory 74/95874/1
Robert Varga [Wed, 21 Apr 2021 10:14:18 +0000 (12:14 +0200)]
Remove OSGiYangParserFactory

We have OSGi R7, use constructor injection and unify injection classes.

Change-Id: I4c045b7bf8bedf2bfde42af2dd071d40ecf6130b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd the ability to retain DeclarationReference 60/95160/19
Robert Varga [Sat, 13 Feb 2021 15:12:19 +0000 (16:12 +0100)]
Add the ability to retain DeclarationReference

There are use cases where we would like to retain information about
where a statement was originally declared -- for example for use in
IDEs.

We already have a parser-internal representation of most of this
information in the form of StatementSourceReference, but that is not
retained in DeclaredStatements nor is it a public API.

Introduce DeclarationReference and its two specializations,
DeclarationInText and DeclarationInFile. These can be acquired via
DeclaredStatement.declarationReference().

Also provide integration between DeclarationReference and
StatementSourceReference, which will allow yang-parser-reactor to turn a
source reference into a declaration reference.

Finally add the basic substrate needed for forwarding decorators
that attach DeclarationReference to a delegate.

JIRA: YANGTOOLS-1193
Change-Id: I4e4d9567c83c08aab9de2a2685470835fadcd0d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRequire symbolic name in {IR,YinDom}SchemaSource 59/95859/5
Robert Varga [Tue, 20 Apr 2021 21:40:40 +0000 (23:40 +0200)]
Require symbolic name in {IR,YinDom}SchemaSource

Constructors which do not take a symbolic name are making it easy to
forget to come up with a strategy. While a symbolic name is not
required, require callers to be explicit about what they want to use.

JIRA: YANGTOOLS-1275
Change-Id: Ib3c253c3d380968bf54a4590551aec61df61bac9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRequire SchemaSourceRepresentation.getSymbolicName() 58/95858/6
Robert Varga [Tue, 20 Apr 2021 21:31:26 +0000 (23:31 +0200)]
Require SchemaSourceRepresentation.getSymbolicName()

getSymbolicName() has been retrofitted into the API long time ago, but
due to its default nature a number of of implementations failed to
provide an override.

Make sure the method is required to be implemented, so that
implementators are well aware of it.

JIRA: YANGTOOLS-1275
Change-Id: Ib98189c606312db80480302959ef563342f5b3ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not subclass YangTextSchemaSource in yang-parser-impl 69/95869/1
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>
3 years agoDo not subclass YangTextSchemaSource in yang-repo-fs 68/95868/1
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>
3 years agoForward symbolic source in YinDomSchemaSource 57/95857/3
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>
3 years agoExpose symbolic name in YangTextSchemaContextResolver 56/95856/2
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>
3 years agoPropagate symbolic name through transformations 55/95855/2
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>
3 years agoRemove NormalizedNode.getNodeType() 11/95411/13
Robert Varga [Thu, 4 Mar 2021 14:50:32 +0000 (15:50 +0100)]
Remove NormalizedNode.getNodeType()

This method is a shortcut through getIdentifier().getNodeType(),
except it does not work in all circumstances. Remove it and let
users deal with augmentation specifics.

JIRA: YANGTOOLS-1074
Change-Id: If112167e2d98c59d92d6e071c510c8e3db97ca0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoOptimize SchemaOrderedNormalizedNodeWriter a bit 49/95849/3
Robert Varga [Tue, 20 Apr 2021 12:45:27 +0000 (14:45 +0200)]
Optimize SchemaOrderedNormalizedNodeWriter a bit

We have a wee bit of duplicate code here, which can be improved
and made static.

Change-Id: I357b4909f7c9b3997b4a38e9d38f01d41a94a217
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove schema-aware builders 46/95846/2
Robert Varga [Tue, 20 Apr 2021 01:17:12 +0000 (03:17 +0200)]
Remove schema-aware builders

Schema-aware builders are woefully incomplete and actually have weird
operations. Remove them to reduce confusion, as we will be replacing
them with a better alternative (at some point in future).

JIRA: YANGTOOLS-1249
Change-Id: I706a73c02d2493e486aeec0ce28cee118806fe49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove ImmutableAugmentationNodeBuilder defensiveness 45/95845/1
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>
3 years agoImprove resolveAugmentations() casts 44/95844/1
Robert Varga [Mon, 19 Apr 2021 19:34:45 +0000 (21:34 +0200)]
Improve resolveAugmentations() casts

Rather than performing weird casts without co-located checks, make sure
resolveAugmentations() takes an AugmentationNode, which makes it clear
that callers are always checking before dispatch.

Change-Id: I30aa7081d2097c4b2e257545798a2a3ba9c8281c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove ImmutableMapEntryNodeBuilder identifier handling 43/95843/1
Robert Varga [Mon, 19 Apr 2021 19:12:42 +0000 (21:12 +0200)]
Improve ImmutableMapEntryNodeBuilder identifier handling

We have duplicate decisions going on here, simplify them bye combining
the check-and-put operation.

Change-Id: Ib5dd56e49e3ac8248ddbded22ba0b71d227dc067
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up NormalizedNodeSchemaUtils.detectCase() 42/95842/1
Robert Varga [Mon, 19 Apr 2021 18:58:31 +0000 (20:58 +0200)]
Speed up NormalizedNodeSchemaUtils.detectCase()

We are dealing with two distinct cases here to side-step
AugmentationNode mechanics. Lift the check out of the loop, which allows
us to neatly expose a method to which callers can bind at compile time.

Change-Id: Id0a80b8e77a27905c8bf5753cfdfc3e97db84f38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename OrderedNodeContainer.getChild(int) 39/95839/2
Robert Varga [Mon, 19 Apr 2021 18:24:31 +0000 (20:24 +0200)]
Rename OrderedNodeContainer.getChild(int)

childAt(int) is a better name for this method, as it does not conflict
with other possible uses. Also move the FIXME related to body() type
override to the top of the class and make sure it does not contain
commented-out code.

JIRA: YANGTOOLS-1022
Change-Id: I583ede8fdd7e91748775475470b09c94b54d8cfe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPush out NormalizedNode fixmes 40/95840/2
Robert Varga [Mon, 19 Apr 2021 18:33:24 +0000 (20:33 +0200)]
Push out NormalizedNode fixmes

We do not have the runway to deal with the modeling changes required
here. Push them out to the next major release.

Change-Id: I9ed9ef3aaf2280089b90f1092836ae93e32e7a7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix a package typo 38/95838/1
Robert Varga [Mon, 19 Apr 2021 17:24:21 +0000 (19:24 +0200)]
Fix a package typo

We have a simple typo in the name of the utility package. Fix it.

Change-Id: I2ac41870851e0bb495e1d47ef4489ba7092f7dc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ReactorStmtCtx.checkLocalNamespaceAllowed() 37/95837/1
Robert Varga [Mon, 19 Apr 2021 17:21:26 +0000 (19:21 +0200)]
Remove ReactorStmtCtx.checkLocalNamespaceAllowed()

This method is a rather expensive route towards a noop method in
StatementDefinitionContext. Since there is no routing, just hide the
method and note how it used to be routed and mark it for potential
removal in the next iteration.

Change-Id: I54492cd780c608e3a2c9f2ab0ff3f2d25219fa2b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPush out ItemOrder FIXME 36/95836/1
Robert Varga [Mon, 19 Apr 2021 17:14:48 +0000 (19:14 +0200)]
Push out ItemOrder FIXME

We did not have enough time to evaluate ItemOrder contract, push the
FIXME out.

Change-Id: I4f2533f19cb077d741a64c67577a349dcda2e5a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup unrecognized statement wrapping 35/95835/1
Robert Varga [Mon, 19 Apr 2021 17:03:19 +0000 (19:03 +0200)]
Cleanup unrecognized statement wrapping

reactor/rfc7950 interaction around inner statements is a bit hacky
in that we end up performing two unrelated semantic checks before
dispatching.

As it turns out, though, this only a special case of a more widely
applicable pattern, where the parent statement chooses to wrap its
children in a different semantic support.

Separating this out makes the intent clear, as it ends up being an
extension trait to StatementSupport on the side of yang-parser-reactor
and has a well-understood anchor in UnrecognizedStatementSupport.

Change-Id: I3b64f58239e22affccc02921efd8cd70b411d7c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove StmtContextUtils.isUnrecognizedStatement() 34/95834/1
Robert Varga [Mon, 19 Apr 2021 16:13:46 +0000 (18:13 +0200)]
Remove StmtContextUtils.isUnrecognizedStatement()

This utility method is only used in reactor itself, rehost it to its
single caller.

Change-Id: I6b40e0fcd936cc230b1a9586d4f20c2ac47205ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename StatementSource to StatementOrigin 33/95833/3
Robert Varga [Mon, 19 Apr 2021 14:45:36 +0000 (16:45 +0200)]
Rename StatementSource to StatementOrigin

'origin' is a less loaded word in that it does not have connotations
to 'source text' and similar.

JIRA: YANGTOOLS-1193
Change-Id: I07c611878f978e2ce30e1c3ad9422cb61744e6f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename yangtools.concepts.Variant to Either 27/95827/3
Robert Varga [Mon, 19 Apr 2021 10:00:18 +0000 (12:00 +0200)]
Rename yangtools.concepts.Variant to Either

'either' is more well-known than our custom naming Variant. Let's
adjust the baseline naming without affecting the other parts of the API.

JIRA: YANGTOOLS-1142
Change-Id: I08005cefb4a2f9d128bd5a3a5718050d5d314182
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove NormalizedNode builders 28/95828/2
Robert Varga [Mon, 19 Apr 2021 11:09:14 +0000 (13:09 +0200)]
Move NormalizedNode builders

Builders have two API surfaces:
- acquisition of particular builders, which is implementation-specific
- actual Builder API shape, which is implementation-agnostic

Move the latter in yang-data-api, reducting overall dependencies on
yang-data-impl.

JIRA: YANGTOOLS-1273
Change-Id: I00dcffb0310afa1d5b0cbabba9983af4f6835f31
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor IdentifierNamespace 05/95805/1
Robert Varga [Mon, 19 Apr 2021 08:12:07 +0000 (10:12 +0200)]
Refactor IdentifierNamespace

IdentifierNamespace.get() is not used anywhere, hence remove this
method. Furthermore this class is only used for specifying a key, hence
make sure it is an abstract class without the possibility of
instantiating.

JIRA: YANGTOOLS-1205
Change-Id: I56f22af2d4bb21caab5dd47da6dfa1b1753777cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove SchemaUtils to yang-data-util 03/95803/1
Robert Varga [Mon, 19 Apr 2021 07:40:26 +0000 (09:40 +0200)]
Move SchemaUtils to yang-data-util

yang-data-impl placement here is quite hurtful, as we have a few
downstream users. Move the class to yang-data-util, where it is more
accessible and mark it as @Beta for further evolution.

JIRA: YANGTOOLS-1248
Change-Id: If2eeeeb5b2313c3656fe348a3ce99fcf770d0f37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not allow nulls in NodeWithValue 42/84342/8
Robert Varga [Thu, 12 Sep 2019 15:11:39 +0000 (17:11 +0200)]
Do not allow nulls in NodeWithValue

We do not allow leaves to have a null value, hence the same
restriction should apply to NodeWithValue.

Change-Id: I4df0caf67baacf12d8b81b70dd447dff7e05a992
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 9.0.0 66/95666/7
Robert Varga [Sat, 3 Apr 2021 18:43:19 +0000 (20:43 +0200)]
Bump odlparent to 9.0.0

Adopt latest released odlparent.

Change-Id: If2e078cb4eaefe3192e79fc4be43b368411b516c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDitch Guava from ModuleDependencySortTest 58/95758/1
Robert Varga [Tue, 13 Apr 2021 09:24:18 +0000 (11:24 +0200)]
Ditch Guava from ModuleDependencySortTest

List.of()/Set.of() are adequate replacements for what we are doing here,
use them instead of Immutable{List,Set}.

Change-Id: Iebf600a8a36c0501c834f2a62d12e9b5588efbc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMore dependency updates 42/95742/2
Robert Varga [Sat, 10 Apr 2021 11:29:27 +0000 (13:29 +0200)]
More dependency updates

Dependency checking is pointing out a number of violations, this patch
fixes a few more components. Most notably odlext-parser-support needs
yang-parser-rfc7950 only with scope=test.

Change-Id: I0b8e1b6be2471e1beb625e81e8b10f2c35dff1d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup dependency declarations 41/95741/1
Robert Varga [Sat, 10 Apr 2021 10:38:28 +0000 (12:38 +0200)]
Cleanup dependency declarations

odlparent-9 is giving us the ability to enforce dependency declarations,
this fixes some of the more obvious violations reported.

Change-Id: If2ae4b84c03256ea757a0bbb2e59c036a5b043e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove AnyxmlSchemaLocationStatement 35/95735/3
Robert Varga [Fri, 9 Apr 2021 20:19:44 +0000 (22:19 +0200)]
Remove AnyxmlSchemaLocationStatement

This statement was never fully exposed to downstreams, as the
corresponding yang-ext model (in mdsal.git) was never updated with the
extension. Remove support for this extension.

JIRA: YANGTOOLS-1268
Change-Id: Ib0f493ca3f948aa9be97191df1b6a2d2146909a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCorrect Context{Instance,Reference} statements 34/95734/1
Robert Varga [Fri, 9 Apr 2021 13:20:19 +0000 (15:20 +0200)]
Correct Context{Instance,Reference} statements

context-instance and context-reference statements' argument is actually
a 'identifier-ref-arg-str' which points to a  much like the argument of
'base' in case of 'type identityref'.

Correct the argument definition and improve the definition of effective
statements to expose the referenced identity.

JIRA: YANGTOOLS-1196
Change-Id: I736df614f9d4c26e910ce78f8d6478a6735f3730
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SchemaInferenceStack.enterSchemaTree(SchemaNodeIdentifier) 50/95550/1
Robert Varga [Wed, 24 Mar 2021 08:51:29 +0000 (09:51 +0100)]
Add SchemaInferenceStack.enterSchemaTree(SchemaNodeIdentifier)

SchemaNodeIdentifier is a well-known concept which we are integrating
with in multiple aspects. One key component is the ability to resolve
a SchemaNodeIdentifier in the context of an existing stack. While users
can do this easily themselves, it is more natural to provide this
ability out of the box.

JIRA: YANGTOOLS-1231
Change-Id: I9818f175d09fd4e6e4f610127929ee8553c3116e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCorrect AugmentIdentifier argument 40/95540/1
Robert Varga [Tue, 23 Mar 2021 10:06:56 +0000 (11:06 +0100)]
Correct AugmentIdentifier argument

augment-identifier extension requires argument matching node-identifier,
which is not a generic String, but rather UnqualifiedQName. Fix that.

JIRA: YANGTOOLS-1196
Change-Id: Ifee79fc8f9749d207ad19469493ad42b1a1c167f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate documentation. 07/95407/8
Iaroslav [Wed, 3 Mar 2021 13:33:59 +0000 (15:33 +0200)]
Update documentation.

Update development guide examples and text according to current code.

JIRA: YANGTOOLS-1263
Change-Id: Ic56431b10d0a734b607c15bf54784ee58b17c7e1
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
3 years agoMove AbstractEffectiveDocumentedNodeWithStatus to yang-model-spi 25/95525/1
Robert Varga [Thu, 18 Mar 2021 12:22:45 +0000 (13:22 +0100)]
Move AbstractEffectiveDocumentedNodeWithStatus to yang-model-spi

While the usage of this class is declining rapidly, it is independent
of yang-parser-spi constructs and hence can easily be hosted
in yang-model-spi instead. Move it.

JIRA: YANGTOOLS-1225
Change-Id: Ieca37d642d9fe77a187e2afc39538f0dfd0f957e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove XPathSupport 24/95524/1
Robert Varga [Thu, 18 Mar 2021 12:11:28 +0000 (13:11 +0100)]
Move XPathSupport

This is a simple utility class for remapping exceptions to parser
semantics. Rehost it into an unexported package, hiding it from users.

JIRA: YANGTOOLS-1241
Change-Id: Idf6a8e0b4160fa8845684468b0cea0b3116926f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoHide BaseImplicitStatementSupport 23/95523/1
Robert Varga [Thu, 18 Mar 2021 12:01:44 +0000 (13:01 +0100)]
Hide BaseImplicitStatementSupport

This class, along with BaseOperationContainerStatementSupport is
an internal implementation detail. Since we have moved all their
users into a single package, move them as well, hiding them in
process.

Change-Id: I6fc3a38373bb5dbe9e812db6809aa9627afae836
JIRA: YANGTOOLS-1241
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove KeyEffectiveStatement implementations 22/95522/1
Robert Varga [Thu, 18 Mar 2021 11:54:10 +0000 (12:54 +0100)]
Move KeyEffectiveStatement implementations

We have 4 different implementations, but there is no reason why
they'd need to reside in yang-parser-rfc7950. Move them to
yang-model-ri.

JIRA: YANGTOOLS-1241
Change-Id: Ibf0ac700bfb525fe4eefe28e6555cbf14a7551aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove EffectiveStatementState 19/95519/2
Robert Varga [Thu, 18 Mar 2021 08:18:01 +0000 (09:18 +0100)]
Remove EffectiveStatementState

This concept is used only by some orphan code, remove it along with
the unused complexity.

Change-Id: I496f67081360a4774d37f46ed8ee24fc99979265
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove EffectiveStatementStateAware 18/95518/1
Robert Varga [Thu, 18 Mar 2021 08:13:11 +0000 (09:13 +0100)]
Remove EffectiveStatementStateAware

This interface is not implemented anywhere, remove it.

Change-Id: I37909b06258ab207de1bc5832b6f62571396765c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd module-info for yang-data-codec-xml 16/95116/5
Robert Varga [Wed, 10 Feb 2021 14:15:45 +0000 (15:15 +0100)]
Add module-info for yang-data-codec-xml

Add a a simple module-info.java, eliminating the need to configure
maven-bundle-plugin.

JIRA: YANGTOOLS-1266
Change-Id: I0da9d85efcbaf909b62022dbbaa06210559cdb7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-common-netty to JPMS 57/95457/1
Robert Varga [Wed, 10 Mar 2021 07:44:06 +0000 (08:44 +0100)]
Convert yang-common-netty to JPMS

This is a very simple component, convert it.

JIRA: YANGTOOLS-1265
Change-Id: Ibf95dbe1d00c9b2d629aa005388f30aa69374093
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate module-info.java 78/95278/12
Robert Varga [Mon, 22 Feb 2021 13:52:15 +0000 (14:52 +0100)]
Update module-info.java

Do not rely on transitive access to packages, spell them out. This makes
the development experience with Eclipse a bit better, as it does not end
up adding random requires.

Also hide a number of private constructs, so we do not need to re-export
imports where not needed.

JIRA: YANGTOOLS-932
Change-Id: I32431065724dee226754bfbd60ca70b839c4f49f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd missing serialVersionUUID 32/95432/1
Robert Varga [Tue, 9 Mar 2021 15:36:50 +0000 (16:36 +0100)]
Add missing serialVersionUUID

XNv1 should have a serial version, fix that.

Change-Id: Ia4cb70089312b57e1864bbfcde66c48ac4670cc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ForwardingEffectiveStatement 31/95431/1
Robert Varga [Tue, 9 Mar 2021 15:27:33 +0000 (16:27 +0100)]
Remove ForwardingEffectiveStatement

This class is not used anywhere, remove it to simplify API.

Change-Id: I9ee0308e7e29bef2be4fbae6e55703f63d0a6d70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove 'must' statement implementations 20/95420/2
Robert Varga [Mon, 8 Mar 2021 08:13:50 +0000 (09:13 +0100)]
Move 'must' statement implementations

These are quite simple, move them out.

JIRA: YANGTOOLS-1241
Change-Id: I831799c52063c3c037eedb14a502eb2f7eeb6f67
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPropagate cause in OperationFailedException 18/95418/2
Robert Varga [Sun, 7 Mar 2021 06:39:03 +0000 (07:39 +0100)]
Propagate cause in OperationFailedException

We are ignoring cause here and squash it to null, fix that.

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