netconf.git
3 weeks agoMove {Hello,XML}XMLMessageWriter 94/113094/6
Robert Varga [Sun, 11 Aug 2024 08:27:12 +0000 (10:27 +0200)]
Move {Hello,XML}XMLMessageWriter

XMLMessageWriter is a well-defined writer, independent of anything else
in netconf.nettyutil. Move it to netconf.codec, whence it can be freely
used without bringing in nettyutil baggage.

Change-Id: Id2d2ed69db2b01d053b723df41d0a99c392aa06b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoRefactor delayed MessageWriter replacement 89/113089/4
Robert Varga [Sat, 10 Aug 2024 20:10:38 +0000 (22:10 +0200)]
Refactor delayed MessageWriter replacement

AbstractNetconfSession has a Runnable extension to allow for replacing
the MessageWriter after the next message is processed.

This is really related to DefaultStartExi, which is driving this change
-- but the change can only happen *after* the RPC response is encoded
using current writer.

Make this transition more explicit by moving the mechanics to
MessageEncoder.

This improves message send, as we do not need to hook to every write
just to update it. It also makes it more accurate: the writer needs to
be switched just after the message is *encoded*, not when is written to
wire.

Change-Id: I992e8f0ea11bf5507dbed966cea1fe608ccb6f04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoRefactor FrameEncoder 83/113083/6
Robert Varga [Sat, 10 Aug 2024 01:11:10 +0000 (03:11 +0200)]
Refactor FrameEncoder

We have MessageEncoder and FrameEncoder working in tandem in the
pipeline. While this is fine and dandy from design perspective, it
leaves a bit left to be desired.

The problem is that we end up buffering the raw content of the message
into one ByteBuf (in MessageEncoder) and then copy it to another ByteBuf
(in FrameEncoder).

This is wasteful for FramingMechanism.EOM, which just wants to write the
message out and then append a fre more bytes.

Refactor FrameEncoder into FramingSupport class, which exposes a
writeMessage(), which takes a MessageWriter and a NetconfMessage and
encodes/frames it according to its rules as an atomic operation.

This removes double buffering from EOM framing, but keeps things as they
are for CHUNK framing -- with a note to improve it later.

Change-Id: Ied01af2d6dd106a8d2b98198bde911a5ea09ae08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoSplit MessageEncoder up 88/113088/10
Robert Varga [Sat, 10 Aug 2024 13:40:08 +0000 (15:40 +0200)]
Split MessageEncoder up

MessageEncoder has currently two functions:
- it receives a NetconfMessage from the pipeline
- it encodes it into a ByteBuf
- it passes the ByteBuf down the pipeline

Refactor MessageEncoder.encodeTo() to a separate class, MessageWriter,
which handles the details of how to write a NetconfMessage into an
OutputStream.

This makes MessageEncoder a final class, which has the notion of which
MessageWriter it is currently using -- and that can be switched from the
pipeline context.

This completely eliminates the need for modifying the pipeline when
switch XML/EXI and provides for nice integration surface for further
consolidation.

This entire exercise means we have only four objects dealing with
default XML encoding -- be it pretty-printing or otherwise.

Change-Id: I8bb4e75465da26e655226c5c83853adc9c47b670
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoImprove OpenAPI parameters validation 27/113027/10
Matej Sramcik [Wed, 7 Aug 2024 10:16:07 +0000 (12:16 +0200)]
Improve OpenAPI parameters validation

Check nullability of width, depth, offset and limit at beginning
and pass them further like int instead of Integer.

JIRA: NETCONF-1346
Change-Id: I22388eff543d25b404736d45c2ca554a61e0b497
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 weeks agoFix YangErrorsBody propagation 61/113261/3
Robert Varga [Mon, 26 Aug 2024 22:04:28 +0000 (00:04 +0200)]
Fix YangErrorsBody propagation

YangErrorsBody needs to be wrapped with JaxRsFormattableBody to
correctly match the writer, which needs pretty-print information.

JIRA: NETCONF-1369
Change-Id: Iefb4b58b63eacc571c0bb7b76b3d595903009408
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoFix jira link 48/113248/4
lubos-cicut [Mon, 26 Aug 2024 13:28:45 +0000 (15:28 +0200)]
Fix jira link

jira.opendaylight.org indirection does not work correctly, hence our tox
verify is broken. Fix it by explicitly linking to
lf-opendaylight.atlassian.net.

Change-Id: I98f0e60814f8699145d3dcb1aa4e566c3f438c96
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoAcquire JAX-RS Principal eagerly 53/113253/2
Robert Varga [Mon, 26 Aug 2024 17:04:20 +0000 (19:04 +0200)]
Acquire JAX-RS Principal eagerly

SecurityContext's methods only work while we are executing in the JAX-RS
framework thread. This means we need to extract the principal (and any
permission-related info) before the request execution enters its
asynchronous phase.

Change-Id: If520a0bae478b92f9a03a5be143fdf8637980850
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoWrap YangPatchStatusBody with JaxRsFormattableBody 52/113252/1
Robert Varga [Mon, 26 Aug 2024 16:40:02 +0000 (18:40 +0200)]
Wrap YangPatchStatusBody with JaxRsFormattableBody

JAX-RS handling of FormattableBody requires use of JaxRsFormattableBody,
as we need the pretty-print parameter. Previous conversion has missed
the case of YANG patch.

JIRA: NETCONF-1368
Change-Id: I298ff44267a1716d5f4f2d1dd9d22de053bcf320
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 weeks agoAdapt user guide to Netty changes 70/113170/2
lubos-cicut [Wed, 21 Aug 2024 06:33:11 +0000 (08:33 +0200)]
Adapt user guide to Netty changes

Update netconf user guide to Netty based endpoint settings.

JIRA: NETCONF-1363
Change-Id: Id7c2712d37e3a7dad919e4acbfa1ae6876e30a43
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 weeks agoNetty based Restconf server 52/111752/61
Ruslan Kashapov [Mon, 11 Mar 2024 09:57:14 +0000 (10:57 +0100)]
Netty based Restconf server

- Init via restconf-nb OSGi service, TLS supported
- AAA Shiro integration for Basic Auth and Principal delivery
- SSE overlay adapter integrating RestconfStream.Registry
- Request dispatcher processing for restconf resource URIs
  plus /modules and resource discovery URIs
- error responses using restconf model

JIRA: NETCONF-873
Change-Id: I18b73302973631914f402997f0bf588b3bea7676
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
3 weeks agoUse empty line as message separator in SSE stream 07/113107/3
Ruslan Kashapov [Tue, 13 Aug 2024 08:47:16 +0000 (11:47 +0300)]
Use empty line as message separator in SSE stream

The double end-line as a message separator wasn't clearly described
in a spec, so it was missed initially (NETCONF-1339).

The external clients like postman rely on this separator
and it makes it consistent with jaxrs implementation.

Also:
- fixed javadoc reference
- lowered log level for every connection message
- using proper ping message wrapper

JIRA: NETCONF-1366
Change-Id: I0cf9cac5cf707315928e0e739f3ad5776271fbc6
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 weeks agoFix top level element insert failure 96/113096/3
Ruslan Kashapov [Mon, 12 Aug 2024 11:32:49 +0000 (14:32 +0300)]
Fix top level element insert failure

Non-null empty path identifier points to abstract root,
using it as data node identifier results validation error.

JIRA: NETCONF-1359
Change-Id: I2a66700ac5578990ed956de10f23155cf4f3c675
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
4 weeks agoUse simple WebContext.name() 75/113075/3
Robert Varga [Fri, 9 Aug 2024 15:54:54 +0000 (17:54 +0200)]
Use simple WebContext.name()

OSGi HTTP Whiteboard requires symbolic-name for names, otherwise we can
wreck a ton of things. Simplify the names.

JIRA: NETCONF-1358
Change-Id: Ia6c22dfe098e77717a5a8914237b078f1fc121fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 weeks agoSimplify NetconfOperationChainedExecution 87/113087/2
Robert Varga [Sat, 10 Aug 2024 10:42:11 +0000 (12:42 +0200)]
Simplify NetconfOperationChainedExecution

There is only a single implementation that reports being a termination
point. Rather than having these checks, just use 'null' to indicate
there is no subsequent operation.

Change-Id: I0c46ea596aec4d18ed8afa0bd39d461a4ae64c52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 weeks agoEliminate cliendId from XMLMessageEncoder 86/113086/1
Robert Varga [Sat, 10 Aug 2024 09:21:27 +0000 (11:21 +0200)]
Eliminate cliendId from XMLMessageEncoder

This is old baggage coming from the initial implementation. Let's not
modify the message being sent, as the clientId field is never
initialized to anything but null.

Change-Id: If7006647abd33a4bc8257082261bf8e1ac6cafb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 weeks agoCentralize MessageEncoder dispatch 85/113085/2
Robert Varga [Sat, 10 Aug 2024 01:53:16 +0000 (03:53 +0200)]
Centralize MessageEncoder dispatch

Both EXI and XML MessageEncoders end up needing an OutputStream,
containing mostly copy&pasted code around this aspect.

Pull the common bits down, focusing encoders on their actual job --
eliminating dependencies and making it clear we can disconnect the
actual encoder from the pipeline.

Change-Id: I6b239f9e83959c26a06e993b86336471c0e79b63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoImprove {Frame,Message}Encoder constructor 82/113082/1
Robert Varga [Fri, 9 Aug 2024 20:31:22 +0000 (22:31 +0200)]
Improve {Frame,Message}Encoder constructor

We are operating on ByteBuf.class and NetconfMessage.class. Pass that
information down to MessageToByteEncoder, bypassing some reflective work
therein.

Change-Id: I418c5c9fe72a642092d3af5b820d17e5780f91c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAllocate AbstractServerRequest.uuid lazily 79/113079/1
Robert Varga [Fri, 9 Aug 2024 18:53:41 +0000 (20:53 +0200)]
Allocate AbstractServerRequest.uuid lazily

Rather than paying the cost of generating the UIID for all requests,
allocate the UUID only when it is first accessed.

Change-Id: I8383d61fc8fe455ceb62ed7b1c4315a7e605a551
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoBump mina-sshd to 2.13.2 77/113077/1
Robert Varga [Fri, 9 Aug 2024 16:51:46 +0000 (18:51 +0200)]
Bump mina-sshd to 2.13.2

https://github.com/apache/mina-sshd/blob/master/docs/changes/2.13.2.md

Change-Id: I52a5d769763a4e59722f0859ce7523b1e442c2d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd ServerRequest.uuid() 54/113054/3
Robert Varga [Fri, 9 Aug 2024 02:02:17 +0000 (04:02 +0200)]
Add ServerRequest.uuid()

We will be exposing more information about request processing, for which
we need something we can correlate on.

UUID.randomUUID() provides a reasonably secure identifier for these
purposes -- and this patch exposes it as ServerRequest.uuid().

Change-Id: Id8bcad37651cf82f6e8457c9ed156d19472e5337
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoBump versions to 8.0.1-SNAPSHOT 56/113056/1
Robert Varga [Fri, 9 Aug 2024 02:39:15 +0000 (04:39 +0200)]
Bump versions to 8.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I92e694e125460dfae9a04d570d0f52742da0439e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRelease netconf v8.0.0
jenkins-releng [Fri, 9 Aug 2024 00:44:09 +0000 (00:44 +0000)]
Release netconf

6 weeks agoAdd a gitlint profile and tox configuration 09/102209/4
guillaume.lambert [Tue, 23 Aug 2022 13:18:38 +0000 (15:18 +0200)]
Add a gitlint profile and tox configuration

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I8704f9199768ed76b064c438c0b2f9e1578a4241

6 weeks agoUnify certificates and keys payload 79/112579/17
lubos-cicut [Tue, 16 Jul 2024 11:37:47 +0000 (13:37 +0200)]
Unify certificates and keys payload

Use PEM format in payloads for rpcs input. Now for keystore rpcs
requires the use of BEGIN and END prefixes. Input is validated in
rpc, so we can no longer store an invalid key or certificate in the
keystore.

JIRA: NETCONF-1304
Change-Id: I3e2608c895046136da816d7c1c714f00558f0c98
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd keystore documentation 47/112647/7
lubos-cicut [Fri, 19 Jul 2024 11:04:16 +0000 (13:04 +0200)]
Add keystore documentation

Improved guide how to add keys and certificates to netconf-keystore.

JIRA: NETCONF-596
Change-Id: I39a62305ea368c2bbd42fd649903b4fe10881c3d
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
6 weeks agoUpdate de-serialization 26/112526/9
lubos-cicut [Tue, 16 Jul 2024 06:37:56 +0000 (08:37 +0200)]
Update de-serialization

Keys de-serialization is ow universal with no limitation on algorithm
used.

JIRA: NETCONF-1334
Change-Id: I99b68637972cc33703c520abd438dc3dc39ab04a
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
6 weeks agoUpdate netconf-keystore model 25/112525/8
lubos-cicut [Tue, 16 Jul 2024 06:21:43 +0000 (08:21 +0200)]
Update netconf-keystore model

Under keystore-entry/key-credential added 'algorithm' (string) and
'public-key' (binary) leafs, 'password' leaf status set to deprecate,
and under private-keys/private-key added 'algorithm' (string) leaf.

JIRA: NETCONF-1334
Change-Id: I46e0f6da4f1f60343c0aa9a24aba4505d7edcec5
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
6 weeks agoFix documentation 41/109741/3
Samuel Schneider [Thu, 11 Jan 2024 11:45:40 +0000 (12:45 +0100)]
Fix documentation

Fix minor mistake in documentation.
For Literal Blocks to work there need to be empty line after "::".

Change-Id: Ib43ec01b5fae6f5c6ce2469e380a8f15714d3435
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
6 weeks agoImprove AbstractNetconfSession.replace() type safety 01/113001/8
Robert Varga [Tue, 6 Aug 2024 18:36:25 +0000 (20:36 +0200)]
Improve AbstractNetconfSession.replace() type safety

This requires that we replace like-for-like, ensuring we can look up
handlers by their function.

JIRA: NETCONF-944
Change-Id: If86c638a76df7311c8e597780f66901e80088d80
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoUpdate restconf northbound guide 78/112978/4
Matej Sramcik [Mon, 5 Aug 2024 13:02:50 +0000 (15:02 +0200)]
Update restconf northbound guide

Update restconf northbound configuration to correspond
with OSGiNorthbound.Configuration.

JIRA: NETCONF-1354
Change-Id: Ie370a4e02bfbfe5d9db084f122f7cf58c256e2b3
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
6 weeks agoReturn restconf-nb configuration file 77/112977/3
Matej Sramcik [Mon, 5 Aug 2024 13:02:50 +0000 (15:02 +0200)]
Return restconf-nb configuration file

Bring back restconf-nb default configuration file
that was removed in NETCONF-1219.

Configuration file contain all actual parameters
defined in OSGiNorthbound.Configuration.

JIRA: NETCONF-1354
Change-Id: Ibffdf43217f145fe287271ec5b96d4172aac3478
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
6 weeks agoAllow URL provider to be updated dynamically 02/113002/5
Robert Varga [Tue, 6 Aug 2024 20:51:14 +0000 (22:51 +0200)]
Allow URL provider to be updated dynamically

Constructor injection is causing a restart, which in turn leads to CSS
provider restart (as it is briefly unused).

Make the URL provider ReferencePolicy.DYNAMIC, allowing it to be updated
without further churn.

JIRA: NETCONF-1356
Change-Id: I2ec8123ae5d6d1cc588491338b4e637e4ccad7bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRequire SessionListener in session and negotiator 99/112999/3
Robert Varga [Tue, 6 Aug 2024 16:39:44 +0000 (18:39 +0200)]
Require SessionListener in session and negotiator

The negotiator is forwarding lifecycle events to the listener, hence we
are risking NPEs if we allow it to be null.

Make require check for it being null.

Change-Id: Ib6577f7404b5e3f89ff9377331e93199f786fc3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoHide EXIMessage{Decoder,Encoder} 00/113000/4
Robert Varga [Tue, 6 Aug 2024 18:03:28 +0000 (20:03 +0200)]
Hide EXIMessage{Decoder,Encoder}

There is no need to expose these classes, as we have a common interface
for both.

JIRA: NETCONF-944
Change-Id: I9e5b4cda75431ab584f193818af3a9a475b7c193
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRename Netconf(Hello)MessageToXmlEncoder 91/112991/7
Robert Varga [Tue, 6 Aug 2024 15:25:00 +0000 (17:25 +0200)]
Rename Netconf(Hello)MessageToXmlEncoder

(Hello)XMLMessageEncoder is a better, shorter name, use that instead.
Also use EXIMessageEncoder for the EXI counterpart.

JIRA: NETCONF-944
Change-Id: Iceee4ed0500b841892bf924fc77efae8d6bb338e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove netconf.api.NetconfSessionListenerFactory 98/112998/3
Robert Varga [Tue, 6 Aug 2024 15:47:01 +0000 (17:47 +0200)]
Remove netconf.api.NetconfSessionListenerFactory

This interface is only used in netconf-client and there it acts just as
indirection. Remove it in favor of passing NetconfClientSessionListener
directly.

Change-Id: I3ca378a098308231f794d18efdb80e792d64ba8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRename NetconfEXIToMessageDecoder to EXIMessageDecoder 90/112990/10
Robert Varga [Mon, 5 Aug 2024 23:00:01 +0000 (01:00 +0200)]
Rename NetconfEXIToMessageDecoder to EXIMessageDecoder

EXIToMessageDecoder to EXUNessageDecoder. This mirrors the baseline
XMLMessageDecoder naming.

JIRA: NETCONF-1191
Change-Id: I7e8e1b077d082a1472dc63f4e90fc564b5688a1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRename NetconfXMLToHelloMessageDecoder 89/112989/7
Robert Varga [Mon, 5 Aug 2024 22:53:51 +0000 (00:53 +0200)]
Rename NetconfXMLToHelloMessageDecoder

A better name is HelloXMLMessageDecoder, being shorter overall while
retaining all of 'HelloMessage', 'XML' and 'MessageDecoder' implications.

JIRA: NETCONF-1191
Change-Id: I10eb5ade1fc2ccf7cc58cedc42e174a7198e6359
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove sal-restconf-broker 95/112995/2
Robert Varga [Tue, 6 Aug 2024 14:25:34 +0000 (16:25 +0200)]
Remove sal-restconf-broker

This directory is not being built and is completely unused, remove it to
prevent confusion.

JIRA: NETCONF-944
Change-Id: Id344a3220d8c0dc825bfb0b6b764b5df338d5aa7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove sal-rest-connector-config 94/112994/2
Robert Varga [Tue, 6 Aug 2024 14:23:21 +0000 (16:23 +0200)]
Remove sal-rest-connector-config

This artifact is hosting an outdated configuration file and is otherwise
unreferenced. Remove it.

JIRA: NETCONF-944
Change-Id: I2bd1e10e0d644beea0bc83d3938059cfb8e60520
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoRemove sal-rest-connector 93/112993/2
Robert Varga [Tue, 6 Aug 2024 14:20:57 +0000 (16:20 +0200)]
Remove sal-rest-connector

We have only defunct tests here, remove the entire directory.

JIRA: NETCONF-944
Change-Id: I4d13b1cd1e37bf0ebc2d6b057010e6031c9ca7eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoMove NetconfXMLToMessageDecoder(Test) 88/112988/3
Robert Varga [Mon, 5 Aug 2024 22:33:47 +0000 (00:33 +0200)]
Move NetconfXMLToMessageDecoder(Test)

NetconfXMLToMessageDecoder is a common baseline MessageDecoder, move it
to netconf.coded.XMLMessageDecoder along with its test.

JIRA: NETCONF-1191
Change-Id: Ia3729b632f1c9f88541f57a4d078b89dec73b96f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoFix an eclipse error in netconf-codec 92/112992/2
Robert Varga [Tue, 6 Aug 2024 13:40:01 +0000 (15:40 +0200)]
Fix an eclipse error in netconf-codec

Eclipse does not like the fact we do not require netty.common, fix that
up.

JIRA: NETCONF-1191
Change-Id: I1c5b9b5b30dd8b87c158f34d24d4fe82e187271d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd Message{Decoder,Encoder} 87/112987/4
Robert Varga [Mon, 5 Aug 2024 21:51:13 +0000 (23:51 +0200)]
Add Message{Decoder,Encoder}

We have known encoder/decoders, capture them these traits in
netconf.codec.Message{Decoder,Encoder} interfaces. This provides a
natural place for
AbstractChannelInitializer.NETCONF_MESSAGE_{DECODER,ENCODER} constants,
which are rehosted.

JIRA: NETCONF-1191
Change-Id: I6a45216352816b840cb8f3392e40ba07b30744a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoSplit out framing handlers to netconf-codec 85/112985/7
Robert Varga [Mon, 5 Aug 2024 20:05:31 +0000 (22:05 +0200)]
Split out framing handlers to netconf-codec

These are baseline coding services, split them out, making them more
widely available.

JIRA: NETCONF-1191
Change-Id: I7c76acc8979be928d40e2f23e740df355c12baea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoMove AbstractChannelInitializer.NETCONF_MESSAGE_FRAME_* 84/112984/3
Robert Varga [Mon, 5 Aug 2024 19:48:29 +0000 (21:48 +0200)]
Move AbstractChannelInitializer.NETCONF_MESSAGE_FRAME_*

AbstractChannelInitializer is the common place for defining frame
codecs. Move framing codec constants to
FramingMechanism{Decoder,Encoder} as HANDLER_NAME, which is more
descriptive.

JIRA: NETCONF-1191
Change-Id: I7dc8bbe4264a5d636aed06326a1bc6a93958036d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoAdd FramingMechanismDecoder 83/112983/5
Robert Varga [Mon, 5 Aug 2024 18:56:58 +0000 (20:56 +0200)]
Add FramingMechanismDecoder

This is a companion class to FramingMechanismEncoder. This also makes it
clear that what is called 'aggregator' is really a 'frame decoder'.

Also remove FramingMechanismEncoder.of(), as it is only called from
tests.

JIRA: NETCONF-1191
Change-Id: I3332c15801c4d2d663efdb9ee943183a08d15dcf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoEnforce netconf-common dependencies 86/112986/1
Robert Varga [Mon, 5 Aug 2024 20:35:06 +0000 (22:35 +0200)]
Enforce netconf-common dependencies

We have a warning here, fix it and enforce dependency declarations.

Change-Id: Id1db8f45865336bb2d08330fbe9ea9f7d43e094a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoSeparate out AbstractNetconfExiSession 82/112982/2
Robert Varga [Mon, 5 Aug 2024 17:41:53 +0000 (19:41 +0200)]
Separate out AbstractNetconfExiSession

We are conflating concerns here: EXI is a split concern, at least where
the base AbstractNetconfSession is concerned.

JIRA: NETCONF-1191
Change-Id: I8cd3c1e307b96823e2733f922305d41f9db18617
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoServer-Sent Event (SSE) support for HTTP transport 33/112533/31
Ruslan Kashapov [Tue, 9 Jul 2024 07:14:57 +0000 (10:14 +0300)]
Server-Sent Event (SSE) support for HTTP transport

SSE stream handlers are implemented as overlay over
existing HTTP layer to be deployed as extension using
transport channel listeners.

Stream is implemented as chunked response, handlers are
intercepting inbound response chunks as event messages.

Listener and service interfaces are provided for custom
components integration for both client and server sides.
ErrorResponseException allows explicit definition of
response code and content type for error responses.

JIRA: NETCONF-1339
Change-Id: I9dbb68a7695f9d6f87ce522bbe2c1dbf24c51832
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoMake UncancellableFuture always non cancellable 61/112361/10
lubos-cicut [Fri, 28 Jun 2024 10:10:59 +0000 (12:10 +0200)]
Make UncancellableFuture always non cancellable

Clean up UncancellableFuture.java and make uncancellation
to always true.

UncancellableFuture is a future that cannot be cancelled. It is used
to communicate with the device and wait for a response. The purpose of
this, is mainly documentary, because once the message is sent,
the future only wait for a response, which will always come.

JIRA: NETCONF-1336
Change-Id: I7142aa07bb0518f8163b6c56496872b9bd674f58
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 weeks agoIntegrate SSEStreamService 96/112696/7
Robert Varga [Thu, 25 Jul 2024 10:22:22 +0000 (12:22 +0200)]
Integrate SSEStreamService

SSEStreamService can be neatly serviced in JaxRsRestconf. Integrate it
there, shifting dependencies appropriately.

JIRA: NETCONF-773
Change-Id: I77305b70058114a73120260cd334c024c0f2f941
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoAdd ServerRequest.session() 14/112914/4
Robert Varga [Wed, 31 Jul 2024 11:03:23 +0000 (13:03 +0200)]
Add ServerRequest.session()

Each ServerRequest has an optional TransportSession, which is tied to
the underlying transport, if available.

JIRA: NETCONF-714
Change-Id: I34d8c967cc91e17ca4cade9db17233ecad3222a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoStabilize aaa 71/112971/1
Robert Varga [Fri, 2 Aug 2024 07:52:50 +0000 (09:52 +0200)]
Stabilize aaa

Use aaa-0.20.0 instead of snapshots.

Change-Id: I74121fea29690f85803d3a9be72f3d4ee8e382f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoAdd ServerRequest.principal() 64/112864/4
Robert Varga [Mon, 29 Jul 2024 00:01:10 +0000 (02:01 +0200)]
Add ServerRequest.principal()

We need information about who is making a particular ServerRequest.
Expose a Principal for now.

JIRA: NETCONF-1353
Change-Id: I9fa5cb7383c7b99bc1317fe2cb0d08be9bde3dd3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoRemove ServerExceptionMapper 44/112744/13
Robert Varga [Wed, 24 Jul 2024 02:54:06 +0000 (04:54 +0200)]
Remove ServerExceptionMapper

Acknowledge the existence of YangErrorsBody in that it is a fair game to
complete a ServerRequest with such a body.

In contexts where we have a ErrorTagMapping, we can produce a nice
FormattableBody with a HttpStatusCode, which ties right into what
ServerExceptionMapper does with AsyncResponse.

JIRA: NETCONF-1188
Change-Id: I3e8509358a16e32fb6ef8f5ba16b5d6f1bd4a8f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoBump upstreams 77/112877/1
Robert Varga [Mon, 29 Jul 2024 10:02:43 +0000 (12:02 +0200)]
Bump upstreams

Adopt:
- yantools-14.0.2
- mdsal-14.0.1
- controller-10.0.1

Change-Id: I33c581a84b34da4cc92416cfaf2422ff8316c80c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoMake restconf-server-mdsal a module 71/112771/5
Robert Varga [Thu, 25 Jul 2024 12:01:45 +0000 (14:01 +0200)]
Make restconf-server-mdsal a module

Make sure this artifact is a good citizen by declaring its module-info.

JIRA: NETCONF-773
Change-Id: I77f1c73e76e068fb02f2366dea6c132a191a86a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoFinish workaround removal 37/112837/1
Robert Varga [Sat, 27 Jul 2024 16:44:23 +0000 (18:44 +0200)]
Finish workaround removal

We really now need jdk.net, eliminate the maven-bundle-plugin
configuration.

Change-Id: I443447e611a791c3d37c3a5ba5f450d9fe9513a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoMake restconf-mdsal-spi a module 70/112770/5
Robert Varga [Thu, 25 Jul 2024 11:51:44 +0000 (13:51 +0200)]
Make restconf-mdsal-spi a module

Make sure this artifact is a good citizen by declaring its module-info.

JIRA: NETCONF-773
Change-Id: I159f89888055e5bbc892f8d7a04d0cec27172fe2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoRemove ExtendedOptions workaround 00/112800/2
Robert Varga [Fri, 26 Jul 2024 13:49:21 +0000 (15:49 +0200)]
Remove ExtendedOptions workaround

https://issues.apache.org/jira/browse/KARAF-7690 has been fixed quite a
while ago, remove the framework working it around.

Change-Id: Ie44343950f3f55457463bb40bd983dca09c449ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoUse release controller artifacts 04/112804/1
Robert Varga [Sat, 27 Jul 2024 05:18:37 +0000 (07:18 +0200)]
Use release controller artifacts

Ditch use of snapshots, as we have a corresponding release.

Change-Id: I37e80b47ae88755ee1a9aa8ee80a85f9ad04b404
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoStabilize upstreams 92/112792/5
Robert Varga [Thu, 25 Jul 2024 20:19:10 +0000 (22:19 +0200)]
Stabilize upstreams

Adopt:
- odlparent-14.0.2
- infrautils-7.0.2
- yangtools-14.0.1
- mdsal-14.0.0

Change-Id: I133e92588122fe446d38f3f62d4fa428e6edc16f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoCentralize jsonassert version 43/112743/2
Robert Varga [Wed, 24 Jul 2024 01:57:00 +0000 (03:57 +0200)]
Centralize jsonassert version

Use bnd-parent's dependencyManagement section to define the dependency
on jsonassert.

Change-Id: I35b1df622a493c641ac42ab4ed282a39000fbe20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoUpdate swagger UI to version 5.17.14 88/112688/2
lubos-cicut [Mon, 22 Jul 2024 11:17:15 +0000 (13:17 +0200)]
Update swagger UI to version 5.17.14

Updated Swagger UI from 5.13.0 to latest current version:
https://github.com/swagger-api/swagger-ui/releases/tag/v5.14.0
https://github.com/swagger-api/swagger-ui/releases/tag/v5.15.0
https://github.com/swagger-api/swagger-ui/releases/tag/v5.15.1
https://github.com/swagger-api/swagger-ui/releases/tag/v5.15.2
https://github.com/swagger-api/swagger-ui/releases/tag/v5.16.0
https://github.com/swagger-api/swagger-ui/releases/tag/v5.16.1
https://github.com/swagger-api/swagger-ui/releases/tag/v5.16.2
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.0
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.1
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.2
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.3
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.4
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.5
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.6
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.7
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.8
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.9
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.10
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.12
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.13
https://github.com/swagger-api/swagger-ui/releases/tag/v5.17.14

JIRA: NETCONF-1340
Change-Id: I936ab7acbf5b518c696a9ef1feccbdea55108f39
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
8 weeks agoMove restconf-mdsal-spi tests 41/112741/2
Robert Varga [Wed, 24 Jul 2024 01:09:55 +0000 (03:09 +0200)]
Move restconf-mdsal-spi tests

We have a few tests lingering in restconf-nb. Move them to their proper
artifact.

JIRA: NETCONF-773
Change-Id: I846b29eb2dbffa510448390c0ce0dcba249f52cd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoHide AbstractNotificationListenerTest 40/112740/2
Robert Varga [Wed, 24 Jul 2024 01:03:31 +0000 (03:03 +0200)]
Hide AbstractNotificationListenerTest

This class has just two subclasses, both of which live in
restconf.mdsal.spi. Move the class there and hide it.

JIRA: NETCONF-773
Change-Id: I9b9e1bb056dc3cf1237a3ca6fceae09dddeb8ce7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit out CreateNotificationStreamRpcTest 39/112739/3
Robert Varga [Wed, 24 Jul 2024 00:43:47 +0000 (02:43 +0200)]
Split out CreateNotificationStreamRpcTest

Move this test test to sal-remote-impl. This necessitates promoting
CompletingServerRequest to restconf-server-api's test-jar for
visibility.

JIRA: NETCONF-773
Change-Id: Ia1756562131086580f34ad02314f498731a92b3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMove restconf-nb 37/112737/5
Robert Varga [Tue, 23 Jul 2024 23:20:14 +0000 (01:20 +0200)]
Move restconf-nb

We have now evacuated everything out, restconf-nb is a simple
application wiring of restconf-mdsal and restconf-server-jaxrs.

JIRA: NETCONF-773
Change-Id: I7e86c27a007c900ad848acd5b85a95e5598cce76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit out restconf-server-jaxrs 36/112736/6
Robert Varga [Tue, 23 Jul 2024 23:09:00 +0000 (01:09 +0200)]
Split out restconf-server-jaxrs

We now have a neatly self-sufficient JAX-RS endpoint. Split it out into
its own artifact, controlled via JaxRsEndpoint(Configuration).

JIRA: NETCONF-773
Change-Id: I350460030251e396ceb9dc0829c77f1de1d48de5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRemove websocket-client 38/112738/2
Robert Varga [Tue, 23 Jul 2024 23:24:31 +0000 (01:24 +0200)]
Remove websocket-client

Now that we do not have websocket delivery, there is no point in keeping
websocket-client around.

JIRA: NETCONF-1209
Change-Id: I5283756bc6f5b03ba7a31d2b2deedaa62cf5225b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRefactor restconf-nb configuration 34/112734/3
Robert Varga [Tue, 23 Jul 2024 22:03:15 +0000 (00:03 +0200)]
Refactor restconf-nb configuration

Define a JaxRsEndpointConfiguration as the holder of all things that
need configuring in restconf.nb.jaxrs.

Refactor JaxRsNorthbound to live in the same package and to expose the
configuration with proper lifecycle -- such that it can directly
implement SSESenderFactory and manage DefaultPingExecutor.

JIRA: NETCONF-773
Change-Id: I901d1dd33efd9f540dfb3645ddf054e5e9b72fe3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoEnforce bnd-parent dependency convergence 35/112735/2
Robert Varga [Tue, 23 Jul 2024 22:24:54 +0000 (00:24 +0200)]
Enforce bnd-parent dependency convergence

All artifacts using bnd-parent must have precise dependencies.

JIRA: NETCONF-773
Change-Id: I8feb762a0b3cf3df6ce12939960ce796d724bb68
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRemove StreamsConfiguration.idleTimeout() 33/112733/1
Robert Varga [Tue, 23 Jul 2024 19:57:57 +0000 (21:57 +0200)]
Remove StreamsConfiguration.idleTimeout()

This timer is not used anywhere, remove it and all references to it.

JIRA: NETCONF-773
Change-Id: I012ddc8f9308b36c2e281981878e625b1744f90c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit out restconf-mdsal-spi 31/112731/9
Robert Varga [Tue, 23 Jul 2024 16:00:31 +0000 (18:00 +0200)]
Split out restconf-mdsal-spi

We have a numbner of SPI-level constructs lurking in
restconf-server-mdsal. Move them out to restconf-mdsal-spi.

Also introduce DOMServerStrategy, which is a DOMService carrier of a
ServerStrategy.

JIRA: NETCONF-773
Change-Id: I034de08684f1de38022b4daf31a1730278ca3594
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMark FIXMEs for OSGiNorthbound.Configuration 30/112730/2
Robert Varga [Tue, 23 Jul 2024 15:24:25 +0000 (17:24 +0200)]
Mark FIXMEs for OSGiNorthbound.Configuration

Northbound configuration entains a number of differing things, let's
make sure we mark up what is related to what.

JIRA: NETCONF-773
Change-Id: Iba625fa77e39d9c3c342a8599191ac28d24494c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoEliminate restconf-common-models 29/112729/4
Robert Varga [Tue, 23 Jul 2024 15:04:37 +0000 (17:04 +0200)]
Eliminate restconf-common-models

The only remaining model is odl-device-notification. Move it to
apps/odl-device-notification and adopt restconf-nb support bits.

JIRA: NETCONF-773
Change-Id: I55b2122d7d44a58e2b9db9c3bb6cefd386cf7cf6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit out sal-remote-impl 26/112726/4
Robert Varga [Tue, 23 Jul 2024 12:50:18 +0000 (14:50 +0200)]
Split out sal-remote-impl

This patch creates a sal-remote-impl, which implements sal-remote.yang
and related models.

JIRA: NETCONF-773
Change-Id: Ie29804b92a9b1fee6c3ed5aa336f6f832e9c9105
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMove ErrorTagsTest 27/112727/2
Robert Varga [Tue, 23 Jul 2024 13:38:23 +0000 (15:38 +0200)]
Move ErrorTagsTest

This this really should be called ErrorTagMappingTest and live in
restconf-server-spi. Rename/move it.

JIRA: NETCONF-773
Change-Id: I0c478241d65e2321748f1912dad8513339ab189f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoPromote netconf-test-models 24/112724/4
Robert Varga [Tue, 23 Jul 2024 12:20:15 +0000 (14:20 +0200)]
Promote netconf-test-models

netconf-test-models are used by both restconf-nb and netconf-topology.

Let's promote them to a common place, so that tests can rely on Java
Bindings. Also ditch non-production models from restconf-common-models.

JIRA: NETCONF-773
Change-Id: I2309162d87785ac45533de392b3bf58338630f91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit out sal-remote from restconf-common-modules 23/112723/3
Robert Varga [Tue, 23 Jul 2024 11:55:50 +0000 (13:55 +0200)]
Split out sal-remote from restconf-common-modules

sal-remote describes a piece of application-level functionality. Split
the model out from restconf-common, so it does not get mingled with
other things unnecessarily.

JIRA: NETCONF-773
Change-Id: I450e94684fe7cfadc17c2fa7d45997de5be7d859
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit out restconf-server-mdsal 22/112722/4
Robert Varga [Tue, 23 Jul 2024 10:21:14 +0000 (12:21 +0200)]
Split out restconf-server-mdsal

MdsalRestconfServer does not have dependencies in restconf-nb, this
patch splits it's production code out into plugins/restconf-server-mdsal.

JIRA: NETCONF-773
Change-Id: Icca2218d6ada133e37afd5929342595ec5978b6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRename nb.rfc8040.rests.transactions to server.mdsal.data 21/112721/1
Robert Varga [Tue, 23 Jul 2024 10:16:55 +0000 (12:16 +0200)]
Rename nb.rfc8040.rests.transactions to server.mdsal.data

RestconfStrategy et al. are (mostly) MD-SAL-specific data access, move
them to server.mdsal.data.

JIRA: NETCONF-773
Change-Id: Ia89ecac72e59dbcc8428ccf8fbd6e4a135529baa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMove ErrorTag{s,Mapping} to restconf.server.spi 20/112720/3
Robert Varga [Tue, 23 Jul 2024 09:47:19 +0000 (11:47 +0200)]
Move ErrorTag{s,Mapping} to restconf.server.spi

Remove the JAX-RS reference and promote this class to
restconf-server-spi, so it is more easily accessible.

JIRA: NETCONF-773
Change-Id: I391ee842a171ea249072c77b571f6de77ab1c25d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSeparate out SSESenderFactory 94/112694/4
Robert Varga [Mon, 22 Jul 2024 22:03:22 +0000 (00:03 +0200)]
Separate out SSESenderFactory

We have a few service invariants we can capture, let's do that to
simplify DefaultRestconfStreamServletFactory.

JIRA: NETCONF-773
Change-Id: I5b5c67278ec5c210210f6b3ce8686395ecce1973
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSimplify ensureParentsByMerge 03/112303/13
Oleksandr Zharov [Thu, 27 Jun 2024 13:15:08 +0000 (15:15 +0200)]
Simplify ensureParentsByMerge

Refactored MdsalRestconfTransaction#ensureParentsByMerge by using
some of the YangInstanceIdentifier methods.
Added test to verify merged path for refactored method.

JIRA: NETCONF-1329
Change-Id: I21b08f11bdfc710e264a371afe1d30acfdfa1e2c
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
8 weeks agoBump mina-sshd to 2.13.1 63/112563/3
Robert Varga [Mon, 15 Jul 2024 11:23:18 +0000 (13:23 +0200)]
Bump mina-sshd to 2.13.1

https://github.com/apache/mina-sshd/releases/tag/sshd-2.13.1

Change-Id: Id9924ba53dcd269bc7ebbf5517d7d7de7df54fc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoTest cleanup after migration to JUnit5 57/112357/3
lubos-cicut [Fri, 28 Jun 2024 06:31:23 +0000 (08:31 +0200)]
Test cleanup after migration to JUnit5

Two tests cannot be migrated to JUnit5 because they depend on mdsal
tests that are not migrated. They are marked as TODO.

Some tests have been migrated but with forgotten access modifier, this
patch will clean them up.

JIRA: NETCONF-1310
Change-Id: Ic9499e3b8c6e29a8363d95dd4c1163437ca5ed15
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
8 weeks agoSeparate out RestconfStream.LocationProvider 93/112693/5
Robert Varga [Mon, 22 Jul 2024 20:28:51 +0000 (22:28 +0200)]
Separate out RestconfStream.LocationProvider

There is no point in having a RestconfStream.Registry without an
endpoint providing access to it.

This patch separates out RestconfStream.LocationProvider, which acts as
a provider of stream locations -- eliminating the need for the
URLConstants hotspot.

JIRA: NETCONF-773
Change-Id: Ic6e7ad614a4c7a0ab8dec10a0f8b27d9b07153d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMove URLConstants.MODULES_* constants 92/112692/2
Robert Varga [Mon, 22 Jul 2024 20:03:19 +0000 (22:03 +0200)]
Move URLConstants.MODULES_* constants

These relate to how JaxRsRestconf is laid out, hence move them there,
reducing their exposure.

This also means that RestconfSchemaSourceUrlProvider is really something
like a 'JaxRxYangLibrary' support -- we keep it simple here, but at some
point it should be possible to run with an external yanglib server.

JIRA: NETCONF-773
Change-Id: I226f89e096b6236bcaa4bd7bb1c1e1215518efbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoImprove ServerDataOperations 91/112691/3
Robert Varga [Mon, 22 Jul 2024 17:35:16 +0000 (19:35 +0200)]
Improve ServerDataOperations

Valid implementations may need to serialize the data we are passing in,
hence we should be providing DatabindPath.Data instead of
YangInstanceIdentifier.

JIRA: NETCONF-1331
Change-Id: I042452b2f7182fb3a1dafaac7fb2890174bcd890
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMove SSEStreamService 90/112690/1
Robert Varga [Mon, 22 Jul 2024 17:06:17 +0000 (19:06 +0200)]
Move SSEStreamService

We have specific implementation requirements around SSE integration in
JAX-RS, most notably SSESender which uses a PingExecutor.

Separate these out into restconf.nb.jaxrs to reduce their exposure.

JIRA: NETCONF-773
Change-Id: Ia29e258e6b2f00297ec2a2d8bdc9df7dd83a1773
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMake MdsalServerStrategy implement only ServerDataOperations 41/112641/15
Robert Varga [Fri, 19 Jul 2024 03:43:46 +0000 (05:43 +0200)]
Make MdsalServerStrategy implement only ServerDataOperations

MdsalRestconfStrategy is acting as the root of a MdsalRestconfServer,
which is really a historical thing.

MdsalServerStrategy is a new class which takes over the role of the root
ServerStrategy, with a clear relationship with MdsalRestconfServer.

This moves a chunk of logic out of (Mdsal)RestconfStrategy, bringing
RestconfStrategy making it just an implementation of
ServerDataOperations.

JIRA: NETCONF-1331
Change-Id: I7fce7a7f1b857f2c4ce45722831dd2d5404a8be4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert restconf-server-spi to bnd-parent 60/112660/1
Robert Varga [Sat, 20 Jul 2024 17:10:13 +0000 (19:10 +0200)]
Convert restconf-server-spi to bnd-parent

restconf-server-spi is a simple single-package module, use bnd-parent to
build it.

JIRA: NETCONF-773
Change-Id: I87c794b8c0639a4c1ce2a1f0d8c52f3e5e216a62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd utility ServerErrorPath constructor 59/112659/1
Robert Varga [Sat, 20 Jul 2024 17:02:42 +0000 (19:02 +0200)]
Add utility ServerErrorPath constructor

We can use DatabindPath.Data as an alternative, making construction a
tad more user-friendly.

JIRA: NETCONF-773
Change-Id: I3d51c6dc012caf5e8ad706577be03b8ad7be7ab5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert restconf-server-api to bnd-parent 58/112658/1
Robert Varga [Sat, 20 Jul 2024 17:01:40 +0000 (19:01 +0200)]
Convert restconf-server-api to bnd-parent

restconf-server-api is a simple single-package module, use bnd-parent to
build it.

JIRA: NETCONF-773
Change-Id: I33a013b95e65892c38a4e02e323e3d235f63455e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert transport-api to bnd-parent 57/112657/1
Robert Varga [Sat, 20 Jul 2024 15:21:11 +0000 (17:21 +0200)]
Convert transport-api to bnd-parent

transport-api is a simple component, convert it to use bnd-parent.
Whiler we are at it, drop the trivial use of @GuardedBy, as it does not
warrant the management checker-qual dependency.

Change-Id: Icef477bccc65e1b28448c8972607f1a6e01230e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove restconf.server.mdsal.ResourceRequest 56/112656/1
Robert Varga [Sat, 20 Jul 2024 15:12:50 +0000 (17:12 +0200)]
Remove restconf.server.mdsal.ResourceRequest

This class is not used anywhere, remove it.

JIRA: NETCONF-773
Change-Id: I74725c4450fc8d7456d11f38836576b68dc1b3a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoConvert netconf-api to bnd-parent 54/112654/1
Robert Varga [Sat, 20 Jul 2024 13:26:45 +0000 (15:26 +0200)]
Convert netconf-api to bnd-parent

netconf-api is quite simple. Update it to use bnd-parent instead of
netconf-parent.

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