yangtools.git
3 years agoAdd UnqualifiedQName.tryCreate() 77/94077/2
Robert Varga [Sun, 6 Dec 2020 12:37:39 +0000 (13:37 +0100)]
Add UnqualifiedQName.tryCreate()

This a better approach to performing a lazy check, as it captures
the valid string in a well-known construct.

JIRA: YANGTOOLS-1191
Change-Id: I7ffe00602d3d83189d9c3f8a59365648aa36720d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not use exceptions for branching 76/94076/1
Robert Varga [Mon, 30 Nov 2020 16:30:24 +0000 (17:30 +0100)]
Do not use exceptions for branching

UnrecognizedEffectiveStatementImpl is mis-using
StmtContextUtils.qnameFromArgument() to attempt to create a QName,
suppressing reported exceptions.

Use a custom-tailored lookup, which utilizes
AbstractQName.isValidLocalName() and thus side-steps exceptions.

JIRA: YANGTOOLS-1191
Change-Id: Iecea9f446730e4e7840b962a95844ce5128dfb9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1bbcdd2d6510d420b916c26f54c60a1c2e1607df)

3 years agoFix YangModeledAnyxmlEffectiveStatementImpl.isMandatory() 28/94028/1
Robert Varga [Fri, 4 Dec 2020 13:27:21 +0000 (14:27 +0100)]
Fix YangModeledAnyxmlEffectiveStatementImpl.isMandatory()

We have a bug in forwarding here, fix that.

Change-Id: I6f71c2df71b4922a45edc41ac19a8fdb71122b3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6852285ee3d78c5ed2eeba3182458bd59b47d537)

3 years agoFire AbstractPrerequisite listeners as soon as they resolve 93/93993/1
Robert Varga [Tue, 1 Dec 2020 13:42:15 +0000 (14:42 +0100)]
Fire AbstractPrerequisite listeners as soon as they resolve

We seem to be stuck with listeners not firing, leaving references
which need to be cleared. Ensure we fire phase listeners as soon
as they are satisfied -- repurposing tryApply() for its logical
purpose.

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

3 years agoEliminate AbstractEffectiveModule.schemaTreeNamespace 59/93959/1
Robert Varga [Fri, 27 Nov 2020 10:29:19 +0000 (11:29 +0100)]
Eliminate AbstractEffectiveModule.schemaTreeNamespace

We already have DefaultWithDataTree.WithSubstatements's indices,
hence there is no point in re-doing the same work.
Eliminate duplication and defer to our superclass.

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

3 years agoFix StmtContext.produces{Declared,Effective} signatures 49/93949/1
Robert Varga [Fri, 27 Nov 2020 04:05:37 +0000 (05:05 +0100)]
Fix StmtContext.produces{Declared,Effective} signatures

We have bad signatures here, one of which is needlessly verbose,
the other one is actually plain wrong as it confuses X,Y for A,D.

Fix them up, which removes the need to go throw raw access to make
them work.

Change-Id: I6bfd995c8b4064b99eb673fa30c4ab8f3d52dd5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSpeed up StmtContextUtils.getModuleQNameByPrefix() 26/93926/1
Robert Varga [Wed, 25 Nov 2020 02:34:26 +0000 (03:34 +0100)]
Speed up StmtContextUtils.getModuleQNameByPrefix()

We are looking up root twice here. Cache the lookup for reuse,
skipping one traversal.

Change-Id: I4ead06fa82b2ef822cbee0a2761bd90674bc1676
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 61f49cd2ff55f24af91c232d3a82ab3f2b565255)

3 years agoFixup collections return implementations 25/93925/1
Robert Varga [Tue, 24 Nov 2020 12:19:56 +0000 (13:19 +0100)]
Fixup collections return implementations

Adjust nullness annotations to fix Eclipse-reported errors.

Change-Id: I664c651e9bf10fd9d91bae00cc31edf86f9fda0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5d35db7723bb19c00955c580b21df9552de9fea0)

3 years agoSpeed up SchemaTracker.startContainerNode() 14/93914/1
Robert Varga [Sun, 22 Nov 2020 15:21:35 +0000 (16:21 +0100)]
Speed up SchemaTracker.startContainerNode()

Eclipse spotted a potential shortcut in expression, make sure we
take it.

Change-Id: Ief68daa77ac98de3698b9df0627061353055434f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 45d29b94e9f05a6067a4c1e3531ae4fa9f6a1eed)

3 years agoAdd MinMaxElementsValidationFailedException 13/93913/1
Robert Varga [Fri, 20 Nov 2020 20:16:16 +0000 (21:16 +0100)]
Add MinMaxElementsValidationFailedException

The refactor we've done makes switch exceptions easy, migrate
MinMaxValidation to a dedicated exception.

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

3 years agoReport a dedicated exception on unique failure 12/93912/1
Robert Varga [Fri, 20 Nov 2020 20:05:16 +0000 (21:05 +0100)]
Report a dedicated exception on unique failure

Rather than using plain IllegalArgumentException, report a dedicated
exception derived from SchemaValidationFailedException. Also refactor
UniqueValidation a bit.

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

3 years agoFix ListModificationStrategy child handling 11/93911/1
Robert Varga [Fri, 20 Nov 2020 19:55:11 +0000 (20:55 +0100)]
Fix ListModificationStrategy child handling

We have an obviously bad cast here, correct that.

JIRA: YANGTOOLS-1180
Change-Id: I706a5335e899e182e4651e9134f608a6e7094c37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 398d1aa8ca1cc91eff5bb6062fbf228eefca4da3)

3 years agoHide UniqueValidator methods 02/93902/1
Robert Varga [Fri, 20 Nov 2020 15:54:59 +0000 (16:54 +0100)]
Hide UniqueValidator methods

Our contract is quite crisp, make sure we hide static utility
methods.

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

3 years agoAdd UniqueValidation 01/93901/1
Robert Varga [Wed, 18 Nov 2020 14:41:30 +0000 (15:41 +0100)]
Add UniqueValidation

This is a simplement implementation with a stateless external enforcer,
similar to what MinMaxElementsValidation does. The test suite is split
out of If3b94a085be034de28e341ac900142b021cd2a88 and adapted a bit.

JIRA: YANGTOOLS-1177
Change-Id: I3914497981db0281ab8f32dee12a102ce729022e
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 52e49d63e73b995ea10bbeefb62df9c6101b44c3)

3 years agoSplit out AbstractValidation 00/93900/1
Robert Varga [Thu, 19 Nov 2020 21:30:20 +0000 (22:30 +0100)]
Split out AbstractValidation

MinMaxElementsValidation performs a useful role as a template for
how we can create simple subtree validations. Split the common bits
into AbstractValidation and elinate code duplication by doing some
trickery.

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

3 years agoUnify ModificationApplyOperation.toString() 99/93899/1
Robert Varga [Wed, 18 Nov 2020 14:58:36 +0000 (15:58 +0100)]
Unify ModificationApplyOperation.toString()

Not all ModificationApplyOperation subclasses provide useful
information in toString(). Make sure all of them do.

JIRA: YANGTOOLS-1176
Change-Id: Id93f2899dcedd8c289b093c1e126c09108eefb4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 53a726edb6deb453584d289b8d6dec12cb0d18c8)

3 years agoReduce list/map/entry strategy confusion 98/93898/1
Robert Varga [Wed, 18 Nov 2020 14:24:24 +0000 (15:24 +0100)]
Reduce list/map/entry strategy confusion

Lists with a key are called 'Map' and contain 'MapEntry'
Lists without a key are called a 'List' and do not have an entry
strategy (yet).

Change-Id: I0321eaebf1541a86778c63a2eaa68bdffcd8672a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 37380a5c65e213bc5f34b521d8f8e7d315df7465)

3 years agoFix get{Min,Max}Elements() usage 97/93897/1
Robert Varga [Wed, 18 Nov 2020 12:33:10 +0000 (13:33 +0100)]
Fix get{Min,Max}Elements() usage

These return a nullable, UTs should be using
assertEquals(Object, Object) to compare them.

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

3 years agoClean up argument checking 96/93896/1
Robert Varga [Wed, 18 Nov 2020 12:49:09 +0000 (13:49 +0100)]
Clean up argument checking

We have a few nullness reports, use coerceArgument() when we
are implying a requirement.

Change-Id: I9854f77eeb28945a6cac9fe86695a145eab0687d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 0b4969972e9facb9d0d1aa515e24b9a7073127ee)

3 years agoRemove an orElse(null) indirection 95/93895/1
Robert Varga [Wed, 18 Nov 2020 12:46:36 +0000 (13:46 +0100)]
Remove an orElse(null) indirection

We do not need to update foundNode() if we do not find anything,
hence sync on optional directly. Improves interactions and solves
an Eclipse warning.

Change-Id: Ibc553d50d48ccd22480bdc33163364bc8a509c83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8c0f44e010826c36a232df28385dc591c7f878fd)

3 years agoFix annotation imports 94/93894/1
Robert Varga [Wed, 18 Nov 2020 12:12:55 +0000 (13:12 +0100)]
Fix annotation imports

We are propagating @NonNull towards our users and are using
@SuppressFBWarnings (which we don't propagate).

JIRA: YANGTOOLS-934
Change-Id: I9e6fc6edb79b7d29f98201b074ca32295b33f646
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2385aa7f0e3fb820348fd6ebe60b007444400d8a)

3 years agoCorrect NonNull annotation 61/93661/2
Robert Varga [Wed, 18 Nov 2020 11:24:25 +0000 (12:24 +0100)]
Correct NonNull annotation

We are using the wrong annotation here, fix that.

Change-Id: Ic3c68239f41ada9dfdcc68f9861ce0a142442d89
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8371a88e6a404e38e1ecdfbe7faed84f8fba955b)

3 years agoConvert yang-data-impl to a JPMS module 55/93855/1
Robert Varga [Mon, 16 Nov 2020 19:49:10 +0000 (20:49 +0100)]
Convert yang-data-impl to a JPMS module

This is a mostly straightforward conversion except we need to move
some files around to allow them to be loaded by external libraries
during UT.

JIRA: YANGTOOLS-1175
Change-Id: Iacecd4157e34c58d35bd2dc495eb178d7e3c86a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2fb9e7cb0aaeac0792f918190803b2041c192611)

3 years agoFixup rfc8528-data-api module-info 56/93656/1
Robert Varga [Mon, 16 Nov 2020 23:03:20 +0000 (00:03 +0100)]
Fixup rfc8528-data-api module-info

We depend on annotations, make sure to express that.

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

3 years agoDrop dependency on javax.xml.bind 52/93852/2
Robert Varga [Mon, 16 Nov 2020 20:16:24 +0000 (21:16 +0100)]
Drop dependency on javax.xml.bind

All we need is a lenient Base64 decoder. Drop the dependency
on javax.xml.bind and use plain java.base-provided one.

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

3 years agoFixup yang-data-api module-info 55/93655/1
Robert Varga [Mon, 16 Nov 2020 23:01:10 +0000 (00:01 +0100)]
Fixup yang-data-api module-info

We have a couple of dependencies we want to express explicitly,
do that now.

Change-Id: I1e40cab18f0ab10ff08764f6df15dcdf3ec1a23f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 15fae756ece7396333a9ae9a4f53f72b3a03138d)

3 years agoDo not use @NonNullByDefault in ItemOrder 54/93654/1
Robert Varga [Fri, 13 Nov 2020 22:05:42 +0000 (23:05 +0100)]
Do not use @NonNullByDefault in ItemOrder

Using @NonNullByDefault limits usability, remove it again.

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

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>