yangtools.git
3 years agoAdd ItemOrder concept 53/93653/1
Robert Varga [Fri, 13 Nov 2020 12:30:50 +0000 (13:30 +0100)]
Add ItemOrder concept

This is a generalized contract for container-like classes, expressing how contained
items contribute to equality contract of the container.

The defined values are ItemOrder.Ordered and ItemOrder.Unordered. For convenience,
these are also exposed as ItemOrder.itemOrder(), reporting the implemented class
of ItemOrder.

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

3 years agoGraduate ChildSchemaNodeNamespace as SchemaTreeNamespace 52/93652/1
Robert Varga [Thu, 5 Nov 2020 16:16:01 +0000 (17:16 +0100)]
Graduate ChildSchemaNodeNamespace as SchemaTreeNamespace

This is a @Beta construct in yang-parser-rfc7950, but it provides
a crucial link between statements and namespaces.

In terms of semantic change, this is a direct replacement for the SPI
idea that there is a SchemaNodeIdentifierNamespace. While that namespace
allowed lookup based on SchemaNodeIdentifier, while
SchemaTreeNamespace follows QName addressing -- i.e. we are changing
the addressing mode and allowing more flexible walks.

This is a strictly speaking API-breaking change, but since it enables
reactor/parser-rfc7950 interactions and is allowed under @Beta API
change rules, we will backport this to otherwise stable branches.

Existence of this namespace allows us to neatly tie it with
OnDemandSchemaTreeStorageNode.

JIRA: YANGTOOLS-1168
Change-Id: I9b1c30d21f7021d4c21f3e5a519f6cd1539871ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6682a8e2a8c02ed7a66bddb8b7a86009ffbbb98d)

3 years agoImport annotations to yang-parser-rfc7950 50/93650/1
Robert Varga [Wed, 11 Nov 2020 20:58:03 +0000 (21:58 +0100)]
Import annotations to yang-parser-rfc7950

Do not rely on upstreams for these, use them explicitly.

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

3 years agoBump versions to 6.0.2-SNAPSHOT 18/93618/1
Robert Varga [Fri, 6 Nov 2020 10:54:05 +0000 (11:54 +0100)]
Bump versions to 6.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I6e2beb8719a845c84d832cff3464d03cefd1c958
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent to 8.0.1 16/93616/2
Robert Varga [Fri, 6 Nov 2020 10:07:26 +0000 (11:07 +0100)]
Bump odlparent to 8.0.1

Pick up latest upgrades, allowing us to ditch a few declarations.

Change-Id: I5ace375fd8d746f13fa7eb83a525203503b3cf33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused SourceSpecificContext methods 09/93609/2
Robert Varga [Thu, 5 Nov 2020 16:42:29 +0000 (17:42 +0100)]
Remove unused SourceSpecificContext methods

These package-private methods are not used, remove them.

Change-Id: I245f4c7d874d5cd3c716f9685fc9f5a4c54679c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix PhaseModificationInNamespacePath effects 90/93590/5
Robert Varga [Thu, 5 Nov 2020 11:53:04 +0000 (12:53 +0100)]
Fix PhaseModificationInNamespacePath effects

PhaseModificationInNamespacePath is a set of requirements, working
along the parent->child axis. As we are resolving individual steps
we have to mark each as being impacted by this mutation, not only
the ultimate target.

This ensures that parent statements are not allowed to complete
until the mutation is resolved one way or another -- thus ensuring
proper parent/child phase completion transitions.

JIRA: YANGTOOLS-1160
Change-Id: I87cd682d32cb9ce3397883f2ac1a61a0bc9c8664
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor StatementContextBase.effective access 87/93587/1
Robert Varga [Wed, 4 Nov 2020 18:48:09 +0000 (19:48 +0100)]
Refactor StatementContextBase.effective access

In order to correctly synchronize substatement and stage completion
view, we need all accesses from StatementContextBase towards its
.effective field guarded.

This patch audits all callers and instantiates an
ensureEffectiveSubstatements() guard around all accesses.

We also introduce effectiveChildrenToComplete(), which communicates
the effective children which should be processed.

InferredStatementContext returns as empty list from this method
if it is not materialized. This acts as an explicit guard, which
is extensible with local state later.

JIRA: YANGTOOLS-784
Change-Id: I235bc15d315ddee71c20f3875412d8d05803a716
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix mis-ordered requires 80/93580/1
Robert Varga [Wed, 4 Nov 2020 10:31:55 +0000 (11:31 +0100)]
Fix mis-ordered requires

This edit passed through review, fix it up.

Change-Id: I2298ecd1fba3c1cf8b4306589abcc2b087501bb7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix transitive if-feature augments 98/69298/40
Robert Varga [Fri, 9 Mar 2018 00:05:41 +0000 (01:05 +0100)]
Fix transitive if-feature augments

We cannot just ignore augments, as they drive namespace population.
Instead of that, let's populate target nodes, but make sure they
are marked as unsupported.

This allows ChildSchemaNodeNamespace-driven lookups to find the resulting
node, but does not allow it to materialize as an EffectiveStatement.

JIRA: YANGTOOLS-859
Change-Id: Ib817e6e20563005427471098bf6ff2991fb60e01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse StmtContext.findSubstatementArgument() for isConfiguration() 04/93504/10
miroslav.kovac [Fri, 30 Oct 2020 16:29:28 +0000 (17:29 +0100)]
Use StmtContext.findSubstatementArgument() for isConfiguration()

We are only interested in having the appropriate argument, hence
we can use provided utility to not force the StmtContext to be
materialized.

JIRA: YANGTOOLS-1156
Change-Id: Idf292794225792afd8df1019c9106362a94ed5a4
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix StmtContext.findSubstatementArgument()/hasSubstatement() 53/93553/1
Robert Varga [Mon, 2 Nov 2020 15:37:49 +0000 (16:37 +0100)]
Fix StmtContext.findSubstatementArgument()/hasSubstatement()

When we are searching for a substatement we should also mind that
it can have its effective statement built. If we do not, we can end
up picking a statement which has been disabled by deviate.

Change-Id: I27743b5acbb2f617497d329423b239f363c54258
JIRA: YANGTOOLS-1157
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate old interfaces CodeGenerator interfaces 35/52035/56
Robert Varga [Sat, 18 Feb 2017 13:34:02 +0000 (14:34 +0100)]
Deprecate old interfaces CodeGenerator interfaces

BasicCodeGenerator and BuildContextAware should be deprecated, as
we have a generalized FileGenerator replacement for them.

JIRA: YANGTOOLS-1148
Change-Id: I0cd0bcfd2314605188b9bfb2204298e2c7eea7a6
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoCentralize project scanning 48/93548/2
Robert Varga [Mon, 2 Nov 2020 11:29:16 +0000 (12:29 +0100)]
Centralize project scanning

We want to relocate scanning to outside of reactor built, as we do
not want to do it twice.

JIRA: YANGTOOLS-1147
Change-Id: I675b8c1165df608b07dd1abb0930e1028b0165e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd LazyCollections.lazyAdd for Sets 91/93391/3
Illia [Mon, 26 Oct 2020 16:15:39 +0000 (18:15 +0200)]
Add LazyCollections.lazyAdd for Sets

This will be used for GenerateType field, which is set of specified
getters.

JIRA: MDSAL-426
Change-Id: I691aa13c88147828890e0639441f607515053af8
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoUse plugin-generator-api in yang-maven-plugin 36/52036/77
Robert Varga [Mon, 12 Nov 2018 10:54:14 +0000 (11:54 +0100)]
Use plugin-generator-api in yang-maven-plugin

Rework plugin execution so that we can use both old-style and
new-style plugins by introducing GeneratorTask. This is then
specialized for both worlds.

We rework the multi-version support so that we run reactor assemply
twice if needed -- for each requested mode separately.

JIRA: YANGTOOLS-1147
Change-Id: I494ad899fabfb065c91537019698fdb131e0f1f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove check for when being copied 36/93536/1
Robert Varga [Sat, 31 Oct 2020 11:06:21 +0000 (12:06 +0100)]
Remove check for when being copied

We have 'when' explicitly excluded, hence we can never observe
it in validation. Eliminate this dead code.

Change-Id: I4a4fb4c1e2a3d888e02f2db0e49671993e2985ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixup module definitions 31/93531/1
Robert Varga [Sat, 31 Oct 2020 08:57:10 +0000 (09:57 +0100)]
Fixup module definitions

We require org.slf4j for most operations, make sure we record that.

Change-Id: If3f5a6f5eb7c16543cc51874eac24e988653c49c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a requirement on annotations 25/93525/1
Robert Varga [Fri, 30 Oct 2020 20:34:33 +0000 (21:34 +0100)]
Add a requirement on annotations

Do not rely to get these transitively, add a requires static.

Change-Id: Ibf06934bcdf808e1bdc47cdb8097adc9d5650606
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd StmtContext.findFirstSubstatementArgument() 96/93496/11
miroslav.kovac [Fri, 30 Oct 2020 11:36:14 +0000 (12:36 +0100)]
Add StmtContext.findFirstSubstatementArgument()

Introduce utility methods to StmtContext, so that individual
implementations can provide optimized version, which does not
walk all children.

InferredStatementContext used this facility to defer to protype,
side-stepping the need to materialize substatements.

JIRA: YANGTOOLS-1157
Change-Id: I9e618d3a51f68ed03a76c718b657be38e5cedb5d
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDefer substatement initialization in InferredStatementContext 38/92238/14
Robert Varga [Sat, 22 Aug 2020 18:27:23 +0000 (20:27 +0200)]
Defer substatement initialization in InferredStatementContext

InferredStatementContext is initializing its substatements rather
eagerly in its constructor. We now have all the tools we need to
defer this instantiation until the substatements are really needed.

JIRA: YANGTOOLS-784
Change-Id: Iafc23c22b15efdf46fde3adfc210c246e8d086bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClarify NamespaceStorageSupport.getParentNamespaceStorage() 81/93481/2
Robert Varga [Fri, 30 Oct 2020 09:08:51 +0000 (10:08 +0100)]
Clarify NamespaceStorageSupport.getParentNamespaceStorage()

This override does seemingly nothing, but in fact splits invocation
groups to two -- those going to SourceSpecificContext and those
going to a NamespaceStorageSupport subclass. More specifically, if
a caller knows it is talking to NamespaceStorageSupport, JIT does
will not consider SourceSpecificContext an implementation.

Furthermore, SourceSpecificContext, as an implementation class,
guarantees it will return BuildGlobalContext.

Change-Id: Ia285f9d7745a9c114d3dd3214c2b82a651db3ce0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTighten {Inferred,Substatement}Context.getParentNamespaceStorage() 83/93483/2
Robert Varga [Fri, 30 Oct 2020 09:33:02 +0000 (10:33 +0100)]
Tighten {Inferred,Substatement}Context.getParentNamespaceStorage()

These two methods are guaranteed to return StatementContextBase,
express that in their return type.

Change-Id: I586c9f4ac88a42b094ed2061d0f698b6ce312d60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRequire org.slf4j in yang-parser-reactor 82/93482/2
Robert Varga [Fri, 30 Oct 2020 09:16:05 +0000 (10:16 +0100)]
Require org.slf4j in yang-parser-reactor

Do not rely on require transitive, explictly spell out we need
logging.

Change-Id: I97d0841311b8468b48a22201cdee58474545e97e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBuildGlobalContext should be final 80/93480/1
Robert Varga [Fri, 30 Oct 2020 08:58:24 +0000 (09:58 +0100)]
BuildGlobalContext should be final

We do not inherit from this class by design, make sure that bit
is captured for JIT to see.

Change-Id: I198e741d041ea45b685ed39024e17caf57f8bca0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReactor requires org.eclipse.jdt.annotation 77/93477/2
Robert Varga [Fri, 30 Oct 2020 01:26:11 +0000 (02:26 +0100)]
Reactor requires org.eclipse.jdt.annotation

We are using these, let's not rely on them coming in transitively.

Change-Id: I00822ab34d6040905144adc6305e02f85adf40ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse coerceStatemntArgument for YinElementStatement 76/93476/2
Robert Varga [Fri, 30 Oct 2020 01:25:28 +0000 (02:25 +0100)]
Use coerceStatemntArgument for YinElementStatement

yin-element requires an argument, it is fair to coerce it and get
rid of a nullness warning.

Change-Id: I1196d0b099a3ba4f481229c9a9259ee9aee1b5f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoStorageSpecific.storageType is private and final 79/93479/2
Robert Varga [Fri, 30 Oct 2020 08:10:24 +0000 (09:10 +0100)]
StorageSpecific.storageType is private and final

Somehow this field escaped our usual attention, make sure it's
properly final and private.

Change-Id: I9bcace1fbb14432f19f4b9a81b5c71c6b86f6f02
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd requires org.slf4j 74/93474/2
Robert Varga [Thu, 29 Oct 2020 22:58:34 +0000 (23:58 +0100)]
Add requires org.slf4j

We are directly using logging, do not rely on 'requires transitive'.

Change-Id: I7e78465bc3632abfa1622304cfa723e6a9f504cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRecheck fields when cleaning up listeners 70/93470/1
Robert Varga [Thu, 29 Oct 2020 16:51:17 +0000 (17:51 +0100)]
Recheck fields when cleaning up listeners

We may end up in a situation where we trigger multiple times, in
which case we can end up with mutated state and therefore cannot
rely on fields being non-null.

JIRA: YANGTOOLS-1155
Change-Id: I5607843d1e02483faa387a5630f3c4c06a3be62a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCentralize Abstract{Input,Output}StatementSupport.parseArgumentValue() 67/93467/1
Robert Varga [Thu, 29 Oct 2020 13:19:58 +0000 (14:19 +0100)]
Centralize Abstract{Input,Output}StatementSupport.parseArgumentValue()

As we have reduced the number of implementations of this method,
by introducing the default implementation, we are down to three
possible implementations under BaseSchemaTreeStatementSupport.

Add a level of indirection through Function<QNameModule, QName>, which
allows us to combine the two implementations into a single one residing
in BaseOperationContainerStatementSupport.

Change-Id: Ia5232d356ce2141800a950e6222cdc2174cd926b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd BaseSchemaTreeStatementSupport.parseArgumentValue() 66/93466/1
Robert Varga [Thu, 29 Oct 2020 13:13:12 +0000 (14:13 +0100)]
Add BaseSchemaTreeStatementSupport.parseArgumentValue()

Almost all subclasses of BaseSchemaTreeStatementSupport do the same
thing for parseArgumentValue(). Centralize the default behaviour there,
while allowing input/output statements to do their own thing.

JIRA: YANGTOOLS-1154
Change-Id: I7a3daf3a9c90eefadc1cad8043af3a2e7b9065e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove implementation of OnStatementAdded to single class 61/93461/6
miroslav.kovac [Thu, 29 Oct 2020 10:26:47 +0000 (11:26 +0100)]
Move implementation of OnStatementAdded to single class

Create BaseSchemaTreeStatementSupport that implements
onStatementAdded and migrate all the usage from
StatementSupport classes.

JIRA: YANGTOOLS-1154
Change-Id: I3815d69f8621b9559470fea35fa4d427a717acc4
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd OnDemandSchemaTreeStorageNode 63/93463/2
Robert Varga [Thu, 29 Oct 2020 11:55:55 +0000 (12:55 +0100)]
Add OnDemandSchemaTreeStorageNode

In order to correctly implement schema dependencies, we need to
invoke a callback from namespace prerequisites back to
StatementContextBase and its subclasses.

The conduit here is NamespaceBehavior.getFrom(), which is invoked
with a namespace key. For ChildSchemaNodeNamespace this ends up
the QName matching the argument the corresponding
SchemaTreeEffectiveStatement will end up having.

Introduce OnDemandSchemaTreeStorageNode, which acts as an extension
to normal NamespaceStorageNode behavior -- it allows an
implementation to supply a QName-based child statement to be
returned.

Since StatementContextBase is a NamespaceStorageNode, its subclasses
can now additionally implement this interface to receive the
callback.

JIRA: YANGTOOLS-784
Change-Id: I0e6f621eb39b341af61005b2334174e814c18875
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRevert "Add OnDemandSchemaTreeStorageNode" 62/93462/1
Robert Varga [Thu, 29 Oct 2020 11:54:51 +0000 (12:54 +0100)]
Revert "Add OnDemandSchemaTreeStorageNode"

This reverts commit 81aa05143b9cdc4cea1bf39dad0ae937525f40e5, as it
is miss-filed.

JIRA: YANGTOOLS-874
Change-Id: I68b8ad39af88a100dc8c97b148426025bbb4edc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd OnDemandSchemaTreeStorageNode 59/93459/6
Robert Varga [Wed, 28 Oct 2020 19:42:51 +0000 (20:42 +0100)]
Add OnDemandSchemaTreeStorageNode

In order to correctly implement schema dependencies, we need to
invoke a callback from namespace prerequisites back to
StatementContextBase and its subclasses.

The conduit here is NamespaceBehavior.getFrom(), which is invoked
with a namespace key. For ChildSchemaNodeNamespace this ends up
the QName matching the argument the corresponding
SchemaTreeEffectiveStatement will end up having.

Introduce OnDemandSchemaTreeStorageNode, which acts as an extension
to normal NamespaceStorageNode behavior -- it allows an
implementation to supply a QName-based child statement to be
returned.

Since StatementContextBase is a NamespaceStorageNode, its subclasses
can now additionally implement this interface to receive the
callback.

JIRA: YANGTOOLS-874
Change-Id: I9badab99764cc182074420eee05e3e21bb7dca0a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc8528-data-util to JPMS 51/93251/3
Robert Varga [Thu, 22 Oct 2020 01:04:42 +0000 (03:04 +0200)]
Convert rfc8528-data-util to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: Ie104b142cf268a79a19cbe5713be721076457904
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMinimize surefire overrides 59/93259/2
Robert Varga [Thu, 22 Oct 2020 12:17:15 +0000 (14:17 +0200)]
Minimize surefire overrides

We just need Mockito to be able to pick up our mocks, for which
we can just increase their visibility.

Change-Id: I262181dc7e4d251666bfbb6554c7c184ba513400
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd faster NormalizedNodes.findNode() alternatives 50/93350/2
Robert Varga [Sun, 25 Oct 2020 20:10:03 +0000 (21:10 +0100)]
Add faster NormalizedNodes.findNode() alternatives

End users are going through iterators needlessly when they want
to touch just a single PathArgument. Add methods which side-step
the intermediate List.

Change-Id: I6baed8fe882e14b09d60b3c7d76f425d0f7bcd7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up NormalizedNodes.getDirectChild() 49/93349/1
Robert Varga [Sun, 25 Oct 2020 20:05:39 +0000 (21:05 +0100)]
Speed up NormalizedNodes.getDirectChild()

Deal with positive matches first, let ValueNode be dealt with using
the default path.

Change-Id: If74b9ee05f0a4b5fb867e4b2db5f53bb06728e38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove yang-data-jaxen to attic top-level directory 50/93250/2
Robert Varga [Thu, 22 Oct 2020 00:53:05 +0000 (02:53 +0200)]
Move yang-data-jaxen to attic top-level directory

yang-data-jaxen is a nice prototype, but we really need a better
executor. For now it is still useful and needs to be kept until
we have a replacement.

Change-Id: I72d7e24e887fccae6fcd60b13f7bc1303d0d5186
JIRA: YANGTOOLS-1149
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc7952-data-util to JPMS 75/93175/10
Robert Varga [Mon, 19 Oct 2020 11:28:49 +0000 (13:28 +0200)]
Convert rfc7952-data-util to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: I20b645ac1fbe04bfbb36e54e850f08513b6cfa34
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-data-util to JPMS 82/93182/6
Robert Varga [Mon, 19 Oct 2020 14:24:11 +0000 (16:24 +0200)]
Convert yang-data-util to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: Ie81fa0e53ea91f35303d1b1c36b0db97893345ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc8528-data-api to JPMS 46/93146/8
Robert Varga [Sun, 18 Oct 2020 16:29:43 +0000 (18:29 +0200)]
Convert rfc8528-data-api to JPMS

This is a simplistic module, convert it. While converting it, an
unneeded dependency on rfc8528-model-api is also eliminated,
which crops up in rfc8528-data-util.

JIRA: YANGTOOLS-934
Change-Id: Iaf9cb15e61eb1b035762843b4a59ea10a87d7233
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-parser-rfc7950 to JPMS 40/93240/16
Robert Varga [Wed, 21 Oct 2020 16:19:18 +0000 (18:19 +0200)]
Convert yang-parser-rfc7950 to JPMS

With all the preparatory work going in before, this one is quite
easy.

JIRA: YANGTOOLS-1151
Change-Id: I9ee0d53b32b2fa2e99709cb8425b72d6c3097133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-parser-api to JPMS module 45/93145/7
Robert Varga [Sun, 18 Oct 2020 16:14:54 +0000 (18:14 +0200)]
Convert yang-parser-api to JPMS module

This again extremely simple, allowing further progress.

JIRA: YANGTOOLS-934
Change-Id: Idc52eaf14ec0e74e600ff8e729ae2db780c82d03
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-parser-reactor to a JPMS module 49/93249/4
Robert Varga [Wed, 21 Oct 2020 23:43:50 +0000 (01:43 +0200)]
Convert yang-parser-reactor to a JPMS module

The reactor does not have that many dependencies, convert it.

JIRA: YANGTOOLS-1151
Change-Id: Ic3ff663c2a217e14c55dea214671903e21549dc7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-parser-spi to JPMS 41/93241/4
Robert Varga [Wed, 21 Oct 2020 16:20:52 +0000 (18:20 +0200)]
Convert yang-parser-spi to JPMS

This is simple enough, and even if we need to move packages, that
is something we can do later.

JIRA: YANGTOOLS-1151
Change-Id: I2f31980b00c59de77b15e36fa39b39c0cbf943a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate YangModelDependencyInfo.forResource() 45/93245/6
Robert Varga [Wed, 21 Oct 2020 21:36:46 +0000 (23:36 +0200)]
Deprecate YangModelDependencyInfo.forResource()

With JPMS we cannot guarantee resources are accessible as that
depends on their path. Let users deal with acquiring the resource
and expose forYangText(), which takes YangTextSchemaSource.

Migrate the test class to use StmtTextUtils.sourceForResource(),
which is updated to guarantee YangStatementStreamSource.

JIRA: YANGTOOLS-1151
Change-Id: If0e381853e66701cb0312fb9bea5c6d5845266be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate ModifierImpl methods 48/93248/2
Robert Varga [Wed, 21 Oct 2020 23:53:14 +0000 (01:53 +0200)]
Deprecate ModifierImpl methods

Eclipse is noticing that deprecated implementations are not marked
as deprecated. Mark them now.

Change-Id: Ic5496c7f38fa9322c4a48f6db4128114003a1518
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a missing @Override 47/93247/2
Robert Varga [Wed, 21 Oct 2020 23:52:22 +0000 (01:52 +0200)]
Add a missing @Override

Noticed by Eclipse: this method is no longer @Beta, either.

Change-Id: I821ab3f952dd89808a955ed5870d1a2bd6455f04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix a raw type warning 46/93246/3
Robert Varga [Wed, 21 Oct 2020 22:16:25 +0000 (00:16 +0200)]
Fix a raw type warning

This is a simple violation, fix it.

Change-Id: Icf9393368ce89a5c495ba1118b42985db59c54a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoWorkaround test model loading issues 44/93244/3
Robert Varga [Wed, 21 Oct 2020 20:59:15 +0000 (22:59 +0200)]
Workaround test model loading issues

Going to a JPMS module means our resources are subject to encapsulation
-- which means things like YangTextSchemaSource.forResource() actually
depend on where the resource if located.

If its location ends up being in a valid package, that request will fail,
as JRE will consider the resource encapsulated and will reject external
module's attempt to meddle with it (such as yang.model.api).

As it turns out some of models are matching this check and we load them
through such facilities. In some cases we can re-route in a way which
makes things less verbose -- and we do that in this patch.

JIRA: YANGTOOLS-1151
Change-Id: Ib55cadd9eba840980eeba3b9004d8f9c4101e33d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoChange StmtTestUtils.sourceForResource() 43/93243/2
Robert Varga [Wed, 21 Oct 2020 21:14:06 +0000 (23:14 +0200)]
Change StmtTestUtils.sourceForResource()

We have a number of test resources which are considered in JPMS
world -- and hence we cannot rely on utilities to load them, as
those utilities are not authorized to use them.

Since we do not want to update massive amounts of tests, just change
how we load resources -- go through Class.getResource() and turn
that into a File and use that. That way StmtTestUtils is the caller
and it is inside our module and is allowed to do that.

JIRA: YANGTOOLS-1151
Change-Id: I6cd43e7cc7ddc1b6c3cbac5875dd9716d43be684
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixup resource loading in yang-parser-rfc7950 42/93242/3
Robert Varga [Wed, 21 Oct 2020 20:07:31 +0000 (22:07 +0200)]
Fixup resource loading in yang-parser-rfc7950

Going towards modular world requires proper context for resource
loading, as we will be on our class loader. Make sure we centralize
the policy in StmtTestUtils. This removes a bit of verbosity from
individual tests.

JIRA: YANGTOOLS-1151
Change-Id: I981245ba93826222950a764e2f9556421e90fc95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-xpath-impl into a JPMS module 51/93151/7
Robert Varga [Sun, 18 Oct 2020 17:51:42 +0000 (19:51 +0200)]
Convert yang-xpath-impl into a JPMS module

This is a bit more involved, as we are using a different
javax.inject and do not use osgi.cmpn but
org.osgi.service.component.annotations directly.

The latter results in a dependency on an automatic module, but
that is not really a problem as we never touch them at runtime.

Since we do not want to export out implementation directly, and
it still needs to be discoverable via reflection, we dedicate
org.opendaylight.yang.xpath.impl.di package for that purpose.
It will come in handy for other injection frameworks as well.

JIRA: YANGTOOLS-1145
Change-Id: Ie80b02eba551fa89c334f20484e386d808316ca3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename distribution-karaf to karaf 25/93225/2
Robert Varga [Wed, 21 Oct 2020 00:00:47 +0000 (02:00 +0200)]
Rename distribution-karaf to karaf

Shorter name for easier use. It's not like its heavily used.

JIRA: YANGTOOLS-1149
Change-Id: I09a66b0c367a3f6e635c91e7419a3e77b04064f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove integration-test directory 24/93224/1
Robert Varga [Tue, 20 Oct 2020 23:56:22 +0000 (01:56 +0200)]
Remove integration-test directory

This is an old remnant of days way past and is not used anywhere.
Remove it to clean up our directory structure.

JIRA: YANGTOOLS-1149
Change-Id: Ib4ab2ebe4a2b41b0071e8a22786673f7bddb2b40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove validation tools 23/93223/1
Robert Varga [Tue, 20 Oct 2020 23:48:17 +0000 (01:48 +0200)]
Move validation tools

Let's create a new tools/ top level directory, so people can
find things more easily.

JIRA: YANGTOOLS-1149
Change-Id: I4a88a9c82a1a9d4112b1a8e1053fef529f873a86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove yang-plugin artifacts 22/93222/1
Robert Varga [Tue, 20 Oct 2020 23:40:04 +0000 (01:40 +0200)]
Move yang-plugin artifacts

We have a plugin top-level directory, move the plugin
things there. This reduces clutter in yang/ and makes for
a more navigable tree.

JIRA: YANGTOOLS-1149
Change-Id: Ifab0a8abda1ca183a3d730367d3da75ab752bc30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSwitch plugin-generator-api to JPMS module 17/93217/4
Robert Varga [Tue, 20 Oct 2020 14:55:03 +0000 (16:55 +0200)]
Switch plugin-generator-api to JPMS module

Switch from being an automatic module to being a full module.

Change-Id: I09b9cbb95b074fc3cb859fd2dec02f9305687339
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd generalized FileGenerator interface 34/52034/47
Robert Varga [Sat, 18 Feb 2017 11:44:17 +0000 (12:44 +0100)]
Add generalized FileGenerator interface

This patch adds a maven-independent interface for code generators,
which captures enough semantics to make mapping usable. We will be
implementing this interface in place of the original SPI.

JIRA: YANGTOOLS-1146
Change-Id: I3daef73d3fa71e74a9678979fd00417579f60695
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a test for resolving names of submodules 86/93186/3
Robert Varga [Mon, 19 Oct 2020 16:13:05 +0000 (18:13 +0200)]
Add a test for resolving names of submodules

There is a weird interaction going on somewhere in the system,
this patch adds a test to see what is going on.

Change-Id: Icccffe90fd9a55a4175e47f6ab314adfec2c76e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc8040-model-api to JPMS 74/93174/2
Robert Varga [Mon, 19 Oct 2020 11:22:38 +0000 (13:22 +0200)]
Convert rfc8040-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: Ie3b6348bb986b50f335f4bd5182cdfffcd9882a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc6643-model-api to JPMS 73/93173/1
Robert Varga [Mon, 19 Oct 2020 11:19:58 +0000 (13:19 +0200)]
Convert rfc6643-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: Id1b24eddcb34c332e77032d88aac2366f062e143
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc6536-model-api to JPMS 72/93172/1
Robert Varga [Mon, 19 Oct 2020 11:18:35 +0000 (13:18 +0200)]
Convert rfc6536-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: I8c3c032a6687ee25b96056541997e7d091df267b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc6241-model-api to JPMS 71/93171/1
Robert Varga [Mon, 19 Oct 2020 11:13:10 +0000 (13:13 +0200)]
Convert rfc6241-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: I7e78151d978c97d5b6adfb2182018401e6716495
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert openconfig-model-api to JPMS 70/93170/1
Robert Varga [Mon, 19 Oct 2020 11:08:39 +0000 (13:08 +0200)]
Convert openconfig-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: I01101cb1e291933ae0787b8d5af1ce70fb77394b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix odlext-model-api conversion 69/93169/1
Robert Varga [Mon, 19 Oct 2020 11:04:42 +0000 (13:04 +0200)]
Fix odlext-model-api conversion

I920432d50409fad36c3567eaa02d55a64331048d was missing the pom.xml
updates. Fix that up.

JIRA: YANGTOOLS-934
Change-Id: Ia2b299c72038fd09190937a73f584a3d943bff93
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd a test reproducer 53/93153/3
Robert Varga [Sun, 18 Oct 2020 20:29:45 +0000 (22:29 +0200)]
Add a test reproducer

This issue does not reproduce on any stream, add a test case just
to prove it.

JIRA: YANGTOOLS-1039
Change-Id: Idce40f02d1311db4eef6642e0c3281da058523b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-model-util to JPMS 50/93150/2
Robert Varga [Sun, 18 Oct 2020 16:54:44 +0000 (18:54 +0200)]
Convert yang-model-util to JPMS

This is one of our core dependencies, convert it so that we can
proceed further. Note that UTs require a block of pom.xml magic
to work.

JIRA: YANGTOOLS-934
Change-Id: Ifdd94495717d19138a1cf2580cde1dd0e9418e10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unneeded type specification 49/93149/2
Robert Varga [Sun, 18 Oct 2020 16:53:53 +0000 (18:53 +0200)]
Remove unneeded type specification

Eclipse is informing us we are overly verbose, fix that.

Change-Id: Ibdf33a03898ab337e8352e240b9e02629f8ea0bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc8528-model-api to JPMS 47/93147/2
Robert Varga [Sun, 18 Oct 2020 16:46:08 +0000 (18:46 +0200)]
Convert rfc8528-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: I920432d50409fad36c3567eaa02d55a64331048d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc8528-model-api to JPMS 44/93144/2
Robert Varga [Sun, 18 Oct 2020 16:23:41 +0000 (18:23 +0200)]
Convert rfc8528-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: I17ba630c16eae524a88b83e98c387bb9cb62bf7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc7952-data-api to JPMS 43/93143/2
Robert Varga [Sun, 18 Oct 2020 16:02:31 +0000 (18:02 +0200)]
Convert rfc7952-data-api to JPMS

This is extremely simple artifact, convert it to JPMS. Note that
this also shows unneded dependency on rfc7952-model-api, which is
removed.

JIRA: YANGTOOLS-934
Change-Id: I384b83ee85ff786821fdcf85d489e17417dc7bae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rfc7952-model-api to JPMS 42/93142/2
Robert Varga [Sun, 18 Oct 2020 15:59:55 +0000 (17:59 +0200)]
Convert rfc7952-model-api to JPMS

This is a simplistic module, convert it.

JIRA: YANGTOOLS-934
Change-Id: Iec8520cf1e7ce2044d2a5df622ea473a8fcdc038
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert yang-data-api to a JPMS module 20/84020/19
Robert Varga [Tue, 27 Aug 2019 21:11:10 +0000 (23:11 +0200)]
Convert yang-data-api to a JPMS module

This drops plugin configuration in favor of declaring a module.

JIRA: YANGTOOLS-934
Change-Id: Id96ce4f0a85d9c957f694ca0125f38979f4654e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake yang-model-api a JPMS module 24/88024/5
Robert Varga [Thu, 8 Oct 2020 14:52:54 +0000 (16:52 +0200)]
Make yang-model-api a JPMS module

This converts yang-model-api to an explicit module, expressing what
it really does. This unfornately exposes the state of affairs re.
JPMS testing and requires us to use explicit opens to get mockito
working.

JIRA: YANGTOOLS-934
Change-Id: I80de90ea903300624e64c57859dc451a59381644
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTurn yang-xpath-api into an explicit JPMS module 41/93141/3
Robert Varga [Sun, 18 Oct 2020 15:15:42 +0000 (17:15 +0200)]
Turn yang-xpath-api into an explicit JPMS module

This is a simple API module, convert it to an explicit module.

JIRA: YANGTOOLS-934
Change-Id: I7e6ac24051df9971a6e224c27ebeee6753cac01c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions 6.0.1-SNAPSHOT 98/92998/1
Robert Varga [Thu, 8 Oct 2020 14:52:54 +0000 (16:52 +0200)]
Bump versions 6.0.1-SNAPSHOT

This starts the enxt development iteration.

Change-Id: Idbb7f126696c132c484ff738dcc9b5a60170711c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpose SchemaNodeIdentifier-based JSON access 93/92993/1
Robert Varga [Thu, 8 Oct 2020 11:37:52 +0000 (13:37 +0200)]
Expose SchemaNodeIdentifier-based JSON access

RESTCONF is using SchemaPath-based instantiation quite heavily,
some of which is getting triggered with operations and their
SchemaNodeIdentifier.

To ease the pain of that interaction, add methods which take
SchemaNodeIdentifier.Absolute. This allows users to minimize
conversions.

Change-Id: I88166d84cd91d5e02ae4d567f9b80db06c23c461
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpose SchemaNodeIdentifier-based XML access 89/92989/3
Robert Varga [Thu, 8 Oct 2020 00:03:52 +0000 (02:03 +0200)]
Expose SchemaNodeIdentifier-based XML access

NETCONF is using SchemaPath-based instantiation quite heavily,
some of which is getting triggered with operations and their
SchemaNodeIdentifier.

To ease the pain of that interaction, add methods which take
SchemaNodeIdentifier.Absolute. This allows users to minimize
conversions.

Change-Id: I843ffc6ae63aa68118d4e95abe354cd65b3be51d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SchemaPath->SchemaNodeIdentifier conversions 90/92990/1
Robert Varga [Thu, 8 Oct 2020 06:10:00 +0000 (08:10 +0200)]
Add SchemaPath->SchemaNodeIdentifier conversions

There are a number of users who are still crossing
SchemaPath->SchemaNodeIdentifier boundary. Add a utility method
for making that task easier.

Change-Id: I612a404f525f875ba6807ccfd696e2c2a6825449
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPromote Absolute.{last,first}NodeIdentifier 28/92928/2
Robert Varga [Wed, 7 Oct 2020 00:09:52 +0000 (02:09 +0200)]
Promote Absolute.{last,first}NodeIdentifier

SchemaNodeIdentifier.Descendant has to have at least one
element just as Absolute. Promote utility methods to allow
users pick them.

Change-Id: I428213da7db699ea50a5e67b25feee21553c99f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMake YangNamespaceContextNamespace global 27/92927/1
Robert Varga [Tue, 6 Oct 2020 18:47:55 +0000 (20:47 +0200)]
Make YangNamespaceContextNamespace global

The crux of the problem with not being able to resolve prefixes comes
from the fact we end up reusing the same context for both submodule
and module. Turn the namespace into a global one, keyed by the root
context.

JIRA: YANGTOOLS-1138
Change-Id: Ibdd1b4c2427fcf62a341e9ff15dddbd055ffa6fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor AbstractEffectiveDocumentedNodeWithStatus 21/92921/2
Robert Varga [Tue, 6 Oct 2020 11:25:39 +0000 (13:25 +0200)]
Refactor AbstractEffectiveDocumentedNodeWithStatus

We want to be passing down declared statement from support, so as
to make statement lifecycle predictable and driven by the reactor.

JIRA: YANGTOOLS-1065
Change-Id: I18a135f979f18ed81c53b7957d876252e10e59cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMore updates to AbstractDeclaredStatement 20/92920/1
Robert Varga [Tue, 6 Oct 2020 10:38:29 +0000 (12:38 +0200)]
More updates to AbstractDeclaredStatement

Migrate RegularPresenceStatement, fix BitStatement implementations
a bit and mark evolution for next major version.

JIRA: YANGTOOLS-1065
Change-Id: Iadf1859ac163d78c4252bb9bb8a3ad95ed15fc1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor bit/if-feature statements 19/92919/1
Robert Varga [Tue, 6 Oct 2020 10:09:54 +0000 (12:09 +0200)]
Refactor bit/if-feature statements

Do not use StmtContext when instantiating these statements, which
also shows we can improve footprint of BitStatement implementation.

JIRA: YANGTOOLS-1065
Change-Id: I2beeee04705f18d68b93fed9d77a759788cdb7b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor simple statements 18/92918/1
Robert Varga [Tue, 6 Oct 2020 09:55:45 +0000 (11:55 +0200)]
Refactor simple statements

Statements which have obvious argument/rawArgument interactions
are refactored to make it clear they have no StmtContext interactions.

JIRA: YANGTOOLS-1065
Change-Id: I217f3fed816783a6581a7d84e93754011a5abcdb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate StmtContext constructors of AbstractDeclaredStatement 17/92917/2
Robert Varga [Tue, 6 Oct 2020 09:17:47 +0000 (11:17 +0200)]
Deprecate StmtContext constructors of AbstractDeclaredStatement

The only reason for taking a parser.spi.meta dependency is unpacking
of argument/rawArgument. Provide altenative constructors and deprecate
use of StmtContext.

JIRA: YANGTOOLS-1065
Change-Id: If518edc28043fca4f9fcd9b714f8022e687261c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove SchemaContextProvider 09/92909/10
Robert Varga [Tue, 6 Oct 2020 05:48:01 +0000 (07:48 +0200)]
Remove SchemaContextProvider

This class has been superseded by EffectiveModelContextProvider,
remove it.

Change-Id: I81a3b0d23c3a7d359b767f5083c992b8bd397afa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify Module/Submodule statement argument usage 16/92916/1
Robert Varga [Tue, 6 Oct 2020 09:09:43 +0000 (11:09 +0200)]
Simplify Module/Submodule statement argument usage

Instead of decoupling statement argument, we can use raw argument,
which is guaranteed to be a String.

Change-Id: I9685715af546c6a07c5a19ff00aa1dd610afe2e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse UnqualifiedQName for {Module,Submodule}Statement 10/92910/6
Robert Varga [Tue, 6 Oct 2020 06:14:42 +0000 (08:14 +0200)]
Use UnqualifiedQName for {Module,Submodule}Statement

UnqualifiedQName is the best approximation of a validated string
we have, even if it has a clunky name. Redefine module-like statements
to take that as an argument, forcing proper validation during
parse.

Change-Id: Ic902b8eedb0e955f00d14b41d115765c576df055
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPush out AbstractMountPointContextFactory FIXMEs 14/92914/2
Robert Varga [Tue, 6 Oct 2020 07:09:45 +0000 (09:09 +0200)]
Push out AbstractMountPointContextFactory FIXMEs

We do not have the time to start interacting with XPath, push FIXMEs
out to next major release.

Change-Id: I8af5ac4cdc024876cb3546a934d878e0899fe006
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPush out uses/refine integration FIXMEs out 13/92913/2
Robert Varga [Tue, 6 Oct 2020 07:05:38 +0000 (09:05 +0200)]
Push out uses/refine integration FIXMEs out

We do not have the time to address the indirection here, push it out
to the next release.

Change-Id: Ic60a4a30991aae29327d30ac96d1801a6e127cff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename NamespaceRevisionAware to QNameModuleAware 11/92911/2
Robert Varga [Tue, 6 Oct 2020 06:24:26 +0000 (08:24 +0200)]
Rename NamespaceRevisionAware to QNameModuleAware

We have a concept which ties together a namespace and a revision,
use that instead of atomizing them again.

Change-Id: Ia40ca982dc5ed2e2ef83b5a7267b720e62baf923
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPush FIXMEs out 08/92908/1
Robert Varga [Tue, 6 Oct 2020 05:25:16 +0000 (07:25 +0200)]
Push FIXMEs out

A number of FIXMEs will not be addressed in 6.0.0, push them out
to 7.0.0.

Change-Id: I6cd2b9b661cd60ae3c3a81b8d341d7ca46092bf7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGraduate most YangInstanceIdentifier-hosted methods 07/92907/1
Robert Varga [Tue, 6 Oct 2020 05:41:53 +0000 (07:41 +0200)]
Graduate most YangInstanceIdentifier-hosted methods

We have a number of @Beta methods, which have proven to be okay,
remove the @Beta moniker.

Change-Id: Ifdbeee6b0b360160a7ac312ef6a8d8f137b6a849
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix NumericalRestrictions.getRange() definition 06/92906/1
Robert Varga [Tue, 6 Oct 2020 05:26:31 +0000 (07:26 +0200)]
Fix NumericalRestrictions.getRange() definition

While the interface is not implented, we want the default method
to be accurate.

Change-Id: Iede28e13911437d10808a55be0cff348675cd7a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove RevisionAwareXPath 04/92904/11
Robert Varga [Mon, 5 Oct 2020 16:28:23 +0000 (18:28 +0200)]
Remove RevisionAwareXPath

Both 'must' and 'when' statements need to have their expressions
parsed now. This allows us to remove an indirection in the form
of RevisionAwareXPath, and just use
YangXPathExpression.QualifiedBound for result.

We have a number of non-compliant models in our test suite, which
are now fixed up.

JIRA: YANGTOOLS-1137
Change-Id: I89c6498f855b6f436052e186e159343d504e3fe4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>