netconf.git
2 months agoRework SubscriptionStateServiceTest 05/115005/9
Matej Sramcik [Wed, 29 Jan 2025 14:00:54 +0000 (15:00 +0100)]
Rework SubscriptionStateServiceTest

SubscriptionStateServiceTest class improved by making it parametrized
to reduce duplicate code.

JIRA: NETCONF-714
Change-Id: Id5eb5124e4f0db6fab770da5983d00b9458fbfa9
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoImprove bnd-parent 38/115138/2
Robert Varga [Thu, 6 Feb 2025 15:30:38 +0000 (16:30 +0100)]
Improve bnd-parent

Add bnd.bnd file to provide local repository overloads, improving
manifests a bit.

Change-Id: Ia839558105d288c3df6d01bbd86487bb1e8ada60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefactor RestconfSession 34/115134/3
Ivan Hrasko [Thu, 6 Feb 2025 14:24:32 +0000 (15:24 +0100)]
Refactor RestconfSession

RestconfSession#prepareRequest does not need ChannelHandler parameter.
Remove it and adapt all consequences across usages of it to create
PreparedRequest instances.

JIRA: NETCONF-714
Change-Id: I9e597657618131a0f9b3432d56f1fa2174981e7e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoRefactor RestconfSubscriptionsStreamRegistry 30/115130/3
Ivan Hrasko [Thu, 6 Feb 2025 13:55:30 +0000 (14:55 +0100)]
Refactor RestconfSubscriptionsStreamRegistry

Refactor RestconfSubscriptionsStreamRegistry:
- organize constants
- refactor methods

JIRA: NETCONF-714
Change-Id: Icf81c90212280174e075e87094093beffa1a6d39
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoUse a switch expression in SecurityHelper 23/114023/5
Robert Varga [Wed, 16 Oct 2024 10:52:23 +0000 (12:52 +0200)]
Use a switch expression in SecurityHelper

Use a switch expression instead of an if/else cascade.

Change-Id: I0e3df820381b77bd5cebb145bbc8a545e1c6f02e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefactor restconf-server SSE support 58/113458/16
Robert Varga [Sat, 7 Sep 2024 17:05:39 +0000 (19:05 +0200)]
Refactor restconf-server SSE support

ServerSseHandler cannot hope to correctly implement SSE transition
because it depends on protocol being used:
- for HTTP/1.1 it needs to integrade with Channel pipeline and disable
  normal HTTP requests
- for HTTP/2 it needs to track the streamId on which request was made,
  so that RST_STREAM frames correctly terminate the event stream

JIRA: NETCONF-1419, NETCONF-714
Change-Id: I994c661ae17cda53eae9950db4bc3eadb97d2e19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
2 months agoImplement RestconfSubscriptionsStreamRegistry 38/114738/19
Oleksandr Zharov [Wed, 11 Dec 2024 20:05:51 +0000 (21:05 +0100)]
Implement RestconfSubscriptionsStreamRegistry

Implemented createStream method to handle creation of
default NETCONF stream.

JIRA: NETCONF-714
Change-Id: Id772fb8e247efb3c29732cd8a8a03e69106d10c1
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoAdd E2E benchmark OpenApi integration test 68/103968/44
Peter Suna [Wed, 4 Dec 2024 11:23:10 +0000 (12:23 +0100)]
Add E2E benchmark OpenApi integration test

Add benchmark test with Juniper models to test OpenApi with large
models. Main goal is to teste if OpenApi can handle large models
with limited memory.

JIRA: NETCONF-939
Change-Id: I252c0f9ff7801a0a8a3579a64a20a404ac946d18
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoCleanup EndpointRoot class 00/115100/2
Ivan Hrasko [Tue, 4 Feb 2025 12:20:48 +0000 (13:20 +0100)]
Cleanup EndpointRoot class

Cleanup EndpointRoot class:
- remove unnecessary toString call
- fix typo

Change-Id: I0c97f2048d5fd7fdc0a932d550d7a6003b5c0e94
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoReplace errorId by reason 04/115004/4
Matej Sramcik [Wed, 29 Jan 2025 13:55:11 +0000 (14:55 +0100)]
Replace errorId by reason

Field errorID is not correct name of field. Changed to "reason"
according to RFC 8639.

JIRA: NETCONF-714
Change-Id: Ie5474e8fee5e687185bb8020948383b749040a98
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
2 months agoImplement subtree filtering 27/114527/16
Yaroslav Lastivka [Tue, 19 Nov 2024 09:06:09 +0000 (11:06 +0200)]
Implement subtree filtering

Added support for subtree filtering of NormalizedNode
structures within the restconf-server-spi module
Added subtree filtering chapter to the user-guide.

JIRA: NETCONF-714
Change-Id: I8fc246b5516582fb389a097e3366e867e71f7e84
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoRefactor AbstractRestconfStreamRegistry 42/114642/31
Ivan Hrasko [Tue, 3 Dec 2024 08:28:08 +0000 (09:28 +0100)]
Refactor AbstractRestconfStreamRegistry

Refactor AbstractRestconfStreamRegistry in a way that createStream
method is moved to MdsalRestconfStreamRegistry in order to allow us
to add other overrides, for example for subscribed notifications.

JIRA: NETCONF-714
Change-Id: I5be4e7d51969f8aca024badd8173043dc1c5db68
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoExpose NETCONF event stream for subscriptions 95/114495/37
Matej Sramcik [Tue, 19 Nov 2024 07:00:00 +0000 (08:00 +0100)]
Expose NETCONF event stream for subscriptions

Create default event stream called NETCONF for purposes of
subscribed notifications.

JIRA: NETCONF-1417
Change-Id: I405789db2fa8011362e3bce34df2134b20720645
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoImprove SSHTransportStack documentation 34/115034/2
Robert Varga [Tue, 3 Dec 2024 17:47:40 +0000 (18:47 +0100)]
Improve SSHTransportStack documentation

Explain the indexing we have, so it is clearer what is it that we are
tracking.

JIRA: NETCONF-1423
Change-Id: I058333e67e185f1cb2c4510a6f48477ed7e20b34
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove TransportIoSession.getHandler() 33/115033/2
Robert Varga [Tue, 3 Dec 2024 16:59:04 +0000 (17:59 +0100)]
Improve TransportIoSession.getHandler()

Return ChannelInboundHandler, to make it clear we are attaching an
inbound processor.

Change-Id: Idff8b3f562666dc8202ee7319baa94f5208750d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump upstreams 99/114999/1
Robert Varga [Wed, 29 Jan 2025 14:55:10 +0000 (15:55 +0100)]
Bump upstreams

Adopt:
- yangtools-14.0.7
- mdsal-14.0.8

Since controller-11 now has a bnd-parent, use that to simplify our
dependency tracking.

Also notif-leaves-update.xml is updated to account for YANGTOOLS-1651
slighly changing iteration order of modified nodes.

Change-Id: I52c4dadc00a551d5a3a9928b113864b00128bb5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoJava based tests for OpenApi over Netty 07/113907/49
Oleksandr Zharov [Tue, 8 Oct 2024 20:43:13 +0000 (22:43 +0200)]
Java based tests for OpenApi over Netty

Added tests for OpenApi over Netty using toaster
model.

JIRA: NETCONF-1371
Change-Id: I8a9c9ecc20c6cc34d1d8809c22a85c16bf04f9db
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
4 months agoCI: Enable Gerrit Verify workflows with GHA 22/114722/3
Anil Belur [Wed, 11 Dec 2024 02:35:16 +0000 (12:35 +1000)]
CI: Enable Gerrit Verify workflows with GHA

This is a pre-req to move Jenkins jobs to GHA.

Change-Id: I0c2a0c8213d476bebe450768ef1bb9cbaa16f737
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 months agoCI: Enable Github2Gerrit workflow 23/114723/3
Anil Belur [Wed, 11 Dec 2024 02:35:40 +0000 (12:35 +1000)]
CI: Enable Github2Gerrit workflow

This allows Github devs/users to contribute to the repo using the
Github workflow.

Change-Id: I483ee5a88688eba6a1e3498b8c5499929be4b7b0
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
4 months agoSkip device update on NetconfNodeHandler close 53/114753/2
Peter Suna [Thu, 12 Dec 2024 12:24:26 +0000 (13:24 +0100)]
Skip device update on NetconfNodeHandler close

If NetconfNodeHandler is closing and removing device
registration, it is unnecessary to update device data
when they are removed in the next step.

JIRA: NETCONF-1432
Change-Id: I946de0539c89302fb558d871437cff2e1801567a
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
4 months agoRefactor transport.http.Response 04/114404/11
Robert Varga [Mon, 2 Dec 2024 22:09:29 +0000 (23:09 +0100)]
Refactor transport.http.Response

Refactor Response to allow pure data holder instances to be used. This
improves dispatch, as we do not overload meaning and opens up the
possibility of further types of responses.

RequestResponse is renamed to FiniteResponse, to reflect the fact it is
of flexible, but finite, size.

JIRA: NETCONF-1419
Change-Id: I4288f520c1ffa0db3587e5a1653517f23771228a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not issue content-type in HEAD requests 14/114714/1
Robert Varga [Tue, 10 Dec 2024 15:58:18 +0000 (16:58 +0100)]
Do not issue content-type in HEAD requests

A HEAD request with a body does not make sense, do not generate these.

Change-Id: Ib78f122b522fd533764436ca4881760b7dd81c28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDocument RESTCONF subscriptions in user-guide 58/114458/9
Yaroslav Lastivka [Mon, 11 Nov 2024 09:28:57 +0000 (11:28 +0200)]
Document RESTCONF subscriptions in user-guide

Added chapter for NETCONF user-guide how to establish,
listen, modify and terminate subscriptions for YANG notifications.

JIRA: NETCONF-714
Change-Id: Id478e123654a519f630390b989a77cf84886b581
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
4 months agoExpose supported features from RFC 8639 09/114609/5
Oleksandr Zharov [Fri, 29 Nov 2024 18:17:19 +0000 (19:17 +0100)]
Expose supported features from RFC 8639

This patch provides class that exposes supprorted featers
from RFC 8639.

JIRA: NETCONF-714
Change-Id: Ia096f29c22c0591f476047fcc55ca562224b70a3
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
4 months agoAdd copyStreamId to AbstractBasicAuthHandler 54/114554/6
Ivan Hrasko [Wed, 27 Nov 2024 14:23:48 +0000 (15:23 +0100)]
Add copyStreamId to AbstractBasicAuthHandler

Copy copyStreamId method into AbstractBasicAuthHandler as its
previous location ServerSseHandler class will be removed.

JIRA: NETCONF-714
Change-Id: Ia56124c457216dd147f1fe4dc32ce4b5ae7e230c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
4 months agoImplement subscription RPCs 33/114133/30
Samuel Schneider [Tue, 22 Oct 2024 07:58:40 +0000 (09:58 +0200)]
Implement subscription RPCs

Implement RPCs for managing RFC 8639 notification subscriptions.
Create se service for managing subscription data in mdsal
datastore.

JIRA: NETCONF-714
Change-Id: I71357f48a554e6f43ad30d12c724184daaa63b60
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
4 months agoImplement simple state machine 75/114475/22
Oleksandr Zharov [Thu, 14 Nov 2024 12:04:18 +0000 (13:04 +0100)]
Implement simple state machine

Added simple state machine to add some controle over
subscriptions state transition.

JIRA: NETCONF-714
Change-Id: I23ba8a2b03104b3c7742b5cd59b33de8060daad0
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
4 months agoImplement subscription state change notifications 35/114135/27
Matej Sramcik [Tue, 29 Oct 2024 13:11:31 +0000 (14:11 +0100)]
Implement subscription state change notifications

Added SubscriptionStateService which use md-sal
DOMNotificationPublishService to send notifications for subscription
status change - modified, completed, resumed, terminated and suspended.

JIRA: NETCONF-714
Change-Id: I67dcaad79d64223b3d3770e8acb35db44d867da9
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
4 months agoAdd odl-restconf-notification feature 42/114242/17
Yaroslav Lastivka [Tue, 29 Oct 2024 10:47:33 +0000 (12:47 +0200)]
Add odl-restconf-notification feature

Created feature for restconf notification subscriptions.

JIRA: NETCONF-714
Change-Id: Id905eb89efb720b143ba55c9239e5eb4117863da
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
4 months agoAdd restconf-notifications-mdsal package 40/114140/17
Yaroslav Lastivka [Thu, 24 Oct 2024 12:38:52 +0000 (15:38 +0300)]
Add restconf-notifications-mdsal package

Created dedicated package for interact with mdsal.

JIRA: NETCONF-714
Change-Id: Ib2ec5c7982a22d61851979bcbefa6194a90b54ad
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
4 months agoAdd restconf-subscription package 21/114021/26
Yaroslav Lastivka [Wed, 16 Oct 2024 10:33:54 +0000 (13:33 +0300)]
Add restconf-subscription package

Added utility method for generatign subscriptions IDs.

JIRA: NETCONF-714
Change-Id: Iad0decb5dd952b010665a0db4f3da570f44f28fb
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
4 months agoDisconnect device deleted from allowed devices 34/109634/39
Matej Sramcik [Thu, 4 Jan 2024 13:05:37 +0000 (14:05 +0100)]
Disconnect device deleted from allowed devices

After removing connected device from the allowed devices,
the device continued to stay connected with the node
in the netconf topology.
This change ensures that a device is properly disconnected
after being removed from the allowed devices.

JIRA: NETCONF-989
Change-Id: I35cba26c4d004a5f90b9fa4f65651c9f58f386bd
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
4 months agoMark ServerSseHandler deprecated 53/114553/6
Ivan Hrasko [Wed, 27 Nov 2024 14:18:45 +0000 (15:18 +0100)]
Mark ServerSseHandler deprecated

Registering ServerSseHandler into Netty's pipeline is:
- preventing us to implement another SSE based web resources,
for example those needed for subscribed notifications.
- adding performance drawback as ServerSseHandler is invoked
on every GET request.

JIRA: NETCONF-714
Change-Id: I368ae2ee547611129b0ea0d86d9b99d260e854c3
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
4 months agoExclude commons-logging 25/114625/1
Robert Varga [Mon, 2 Dec 2024 11:32:06 +0000 (12:32 +0100)]
Exclude commons-logging

commons-logging is provided by pax-logging in Karaf, hence we should not
be generating a dependency on it.

Change-Id: I19aa406575e5e7fc2ab0834eb24d7a21870ab57c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoDo not buffer entities in PathsEntity 26/113926/5
Robert Varga [Wed, 9 Oct 2024 12:37:08 +0000 (14:37 +0200)]
Do not buffer entities in PathsEntity

We have the target generator ready -- hence we can just run generate()
without buffering.

Change-Id: Ifda1116eec357fc14bca7b6ff74fe39a422d6433
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoBump upstreams 15/114615/4
Robert Varga [Sat, 30 Nov 2024 14:19:04 +0000 (15:19 +0100)]
Bump upstreams

Adopt:
- odlparent-14.0.5
- infrautils-7.0.5
- yangtools-14.0.6
- mdsal-14.0.6

Change-Id: Iedd5c0afd4f900e7404f75d4454654de3649f5da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoFixup checkstyle 16/114616/1
Robert Varga [Sat, 30 Nov 2024 21:48:01 +0000 (22:48 +0100)]
Fixup checkstyle

Upgraded checkstyle is finding new violations, fix them up.

Change-Id: I0844f56c3c605cc26455bf6a69c044ad46e7d3b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoMigrate to Pekko 32/112432/14
Oleksandr Zharov [Wed, 3 Jul 2024 18:00:31 +0000 (20:00 +0200)]
Migrate to Pekko

Replaced usage of Akka to Pekko.
Done according to:
https://pekko.apache.org/docs/pekko/current/project/migration-guides.html

JIRA: NETCONF-1341
Change-Id: I9fac889f3d5ce446fc7e0c9b37ca40a4ef754bf2
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
5 months agoBump upstreams 28/114528/3
Robert Varga [Tue, 26 Nov 2024 11:45:55 +0000 (12:45 +0100)]
Bump upstreams

Adopt:
- controller-11.0.0-SNAPSHOT
- aaa-0.21.0-SNAPSHOT

Change-Id: I4ee2510f9b6828503438a393d43be2a89dc484c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoMigrate HttpClientServerTest 25/114525/5
Robert Varga [Mon, 25 Nov 2024 20:17:15 +0000 (21:17 +0100)]
Migrate HttpClientServerTest

Use HTTPServerSession for test harness, as we are entering a phase where
mocking would have to duplicate production code.

Since we are using HTTPServerSession, we can verify our task gets
executed on the corresponding virtual thread. That in turn allows us to
ditch the executor service in favor of an explicit sleep.

JIRA: NETCONF-1419
Change-Id: If1958fd6e57180565cd3d0bd5b341cfa0427b3b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoSplit out CleartextUpgradeHandler 23/114523/2
Robert Varga [Mon, 25 Nov 2024 19:00:48 +0000 (20:00 +0100)]
Split out CleartextUpgradeHandler

The code structure is clear: we have two handlers:
- AlpnUpgradeHandler handles the transition from TLS for HTTPS
- CleartextUpgradeHandler handles the transition frop TCP for HTTP

Split out the anonymous class into a named entity, so we have an
improved debugging experience -- including transition debug messages.

We also talk to our superclass to not automatically release the message,
and therefore we do not need to undo its work in channelRead().

JIRA: NETCONF-1419
Change-Id: I428e1ed91d7c3c5a6beb51af56fd8abcac112a16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoFix cleartext HTTP/2 upgrade 52/113452/15
Ruslan Kashapov [Fri, 6 Sep 2024 10:56:07 +0000 (13:56 +0300)]
Fix cleartext HTTP/2 upgrade

HttpServerUpgradeHandler is a HttpObjectAggregator, therefore we need to
pass a consistent maximum request size -- otherwise it will reject the
first HTTP/1 request.

The second part of the puzzle is intercepting the first request: for
this we already have a an UpgradeEvent hook.

JIRA: NETCONF-1378
Change-Id: Ibeb85fe84e645411b4ac634649335f82189f0dba
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRefactor HTTPScheme.initializeServerPipeline() 19/114519/8
Robert Varga [Mon, 25 Nov 2024 12:36:49 +0000 (13:36 +0100)]
Refactor HTTPScheme.initializeServerPipeline()

The split nature of setup makes it quite unclear as to what is going on.

This improves the code flow, as we now understand that channelHandler()
is a HTTP2->HTTP1 thing -- hence we can allocate it only when needed.
This leads to TLS-based-HTTP1 not allocating it at all.

JIRA: NETCONF-1419
Change-Id: Ib8998b648fac27536c2b7b64fac6818de1fb0374
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRemove {Plain,Tls}HTTPServer 17/114517/5
Robert Varga [Mon, 25 Nov 2024 11:31:01 +0000 (12:31 +0100)]
Remove {Plain,Tls}HTTPServer

The two subclasses differ only in HTTPScheme and pipeline setup. Move
pipeline setup to HTTPScheme and eliminate the two subclasses.

The result is a centralized view of what the pipeline looks like as well
make it possible to setup the pipeline without HTTPServer.

JIRA: NETCONF-1419
Change-Id: I82a589a39a60748545ee110e6d2643bc16ce80fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoUse HTTPTransportChannel in enableClientSse() 22/114522/3
Robert Varga [Mon, 25 Nov 2024 14:53:58 +0000 (15:53 +0100)]
Use HTTPTransportChannel in enableClientSse()

We are mucking around the pipeline to figure out the scheme we are
using. Pass down HTTPTransportChannel which has this info readily
available.

JIRA: NETCONF-1419
Change-Id: I24e7c971787c8988a09a1b4ec1be895b4f6dffff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoPass HTTPScheme to ClientHttp2RequestDispatcher 21/114521/2
Robert Varga [Mon, 25 Nov 2024 14:39:34 +0000 (15:39 +0100)]
Pass HTTPScheme to ClientHttp2RequestDispatcher

We know whether or not we are being set up for HTTPS, pass that
knowledge down to ClientHttp2RequestDispatcher, which thus loses a
dependency on TlsHandler.

JIRA: NETCONF-1419
Change-Id: I23fcf6003915fb4a87e2f46dbdeb6b07a8d59b62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd HTTPScheme 53/114453/10
Robert Varga [Mon, 11 Nov 2024 21:19:14 +0000 (22:19 +0100)]
Add HTTPScheme

Expose supported channel setups via HTTPScheme, which is an enum,
unliike the Netty equivalent. This will allow us to host some
implementation details there in the future.

JIRA: NETCONF-1419
Change-Id: I29892928ed06c872d445c22a2589819dd7cac71a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoPropagate client auth failure 12/114512/4
Robert Varga [Fri, 22 Nov 2024 19:41:41 +0000 (20:41 +0100)]
Propagate client auth failure

We should trigger onTransportFailed() when we fail to authenticate to
the server.

JIRA: NETCONF-1423
Change-Id: I58ff67d663c2728488eea6206d1ba03c4d707ac3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoPropagate SSH channel open failures 11/114511/1
Robert Varga [Fri, 22 Nov 2024 19:37:10 +0000 (20:37 +0100)]
Propagate SSH channel open failures

A SSHTransportStack may fail to open the "NETCONF" subsystem, which
means the transport has failed. Propagate this failure to listeners.

JIRA: NETCONF-1423
Change-Id: Ide8a0e3a91bdf48fdc36399b4b9b97d742435cbb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAnnotate sessionId(Session) 10/114510/1
Robert Varga [Fri, 22 Nov 2024 19:46:03 +0000 (20:46 +0100)]
Annotate sessionId(Session)

We are always returning non-null here, annotate that fact.

Change-Id: I9f3b4425f98fef3656391cb8f4116cdec039fd6a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd a few more README.mds 89/114489/1
Robert Varga [Tue, 19 Nov 2024 10:56:33 +0000 (11:56 +0100)]
Add a few more README.mds

This adds READMEs to keystore, transport and truststore directories.

Change-Id: I0b38dbf6a9371f7cd190d94831162a8e96110f28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoExpand README.md 77/114477/5
Robert Varga [Thu, 14 Nov 2024 23:31:34 +0000 (00:31 +0100)]
Expand README.md

Add a big explanation diagram of what we are doing here and add
protocol/README.md

Change-Id: I5458052f75560827bd826b3f3e3887e94818e894
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoUse /openapi/api/v3/mounts without ending slash 57/114457/7
Ivan Hrasko [Tue, 12 Nov 2024 08:26:41 +0000 (09:26 +0100)]
Use /openapi/api/v3/mounts without ending slash

New Netty based RESTCONF OpenApi server does not recognize
URL when it ends by slash ('/').

Adapt swagger-initializer accordingly.

JIRA: NETCONF-1370
Change-Id: Ie585e778686fff84eb091847ac9cbad63cacdd69
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
5 months agoNetty endpoint for RESTCONF OpenApi 81/113581/34
Ruslan Kashapov [Thu, 5 Sep 2024 07:06:43 +0000 (10:06 +0300)]
Netty endpoint for RESTCONF OpenApi

Introduce OpenApiResourceProvider, which registers to each
NettyEndpoint's WebHostResourceProvider whiteboard.

Each NettyEndpoint then drives instantiation of its own
WebHostResourceInstance for each registered provider.

JIRA: NETCONF-1370
Change-Id: I4005f3bd1fe238672cfdee465474d625a628a561
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
5 months agoSplit out ServerRequestExecutor 03/114403/8
Robert Varga [Sun, 10 Nov 2024 19:16:25 +0000 (20:16 +0100)]
Split out ServerRequestExecutor

This is a reusable piece, not directly tied to the pipeline. Split it
out, making for a leader HTTPServerSession.

JIRA: NETCONF-1424
Change-Id: Ifc9e79ec32d91a2871a65e8b751267dec0cfbe67
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoShutdown threadpools when channelInactive() 02/114402/6
Robert Varga [Sun, 10 Nov 2024 18:35:55 +0000 (19:35 +0100)]
Shutdown threadpools when channelInactive()

A secodary event that should trigger us shutting down is when the
channel does down. Add that hook.

JIRA: NETCONF-1424
Change-Id: I14390525996a11da12feaffa3802db2e7be13d73
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoMake sure RestconfStream.Sender gets non-null 55/114455/3
Robert Varga [Tue, 12 Nov 2024 03:27:41 +0000 (04:27 +0100)]
Make sure RestconfStream.Sender gets non-null

null event chunks are simply not allowed, annotate as much.

Change-Id: I9e97cc5ef1756106324d440b3bffca392561d1f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd credentials for CallHome Netconf node 01/114401/4
Yaroslav Lastivka [Fri, 8 Nov 2024 13:52:44 +0000 (15:52 +0200)]
Add credentials for CallHome Netconf node

Added empty unencrypted login credentials configuration for
CallHome Netconf nodes in CallHomeMountService.
Ensures compatibility with NetconfDeviceTopologyAdapter,
which now requires credentials for creating NetconfNode
after applying NETCONF-1235.

JIRA: NETCONF-1427
Change-Id: I24b1020ca10229bb394e3a2c8930f8269dd86d4e
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
5 months agoModernize callhome-provider 46/114446/4
Robert Varga [Mon, 11 Nov 2024 12:59:09 +0000 (13:59 +0100)]
Modernize callhome-provider

Use DataObject{Identifier,Reference} instead of InstanceIdentifier.

Change-Id: I9f976c71372e3b822e4fe7cc00450dcdf9860082
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoIndicate RESTCONF server features 08/114108/4
Ivan Hrasko [Mon, 21 Oct 2024 09:22:59 +0000 (11:22 +0200)]
Indicate RESTCONF server features

Indicate that RESTCONF server implementation supports:
HttpListen and HttpsListen features.

HttpsCallHome will be supported after server refactoring
is completed and we will have a user for it.

CentralRestconfServerSupported feature is going to be relocated
into new apps/central-restconf-server package.

Change-Id: I0a52ed7918547ef39f18e1dcfc0f473cc5a4f857
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
5 months agoStop device reconnection with wrong config 90/114390/2
Peter Suna [Thu, 7 Nov 2024 12:24:14 +0000 (13:24 +0100)]
Stop device reconnection with wrong config

Call onDeviceFailure directly on delegate attribute instead
of calling onDeviceFailed method, which tries to reconnect with
same incorrect configuration.

JIRA: NETCONF-1425
Change-Id: I0b5e09fadcca0e140d16d01f94abdf9cd882e8a1
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
5 months agoFix BytebufRequestResponse capitalization 85/114385/3
Robert Varga [Wed, 6 Nov 2024 23:41:45 +0000 (00:41 +0100)]
Fix BytebufRequestResponse capitalization

The response holds a ByteBuf, not a Bytebuf. Capitalize correctly.

Change-Id: Ibb6fcce0794b83af6e8ab13c026342d770288d83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoUse virtual threads for request execution 68/114268/11
Robert Varga [Wed, 30 Oct 2024 12:27:59 +0000 (13:27 +0100)]
Use virtual threads for request execution

HTTPServerSession has four distinct phases, two of which involve
reading or writing message body.

This patch offloads processing from the Netty thread, so that the task
of parsing request body and wrapping of asynchronous execution occurs
on a dedicated virtual thread -- off-loading IO threads and allowing
Channel.write() to occur in a blocking context.

JIRA: NETCONF-1424
Change-Id: Ia347e673d824ca18374a390284095410b361c5a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRefactor RestconfSession.{close,registerResource} 86/114386/7
Robert Varga [Thu, 7 Nov 2024 00:06:09 +0000 (01:06 +0100)]
Refactor RestconfSession.{close,registerResource}

There is no need to have an explicit listener on Channel.closeFuture(),
as we can just attach to channelInactive().

This patch also refactor resource registration, as RPC invocations,
which are expected to be the primary source of interactions, are
expected to execute asynchronously.

JIRA: NETCONF-1424
Change-Id: I8c257f8cfd427e00b066651c463298c708782eca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoUse channel allocator for Responses 66/114266/8
Robert Varga [Wed, 30 Oct 2024 12:03:31 +0000 (13:03 +0100)]
Use channel allocator for Responses

Refactor HTTPServerSession to correctly take advantage of ReadyResponse
and of channel's allocator -- leading to potential buffer reuse.

This also ensures we release the allocated buffer is released in case
of a writeout failure.

Change-Id: Ifb603aefee753fd9c0bc3c38f65e0eaa3cff2a6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoAdd ExceptionRequestResponse 51/114351/1
Robert Varga [Wed, 6 Nov 2024 11:14:22 +0000 (12:14 +0100)]
Add ExceptionRequestResponse

This is a specialized class for reporting error responses with a known
exception cause.

Change-Id: I1bb6e480d971bc1f9f2a4cd57aef61ff8eca2932
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 months agoRecognize */* media range 26/114326/1
Robert Varga [Sun, 3 Nov 2024 11:44:01 +0000 (12:44 +0100)]
Recognize */* media range

While our processing is quite lacking, add a special-case to allow for
*/* being specified.

Change-Id: I7b0cee7ad03185f8be07db4ae7394cc3448d605d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoAdd WebHostResource 31/114131/17
Robert Varga [Tue, 22 Oct 2024 15:48:09 +0000 (17:48 +0200)]
Add WebHostResource

We need the ability to inject secondary services into the NettyEndpoint,
such that they have a reference to the XRD (for now).

This patch introduces WebHostResource as the common execution API, which
are dispatched to from EndpointRoot.

This maps neatly to OSGi whiteboard pattern:
- WebHostResourceProvider is the service published to the whiteboard
- OSGiNettyEndpoint instances are event sources

In other environments SimpleNettyEndpoint's explicit register()/close()
mechanics might prove to be helpful

JIRA: NETCONF-1370
Change-Id: I041059919db7471a11c5e0da75557ff3c48efcda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoFix ReadyResponse methods 65/114265/1
Robert Varga [Wed, 30 Oct 2024 11:59:17 +0000 (12:59 +0100)]
Fix ReadyResponse methods

ReadyResponse implementations should not need an allocator, make sure to
adjust methods shapes to have subclasses reflect that.

Change-Id: Iba8f9f574a2990d6e8c36e541f71d0b6e06ad19c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoAdd Automatic-Module-Name to transport-{http,ssh} 46/113846/6
Robert Varga [Mon, 7 Oct 2024 08:38:01 +0000 (10:38 +0200)]
Add Automatic-Module-Name to transport-{http,ssh}

We need to start using these in JPMS modules, let's make sure their
module names are stable.

transport-ssh needs the entire 'shade sshd' story figured out: we
essentially want to have a module which includes sshd, but does not
export it.

transport-http uses codegen and that cannot be modules just yet.

Change-Id: Ic71d637b9cf370ea73408b15f6a8fbff24bb3f33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoDon't update data if DeviceSalFacade was closed 94/114194/5
Peter Suna [Fri, 25 Oct 2024 12:23:18 +0000 (14:23 +0200)]
Don't update data if DeviceSalFacade was closed

Verify that NetconfTopologyDeviceSalFacade and NetconfDeviceSalFacade
are not closed before modifying device data. This can prevent
the device from connecting if one thread calls close method while
another thread calls onDeviceConnected method.

JIRA: NETCONF-1418
Change-Id: Ifbe9a46a2f4ac236b63d9999fdaf84b9ec7ec563
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 months agoImprove event notification subscription tutorial 20/114020/2
Samuel Schneider [Wed, 16 Oct 2024 10:39:40 +0000 (12:39 +0200)]
Improve event notification subscription tutorial

Information about possible query parameters was misplaced.
Query parameters should be used when connecting to SSE location
not when obtaining it.
Move this information to more relevant place.

JIRA: NETCONF-1392
Change-Id: Idb44f76ea1fa5a894b567b025b8871425efe4436
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
6 months agoUpdate public TransportChannelListener references 18/113718/8
Robert Varga [Thu, 26 Sep 2024 12:03:09 +0000 (14:03 +0200)]
Update public TransportChannelListener references

Fix raw type warnings stemming from TransportChannelListener being
generic in public interfaces. This constitutes an API-incompatible
change.

JIRA: NETCONF-1401
Change-Id: I87097ef38fddce12afa0b667a16e3ffe66994ef2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoBump versions to 9.0.0-SNAPSHOT 99/113799/4
Robert Varga [Thu, 24 Oct 2024 13:52:58 +0000 (15:52 +0200)]
Bump versions to 9.0.0-SNAPSHOT

This starts the next development iteration.

Change-Id: I2bb7447d2269b88a5ecc49c7cdbb1b880a1e3087
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoBump versions to 8.0.4-SNAPSHOT 41/114141/1
Robert Varga [Thu, 24 Oct 2024 13:51:37 +0000 (15:51 +0200)]
Bump versions to 8.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I972d7d73489e2dcff1b8dbd865503921bbdb4f86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoRelease netconf v8.0.3
jenkins-releng [Thu, 24 Oct 2024 11:12:09 +0000 (11:12 +0000)]
Release netconf

6 months agoPropagate HttpHeaders to WellKnownResources 76/113876/7
Robert Varga [Thu, 24 Oct 2024 09:27:08 +0000 (11:27 +0200)]
Propagate HttpHeaders to WellKnownResources

We will need to see the headers to deal with the Accept-based JRD
serving. This patch exposes that.

JIRA: NETCONF-1379
Change-Id: Ic3551be618eda818365bb8a974dd53adf3de79ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoSeparate transport from service layer 97/113497/28
Matej Sramcik [Tue, 10 Sep 2024 14:34:25 +0000 (16:34 +0200)]
Separate transport from service layer

This patch extracts all JAX-RS-specific contracts from OpenApiService
and moves them to a new class, JaxRsOpenApi.

We then use WebInitializer to instantiate JaxRsOpenApi based on injected
OpenApiService instance.

JIRA: NETCONF-1370
Change-Id: Ifff963e4409e8e3c23add65beb88c62111ae24a8
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoRegister resources for cleanup 11/113611/14
Ivan Hrasko [Wed, 9 Oct 2024 15:05:22 +0000 (17:05 +0200)]
Register resources for cleanup

Add the possibility to close transport session and the ability
to register resource to be closed.

For this we also add onTransportChannelClosed() into
TransportChannelListener which is invoked when channel is closed.

JIRA: NETCONF-714
Change-Id: I4912bd7d4a03530e4941bc9b663b2dc3b54a2f22
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoForce instanceNum to be a long 40/113940/5
Robert Varga [Thu, 10 Oct 2024 14:29:22 +0000 (16:29 +0200)]
Force instanceNum to be a long

We require this parameter and will issue a 500 internal server error if
it is not present.

Push the definition to be a plain long, so as to guide JAX-RS (and
future users) towards non-Strings.

JIRA: NETCONF-1370
Change-Id: Ia01b09721536a1a343ab27beff093fb8f107856a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoMove NO_CONTENT and NOT_FOUND response 36/114136/1
Robert Varga [Wed, 23 Oct 2024 14:02:43 +0000 (16:02 +0200)]
Move NO_CONTENT and NOT_FOUND response

These responses are rather useful, make them more widely available.

JIRA: NETCONF-1379
Change-Id: I35c76c89afeb05458337a268d1833524a2e89cc5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoHTTPServerSession.prepare() is version-agnostic 32/114132/4
Robert Varga [Tue, 22 Oct 2024 20:54:59 +0000 (22:54 +0200)]
HTTPServerSession.prepare() is version-agnostic

HttpVersion is only required for HttpResponse construction, i.e. we have
it passed to Response.toHttpResponse(HttpVersion). Remove them from
prepation path.

Change-Id: I0aeadf8a5e97ef9ffe4d98ab6a1405173a18bc83
JIRA: NETCONF-1379
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoMark outbound write thread is internal 28/114128/6
Robert Varga [Tue, 22 Oct 2024 10:38:54 +0000 (12:38 +0200)]
Mark outbound write thread is internal

When we are writing out a message, we may be hitting a KEX -- at which
point we would normally be blocked.

The problem is that the blocked thread is usually the Netty IO thread,
which effectively ends up deadlocking it.

Prevent this situation by marking our thread as internal, which causes
SSHD to enqueue the message rather than blocking.

JIRA: NETCONF-1415
Change-Id: If472986270e827a316099168069754fe1661939d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoFix javadocs in Subscriber(s) 30/114130/3
Ivan Hrasko [Tue, 22 Oct 2024 11:00:44 +0000 (13:00 +0200)]
Fix javadocs in Subscriber(s)

Fix typos and wrong links in Subscriber and Subscribers javadocs.
Make clear that we operate on RestconfStream.

Change-Id: I16b3388a3e5bdd74048f1c7993f3d0dbc0b46ad8
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 months agoBump upstreams 29/114129/1
Robert Varga [Tue, 22 Oct 2024 10:41:42 +0000 (12:41 +0200)]
Bump upstreams

Adopt:
- mdsal-14.0.4
- controller-10.0.4
- aaa-0.20.3

Change-Id: I4317628af4a0b24004919d3faee45f955c423ca2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoFix docs in RestconfStream 03/114103/2
Ivan Hrasko [Mon, 21 Oct 2024 08:52:36 +0000 (10:52 +0200)]
Fix docs in RestconfStream

We are no more using web-sockets but SSE.
Fix documentation accordingly.

Change-Id: I656e5c77071413479c2ce62e83113f0bf62ae584
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 months agoFix docs in SSESender 02/114102/2
Ivan Hrasko [Mon, 21 Oct 2024 08:51:13 +0000 (10:51 +0200)]
Fix docs in SSESender

We are no more using web-sockets but SSE.
Fix documentation accordingly.

Change-Id: Id1aab876a7c63ee2d31e3890775645c6888e9e46
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 months agoAdd range restriction for backoff-multiplier 21/113921/5
Peter Suna [Wed, 9 Oct 2024 10:48:43 +0000 (12:48 +0200)]
Add range restriction for backoff-multiplier

Add range restriction from 1 to max value. This will remove
the case when it starts decreasing instead of multiplying the value
initially set as the minimum value.

JIRA: NETCONF-1407
Change-Id: I2bb906386b9935543e8a4b6eab23e90313d3f4f2
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
6 months agoClean up XRD output 84/114084/1
Robert Varga [Sun, 20 Oct 2024 08:26:11 +0000 (10:26 +0200)]
Clean up XRD output

Use writeEmptyElement() to ensure we have a self-closed tag.

JIRA: NETCONF-1379
Change-Id: I2112e42b3cfccbe683bd9f618f9fd072825b5410
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoShare a single DOMSchemaService across devices 68/114068/1
Robert Varga [Thu, 17 Oct 2024 16:49:15 +0000 (18:49 +0200)]
Share a single DOMSchemaService across devices

Since we have the same model context, we can just use a
FixedDOMSchemaService, which does the magic.

This reduces the amount of code we have as well as eliminate a single
object per instance, improving scalability a bit.

Change-Id: I28e0f468647b54b49623065eabd816b326474dd9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoAdd FIXME to MdsalOperationService 67/114067/1
Robert Varga [Thu, 17 Oct 2024 16:19:12 +0000 (18:19 +0200)]
Add FIXME to MdsalOperationService

JIRA: NETCONF-1414
Change-Id: I9e1587bafabb5e93d340e8e079e95223df764101
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoIntroduce transport.spi 16/114016/8
Robert Varga [Tue, 15 Oct 2024 21:36:18 +0000 (23:36 +0200)]
Introduce transport.spi

We have a number of implementation-internal classes living in
transport.api. Create transport.spi, so that implementation details are
in a different package.

Change-Id: I4701c632dc41f8202214068495711c640acd49a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoHandle the case of a null private key 22/114022/5
Robert Varga [Wed, 16 Oct 2024 10:49:03 +0000 (12:49 +0200)]
Handle the case of a null private key

A null object is an indication that there are no more objects left --
handle that gracefully.

A null private key can cause an exception during the creation of a
PEMParser instance. A check has been added to ensure that the
private key is not null.

JIRA: NETCONF-1411
Change-Id: Iebe4da892bfcc518882403b838899060b4deea6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
6 months agoClarify description in odl-netconf-device 84/113984/4
Peter Suna [Tue, 15 Oct 2024 08:26:20 +0000 (10:26 +0200)]
Clarify description in odl-netconf-device

Update description for max-backoff-millis and min-backoff-millis
leaf to clarify their functionality.

JIRA: NETCONF-1408
Change-Id: Iccefcad853c49303402fda21c01748cb21172539
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
6 months agoOpenApi: Fix /mounts endpoint 29/114029/2
Ivan Hrasko [Wed, 16 Oct 2024 11:05:27 +0000 (13:05 +0200)]
OpenApi: Fix /mounts endpoint

After removal of JacksonJaxbJsonProvider usage there is no writer
capable to write List of MountPointInstance(s) to JSON.

Create dedicated MountPointsEntity to generate OpenApiEntity.

JIRA: NETCONF-1412
Change-Id: I6f645deacc51841d00d0fd2db574c26163ca18f2
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 months agoModernize keystore-legacy 09/113909/5
Robert Varga [Wed, 9 Oct 2024 03:58:01 +0000 (05:58 +0200)]
Modernize keystore-legacy

Use DataObjectIdentifier instead of InstanceIdentifier.

Change-Id: I030c8dfc89fa3d1707c8db54aa8d7777ee12ff06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoAddress NETCONF-1210 FIXME 19/114019/2
Ivan Hrasko [Wed, 16 Oct 2024 07:44:46 +0000 (09:44 +0200)]
Address NETCONF-1210 FIXME

NETCONF-1210 has been fixed thus we can un-comment assertion.

Change-Id: I5c98363a6e5fd0a5c3cd97d2f8abddf1a89de54e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 months agoOpenAPI: remove empty list/container from payloads 78/113078/4
Oleksandr Zharov [Fri, 9 Aug 2024 16:42:32 +0000 (18:42 +0200)]
OpenAPI: remove empty list/container from payloads

Adjusted depth logic to remove empty lists and containers.
Now logic should work in line with proposed in NETCONF-1298.
Removed POST for depth 1 - for that value child container/list
always result in empty payload because child elements are being
cut off by depth.

JIRA: NETCONF-1345
Change-Id: I4f83823ac06d63dc57c69963f0eb8f6a1e3bb671
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
6 months agoFix client dispatcher queuing 10/114010/2
Robert Varga [Tue, 15 Oct 2024 19:04:07 +0000 (21:04 +0200)]
Fix client dispatcher queuing

Future listeners are not delivered immediately upon write completion,
but rather at some time after.

This means we need to setup the queue before we send the request, so
that if we receive a response before the callback runs we do not get
into weird state.

JIRA: NETCONF-1406
Change-Id: I66e1911fd6db6843499f772827e7ae00fa3ff377
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 months agoMove AbstractJukeboxTest 02/114002/3
Robert Varga [Tue, 15 Oct 2024 15:01:37 +0000 (17:01 +0200)]
Move AbstractJukeboxTest

We have contracts in restconf.server.api which could use some localized
testing. Allow that to happen by rehosting AbstractJukeboxTest.

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