netconf.git
8 weeks agoRelease netconf v7.0.1
jenkins-releng [Wed, 6 Mar 2024 13:43:15 +0000 (13:43 +0000)]
Release netconf

8 weeks agoOpenAPI: netopeer2 NPE because stack is null 63/110263/4
lubos-cicut [Mon, 19 Feb 2024 10:33:44 +0000 (11:33 +0100)]
OpenAPI: netopeer2 NPE because stack is null

When we load netopeer2 modules, in karaf.log we get NullPointException.
It is because stack was transported to PropertyEntity#processTypeDef
as null.

JIRA: NETCONF-1254
Change-Id: I319313919568f8b9756ed63a3a92d670bf349b72
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
8 weeks agoFix RPC/action output writeout 87/110487/5
Robert Varga [Wed, 6 Mar 2024 09:40:42 +0000 (10:40 +0100)]
Fix RPC/action output writeout

AbstractNormalizedNodeBodyWriter's dispatch logic falls through to
writeData(), which ends up wrecking the output.

Add missing return statements and improve tests to cover these.

JIRA: NETCONF-1266
Change-Id: I5ab83bf7b6b79d54dedc76ce4785f120dfe61304
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMigrate constructor caller 88/110488/1
Robert Varga [Wed, 6 Mar 2024 10:26:03 +0000 (11:26 +0100)]
Migrate constructor caller

Use DOMDataTreeIdentifier.of() instead.

Change-Id: I43bc9b490736968cdde7fa4a44225ff6dce60fc4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRemove useless warning about rounding 79/110479/2
Robert Varga [Tue, 5 Mar 2024 13:21:05 +0000 (14:21 +0100)]
Remove useless warning about rounding

We are warning when we round the time -- assuming we have
millisecond-precision time.

We have switched to nanosecond-precision in commit
 efe35f12ce37107c814a5d8bb245e5f9ed9ba073, hence this warning is
completely superfluous.

JIRA: NETCONF-1262
Change-Id: I76377a078d13c9256ae55bc41439a1ff2bc24564
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump versions to 7.0.1-SNAPSHOT 96/110396/1
Robert Varga [Wed, 28 Feb 2024 20:57:57 +0000 (21:57 +0100)]
Bump versions to 7.0.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I26291846a465b68c5fcc03343892811ecaa38045
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRelease netconf v7.0.0
jenkins-releng [Wed, 28 Feb 2024 10:12:50 +0000 (10:12 +0000)]
Release netconf

2 months agoDo no implement invokeNetconf() as a default method 92/110392/4
Robert Varga [Wed, 28 Feb 2024 07:15:36 +0000 (08:15 +0100)]
Do no implement invokeNetconf() as a default method

We need to split the invokeRpc() and invokeNetconf() implementations,
this takes the first step.

JIRA: NETCONF-806
Change-Id: I4b6af534dcdf733c29e6dfc03e379a040e72aa8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUpdate to Swagger UI v5.11.8 17/110317/4
Oleksandr Zharov [Fri, 23 Feb 2024 16:31:21 +0000 (17:31 +0100)]
Update to Swagger UI v5.11.8

Updated Swager UI from 5.9.0 to latest current version:
https://github.com/swagger-api/swagger-ui/releases/tag/v5.10.0
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.0
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.1
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.2
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.3
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.4
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.5
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.6
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.7
https://github.com/swagger-api/swagger-ui/releases/tag/v5.11.8

All ODL adjustments perserved.

JIRA: NETCONF-1255
Change-Id: I17600e718e9748027579ff2d82929c39af6db409
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoRefactor NetconfDeviceSchemas 63/110363/6
Robert Varga [Mon, 26 Feb 2024 16:55:14 +0000 (17:55 +0100)]
Refactor NetconfDeviceSchemas

NetconfDeviceSchemas is currently largely useless, as of its two
implementations only one really works.

This patch reworks it to be a record holding information about how the
EffectiveModelContext is to be assembled and moves processing to
NetconfStateSchemasResolverImpl, making it a private detail in process
of doing so.

The checks for yang-library are disabled and will be re-enabled with a
new implementation, which will act as a counter-balance to the current
HELLO+Monitoring implementation.

JIRA: NETCONF-840
Change-Id: Ie0e46656ae022cffbe6724738bd982d51e3d80da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoEliminate SchemasStream.EntityType 84/110084/11
lubos-cicut [Mon, 29 Jan 2024 18:48:29 +0000 (19:48 +0100)]
Eliminate SchemasStream.EntityType

We were using SchemasStream.EntityType to distinguish if
SchemaEntity is node or RPC. Eliminated this enum and created
a class hierarchy structure, so we now have NodeSchemaEntity and
RpcSchemaEntity

JIRA: NETCONF-1226
Change-Id: I70a9f48de0528443831b95d16e83dd513a73bc13
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoImprove monitoring access to revision-less schemas 55/110355/1
Robert Varga [Mon, 26 Feb 2024 13:57:20 +0000 (14:57 +0100)]
Improve monitoring access to revision-less schemas

The server may support multiple versions of YANG schema, which one of
which may not actually have a revision. In this case we really want to
specify an empty version, as that is the entry are after -- rather than
any version, which would incur data-not-unique error.

JIRA: NETCONF-840
Change-Id: I5b705971369cbffa81c0c0464569f8caac2f8e6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMove MonitoringSchemaSourceProvider 54/110354/1
Robert Varga [Mon, 26 Feb 2024 11:02:18 +0000 (12:02 +0100)]
Move MonitoringSchemaSourceProvider

Hide the ietf-netconf-monitoring schema provider, in preparation for it
being revamped a bit.

JIRA: NETCONF-840
Change-Id: Ie291c30b7f877937a28a52217ba23b69cf50eff0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove CachedYangTextSchemaSource 52/110352/1
Robert Varga [Mon, 26 Feb 2024 10:52:06 +0000 (11:52 +0100)]
Remove CachedYangTextSchemaSource

There is no point in having this subclass -- just use plain
StringYangTextSource instead.

JIRA: NETCONF-840
Change-Id: I8e0a39391323726d50f0c9c769dc4bfba1a9461c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoPush down STATE_SCHEMAS_RESOLVER 44/110344/1
Robert Varga [Sun, 25 Feb 2024 17:37:24 +0000 (18:37 +0100)]
Push down STATE_SCHEMAS_RESOLVER

We are most likely going to inline the resolver back, make sure tests'
exposure is minimal.

JIRA: NETCONF-840
Change-Id: I5d713e0b9349b3dedad33f19a37c06bd5f7f27b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoEliminate SchemaResourcesDTO 73/110273/16
Robert Varga [Wed, 21 Feb 2024 10:27:47 +0000 (11:27 +0100)]
Eliminate SchemaResourcesDTO

The process of setting up EffectiveModelContext is rather arcane, going
through multiple indirections, most of which are not really necessary.

This patch introduces DeviceNetconfSchemaProvider to replace the plain
SchemaResourcesDTO, centralizing the process into a single class.

As we now have a stricter lifecycle, we end up using invokeNetconf()
instead of invokeRpc(), making it clear we are only invoking base RPCs.

JIRA: NETCONF-840
Change-Id: I14d41f9f78332d2da9681de89a931dc01cd0829f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoNetconfClientFactoryImpl should propagate stack failure 06/110306/5
Robert Varga [Sun, 25 Feb 2024 14:01:46 +0000 (15:01 +0100)]
NetconfClientFactoryImpl should propagate stack failure

createClient() is ignoring failures to set up the transport stack,
leading to the future not completing on, for example, refused
connection.

Fix this by making ClientTransportChannelListener also a FutureCallback,
routing such failures to the returned future.

JIRA: NETCONF-1252
Change-Id: I3abc1faed94ee793ac6116eaca56a3cf473d8261
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUse try-with-resources to get localport 42/110342/1
Robert Varga [Sun, 25 Feb 2024 13:43:04 +0000 (14:43 +0100)]
Use try-with-resources to get localport

Eclipse is flagging the use of AutoCloseable, oblige by restructuring
the code a bit.

Change-Id: I37d089ab9c783022ade6c66d6544613abc4f3fc6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove NetconfDeviceCommunicator error checking 40/110340/4
Robert Varga [Sun, 25 Feb 2024 11:33:47 +0000 (12:33 +0100)]
Improve NetconfDeviceCommunicator error checking

Use Future.cause() to discern failures -- meaning we have a non-null
cause in the error path.

Change-Id: Ifb88cfcf666d1aea99c09189992d80224c0862e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove future result access 39/110339/2
Robert Varga [Sun, 25 Feb 2024 10:47:46 +0000 (11:47 +0100)]
Improve future result access

When the future completes, just look at it cause(), as that will be null
for success. This slightly improve the performance in the case of a
failure.

Change-Id: Ieb1aa02e4aa7b86f35a6b6de8c7129f8cc048385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove ClientTransportChannelListener 38/110338/2
Robert Varga [Sun, 25 Feb 2024 10:31:27 +0000 (11:31 +0100)]
Improve ClientTransportChannelListener

Since we are completing the same future, there is no need to allocate
a new FutureListener and capture the promise.

Make ClientTransportChannelListener a FutureListener itself, and pick
the result from the future we get handed.

Change-Id: I14af7d49af8b02ea530c7c994968d2adf48083a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSplit out ClientTransportChannelListener 37/110337/3
Robert Varga [Sun, 25 Feb 2024 10:14:28 +0000 (11:14 +0100)]
Split out ClientTransportChannelListener

Promote this record to a top-level class, so that it can be tested
easily.

While we are at it, allocate it in a single place and make sure we do
not retain a reference to configuration.

JIRA: NETCONF-590
Change-Id: I8eace1bd10ed6f2810d9bc85020d843f2558bcde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUse a switch expression in createClient() 36/110336/2
Robert Varga [Sun, 25 Feb 2024 10:06:22 +0000 (11:06 +0100)]
Use a switch expression in createClient()

Using a switch expression ensures we are handling each case and makes it
clear we are not doing anything with the returned future.

JIRA: NETCONF-590
Change-Id: I534bdee682d86abc8cb93787ef52183cb2b57a42
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoGuarantee a non-null protocol 35/110335/2
Robert Varga [Sun, 25 Feb 2024 09:57:39 +0000 (10:57 +0100)]
Guarantee a non-null protocol

NetconfClientConfiguration always has its protocol, make sure we express
that.

Change-Id: I47e13fba756eefaa4075d754913f213a2b50dda1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix transport-http dependencies 34/110334/1
Robert Varga [Sun, 25 Feb 2024 09:18:16 +0000 (10:18 +0100)]
Fix transport-http dependencies

We are using ietf-yang-types and RFC8341, declare that fact.

Change-Id: I317fdde2f06e3bcac778ee9fbc30b534d64594df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix transport-ssh dependencies 33/110333/1
Robert Varga [Sun, 25 Feb 2024 09:17:02 +0000 (10:17 +0100)]
Fix transport-ssh dependencies

We are using RFC6991 and RFC8341 models, declare that fact.

Change-Id: If530c9cee92591535919825aae286ffc794117e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix transport-tls dependencies 32/110332/1
Robert Varga [Sun, 25 Feb 2024 09:14:36 +0000 (10:14 +0100)]
Fix transport-tls dependencies

We are using rfc8341 model, declare that fact.

Change-Id: Id328592638568fc4e3c6e6b3fb797a2c92a0a05d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix keystore-legacy dependencies 31/110331/1
Robert Varga [Sun, 25 Feb 2024 09:13:08 +0000 (10:13 +0100)]
Fix keystore-legacy dependencies

We are using BouncyCastle provider, add it to dependency list.

Change-Id: I75035f052fcf5ce3a5a233ac5f0b793217f02345
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoClean up {key,trust}store-none dependencies 30/110330/1
Robert Varga [Sun, 25 Feb 2024 09:11:38 +0000 (10:11 +0100)]
Clean up {key,trust}store-none dependencies

Pull in JDT annotations.

Change-Id: I4e7e3447939baba1939c56ea3d734cf061ff4861
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoClean up netconf-test-util dependencies 29/110329/1
Robert Varga [Sun, 25 Feb 2024 09:10:27 +0000 (10:10 +0100)]
Clean up netconf-test-util dependencies

Use JDT annotations and do not pull in JUnit itself.

Change-Id: I3e5e6425b0839b1445907da7b530138bacc38191
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix rfc8639 dependencies 28/110328/1
Robert Varga [Sun, 25 Feb 2024 09:08:40 +0000 (10:08 +0100)]
Fix rfc8639 dependencies

We are using RFC6991 here, make sure we declare these dependencies.

Change-Id: Ic011fceb6e148bb9c89037794a1f44e00249e2fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoClean up netconf-server-mdsal dependencies 27/110327/1
Robert Varga [Sun, 25 Feb 2024 09:06:12 +0000 (10:06 +0100)]
Clean up netconf-server-mdsal dependencies

Adjust dependencies to eliminate most of the reported warnings.

Change-Id: Ic3ba25c35f97550ed7d55d4c162e998122f47f71
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoClean up NetconfNodeActor fields 22/110322/2
Robert Varga [Sun, 25 Feb 2024 07:43:27 +0000 (08:43 +0100)]
Clean up NetconfNodeActor fields

Do not retain NetconfTopologySetup, as we are using only actor system,
which is a constant for the actor anyway.

Retain SchemaResourcesDTO without extracting things out of it, as we
will be evolving it a bit -- and update them when
RefreshSetupMasterActorData comes in.

JIRA: NETCONF-840
Change-Id: I2b07aa84ae1b51153cc4144bc739ef8cae0480f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not use Builders in netconf-testtool 26/110326/1
Robert Varga [Sun, 25 Feb 2024 08:13:15 +0000 (09:13 +0100)]
Do not use Builders in netconf-testtool

Migrate to using ImmutableNodes' methods instead.

While we are here, ditch the unneeded wrapping of executor as well.

Change-Id: I7097ebf6ca9db387b5aab7878952f88a50b1464b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not use Builders in netconf-server-mdsal 25/110325/1
Robert Varga [Sun, 25 Feb 2024 07:58:21 +0000 (08:58 +0100)]
Do not use Builders in netconf-server-mdsal

Use data.spi.node.ImmutableNodes for the few constructs we create.

Change-Id: Ic9dbb6107b0d75df3ce3cea67a450c3c6a54456e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove an unused import 24/110324/1
Robert Varga [Sun, 25 Feb 2024 07:57:20 +0000 (08:57 +0100)]
Remove an unused import

We are implementing NetconfNotificationCollector, so there is not need
to import NetconfNotificationStreamListener.

Change-Id: Ib180f775c23025a2a24286ece5bb66a988eb7063
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not use ListenerRegistration 23/110323/1
Robert Varga [Sun, 25 Feb 2024 07:55:36 +0000 (08:55 +0100)]
Do not use ListenerRegistration

Use a plain Registration, as that is all we need.

Change-Id: Iebdda78c3707fb8a0389ded721bb81f1bfd28dcd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump sshd to 2.12.1 86/110286/1
Robert Varga [Thu, 22 Feb 2024 07:33:58 +0000 (08:33 +0100)]
Bump sshd to 2.12.1

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

Change-Id: I5a6733a9f0e0ebf14bc1455c7e40867b76ce46f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove NetconfDeviceTest capability assertions 76/110276/2
Robert Varga [Wed, 21 Feb 2024 13:26:08 +0000 (14:26 +0100)]
Improve NetconfDeviceTest capability assertions

Rather than fishing through reported assertions to see what is present,
use assertEquals() to ensure the result is exactly what we expect.

Change-Id: I892abf0da7c6c069afcb6cd462639cfe3ea603e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSimplify invocation mocking 75/110275/2
Robert Varga [Wed, 21 Feb 2024 13:17:20 +0000 (14:17 +0100)]
Simplify invocation mocking

Use Invocation.getArgument() instead of getArguments() and casting.
While we are here, fix minor warnings around ArgumentCaptor by using
local variable type inference.

Change-Id: I75756f79a9e0820d61acea847c8e635cf5657f36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoHide RestconfStrategy.readData() 67/110267/1
Robert Varga [Mon, 19 Feb 2024 13:22:09 +0000 (14:22 +0100)]
Hide RestconfStrategy.readData()

This method is only used internally, reduce its visibility.

JIRA: NETCONF-1155
Change-Id: I788b7d371ad9d22260adb91eb42cc3e1848ba0ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoCorrect device-notification output 61/110261/2
Robert Varga [Sun, 18 Feb 2024 18:22:04 +0000 (19:22 +0100)]
Correct device-notification output

Stream subscription always results in to stream name, with the actual
location being discoverable via stream state.

JIRA: NETCONF-1102
Change-Id: Ia66c8d944053536f8d7676e120ab4a558137a6a7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefactor ClientFactoryManagerConfigurator 64/110064/7
Robert Varga [Sun, 28 Jan 2024 20:48:32 +0000 (21:48 +0100)]
Refactor ClientFactoryManagerConfigurator

Turn the interface into an abstract class, so that we can evolve -- most
of the use cases boil down to authentication, it would seem.

JIRA: NETCONF-1238
Change-Id: Ieef402a8879a86780bff65614397aae158903495
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSchema determination is asynchronous 87/109987/12
Robert Varga [Thu, 25 Jan 2024 03:47:38 +0000 (04:47 +0100)]
Schema determination is asynchronous

One of the reasons NetconfDevice needs an Executor is because it is
invoking Future.get() -- which must not happen on the invoking thread,
because then we would not get a response as we would block the Netty
thread.

Refactor schema acquisition to be asynchronous, which means it can be
executed immediately and we can then follow up with schema setup through
a callback.

The introduced asynchrony means we cannot really use things like
Verify.verify() and Preconditions.checkState(). We essentially write the
parsing code from scratch with proper defenses against the dark arts.

This removes artificial content stripping, as that is just not
appropriate -- leading to one test schema being ignored.

JIRA: NETCONF-1233
Change-Id: I527e2d8da6bdbd74baf5ffcd9eae256c2ade9e6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRework BaseScheams 59/110059/11
Robert Varga [Sun, 28 Jan 2024 10:29:00 +0000 (11:29 +0100)]
Rework BaseScheams

The EffectiveModelContext we use for initial baseline access depends on
the set of advertized capabilities.

This patch refactors BaseNetconfSchemas and BaseSchema, so that we have
well-defined API-level contract backed by a cache.

JIRA: NETCONF-1256
Change-Id: I9a432f03be861eb082a7f2349801b921849e6e5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefresh IETF client/server models 28/110228/5
Robert Varga [Tue, 13 Feb 2024 09:32:33 +0000 (10:32 +0100)]
Refresh IETF client/server models

Adopt models from the following:
- draft-ietf-netconf-crypto-types-31
- draft-ietf-netconf-http-client-server-17
- draft-ietf-netconf-keystore-32
- draft-ietf-netconf-netconf-client-server-33
- draft-ietf-netconf-restconf-client-server-33
- draft-ietf-netconf-ssh-client-server-37
- draft-ietf-netconf-tcp-client-server-21
- draft-ietf-netconf-tls-client-server-38
- draft-ietf-netconf-trust-anchors-25

JIRA: NETCONF-590
Change-Id: I5497369b68e20f5442af07565f18b922d0a0e570
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix tests imports 29/110229/1
Oleksandr Zharov [Tue, 13 Feb 2024 10:46:17 +0000 (11:46 +0100)]
Fix tests imports

Fixed test imports in NetconfRestconfStrategyTest.

Change-Id: Iaf6e1c55baed883dfc221e2903e15fa655275085
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoFix PUT/POST requests for lists 27/109127/13
Oleksandr Zharov [Thu, 30 Nov 2023 11:07:00 +0000 (12:07 +0100)]
Fix PUT/POST requests for lists

Added condition into PUT/POST requests with insert=after option
that covers insert after last element of the list.

JIRA: NETCONF-1180
Change-Id: Ib55818741c82c907648b259c2bd362b9b4348e52
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoMove AbstractBody et al. 27/110227/3
Robert Varga [Mon, 12 Feb 2024 12:26:41 +0000 (13:26 +0100)]
Move AbstractBody et al.

Request bodies are part of RESTCONF server API, move them into that
package.

JIRA: NETCONF-773
Change-Id: I1fe9e41d237eaf5ffd70a31f9b4eebd1d6e43bed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSeparate logic of get root path 76/110176/10
lubos-cicut [Thu, 8 Feb 2024 09:34:15 +0000 (10:34 +0100)]
Separate logic of get root path

Repaired creating of get root path to simplify logic of
OperationEntity#generate method.

Change-Id: Ice9857b673e8db88f7edcb46cbf92a9851d033ba
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenAPI: Unify description handling 56/110156/8
Yaroslav Lastivka [Mon, 5 Feb 2024 12:15:45 +0000 (14:15 +0200)]
OpenAPI: Unify description handling

Updated the description() method to return
null when a node lacks a description.
Unit tests have been adjusted to reflect
this updated behavior.

JIRA: NETCONF-1253
Change-Id: I6a9d7a5830afad4cd14c567578284493dc1f326e
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoCreate overloaded constructors for PathEntity 55/110155/7
Samuel Schneider [Tue, 6 Feb 2024 09:29:02 +0000 (10:29 +0100)]
Create overloaded constructors for PathEntity

Create overloaded constructors for PathEntity. This was done to avoid
using null for PathEntity creation.

JIRA: NETCONF-1240
Change-Id: I231a596537fca238990fb231f7015f24c9931aed
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoFix OpenAPI is ignoring restconf settings 86/110186/3
lubos-cicut [Wed, 7 Feb 2024 22:56:28 +0000 (23:56 +0100)]
Fix OpenAPI is ignoring restconf settings

Restconf OpenAPI is ignoring restconf settings in
etc/org.opendaylight.restconf.nb.rfc8040.cfg namely restconf
setting to specify the base path which has been introduced
in NETCONF-1218.

JIRA: NETCONF-1230
Change-Id: I6c658b9feb89aba11a68290073b115c27d98bd13
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoOpenAPI: Remove not needed TODOs 58/110158/7
Yaroslav Lastivka [Tue, 6 Feb 2024 12:05:25 +0000 (14:05 +0200)]
OpenAPI: Remove not needed TODOs

Remove TODOs which were left from OpenAPI rewrite and which
we know they are already addressed, we cannot reproduce any issue
or were just no more valid comments.

JIRA: NETCONF-938
Change-Id: Id77f825d2eefe2ea6277bddeeccc6f2d8cb8909c
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoOpenAPI: Delete no-op methods 07/110207/2
Ivan Hrasko [Fri, 9 Feb 2024 14:17:06 +0000 (15:17 +0100)]
OpenAPI: Delete no-op methods

Delete no-op methods which are not used or make them abstract
in case they are going to be implemented in child classes.

These methods are remnants from NETCONF-938 reimplementation.

Change-Id: I072717c5ef66329a5b202dc8804f51fdefad2c78
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoRemove unnecessary empty double lines. 43/110143/6
Yaroslav Lastivka [Mon, 5 Feb 2024 11:09:49 +0000 (13:09 +0200)]
Remove unnecessary empty double lines.

Reordered class fields, separated fields with different keywords, and removed empty double lines within the openapi package.

JIRA: NETCONF-938
Change-Id: Ia601693fa7f12db1984d9163649106c1c1d96e31
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoDelete all always null returning methods 75/110175/2
lubos-cicut [Wed, 7 Feb 2024 09:34:15 +0000 (10:34 +0100)]
Delete all always null returning methods

Removed methods in restconf-openapi which always return null. These
are the remnants from implementation rewrite done in NETCONF-938.

Change-Id: I43d8bffeb2ba1df2d6a5bba70715ce0c2e307fa4
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoRename odl-netconf-netty-util 75/110075/2
Robert Varga [Mon, 29 Jan 2024 12:40:12 +0000 (13:40 +0100)]
Rename odl-netconf-netty-util

A better name is odl-netconf-common, let's use that.

Change-Id: Ia40a3f63291d05a1e0aa1f7a9754b8935a0c73ab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoIterate over models in SchemasStream 22/110122/6
lubos-cicut [Tue, 6 Feb 2024 09:43:15 +0000 (10:43 +0100)]
Iterate over models in SchemasStream

Use originally intended iterative approach to get next chunk of
schemas (for one model) in SchemasStream.

JIRA: NETCONF-1242
Change-Id: I205f817a83fa957535b23591a943aa7775a2cb7d
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoIterate over models in PathsStream 21/110121/7
lubos-cicut [Fri, 2 Feb 2024 09:05:54 +0000 (10:05 +0100)]
Iterate over models in PathsStream

Use originally intended iterative approach to get next chunk of
paths (for one model) in PathsStream.

JIRA: NETCONF-1241
Change-Id: I1358e94d387f944f72e12fae5421d35b312481f2
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoTest revision requirement in schema service 51/107351/11
lubos-cicut [Thu, 21 Dec 2023 11:27:42 +0000 (12:27 +0100)]
Test revision requirement in schema service

This patch adapt old tests, because they were using not existing
module.

JIRA: NETCONF-1160
Change-Id: I2ca913b69fb128d9e4aafa4baf1571c7db7650a6
Signed-off-by: Oleksandr Panasiuk <oleksandr.panasiuk@pantheon.tech>
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoUpdate user guide with key-based auth 98/109998/10
Oleksandr Zharov [Thu, 25 Jan 2024 11:14:37 +0000 (12:14 +0100)]
Update user guide with key-based auth

Added example payload for device creation using key-based authentication.

JIRA: NETCONF-1186
Change-Id: Iadb4f6651091113631d3ed1707ba86f00931a4ac
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoEnforce base64 encoding for netconf-keystore 96/108896/22
Oleksandr Zharov [Thu, 9 Nov 2023 16:59:01 +0000 (17:59 +0100)]
Enforce base64 encoding for netconf-keystore

Changed type to binary for all leafs that are claiming their type as
base64.

We are no more reusing groupings for RPC. Purpose of it is to left
all RPC logic untouched by this patch.

JIRA: NETCONF-1186
Change-Id: I870427af766c55a5e65b336046e64f048c2b7fdd
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoImprove error path for list items 96/110096/3
Yaroslav Lastivka [Wed, 31 Jan 2024 09:26:01 +0000 (11:26 +0200)]
Improve error path for list items

Enhanced the throwing of RestconfDocumentedException
to include a more precise path.

JIRA: NETCONF-1222
Change-Id: I19f9b7c413ba24a38d716c2140ad35ef94c5ff49
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoFlatten callhome-provider 32/110132/2
Robert Varga [Sun, 4 Feb 2024 15:45:28 +0000 (16:45 +0100)]
Flatten callhome-provider

There is no point in separating components here -- flatten them to a
single package. We may end up promoting some of these to
netconf-client-mdsal and/or netconf-topology, but that is a separate
story.

JIRA: NETCONF-590
Change-Id: I1d8d96351b75965849d32028329716075c2da84c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRework SslHandlerFactory 62/110062/16
Robert Varga [Sun, 28 Jan 2024 17:40:33 +0000 (18:40 +0100)]
Rework SslHandlerFactory

Tracking down all the possible implementations and bridging of
SslHandlerFactor is not nice.

Turn SslHandlerFactory into an abstract class, with an explicit
fixed specialization.

This also allows us to put the configuration parsing bits to where
users can find them -- and create dynamic SslContexts as appropriate.

Furthermore this ends up differentiating the deprecated
netconf.client.SslHandlerFactory -- which becomes SslContextFactory and
we end up ditching the manual SSLEngine creation.

JIRA: NETCONF-1237
Change-Id: I2cd4721336f9867921123521d7b18d91a8743835
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDecrypt key credentials in keystore-legacy 28/110128/4
Robert Varga [Fri, 2 Feb 2024 20:54:55 +0000 (21:54 +0100)]
Decrypt key credentials in keystore-legacy

This moves the decryption and decoding logic into keystore-legacy, so
that the lifecycle is controlled.

JIRA: NETCONF-1237
Change-Id: Ib39d034f87f98114aff1106490d237eea99d0940
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUse NetconfKeystoreService in tls auth provider 24/110124/1
Robert Varga [Fri, 2 Feb 2024 15:28:12 +0000 (16:28 +0100)]
Use NetconfKeystoreService in tls auth provider

Rather than listening to datastore, use the associated service to
acquire readily-decoded certificates.

While we are at it, we index them to a multimap, so we do not need to
iterate through them all the time.

JIRA: NETCONF-1243
Change-Id: I93e546684e6f31e309da45d0cf07cc30de31565a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix SslHandler indirection 11/110111/3
Robert Varga [Wed, 31 Jan 2024 22:38:32 +0000 (23:38 +0100)]
Fix SslHandler indirection

We should be binding the factory at configuration time, not when it is
actually needed.

JIRA: NETCONF-1243
Change-Id: I36854bfab82a9d240cc641b5eb525b396215901a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove callhome-server 12/110112/2
Robert Varga [Wed, 31 Jan 2024 23:34:42 +0000 (00:34 +0100)]
Remove callhome-server

The server/provider split does not make sense here -- we end up with
ping-pong through callbacks and whatnot.

Bring the thwo parts into a single component, as callhome-server touches
topology anyway.

While this is not directly tied to the SSL context work, callhome-server
is monitoring netconf-keystore, so the lifecycle needs to tied together
correctly.

JIRA: NETCONF-1243
Change-Id: I75b0b28202a03105169ef675fba7713561eacd68
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoExpose NetconfKeystoreService 10/110110/3
Robert Varga [Wed, 31 Jan 2024 21:56:33 +0000 (22:56 +0100)]
Expose NetconfKeystoreService

We are performing translation of datastore configuration state into Java
equivalent. Let's expose that as a service and run a full component,
which supports asynchronous updates.

This also defers start by not reporting initial state until we have
observed the datastore.

JIRA: NETCONF-1237
Change-Id: Ib6b34d707eb664a94cb4a30049e50444f47fc5ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate thread-blocking on NetconfMessage.toString() 28/109928/5
Matej Sramcik [Tue, 23 Jan 2024 13:06:29 +0000 (14:06 +0100)]
Eliminate thread-blocking on NetconfMessage.toString()

The NetconfMessage.toString() method is synchronized on the
TRANSFORMER.
This creates bottleneck if method is processing a lot of messages.

Used XmlUtil.toString() instead of Transformer to fix the issue.

JIRA: NETCONF-1227
Change-Id: I26ec52bc53787801d2a01db4a8096a855a30718a
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
3 months agoClean up CachedYangTextSchemaSource 68/110068/6
Robert Varga [Sun, 28 Jan 2024 23:34:12 +0000 (00:34 +0100)]
Clean up CachedYangTextSchemaSource

Rename to CachedYangTextSource and inherit from StringYangTextSource,
which does everything we need it to do. Also update the test to use
JUnit5.

Change-Id: Ibc0d19ebe4ca7582319da3f864dc7c4d5af2459c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRegister call-home listeners globally 83/110083/3
Robert Varga [Mon, 29 Jan 2024 17:21:16 +0000 (18:21 +0100)]
Register call-home listeners globally

This is probably a migration omission. Since the listeners have no
effects, it is safe to run them concurrently. Do just that, fixing at
least 3 warnings.

Change-Id: Ia42beebb17d54afc12fc2d5f68b04af92ff1ec77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate callhome-model artifact 01/110101/1
Robert Varga [Wed, 31 Jan 2024 11:22:20 +0000 (12:22 +0100)]
Eliminate callhome-model artifact

Move the model into its sole user and eliminate the artifact.

JIRA: NETCONF-1243
Change-Id: I41a7a1dd79227b1672119dacae33df713f0b2a35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMake AuthorizedKeysDecoder thread-safe 00/110100/1
Robert Varga [Wed, 31 Jan 2024 11:17:51 +0000 (12:17 +0100)]
Make AuthorizedKeysDecoder thread-safe

AuthorizedKeysDecoder is mutating state of a single instance, which is
counter-intuitive and leads to the last decoded key to be left present
in the instance.

Fix this by making the deconding method static and keeping the instance
an internal thing, closing the leak and making the decoding process
inherently thread-safe.

Change-Id: I000b100773d206aee6b0e4f634f7d46a8b56544e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSwitch ssh-host-key to binary 92/110092/5
Robert Varga [Tue, 30 Jan 2024 10:52:10 +0000 (11:52 +0100)]
Switch ssh-host-key to binary

Using a String with Base64 is a rather lacking employ of YANG, as 'type
binary' is encoded in JSON and XML as Base64, so we get codecs for free.

JIRA: NETCONF-1243
Change-Id: I90158893570e2dd6d80a69a78acf8fe99f84ae1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoObsolete non-transport ssh-host-key 82/110082/7
Robert Varga [Mon, 29 Jan 2024 17:20:33 +0000 (18:20 +0100)]
Obsolete non-transport ssh-host-key

Update the model layout to make 'transport' choice mandatory and
make ssh-host-key obsolete.

JIRA: NETCONF-1243
Change-Id: I178d5d8d7858d6c4074214ac8cce598f5c2b6ec1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefactor NetconfSalKeystoreRpcs 90/110090/5
Robert Varga [Tue, 30 Jan 2024 04:36:15 +0000 (05:36 +0100)]
Refactor NetconfSalKeystoreRpcs

Move RPC implementations into keystore-legacy and wrap them in a
ClusterSingletonService.

JIRA: NETCONF-1237
Change-Id: I1fdc81500c90cb46235838c9e77e741d44160807
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove SP dependency 93/110093/2
Robert Varga [Tue, 30 Jan 2024 12:32:20 +0000 (13:32 +0100)]
Remove SP dependency

This dependency seems to be unused now == remove it.

Change-Id: I691fcb0e6e84c1f40fcf4a62c26113c7ed76e6ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCreate SchemasEntity class to simplify SchemasStream 08/109908/7
lubos-cicut [Mon, 22 Jan 2024 12:34:45 +0000 (13:34 +0100)]
Create SchemasEntity class to simplify SchemasStream

Created SchemasEntity class to simplify SchemasStream. SchemasEntity
now hold collection of SchemaEntity as in PathsEntity. Class
SchemaStream is no more necessary.

JIRA: NETCONF-938
Change-Id: I02ac62704dabe94d5c793af383bb6a0c7bbd4a0a
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoOptimize AuthorizedKeysDecoder 91/110091/1
Robert Varga [Tue, 30 Jan 2024 06:33:03 +0000 (07:33 +0100)]
Optimize AuthorizedKeysDecoder

Use pre-computed bytes for our constants and do not compute individual
components twice.

Change-Id: Iff1428f529db3c5df634cd80b8c08da6772bdbee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRequire key specification 88/110088/1
Robert Varga [Tue, 30 Jan 2024 00:23:05 +0000 (01:23 +0100)]
Require key specification

We have a testing-only utility method. Ditch it in favor of supplying
the value from tests.

JIRA: NETCONF-1237
Change-Id: Ibe0a0f3c78365043401e5a80db00c3e841ac9027
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMove data processing to update thread 86/110086/3
Robert Varga [Mon, 29 Jan 2024 23:15:42 +0000 (00:15 +0100)]
Move data processing to update thread

We are interpreting datastore data and applying to Java native
constructs. Rather than doing that each time we are asked for a
SslHandler, move the processing to when the data changes.

This also makes things a tad more defensive, so that we do not propagate
invalid configuration (but issue stern warnings).

JIRA: NETCONF-1237
Change-Id: Ib76c7ff6e3203e26c035e4ca475072a9d3964f77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSplit out keystore-legacy 85/110085/5
Robert Varga [Mon, 29 Jan 2024 19:30:25 +0000 (20:30 +0100)]
Split out keystore-legacy

Tracking down the lifecycle of SslContexts brings us to our handling of
key material.

This is currently tangled netconf-client-mdsal using our home-grown (and
problematic) model.

Split out netconf-keystore.yang and the baseline implementation into
keystore-legacy. Now that it sits side-by-side with keystore-api, we can
compare the two.

Since this change requires us to intercept a hidden object, rework the
test in terms of JUnit5.

JIRA: NETCONF-1237
Change-Id: Id9d410e88ec588e148c5f1dff3aad574b3cc8328
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFurther warnings mitigation 81/110081/3
Robert Varga [Mon, 29 Jan 2024 16:35:52 +0000 (17:35 +0100)]
Further warnings mitigation

This is straightforward conversion to new methods.

Change-Id: I9ddb943ad73a0b131f910ffcbc4a99d3d87e261c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up callhome-provide warnings 80/110080/1
Robert Varga [Mon, 29 Jan 2024 15:58:01 +0000 (16:58 +0100)]
Clean up callhome-provide warnings

We have a few warnings from upstreams, fix them up.

Change-Id: I97235589a17d315f5e183e9f4f2b1b9daa7f9aef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up netconf-client-mdsal warnings 79/110079/1
Robert Varga [Mon, 29 Jan 2024 15:57:07 +0000 (16:57 +0100)]
Clean up netconf-client-mdsal warnings

The bump to mdsal-13 is causing a large number of warnings, start fixing
them up.

Change-Id: I0dde1197b9ed0026b0e7de3177b6d0411ff15a53
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix wrong path reference - schema for actions 17/110017/2
lubos-cicut [Fri, 26 Jan 2024 12:38:20 +0000 (13:38 +0100)]
Fix wrong path reference - schema for actions

Last patch lost pre-rewrite logic. This patch applies old logic again.

JIRA: NETCONF-938
Change-Id: I76c960d324b487a8de101a0949ba3214685f34e4
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoUse nio Channels in OpenAPI read 03/109803/8
Ivan Hrasko [Tue, 16 Jan 2024 14:49:54 +0000 (15:49 +0100)]
Use nio Channels in OpenAPI read

Override read(byte[], int, int) method using nio Channels
to speed up retrieval of documentation.

JIRA: NETCONF-1234
Change-Id: I3bfc4110cfe828302a08f86756c4535077fe5c5c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoRemove SchemaServiceStub 69/110069/2
Robert Varga [Sun, 28 Jan 2024 23:53:43 +0000 (00:53 +0100)]
Remove SchemaServiceStub

We have FixedDOMSchemaService, use that instead of brewing our own.

Change-Id: Ib1cf5a7ac2f9417865d98b73228a2b7b6c4281d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up utility method 67/110067/1
Robert Varga [Sun, 28 Jan 2024 23:25:24 +0000 (00:25 +0100)]
Clean up utility method

We have introduced a nasty bit of code, clean it back up again.

Change-Id: Iea78986db79a106d9fc15cfdbad65ea3cca0245e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump upstreams 00/109800/42
Robert Varga [Tue, 16 Jan 2024 12:24:13 +0000 (13:24 +0100)]
Bump upstreams

Adopt:
- yangtools-13.0.1
- mdsal-13.0.0
- controller-9.0.0
- aaa-0.19.1

Change-Id: I690bf875372e058d96920e6470bfd63be74194bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDisconnect NetconfDeviceRpc from DOMRpcService 61/110061/6
Robert Varga [Sun, 28 Jan 2024 11:32:11 +0000 (12:32 +0100)]
Disconnect NetconfDeviceRpc from DOMRpcService

DOMService is about to get very picky about class hierarchy, let's make
sure we do not attempt to combine multiple DOMServices.

This adds a bit of indirection, but opens up the possibility to properly
separate invocation paths and their expectations.

Change-Id: Iecdb60e9664a97c400eab5100ef05a84e3f555e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoNetconfRpcService should be extensible 58/110058/5
Robert Varga [Sun, 28 Jan 2024 03:50:14 +0000 (04:50 +0100)]
NetconfRpcService should be extensible

We are capturing a good base contract, but the documentation contradicts
the actual implementation.

The difference is that the API says it supports RFC4741/6241, but in
reality we also support RFC6020 and (optionally) RFC5277/6470.

This patch turns to DOMExtensibleService to allow for a baseline service
which potentially has extensions.

Change-Id: I541b9f76c6eecbbf85f593b68cd0ade6c5c286e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoImport PKIUtilTest 52/110052/2
Robert Varga [Sun, 28 Jan 2024 01:45:40 +0000 (02:45 +0100)]
Import PKIUtilTest

We have ditched the use of PKIUtil and that class is going away. Rehost
PKIUtilTest to test our code instead. This code is imported from aaa.git
at ee5509ac1864eec537a9f9422fe49fc85b368e48.

JIRA: AAA-269
Change-Id: Ib7b9a41c5ba4e398ac859a8221fa2735d3b62afb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up NetconfServerSessionNegotiatorTest 50/110050/1
Robert Varga [Sat, 27 Jan 2024 21:25:01 +0000 (22:25 +0100)]
Clean up NetconfServerSessionNegotiatorTest

Split the three test cases into individual methods, migrating to JUnit5.
Since SshdSocketAddress is not asserted against, we remove it along with
the dependency on shaded-sshd.

Change-Id: I7b297ce843ac7dcd12312493663b4b04384fb370
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use SecurityUtils in callhome-provider 49/110049/1
Robert Varga [Sat, 27 Jan 2024 20:50:26 +0000 (21:50 +0100)]
Do not use SecurityUtils in callhome-provider

Use plain KeyStore access to acquire provides. This eliminate
AuthorizedKeysDecoder's dependency on sshd -- which does not make sense
in its current shape and form.

Change-Id: I95e743a34d78f7220e2edf49dbac177a132f0c3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAccess RemoteAddress exactly once 48/110048/1
Robert Varga [Sat, 27 Jan 2024 20:49:22 +0000 (21:49 +0100)]
Access RemoteAddress exactly once

We are using the value twice, so let's save it in a local variable.

Change-Id: Ib38a12a3ee71199cbdf8e118225225d2c4ada6f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove netconf-api dependency 47/110047/1
Robert Varga [Sat, 27 Jan 2024 20:47:12 +0000 (21:47 +0100)]
Remove netconf-api dependency

callhome-provider does not deal with netconf-api directly, remove the
unused dependency.

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