netconf.git
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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 months agoClean up netconf-common-mdsal dependencies 46/110046/2
Robert Varga [Sat, 27 Jan 2024 20:12:14 +0000 (21:12 +0100)]
Clean up netconf-common-mdsal dependencies

We have a number of warnings here, fix them up.

Change-Id: Ib12bd9d67aa2c76f7b51392b8f3c9a83a8ab2ff3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up netconf-nb dependencies 45/110045/1
Robert Varga [Sat, 27 Jan 2024 20:03:55 +0000 (21:03 +0100)]
Clean up netconf-nb dependencies

The dependency graph has changed significantly, this patch eliminates
the problems reported in netconf-nb.

Change-Id: Ice97ce72a1e02d74fb60c7a54c8d2b2d6b2b9d5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up netconf-client-mdsal dependencies 44/110044/1
Robert Varga [Sat, 27 Jan 2024 19:57:50 +0000 (20:57 +0100)]
Clean up netconf-client-mdsal dependencies

We are using netconf-common, but not shaded-sshd and not
netconf-netty-util.

Change-Id: I9bc99d8270b4b2d3467925b8a9e43d6b989db7c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix shutdown message 43/110043/2
Robert Varga [Sat, 27 Jan 2024 19:47:57 +0000 (20:47 +0100)]
Fix shutdown message

The timer is being stopped, not started, fix that.

Change-Id: Iebce87f8710bbb05c6e60f4fbcfd4a7b691938fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate use of PKIUtil 42/110042/1
Robert Varga [Sat, 27 Jan 2024 19:39:18 +0000 (20:39 +0100)]
Eliminate use of PKIUtil

aaa-encrypt-service is confused as to what it's role is. We are using a
a very simple method from PKIUtil -- inline and optimize it for our use,
making it clear we depend on BouncyCastle.

Change-Id: Ic9bbda2c49f41f7bca483ac0127f08a8ff992e9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove AuthenticationHandler 41/110041/1
Robert Varga [Sat, 27 Jan 2024 19:21:08 +0000 (20:21 +0100)]
Remove AuthenticationHandler

This class is not used anywhere, remove it and clean up dependencies,
making it plenty clear that netconf-netty-util is just a Netty thing.

JIRA: NETCONF-1108
Change-Id: I0454c53b2c3b9d8573c1b386c37df97e7fc2df1d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoActivate NetconfClientFactoryImpl lazily 38/110038/4
Robert Varga [Sat, 27 Jan 2024 18:07:14 +0000 (19:07 +0100)]
Activate NetconfClientFactoryImpl lazily

This is a simple service, which should be deactivated when it is not
needed. Also drop the use of properties, as there really is no point.

JIRA: NETCONF-1108
Change-Id: I880ccb112b3c86fa196fe2c20157e070bc5efd47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoIntroduce NetconfTimer 37/110037/8
Robert Varga [Sat, 27 Jan 2024 15:44:55 +0000 (16:44 +0100)]
Introduce NetconfTimer

The wiring of a global timer is not quite what we want, as it makes
tracking down where and how it is used quite hard.

Add an explicit NetconfTimer interface and a default implementation to
provide indirection in from on the Netty timer.

This has the benefit of reigning in the lifecycle of the timer, so we
actually end up sharing it across components properly.

JIRA: NETCONF-590
Change-Id: Ib58c9f5668ec859d68432116fe63f954f6eae08e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate netconf.nettyutil.handler.ssh.client 40/110040/2
Robert Varga [Sat, 27 Jan 2024 18:30:47 +0000 (19:30 +0100)]
Eliminate netconf.nettyutil.handler.ssh.client

All of this code has been rendered unused, remove it.

JIRA: NETCONF-1108
Change-Id: I3543a42edd7f2464544af6a54036444ee923cf01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up NetconfClientConfiguration 39/110039/2
Robert Varga [Sat, 27 Jan 2024 18:11:15 +0000 (19:11 +0100)]
Clean up NetconfClientConfiguration

Use normal reference to SslHandlerFactory.

Change-Id: I17bcb552d6a6539f8efc0d0cfc23ebaa3bf68ca8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove NetconfMessageTransformUtil.FILTER_NODEID 00/110000/2
Robert Varga [Thu, 25 Jan 2024 19:10:33 +0000 (20:10 +0100)]
Remove NetconfMessageTransformUtil.FILTER_NODEID

We have Filter.QNAME, which we can use without relying on a special
constant. While at it, fixup GET RPC's input.

Change-Id: I3040c99ae983e2bcd5e28f29007cf031ff1a3a54
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove use of threadpool-config-impl 08/110008/4
Robert Varga [Fri, 26 Jan 2024 03:53:28 +0000 (04:53 +0100)]
Remove use of threadpool-config-impl

We are using just one utility, inline the few lines of code that are
needed to make the threadpool work.

JIRA: CONTROLLER-2092
Change-Id: I93d08f348f3331a8b28e40c7f18f60831cd18d8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump sshd to 2.12.0 24/110024/2
Robert Varga [Fri, 26 Jan 2024 14:37:09 +0000 (15:37 +0100)]
Bump sshd to 2.12.0

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

Change-Id: I8aebc6496f95f97c8133b2ced6bfa246da7f5864
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix nullability checks in operations entity classes 15/110015/3
lubos-cicut [Fri, 26 Jan 2024 08:34:58 +0000 (09:34 +0100)]
Fix nullability checks in operations entity classes

During rewrite we have lost requireNonNull checks. This patch
contains all classes which extend OperationEntity.

JIRA: NETCONF-938
Change-Id: I117e723ebfaab1c048f457bda073e29748329495
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoRemove netconf-config 07/110007/5
Robert Varga [Fri, 26 Jan 2024 03:06:38 +0000 (04:06 +0100)]
Remove netconf-config

Rehost the remaining threadpool into netconf-topology and let users
inject is as NetconfTopologySchemaAssembler.

JIRA: NETCONF-1232
Change-Id: I3dd7a24d689c53aafd1e067028991302a8925ef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate GlobalNetconfSshScheduledExecutor 06/110006/4
Robert Varga [Fri, 26 Jan 2024 00:48:52 +0000 (01:48 +0100)]
Eliminate GlobalNetconfSshScheduledExecutor

The only thing this executor is used is for ietf-monitoring listener
updates for netconf-server.

Rather than having a tuneable threadpool, just acknowledge the fact we
need a single thread for this task and manage it internally
NetconfMonitoringServiceImpl if possible.

JIRA: NETCONF-1232
Change-Id: I081947c28981442777ea8bc91a77df01641d23fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix nullability checks in PropertyEntity class 14/110014/2
lubos-cicut [Fri, 26 Jan 2024 08:31:58 +0000 (09:31 +0100)]
Fix nullability checks in PropertyEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: I6b8a38164a60fd61b35c10af559f6e41514095b3
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in ParameterSchemaEntity class 13/110013/2
lubos-cicut [Fri, 26 Jan 2024 08:30:29 +0000 (09:30 +0100)]
Fix nullability checks in ParameterSchemaEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: Ibd745802a31aa29cce57706056b25e7fdaaa6486
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in PathsEntity class 12/110012/2
lubos-cicut [Fri, 26 Jan 2024 08:30:06 +0000 (09:30 +0100)]
Fix nullability checks in PathsEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: I8dcbafa3bc88e09da176b036e0c1e98c45778a90
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in SecurityEntity class 11/110011/2
lubos-cicut [Fri, 26 Jan 2024 08:29:03 +0000 (09:29 +0100)]
Fix nullability checks in SecurityEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: Icebdd9d178a1850dd60b58aea32e432a23902c2f
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in SecuritySchemesEntity class 10/110010/2
lubos-cicut [Fri, 26 Jan 2024 08:28:42 +0000 (09:28 +0100)]
Fix nullability checks in SecuritySchemesEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: I7975d31f053ac223e80728ba1cc2579148d332f2
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in ServersEntity class 09/110009/2
lubos-cicut [Fri, 26 Jan 2024 08:27:34 +0000 (09:27 +0100)]
Fix nullability checks in ServersEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: If55ddb78471d457db3eb1c8f99ad2f004ddbf2aa
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in ParameterEntity class 91/109991/2
lubos-cicut [Thu, 25 Jan 2024 07:47:11 +0000 (08:47 +0100)]
Fix nullability checks in ParameterEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: Ic03d603bfa0ae5356f82576471ba50d8d4331d7d
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in ServerEntity class 90/109990/2
lubos-cicut [Thu, 25 Jan 2024 07:42:52 +0000 (08:42 +0100)]
Fix nullability checks in ServerEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: I36e524b42a43698a80972e4980ab7450dfb95e66
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix nullability checks in InfoEntity class 89/109989/2
lubos-cicut [Thu, 25 Jan 2024 07:39:09 +0000 (08:39 +0100)]
Fix nullability checks in InfoEntity class

During rewrite we have lost requireNonNull checks.

JIRA: NETCONF-938
Change-Id: I31b556927df909878e3bbe0b0bc3cc6865660011
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoFix wrong path reference - schema for actions 25/109825/7
lubos-cicut [Wed, 17 Jan 2024 16:53:30 +0000 (17:53 +0100)]
Fix wrong path reference - schema for actions

After rewrite we lost reference to parent node in some of actions
paths. This patch repairs it.

JIRA: NETCONF-938
Change-Id: I90d048a3157e0cf07b52621eee351ee6119790af
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoAdd restconf-{client,server} 02/110002/3
Robert Varga [Thu, 25 Jan 2024 21:31:03 +0000 (22:31 +0100)]
Add restconf-{client,server}

This patch adds the bare-bones ietf-restconf-{client,server} models from
draft-ietf-netconf-restconf-client-server-29 without packaging or
implementing them.

JIRA: NETCONF-773
Change-Id: Ie1070076544e4b3b30f75f641cdc66bfb0efff43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoAdd transport-http 01/110001/3
Robert Varga [Thu, 25 Jan 2024 21:17:41 +0000 (22:17 +0100)]
Add transport-http

This patch adds the bare-bones ietf-http-{client,server} models from
draft-ietf-netconf-http-client-server-13 without providing feature
packaging.

A baseline intended set of features is also introduced, but nothing else
is done on the implementation side.

JIRA: NETCONF-773
Change-Id: Ic86a6fd8d850c8cc16a25db54fc8f7f27a20bf0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefresh IETF client/server models 85/109985/4
Robert Varga [Wed, 24 Jan 2024 20:19:10 +0000 (21:19 +0100)]
Refresh IETF client/server models

This updates the models to the versions published in
- draft-ietf-netconf-crypto-types-28
- draft-ietf-netconf-keystore-29
- draft-ietf-netconf-trust-anchors-22
- draft-ietf-netconf-tcp-client-server-17
- draft-ietf-netconf-tls-client-server-34
- draft-ietf-netconf-ssh-client-server-34
- draft-ietf-netconf-netconf-client-server-30

The ietf-truststore.yang model is augmented with four if-feature
statements which are missing in the published model. Their absence
causes binding runtime to fail because it sees the two leaves using
their respective leafref types and it cannot resolve them (becase we do
not support central-truststore).

JIRA: NETCONF-590
Change-Id: I1fe3be6151a5aa633b1e8a2405454063cfba8c84
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoClean up netconf-{common,client}-mdsal constants 99/109999/6
Robert Varga [Thu, 25 Jan 2024 16:32:18 +0000 (17:32 +0100)]
Clean up netconf-{common,client}-mdsal constants

We have a ton of constants relating to naming elements which hark back
to when we did not have Binding representation of RPCs and anyxmls.

These days we have pre-generated constants, so use those, which makes
for looser code coupling and better expressiveness in terms of what we
are doing.

Change-Id: Ied0bda7c3c78cdaa0c59bbca6f1aa9b87342848d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSet backoff-jitter for call-home devices 54/109954/2
Peter Suna [Wed, 24 Jan 2024 14:36:54 +0000 (15:36 +0100)]
Set backoff-jitter for call-home devices

Call-home devices are not using datastore defaults. We have to set
the default value for backoff-jitter programatically.

JIRA: NETCONF-1193
Change-Id: I2ff37fce1ccd195bba9768257bb96886095b6d0d
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
3 months agoFix odl-restconf-common dependencies 64/109964/1
Robert Varga [Wed, 24 Jan 2024 22:38:46 +0000 (23:38 +0100)]
Fix odl-restconf-common dependencies

We need to depend on the MD-SAL feature packaging the RFC8072 model.

JIRA: NETCONF-1118
Change-Id: I6c9cba22c8af011cd7bf254c8c35a1d5179b5ff4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not package iana-crypt-hash 63/109963/1
Robert Varga [Wed, 24 Jan 2024 21:17:45 +0000 (22:17 +0100)]
Do not package iana-crypt-hash

MD-SAL is already providing a pre-packaged model, consume that instead
of rolling our own.

Change-Id: I9486ecfe0519351c7a8588e4a894b222fc8224bd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoDo not use threadpool-config-impl in websocket-client 60/109960/1
Robert Varga [Wed, 24 Jan 2024 16:48:58 +0000 (17:48 +0100)]
Do not use threadpool-config-impl in websocket-client

threadpool-config-impl provides just a few simple wrappers, ditch their
use and just use Java/Guava equivalents.

Change-Id: I31eafb83c05b1d79b1c7f96021a8157ffd26089e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUpdate User Guide with Enhanced Authentication Details 28/109828/5
Yaroslav Lastivka [Thu, 18 Jan 2024 09:08:06 +0000 (11:08 +0200)]
Update User Guide with Enhanced Authentication Details

Added note wich emphasizing encryption key access and
password format in User Guide.

JIRA: NETCONF-1217
Change-Id: I3503df759326915de55246fcda9d6462c994c52c
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoMake RESTCONF base path configurable 01/109701/9
Robert Varga [Mon, 22 Jan 2024 21:13:39 +0000 (22:13 +0100)]
Make RESTCONF base path configurable

Move BASE_PATH constant into OSGi configuration to make it
configurable and propagate it to other components through
RestconfStreamServletFactory.

JIRA: NETCONF-1218
Change-Id: Ie1aed49ed37ff3e0cc862db77c7b88c7470c082a
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFixup NetconfDeviceCommunicatorTest 10/109910/1
Robert Varga [Mon, 22 Jan 2024 13:36:48 +0000 (14:36 +0100)]
Fixup NetconfDeviceCommunicatorTest

Use Mockito.spy() again, now that we have an upgraded Mockito.

Change-Id: Ibdb5322f1cd2a46bf70f891a406f461c046aad76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoCreate Unit Test for POST existing data error 15/107715/6
lubos-cicut [Wed, 6 Sep 2023 05:54:25 +0000 (07:54 +0200)]
Create Unit Test for POST existing data error

Successfully create resource of your choice using POST request.
When we invoke the same request again, we get the error
response 500 Internal Server Error. According to RFC 8040
we should get 409 Conflict.

Unit Test has been created to verify this issue.

JIRA: NETCONF-1130
Change-Id: Iad1254d2f058a8aa69ed1076e43823224d54c06e
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>