netconf.git
2 years agoFix odl-yanglib packaging 59/98059/1
Robert Varga [Sat, 23 Oct 2021 07:46:32 +0000 (09:46 +0200)]
Fix odl-yanglib packaging

We are packaging an mdsal artifact, fix that.

Change-Id: Ie320e9509e9201edd8e69c4e11e0aa11546e2bf9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove ApiPath.Step with hashCode()/equals() 52/98052/1
Robert Varga [Fri, 22 Oct 2021 20:30:57 +0000 (22:30 +0200)]
Improve ApiPath.Step with hashCode()/equals()

Users will be expecting a reasonable comparison behaviour, make sure
we have that covered.

Change-Id: I1df17ea035b5442e9f2b2ea908a5b9f404bb2823
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove StreamingContext diagnostics 49/98049/1
Robert Varga [Fri, 22 Oct 2021 15:59:43 +0000 (17:59 +0200)]
Improve StreamingContext diagnostics

When we encounter a wrong nested child we end up throwing an opaque
ClassCastException. Add an explicit check to improve diagnostics.

JIRA: NETCONF-820
Change-Id: I3c5a24c1ff4d12a56dfd5fd6d8cd3f940af330a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse YangNames CharMatchers in parser 48/98048/2
Robert Varga [Fri, 22 Oct 2021 15:11:25 +0000 (17:11 +0200)]
Use YangNames CharMatchers in parser

We have common matchers available from yangtools, use those instead
of brewing our own.

Change-Id: I4099aab90e0abbf45bc5ba8248b1e0658921ee7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse YangNames CharMatchers 47/98047/1
Robert Varga [Fri, 22 Oct 2021 15:05:19 +0000 (17:05 +0200)]
Use YangNames CharMatchers

YangNames exposes utility CharMatchers now, use them rather than
having our own copy.

Change-Id: Ided0180e43a4e248475cad61acba9080de6e3066
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 31/98031/2
Robert Varga [Thu, 21 Oct 2021 10:52:10 +0000 (12:52 +0200)]
Bump MRI upstreams

Adopt:
- odlparent-9.0.7
- yangtools-7.0.9
- mdsal-8.0.6
- controller-4.0.4
- infrautils-2.0.7
- aaa-0.14.4

Change-Id: I58a167c02bc8e09465534859242661a8f2ee77c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse simple concat in createParsingException() 09/97809/1
Robert Varga [Wed, 6 Oct 2021 11:33:14 +0000 (13:33 +0200)]
Use simple concat in createParsingException()

String.format() is wasteful as we can use JEP280 to make things
a lot more performant.

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

2 years agoUse AsyncResponse in RPC invocation path 88/97488/11
Robert Varga [Tue, 14 Sep 2021 09:12:18 +0000 (11:12 +0200)]
Use AsyncResponse in RPC invocation path

RPC invocation is isolated and is inherently asynchronous. Convert it to
use a @Suspended AsyncResponse.

JIRA: NETCONF-718
Change-Id: I5ba174bd8d69e4e54a085a2f4feac076f07d59ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd rfc8040.ApiPath 03/97503/34
Robert Varga [Thu, 16 Sep 2021 02:09:00 +0000 (04:09 +0200)]
Add rfc8040.ApiPath

Our YangInstanceIdentifierSerializer is a rather complex piece of
machinery, which is a maintenance burden and cannot be modified easily.

In order to deal with it, we will split parsing into two steps:

1) structural tokenization, which splits the input string into a
   representation of 'api-path' ABNF producation.

2) semantic binding to an EffectiveModelContext, which reconciles the
   structure with the context, producing YangInstanceIdentifier in the
   process.

This patch deals with item 1) by introducing an ApiPath class, which
can be constructed from a string.

JIRA: NETCONF-631
Change-Id: I44c8ad1308b27ee459f95f8617f54c8537ea9c65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove YangInstanceIdentifierDeserializer.checkValid() 91/97791/1
Robert Varga [Wed, 6 Oct 2021 08:18:23 +0000 (10:18 +0200)]
Improve YangInstanceIdentifierDeserializer.checkValid()

The current implementation is slow due to always playing with arguments,
even when we do not use them. As it turns out, a bit of restructuring
allows us to make this a lot saner and performant.

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

2 years agoUpdate ParserIdentifier a bit 43/97743/4
Robert Varga [Mon, 4 Oct 2021 19:44:10 +0000 (21:44 +0200)]
Update ParserIdentifier a bit

Hide a testing-only method and mark a method for movement.

JIRA: NETCONF-631
Change-Id: I73f8e32803bec49dce747503206cde78df75fbce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix RestconfOperationsService.getOperations(UriInfo) 85/97685/4
Robert Varga [Wed, 29 Sep 2021 18:53:16 +0000 (20:53 +0200)]
Fix RestconfOperationsService.getOperations(UriInfo)

ietf-restconf.yang has a rather ugly wart in its definition of the
operations container, which we are using an ugly workaround for.

This workaround is rendered inoperable due to strict binding to
effective model context, which does not find the dynamic leaves required
to encode the content.

Rework the implementation to side-step NormalizedNode documents and
provide ready JSON/XML strings.

JIRA: NETCONF-822
Change-Id: I57760d06240e09940026fee9b195e207853c01b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReturn a List from YIID Deserializer 46/97746/1
Robert Varga [Tue, 5 Oct 2021 11:02:46 +0000 (13:02 +0200)]
Return a List from YIID Deserializer

Hiding behind an interable is not useful, expose the List. This allows
us to perform major cleanups in the corresponding test, which has also
improved assertions now.

Change-Id: Ie7100a3d4ab7e0824af7b4cf06b42e483ab9a295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix a warning 41/97741/2
Robert Varga [Mon, 4 Oct 2021 18:19:48 +0000 (20:19 +0200)]
Fix a warning

The intent is to report APPLICATION here, reference is statically.

Change-Id: If7543c8c962cff450b3ce867eaa9606c1212e42c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.6-SNAPSHOT 13/97513/2
Robert Varga [Fri, 17 Sep 2021 12:12:57 +0000 (14:12 +0200)]
Bump versions to 2.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie94347689af3a4e5d97ff6cd00d99a6bea8e7dd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate ParserIdentifier.stringFromYangInstanceIdentifier() 18/97518/2
Robert Varga [Sat, 18 Sep 2021 11:41:50 +0000 (13:41 +0200)]
Eliminate ParserIdentifier.stringFromYangInstanceIdentifier()

This is just a pass-through to IdentifierCodec.serialize(), remove it
and update callers.

Change-Id: If8d24b6d2359ff1cbb4b83f75a3af66890a063d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoInline RestconfStreamsConstants 19/97519/2
Robert Varga [Sat, 18 Sep 2021 11:44:17 +0000 (13:44 +0200)]
Inline RestconfStreamsConstants

We have a number of single-use constants, make sure to inline them to
their users, making things a lot clearer.

Change-Id: Ifce07aa63086d90c47b3b6369c2bf7ef01589cf9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix controller mis-bump 11/97511/3
Robert Varga [Fri, 17 Sep 2021 11:32:49 +0000 (13:32 +0200)]
Fix controller mis-bump

We missed an update of controller version, fix that. This also exposes
our failure to migrate a reference to jackson-2.11.

Change-Id: I23887c5520d8042bb56e971a3fcf83cf78d2e102
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.5-SNAPSHOT 08/97508/1
Robert Varga [Fri, 17 Sep 2021 10:33:41 +0000 (12:33 +0200)]
Bump versions to 2.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: Ifad8b18f3e725ffab97775ac038c921ef98455d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide PostDataTransactionUtil.POST_TX_TYPE 00/97500/2
Robert Varga [Wed, 15 Sep 2021 22:10:37 +0000 (00:10 +0200)]
Hide PostDataTransactionUtil.POST_TX_TYPE

This constant is not used elsewhere, hide it.

Change-Id: I22cead85422db82d619c916d9e2f8e0f45a2975c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse Assert.equals() instead of assertTrue() 99/97499/3
Robert Varga [Wed, 15 Sep 2021 21:55:51 +0000 (23:55 +0200)]
Use Assert.equals() instead of assertTrue()

This just hides the intent, fix that up.

Change-Id: I11b868319a74ff0c53ba2a45bf3001d59446d475
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not leak Promises 98/97498/1
Robert Varga [Wed, 15 Sep 2021 21:43:15 +0000 (23:43 +0200)]
Do not leak Promises

We want to propagate only a read-only view of the connection process,
return a Future, not a Promise.

Change-Id: Iccfa83a20c3dd2a33ac4871ad58670256a068c66
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRework createReconnectingClient() 85/97385/12
Robert Varga [Fri, 3 Sep 2021 11:10:24 +0000 (13:10 +0200)]
Rework createReconnectingClient()

We seem to have competing interests going on, where we want some
information from the first connection attempt propagated outwards.

JIRA: NETCONF-784
Change-Id: I232d523b60c36de85fea909c6405b1d7cac39c57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 97/97497/1
Robert Varga [Wed, 15 Sep 2021 15:32:16 +0000 (17:32 +0200)]
Bump MRI upstreams

Adopt:
- odlparent-9.0.6
- yangtools-7.0.8
- mdsal-8.0.5
- controller-4.0.3
- infrautils-2.0.6
- aaa-0.14.3

Change-Id: Ibbc448edc536ddae986d5936264e5e3fcbca6a69
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove DataChangeScope 87/97487/2
Robert Varga [Tue, 14 Sep 2021 00:22:19 +0000 (02:22 +0200)]
Remove DataChangeScope

This class duplicate of Scope, which is a generated enum which has no other
meaning, really. Remove it and migrate users.

JIRA: NETCONF-773
Change-Id: Ibfa7311178a2cc0e09bfaec8228bd1e8f5128eab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RestconfInvokeOperationsUtil 85/97485/5
Robert Varga [Mon, 13 Sep 2021 21:55:39 +0000 (23:55 +0200)]
Remove RestconfInvokeOperationsUtil

This is a stateless utility class, whose only use to make cooperating
code harder to understand. Remove it by moving its methods to
Restconf{Data,InvokeOperations}ServiceImpl, who are its only users.

JIRA: NETCONF-773
Change-Id: Ie2cd32af2b26f09d4196df0c52be737809d10850
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RestconfInvokeOperationsUtilTest 84/97484/4
Robert Varga [Mon, 13 Sep 2021 21:45:51 +0000 (23:45 +0200)]
Remove RestconfInvokeOperationsUtilTest

We are about to remove RestconfInvokeOperationsUtil, integrate its test
into RestconfInvokeOperationsServiceImplTest.

JIRA: NETCONF-773
Change-Id: Ie04f07f0ebf3351a6ac0afc2cb3c1d697097f69f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup RestconfInvokeOperationsUtilTest 83/97483/3
Robert Varga [Mon, 13 Sep 2021 21:34:21 +0000 (23:34 +0200)]
Cleanup RestconfInvokeOperationsUtilTest

Prior to RestconfInvokeOperationsUtil removal, clean up the corresponding test.

JIRA: NETCONF-773
Change-Id: Ib9459e39156ab91030d781a4b25bd2df40aa33f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not use FutureCallbackTx for RPCs and Actions 82/97482/6
Robert Varga [Mon, 13 Sep 2021 20:58:59 +0000 (22:58 +0200)]
Do not use FutureCallbackTx for RPCs and Actions

FutureCallbackTx is on its way out, use a simple Future.catching() to
peel off the RPC/Action caller's use case. This allows us to move
completion handling closer to JAX-RS without the tangle which is
FutureDataFactory.

JIRA: NETCONF-718
Change-Id: Ie891cef7e33b54d608c15a09a10e75c3fc19de9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not pass RestconfStrategy to FutureCallbackTx 81/97481/3
Robert Varga [Mon, 13 Sep 2021 19:07:28 +0000 (21:07 +0200)]
Do not pass RestconfStrategy to FutureCallbackTx

We have gotten rid of transaction chains, there is no point in dealing
with them and interacting with strategy anymore. This simplifies the
logic a bit and paves way for further improvements.

JIRA: NETCONF-773
Change-Id: I597bf31f509efbc839cf48b25bd5657fcb92f13a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate ErrorTag special case 46/97446/2
Robert Varga [Sat, 11 Sep 2021 11:04:21 +0000 (13:04 +0200)]
Eliminate ErrorTag special case

We now have YangError.getErrorTag(), hence we can eliminate this ugly
special case.

Change-Id: I2d2f51a05c8e8e68e5ad97f57cf923d16384c30d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RestconfError.ErrorTag 30/97030/15
Robert Varga [Mon, 26 Jul 2021 21:08:07 +0000 (23:08 +0200)]
Remove RestconfError.ErrorTag

The concept of an error-tag is shared between NETCONF and RESTCONF, or
anything iteracting with YANG. We have a unified definition in
yang.common, which NETCONF is already using. Eliminate
RestconfError.ErrorTag in favor of the yang.common.

Implementation updates are rather straighforward, except the fact we end
up having custom well-known error-tags. Deal with this through
relocation towards RESTCONF-specific ErrorTags, which concentrate all
related tasks.

JIRA: NETCONF-793
Change-Id: I21a79625a2509adabf50f706739c88f9a3359777
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPretty-print error messages 49/97249/6
Dominik Vrbovsky [Thu, 19 Aug 2021 07:32:57 +0000 (09:32 +0200)]
Pretty-print error messages

- Format out error reports to be more user-friendly and better readable
- Add a unit test that shows formating out works correctly

JIRA: NETCONF-807
Change-Id: I4570263f2ffddf9174ae9a46eb84604bc78bab3b
Signed-off-by: Dominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
2 years agoSimplify testing of mountpoints 88/97388/4
Robert Varga [Sat, 4 Sep 2021 01:02:02 +0000 (03:02 +0200)]
Simplify testing of mountpoints

Client dispatcher is not communicating with the underlying session, just
use a simple mock in strict mode. Also eliminates the need for two
warning suppresions.

Change-Id: If5dc9be4c16f2fdf0e0abb5c94fbbf6048cd07fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup ReconnectPromise a bit 87/97387/5
Robert Varga [Sat, 4 Sep 2021 00:48:41 +0000 (02:48 +0200)]
Cleanup ReconnectPromise a bit

ClosedChannelHandler is really a stateless object used by
ReconnectPromise wiring. Acknowledge that fact by removing the class in
favor of a field initialized by an anonoymous inner class.

While we are here, also document locking rules and generally tighten
things up, eliminating a SpotBugs suppression in the process.

Change-Id: I6abc0ddf296dd9e2f5ea6de5a709003cf14edc7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMake createTopologyNodeListPath() a bit more useful 86/97386/3
Robert Varga [Sat, 4 Sep 2021 00:10:59 +0000 (02:10 +0200)]
Make createTopologyNodeListPath() a bit more useful

We are taking an explicit key to construct a KeyedInstanceIdentifier,
which can easily return it back. Expose this functionality to others,
which is useful at least for a test.

Change-Id: I82fab42271adcdbb75f03aaccc750ae5a0b32384
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix spelling in NetconfDeviceCommunicator 83/97383/1
Robert Varga [Fri, 3 Sep 2021 07:47:58 +0000 (09:47 +0200)]
Fix spelling in NetconfDeviceCommunicator

A few instances of confused spelling, fix that up.

Change-Id: I29b41296242043f7808b8da577474b82a431c2a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse Stream.{of,concat} 82/97382/2
Robert Varga [Fri, 3 Sep 2021 07:40:13 +0000 (09:40 +0200)]
Use Stream.{of,concat}

Simplify stream handling by using utility methods more efficiently.

Change-Id: Iba3eaff410973f6e91a2b3933a7438fd02e4adb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove SendErrorExceptionUtil 04/97304/9
Robert Varga [Mon, 23 Aug 2021 23:35:44 +0000 (01:35 +0200)]
Move SendErrorExceptionUtil

SendErrorExceptionUtil is only used in netconf-impl, move it there
along with its tests. This improves our ability to reason about its
interactions.

Change-Id: I4e93c0d3fcbe87a6689f55d592a085d7aa6b8be3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup NetconfCapabilityMonitoringServiceTest 29/97329/3
Robert Varga [Wed, 25 Aug 2021 15:06:50 +0000 (17:06 +0200)]
Cleanup NetconfCapabilityMonitoringServiceTest

Use Set.{copyOf,of} and delete some dead code.

Change-Id: Ic75d3b64c4bdde0f1307836b9c2ea26bf1bcef74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix binding-parent mdsal reference 47/97347/1
Robert Varga [Fri, 27 Aug 2021 10:11:45 +0000 (12:11 +0200)]
Fix binding-parent mdsal reference

We are pointing to 8.0.2, which elicits a rather stern warning. Fix the
declaration to point to 8.0.4.

Change-Id: I3760225d1c4d0d43863f838ce9fec9586d48a4bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.4-SNAPSHOT 30/97330/1
Robert Varga [Wed, 25 Aug 2021 15:44:37 +0000 (17:44 +0200)]
Bump versions to 2.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie3d13f666e18d888271d060ac8b39101a7bbc7b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 92/97292/13
Robert Varga [Mon, 23 Aug 2021 08:53:08 +0000 (10:53 +0200)]
Bump MRI upstreams

Adopt:
- odlparent-9.0.5
- yangtools-7.0.7
- mdsal-8.0.4
- controller-4.0.2
- infrautils-2.0.5
- aaa-0.14.2

Change-Id: I525bcbd1c137cfe00c98b0d31c23de92035a98de
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix revisionless capabilities 93/97293/11
Robert Varga [Mon, 23 Aug 2021 14:02:10 +0000 (16:02 +0200)]
Fix revisionless capabilities

NetconfCapabilityMonitoringService seems to indicate it cannot work with
modules without a revision due to modeling restrictions. This is not
accurate, as we should be using empty string to represent an absent
revision.

JIRA: NETCONF-808
Change-Id: I2dbcdc0cc0bb7e6560a46986c8c06388b8cc23d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove DeserializerExceptionHandler 03/97303/4
Robert Varga [Mon, 23 Aug 2021 23:28:01 +0000 (01:28 +0200)]
Improve DeserializerExceptionHandler

We are getting a deprecation warning, as there exceptionCaught() really
makes sense only on inbound side. This happens to be what we actually
are doing with DeserializerExceptionHandler anyway, so just pick up
ChannelInboundHandlerAdapter and use that as the superclass.

Change-Id: Ic661e4e85f4442a395c820463abf00e71c52543e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove exceptions from utility constructors 38/97238/1
Robert Varga [Tue, 17 Aug 2021 19:54:31 +0000 (21:54 +0200)]
Remove exceptions from utility constructors

The only way to test these is through reflections and they are just dead
weight. Use a simple comment instead.

Change-Id: I526f56b2abf207a0734327a9feb80f34bbd6f2db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReduce NETCONF device disconnect warnings 14/97214/2
Robert Varga [Sat, 14 Aug 2021 12:26:57 +0000 (14:26 +0200)]
Reduce NETCONF device disconnect warnings

Document java.io.EOFException as the natural end-of-stream cause and
handle that case with less alarm as other causes.

JIRA: NETCONF-805
Change-Id: If3b07125434e2a5faec90b1cd0144dc3d9f6c818
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide StringModuleInstanceIdentifierCodec 13/97213/5
Robert Varga [Sat, 14 Aug 2021 00:49:18 +0000 (02:49 +0200)]
Hide StringModuleInstanceIdentifierCodec

This is a package-internal utility class, hide it from outside view and
optimize its dispatch. This entire class is quite dubious and needs to
be re-evaluated in terms of what it really provides -- it is not even
covered by UT.

Change-Id: I62a974f82b0ad5db6e7df7c4b09a1379ff23d7c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReduce use of StringModuleInstanceIdentifierCodec 12/97212/2
Robert Varga [Sat, 14 Aug 2021 00:33:45 +0000 (02:33 +0200)]
Reduce use of StringModuleInstanceIdentifierCodec

JsonPatchBodyReader internally does not really need the entire codec,
just the underlying DataSchemaContextTree.

Change-Id: I6c2bca6609e10eb9f801e1e5ac1aab439eed3b8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix patch target parsing 10/97210/10
Robert Varga [Fri, 13 Aug 2021 20:28:24 +0000 (22:28 +0200)]
Fix patch target parsing

Our tests were not updated for RFC8040, hence they are written with
weird codecs which utterly do not match RFC8072 definition of
yang-patch.

The problem is that patch edit's target is interpreted in terms of an
extension to the URL, i.e. it does NOT follow JSON nor XML parsing
rules, nor is it anything in-between -- we must use ParserIdentifier's
facilities.

Update the parsers and the test suites, ditching a lot of complexity
in process of doing so.

JIRA: NETCONF-804
Change-Id: If9d9c77e0e2397ffdcb8e8c0f0fef0b9b02bac8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix XmlPatchBodyReader revision handling 09/97209/1
Robert Varga [Fri, 13 Aug 2021 20:14:41 +0000 (22:14 +0200)]
Fix XmlPatchBodyReader revision handling

There is a nullness bug around the conversions through string and
calling Revision.of(). Our current interfaces allow us to do better,
with fewer objects.

Change-Id: I68163b7b8766e6063a27d280bae9c049a675ac76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoLower codec instantiation scope 08/97208/1
Robert Varga [Fri, 13 Aug 2021 19:59:42 +0000 (21:59 +0200)]
Lower codec instantiation scope

Do not instantiate codec until we really need it. This also
short-circuits some of the other setup code.

Change-Id: I1b38951699395f18fe961e3c752a8bd8dde5eac5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup StringModuleInstanceIdentifierCodec a bit 07/97207/1
Robert Varga [Fri, 13 Aug 2021 19:25:23 +0000 (21:25 +0200)]
Cleanup StringModuleInstanceIdentifierCodec a bit

Compact the implementation a bit by reusing code paths. Also we do not
really allow null defaultPrefix, but check for it being empty.

Make this.defaultPrefix nullable, which allows us to simplify the check
in moduleForPrefix() down to a simple null check.

JIRA: NETCONF-804
Change-Id: Ifa01017613761466a32e371d56b0bb6521145115
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup ObjectCodec a bit 06/97206/1
Robert Varga [Fri, 13 Aug 2021 19:33:58 +0000 (21:33 +0200)]
Cleanup ObjectCodec a bit

Use a return expression and do not use the useless this.obviously
field references.

Change-Id: I2144d8e855ff56269118df505c43741bb292e282
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove JsonPatchBodyReader's StringBuilder 05/97205/1
Robert Varga [Fri, 13 Aug 2021 17:37:29 +0000 (19:37 +0200)]
Move JsonPatchBodyReader's StringBuilder

readEditDefinition() does not care how the resulting string is being
created -- move StringBuilder allocation down to readValueNode() and let
it be a contract between that method and readValueObject().

Change-Id: Ic02ffea2acbb9686066a34aaca9cec2f914d2700
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReport bad document on empty body 03/97203/1
Robert Varga [Fri, 13 Aug 2021 14:00:38 +0000 (16:00 +0200)]
Report bad document on empty body

If we do not get a PatchContext report a 400 bad request instead
of 500 server failure.

JIRA: NETCONF-803
Change-Id: Ic314273cfa6074da16cf0b9182c94641358ccf38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReport data-missing when an invalid stream is requested 42/97142/2
Robert Varga [Wed, 11 Aug 2021 13:41:54 +0000 (15:41 +0200)]
Report data-missing when an invalid stream is requested

We should not be throwing a random IAE, but rather use a
RestconfDocumentedException to report the correct status.

JIRA: NETCONF-802
Change-Id: I4ac0a24f0acb059f08d14ab0abd4021e91b0d07b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix Server-Sent Events routing 32/97132/1
Robert Varga [Wed, 11 Aug 2021 09:38:04 +0000 (11:38 +0200)]
Fix Server-Sent Events routing

I2534a6418dc0ca1f1d6aad3d41f874781ea1930d dropped a @Path specification,
which results in a path mismatch. Restore the specification.

JIRA: NETCONF-801
Change-Id: I88a9f8ce258b21c8f803cb05609822e1e4babba2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse well-known Status enumeration 08/97108/1
Robert Varga [Mon, 9 Aug 2021 13:08:01 +0000 (15:08 +0200)]
Use well-known Status enumeration

Response.status() can be used with an int, but that ends up walking all
Status.values() in an attempt to find the corresponding constant. While
we end up hitting the first element, use Status.OK explicitly to speed
things up a bit.

Change-Id: I7c72a88602c95ec4c7274369a9e5c613c3ce3b9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not report failure on empty action output 33/97033/10
PeterSuna [Tue, 27 Jul 2021 12:47:11 +0000 (14:47 +0200)]
Do not report failure on empty action output

When an action invocation results in an empty container
we should be emitting a normal 204 response, not go through
the error path -- as per RFC8040 section 6.3.

JIRA: NETCONF-799
Change-Id: Ie8f3d098fc65828998b088bfed5ca89e2f438828
Signed-off-by: PeterSuna <Peter.Suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd infrautils features to netconf-karaf 80/97080/1
Tomas Cere [Wed, 4 Aug 2021 11:15:26 +0000 (13:15 +0200)]
Add infrautils features to netconf-karaf

Needed as well for csit, make sure to pull it in here
so we dont have to modify the features repo in jjb scripts.

Change-Id: I76b51a7fc2f1bd70f6eadee9fc045f78087f911c
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
2 years agoPull in controller-testing features in netconf karaf 79/97079/1
Tomas Cere [Wed, 4 Aug 2021 08:32:22 +0000 (10:32 +0200)]
Pull in controller-testing features in netconf karaf

Looks like we need this for csit.

Change-Id: I29d6de3943081d24e7a2e79280587fb89efe5b15
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
2 years agoBump versions to 2.0.3-SNAPSHOT 52/97052/2
Robert Varga [Mon, 2 Aug 2021 13:40:13 +0000 (15:40 +0200)]
Bump versions to 2.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I3b46e1c7dfe80f4d86f552a14aae356fb60ceb59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPublish netconf-karaf artifact 62/97062/2
Tomas Cere [Wed, 28 Jul 2021 11:29:40 +0000 (13:29 +0200)]
Publish netconf-karaf artifact

We want to eventually start running csit on individual distros
so make sure we have an artifact published.

Change-Id: I46aba477df05b175f0ad2e1df313ae37f51e59c2
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
2 years agoUse RFC 8040 paths by testtool 46/97046/7
Ivan Hrasko [Thu, 29 Jul 2021 08:11:12 +0000 (10:11 +0200)]
Use RFC 8040 paths by testtool

Switch to use RFC 8040 implementation paths
for device registration in testool.

JIRA: NETCONF-796
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Change-Id: Id86fc5e7d6f0339f78e3dbc0c20aa45457bec799

2 years agoFix testtool device registration 10/95210/46
Illia [Mon, 22 Feb 2021 11:39:30 +0000 (13:39 +0200)]
Fix testtool device registration

The NETCONF testtool functionality for automatic bulk
registration of devices was broken for some time.

We have decided to not only fix the problem but also
refactor testtool the following way:

- Create request bodies using NormalizedNodes
instead of using config templates.

- Register devices with PATCH instead of POST
to allow merging nodes into topology and prevent
error for consequent batch requests.

JIRA: NETCONF-796
Change-Id: Ifd7c74e9b07bb56b84e6a1ffea0bf2809b85246c
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoModernize test suite 47/97047/3
Dominik Vrbovsky [Fri, 30 Jul 2021 09:25:53 +0000 (11:25 +0200)]
Modernize test suite

- Remove try catch blocks and use assertThrows method instead
- Use assertEquals method where possible

Change-Id: I5790d8197187e2130b52920b8659acd56cc98e57
Signed-off-by: Dominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
2 years agoUse Java 11 HttpClient 18/96918/6
Robert Varga [Mon, 19 Jul 2021 10:00:58 +0000 (12:00 +0200)]
Use Java 11 HttpClient

Reduce dependencies by using JRE-provided HTTP client.

JIRA: NETCONF-751
Change-Id: I49a51306a042ed534bafd7174633e300f00ce305
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove DocumentedException.ErrorTag 29/97029/5
Robert Varga [Mon, 26 Jul 2021 20:08:47 +0000 (22:08 +0200)]
Remove DocumentedException.ErrorTag

We have an openly-extensible ErrorTag concept in yang-common. Remove
the hard-coded enum we have in DocumentedException.

JIRA: NETCONF-793
Change-Id: Ic4e1bebff549c5fd09a78995b8e76e37905241ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RestconfError.ErrorType 28/97028/6
Robert Varga [Mon, 26 Jul 2021 14:39:56 +0000 (16:39 +0200)]
Remove RestconfError.ErrorType

yang-common is providing us with a replacement, switch to using it,
which allows us to ditch some amount of legacy code.

JIRA: NETCONF-793
Change-Id: Id71b5f7a992456ff17b53795e54e7a8b49120586
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove DocumentedException.ErrorType 27/97027/4
Robert Varga [Mon, 26 Jul 2021 14:06:43 +0000 (16:06 +0200)]
Remove DocumentedException.ErrorType

Use ErrorType from yang-common instead of defining our own. This allows
us to reuse some mapping code as well.

JIRA: NETCONF-793
Change-Id: I00c3344f15f5e052784e9f439a025678b093655e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove DocumentedException.ErrorSeverity 26/97026/4
Robert Varga [Mon, 26 Jul 2021 13:22:59 +0000 (15:22 +0200)]
Remove DocumentedException.ErrorSeverity

Use ErrorServerity from yang-common, eliminating some amount of
duplication. This also allows us to take advantage of bidirectional
mapping to (now legacy) RpcError.ErrorSeverity.

Also modernize test suite to perform correct asserts.

JIRA: NETCONF-793
Change-Id: Ie7e592233e6a948a9a991e4309315e1fb857b8d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup DocumentedException and subclasses 25/97025/2
Robert Varga [Mon, 26 Jul 2021 13:09:52 +0000 (15:09 +0200)]
Cleanup DocumentedException and subclasses

Do not qualify Error{Type,Tag,Severity} and use Map.of() instead
of Collections.emptyMap().

Change-Id: I9eb201a2c02f8ac4370341a98fdf94a1f7a6425e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove Jakub Toth from committers 20/95520/3
Robert Varga [Thu, 18 Mar 2021 09:41:51 +0000 (10:41 +0100)]
Remove Jakub Toth from committers

Jakub has been mostly inactive in this project since 18.8.2020. He
has asked to step down now.

Change-Id: I8ee4705ee09bd6666b48bbd4dc10a9936b445cc9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 23/97023/3
Robert Varga [Sun, 25 Jul 2021 11:02:17 +0000 (13:02 +0200)]
Bump upstream versions

Adopt mdsal-8.0.1, controller-4.0.1, aaa-0.14.1. Also fix unit test
assertion now that yangtools reports the right layer.

Change-Id: If8c205094a55d8c956d575af8a8d7cec5eb2aadf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoLog full exception when we are missing errors 41/96941/2
Robert Varga [Tue, 20 Jul 2021 11:09:07 +0000 (13:09 +0200)]
Log full exception when we are missing errors

Our current logging does not identify the source of the offending
exception. Make sure we log the entire input exception, so that
offenders may be fixed up.

JIRA: NETCONF-789
Change-Id: I30a24a615ce221a838e1ad95f6b11263e2d6f8f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.2-SNAPSHOT 20/96920/1
Robert Varga [Mon, 19 Jul 2021 10:49:55 +0000 (12:49 +0200)]
Bump versions to 2.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: Icfc93a2326c62319d8e82008141c2b7c21409353
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump janino to 3.1.4 16/96916/1
Robert Varga [Mon, 19 Jul 2021 08:59:50 +0000 (10:59 +0200)]
Bump janino to 3.1.4

https://janino-compiler.github.io/janino/changelog.html

Change-Id: I40ce79d4001a10af6bedfaf8ff5657036d892a88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert netconf-client to OSGi DS 04/96904/6
Robert Varga [Fri, 16 Jul 2021 16:12:35 +0000 (18:12 +0200)]
Convert netconf-client to OSGi DS

This is a rather straighforward migration, but we also ditch the
now-unneeded Autocloseable from AbstractNetconfDispatcher.

JIRA: NETCONF-791
Change-Id: I4737ef30e0ff3b12bbaedcf8940edf80d8eb7d7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDitch blueprint-maven-plugin 07/96907/2
Robert Varga [Fri, 16 Jul 2021 17:21:40 +0000 (19:21 +0200)]
Ditch blueprint-maven-plugin

We have two artifacts using a combination of generated and hand-written
blueprint containers. This makes reasoning about the actual wiring
rather hard. Inline the generated XML into the hand-written one, so that
we can untangle it more easily.

JIRA: NETCONF-749
Change-Id: I380600215a0fadf438b9a44e6ea4465f15d63fbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup NetconfConsoleUtils 06/96906/2
Robert Varga [Fri, 16 Jul 2021 16:56:35 +0000 (18:56 +0200)]
Cleanup NetconfConsoleUtils

We have a few strange methods here, clean them up to streamline.

Change-Id: Icf0ca4661d4b62cf9e3855af99a6611d1b719869
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert netconf-console to OSGi DS 05/96905/2
Robert Varga [Fri, 16 Jul 2021 16:36:16 +0000 (18:36 +0200)]
Convert netconf-console to OSGi DS

netconf-console is a very simple component, convert it to OSGi DS.

JIRA: NETCONF-792
Change-Id: Ic92a59b52a85af67a8ed648a53cb11a083928ece
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove old AbstractNetconfDispatcher.getReconnectingClient() 03/96903/1
Robert Varga [Fri, 16 Jul 2021 12:52:14 +0000 (14:52 +0200)]
Remove old AbstractNetconfDispatcher.getReconnectingClient()

This method is not used anywhere, remove it. Also deprecate the
corresponding re-establishment policy, as it is no longer used.

Change-Id: I89b5ebf3197e8d459501b11433f3c9eaa3845281
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove Rfc8040.Restconf constants 86/96886/2
Robert Varga [Wed, 14 Jul 2021 11:38:11 +0000 (13:38 +0200)]
Move Rfc8040.Restconf constants

We are using most of these constants only in export, clean them up and
move them to their sole user.

Change-Id: I493bb2baed521367ff78d6ec07ad64ee56516c32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove mapModulesByIetfYangLibraryYang() 85/96885/2
Robert Varga [Wed, 14 Jul 2021 11:15:23 +0000 (13:15 +0200)]
Move mapModulesByIetfYangLibraryYang()

This method has only a single production caller, migrate it to that
class, making reducing utility overloads.

Change-Id: I2c210e93797fbe5575c524e54c6c3ad6841b950f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMigrate getDataChildByName() callers 78/96878/2
Robert Varga [Tue, 13 Jul 2021 12:48:06 +0000 (14:48 +0200)]
Migrate getDataChildByName() callers

ControllerContext missed the migration of getDataChildByName(), hence
it's nullness checks are ineffective and it is tripping over. Make sure
we use plain dataChildByName() when we can tolerate missing data.

JIRA: NETCONF-790
Change-Id: Ic3aa31c764d08c199085b750674e5f98c9165f2e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate tests with Akka Artery 15/95515/13
Kostiantyn Nosach [Wed, 17 Mar 2021 13:57:14 +0000 (15:57 +0200)]
Update tests with Akka Artery

Upstream has switched to using Artery TCP instead of classic transport.
Update test config file
netconf/netconf-topology-singleton/src/test/resources/application.conf
with new transport (artery-tcp)

JIRA: NETCONF-787
Change-Id: I70a4a5bb23f53166d8b164fced7f1311f1d7f764
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSingle out RestconfConstants.MOUNT 62/96862/1
Robert Varga [Sat, 10 Jul 2021 05:18:02 +0000 (07:18 +0200)]
Single out RestconfConstants.MOUNT

This constant should be used via its PathArgument equivalent. Reduce
its use in tests and mark it for removal.

Change-Id: Ia3b75b95b236e35167ffb213c138930ed419a7f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove RestconfConstants.IDENTIFIER 61/96861/2
Robert Varga [Fri, 9 Jul 2021 23:02:58 +0000 (01:02 +0200)]
Remove RestconfConstants.IDENTIFIER

This constant is not really useful, as it is referenced once in
production code and once in testing. Inline the definitions, as we
really want to make an explicit assertion in tests.

Change-Id: I7fd7a6e64562cb054b15011c1aad7624c47fea3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCollapse streams.{sse,websocket} 60/96860/2
Robert Varga [Fri, 9 Jul 2021 22:52:24 +0000 (00:52 +0200)]
Collapse streams.{sse,websocket}

This two packages have just a few classes, collapse them to simplify
overall structure.

Change-Id: Ib3df507ac7b68e8641b933ac45c42f3bd7494437
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRestconfTransaction always operates on a single datastore 59/96859/3
Robert Varga [Fri, 9 Jul 2021 15:53:48 +0000 (17:53 +0200)]
RestconfTransaction always operates on a single datastore

Previous refactors in this area have suffered from lack of actual
clarity. All legitimate users of RestconfTransaction operate on
CONFIGURATION, hence use that without allowing a possiblity to
mix&match datastore access.

Change-Id: Ief9ff8d51e12c3cd3e04e55f9cd04b2b42f81068
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClean up RestconfInvokeOperationsUtil 58/96858/2
Robert Varga [Fri, 9 Jul 2021 14:38:57 +0000 (16:38 +0200)]
Clean up RestconfInvokeOperationsUtil

RPC/action invocation through mount point and service is the same,
except for an additional lookup/throws. Restructure code to take
advantage of that.

JIRA: NETCONF-773
Change-Id: I68a4d75564b2f0a42070ad9f8ebd140109a6eb62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClean up listener activation 57/96857/3
Robert Varga [Fri, 9 Jul 2021 14:16:09 +0000 (16:16 +0200)]
Clean up listener activation

We have a two-step process in listener create/activate. Move methods
around so that the process can become properly stateful, without
giving out too much in terms of actual implementation methods.

JIRA: NETCONF-773
Change-Id: Ib9aa28a7b00e8f292a8a97a56d472ed51a9c45fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPackage ietf-yang-patch 56/96856/1
Robert Varga [Fri, 9 Jul 2021 12:41:24 +0000 (14:41 +0200)]
Package ietf-yang-patch

This is the model published in RFC8072, which gives us some basic
structural elements. Its value will increase once we can generate
structures for rc:yang-data.

JIRA: NETCONF-788
Change-Id: I063cea05f33cc8191db4320ee686b253b0471679
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRename {Xml,Json}ToPatchBodyReader 55/96855/1
Robert Varga [Fri, 9 Jul 2021 12:31:11 +0000 (14:31 +0200)]
Rename {Xml,Json}ToPatchBodyReader

Make sure we have consistent naming here by dropping 'To'.

JIRA: NETCONF-773
Change-Id: If1fd3cb6b07c97c7faf18b8d8324e81e9888c084
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove validation methods 54/96854/3
Robert Varga [Fri, 9 Jul 2021 10:42:56 +0000 (12:42 +0200)]
Move validation methods

PutDataTransactionUtil is rather ugly in that it is used only
by a single implementation. Start disolving it by moving data validation
methods to RestconfDataServiceImpl.

JIRA: NETCONF-773
Change-Id: I365c087392fb0f593560c4dac3583622b341b037
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd AbstractPatchStatusBodyWriter 53/96853/3
Robert Varga [Fri, 9 Jul 2021 10:11:35 +0000 (12:11 +0200)]
Add AbstractPatchStatusBodyWriter

We have two specializations of this writer, create a common superclass
and share common code. Also improve error handling by mapping wrapping
XMLStreamException into an IOException.

JIRA: NETCONF-773
Change-Id: I000b9c7b333f59d000dc28ce2e75ee65477da193
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd AbstractNormalizedNodeBodyWriter 52/96852/3
Robert Varga [Fri, 9 Jul 2021 10:02:02 +0000 (12:02 +0200)]
Add AbstractNormalizedNodeBodyWriter

We have two specializations of this writer, share common code in
an abstract class. Also use more regular class naming.

JIRA: NETCONF-773
Change-Id: I8f52090de19a44a0293cb2cb07bfb9623250e34c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove AbstractNormalizedNodeBodyReader 51/96851/3
Robert Varga [Fri, 9 Jul 2021 09:58:25 +0000 (11:58 +0200)]
Move AbstractNormalizedNodeBodyReader

We have only two specializations in jersey.providers package, move
the base class there.

JIRA: NETCONF-773
Change-Id: I1ae2cadff525af8089a511738989de68a3866df7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor source export 50/96850/3
Robert Varga [Fri, 9 Jul 2021 09:53:51 +0000 (11:53 +0200)]
Refactor source export

Add AbstractSchemaExportBodyWriter and specialize it for YIN/YANG.
Also eliminate jersey.provides.schema package, as it does not really
make sense.

JIRA: NETCONF-773
Change-Id: Ia099e927da10f451cd843ba947a79312dd35af19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>