netconf.git
2 months agoUse a switch expression in RestconfStrategy.prepareData() 39/112639/5
Robert Varga [Fri, 19 Jul 2024 01:30:33 +0000 (03:30 +0200)]
Use a switch expression in RestconfStrategy.prepareData()

Instead of an if/else cascade, use a simple switch expression.

JIRA: NETCONF-1331
Change-Id: I80c2bd57a36fe936e819643a2a446dc48d81e13c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRefactor ServerRpcOperations implementations 32/112632/5
Robert Varga [Thu, 18 Jul 2024 23:59:13 +0000 (01:59 +0200)]
Refactor ServerRpcOperations implementations

We support both local and DOMRpcService-mediated RPC implementations,
but have the relationship rather hard-coded.

InterceptingServerRpcOperations provides the ability to look up a
RpcImplementation and delegate to it. If the lookup fails, the request
will be forwarded to a downstream ServerRpcOperations.

A default downstream is provided as NotSupportedServerRpcOperations,
which always completes the request with an ErrorTag.NOT_SUPPORTED
error.

We also split out DOMRpcService-based implementation into
MdsalServerRpcOperations and have RestconfStrategy instantiate a
combination of these two.

The same is true for a DOMActionService-based implementation, named
MdsalServerActionOperations.

JIRA: NETCONF-1331
Change-Id: Icdf1690a816a67b972eb331e56db038cd0474e1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoSplit out server.spi.ServerStrategy 96/112296/13
Robert Varga [Thu, 18 Jul 2024 14:42:33 +0000 (16:42 +0200)]
Split out server.spi.ServerStrategy

RestconfStrategy has accrued a lot of code related to request
invocation, which is shared between the two final specializations.

This patch introduces restconf.server.spi.ServerStrategy, which
defines the contract exposed towards a RestconfServer implementation.

We also pull down the common body handling bits into an
AbstractServerStrategy, so they can we widely shared.

JIRA: NETCONF-1331
Change-Id: If0f0b5615ec06abcf50c2e600760bd4f6c87a756
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove restconf.nb.rfc8040.legacy 26/112626/1
Robert Varga [Thu, 18 Jul 2024 10:17:34 +0000 (12:17 +0200)]
Remove restconf.nb.rfc8040.legacy

We have a single class here, move it to restconf.nb.jaxrs.

JIRA: NETCONF-773
Change-Id: Ied43a4bbe8deebc43b8f6b75d867756228df3fb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMove restconf.server.spi tests 18/112618/4
Robert Varga [Wed, 17 Jul 2024 22:14:13 +0000 (00:14 +0200)]
Move restconf.server.spi tests

Move the test substrate into restconf-server-spi test-jar, from whence
it can be consumed by downstreams. This allows us to move test where
they belong.

Resources are troublesome, so we end up duplicating
instanceidentifier/yang models -- which is okay for now, but should be
cleaned up later.

JIRA: NETCONF-773
Change-Id: I7f3e85ea0151f2ed1f083572a17844bf150cc431
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFactor out restconf-server-spi 16/112616/4
Robert Varga [Wed, 17 Jul 2024 20:57:38 +0000 (22:57 +0200)]
Factor out restconf-server-spi

Move RESTCONF SPI-level contracts into a separate component.

JIRA: NETCONF-773
Change-Id: I5a24130606d55f9a89c8cf857d3d405afc402730
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMove nb.rc8040.Insert to server.spi 15/112615/3
Robert Varga [Wed, 17 Jul 2024 20:35:18 +0000 (22:35 +0200)]
Move nb.rc8040.Insert to server.spi

There is no point in keeping this class specific to northbound, move it
to server.spi.

JIRA: NETCONF-773
Change-Id: I222d65bdf45b0c4988a21eb63e86e356735bf4fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix draft-ietf-crypto-types description 17/112617/1
Robert Varga [Wed, 17 Jul 2024 21:24:25 +0000 (23:24 +0200)]
Fix draft-ietf-crypto-types description

We have the netconf- infix confused, fix that up.

JIRA: NETCONF-773
Change-Id: Ibc389ca448e0d7586ec7fccf41721c7f9d07b900
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMake stream subpath flexible 14/112614/2
Robert Varga [Wed, 17 Jul 2024 20:26:33 +0000 (22:26 +0200)]
Make stream subpath flexible

AbstractRestconfStreamRegistry has no opinions on location, except it
needs to be non-null. Push the knowledge out of server.spi.

JIRA: NETCONF-773
Change-Id: I40597fd04e818df529ee95e52ea8b01156498d58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFactor out restconf-server-api 13/112613/2
Robert Varga [Wed, 17 Jul 2024 17:11:17 +0000 (19:11 +0200)]
Factor out restconf-server-api

Separate out restconf.server.api from restconf-nb into a dedicated
restconf-server-api artifact.

Also move separate out ietf-restconf-server artifact packaging so as to
make dependencies more clear.

draft-ietf-netconf-crypto-types is renamed to match naming based on YANG
modules rather than drafts.

JIRA: NETCONF-773
Change-Id: I62f4f99144a7519022f35d7e7657e51ba36f9a77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove restconf-common 24/112224/11
Robert Varga [Tue, 18 Jun 2024 10:47:22 +0000 (12:47 +0200)]
Remove restconf-common

Move the two remaining classes to restconf.server.api and remove
restconf-common artifact.

JIRA: NETCONF-773
Change-Id: I14990e3b3e59ce77d9f1186338f3c09b8fa1e671
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRemove RestconfDocumentedException 23/112223/11
Robert Varga [Tue, 18 Jun 2024 08:53:47 +0000 (10:53 +0200)]
Remove RestconfDocumentedException

We now have everything we need in ServerException. Migrate the final
holdouts and eliminate RestconfDocumentedException.

JIRA: NETCONF-1188
Change-Id: I217453054c5c066b0d0b44559318b110d6fd32b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoEliminate RestconfFuture 20/112220/15
Robert Varga [Tue, 18 Jun 2024 06:09:35 +0000 (08:09 +0200)]
Eliminate RestconfFuture

We are just hooking to Future.get(), there is no need for a dedicated
class.

JIRA: NETCONF-1188
Change-Id: I4801aafd1c5b12432d45dff669183373d6ccbd4d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdopt models from mdsal 95/112595/4
Robert Varga [Tue, 16 Jul 2024 20:12:34 +0000 (22:12 +0200)]
Adopt models from mdsal

MDSAL-862 has expanded the library, let's take advantage of that and
remove our packaging of these.

Change-Id: Ie9f4cbdd69e97650f0f15e3843b1946d9f23a00e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoBump upstreams 95/112495/8
Robert Varga [Mon, 8 Jul 2024 17:50:12 +0000 (19:50 +0200)]
Bump upstreams

Adopt:
- odlparent-14.0.1
- infrautils-7.0.1
- yangtools-14.0.0
- mdsal-14.0.0-SNAPSHOT
- controller-10.0.0-SNAPSHOT
- aaa-0.20.0-SNAPSHOT

Change-Id: I559b0a163a984e39426f1f944fa15faf8ae820ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix TCPClient.connect() initialization 43/112543/9
Robert Varga [Sat, 13 Jul 2024 12:20:33 +0000 (14:20 +0200)]
Fix TCPClient.connect() initialization

The firing of ChannelFutureListeners and handler callbacks is slightly
diifferent in that listeners may be fired in a separate pass, but
handler callbacks are guaranteed to fire during event reception.

We really want to fire when the channel becomes active, similarly to the
no-op we have via ConnectChannelInitializer -- thus immediately updating
the pipeline.

This ensures that NettyIoSession.channelActive() has been invoked before
Netty can deliver any events to it.

While we are touching SshClientServerTest, make it package-protected and
hide its fields, as JUnit5 can handle that.

JIRA: NETCONF-1348
Change-Id: I68a718d1870a572dc6a1a8bafd5c7b31e6ee4ece
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoHide TcpClientServerTest 45/112545/2
Robert Varga [Sat, 13 Jul 2024 15:13:38 +0000 (17:13 +0200)]
Hide TcpClientServerTest

We are using JUnit5, so there's no point in exposing this class or its
methods.

Change-Id: If8392809ab603a24a7a241ce1b336d387a681dd8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix typo in commands descriptions 36/112536/2
Ivan Hrasko [Thu, 11 Jul 2024 12:37:07 +0000 (14:37 +0200)]
Fix typo in commands descriptions

Fix typo in NetconfConnectDeviceCommand and NetconfUpdateDeviceCommand
option description for schemaless option.

Change "surpport" to "support".

Change-Id: Ic1de685ab264c0a614e215fa0f961bac5d5c72d8
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoDisable transport-ssh integration tests 42/112542/1
Ivan Hrasko [Fri, 12 Jul 2024 13:50:47 +0000 (15:50 +0200)]
Disable transport-ssh integration tests

Either transport-ssh or its test have not satisfying performance
resulting in permanent failures on Jenkins or low resources PC locally.

JIRA: NETCONF-1348
Change-Id: I3d024a17ca8cf900ee811a94d45b362f46ffdaea
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoFix pagination javadoc 87/112487/1
Ivan Hrasko [Mon, 8 Jul 2024 11:15:55 +0000 (13:15 +0200)]
Fix pagination javadoc

Fix the order of offset and limit parameters in javadoc.

JIRA: NETCONF-1225
Change-Id: Ic497539662a6459850b9196fd0aec0e3e65d33b1
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoOpenAPI: Implement pagination test 36/111436/17
lubos-cicut [Wed, 17 Apr 2024 07:27:59 +0000 (09:27 +0200)]
OpenAPI: Implement pagination test

This patch tests the implementation of pagination, which allows us
to retrieve a OpenApi document for selected number of modules from
schema. In this case ?offset=3&limit=5.

JIRA: NETCONF-1225
Change-Id: I3ecf8b810649a58c05b8a2c8433135c8c3694db5
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenAPI: Implement pagination 00/111200/21
Ivan Hrasko [Tue, 2 Apr 2024 12:58:38 +0000 (14:58 +0200)]
OpenAPI: Implement pagination

Enable user to limit number of modules for which OpenAPI documentation
is generated.

Then new API parameters offset and limit can be used as:
?offset=0&limit=0 for all modules
?offset=0&limit=10 for first 10 modules
?offset=10&limit=10 for 10-20 modules
?offset=1000 offset is out of range return empty paths and components
?limit=1000 limit out of range return all models
?offset=-1 or ?limit=-1 negative number always return empty paths and
components

JIRA: NETCONF-1225
Change-Id: Ib091a622f90c554946fc0f7504397de3814f681e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoImprove Swagger UI Update Process 10/111410/6
Anton Okhrimenko [Sat, 27 Apr 2024 01:59:31 +0000 (03:59 +0200)]
Improve Swagger UI Update Process

Our custom code is now separated in:
styles.css, swagger-initializer.js, logo_small.png
and configuration.js. Everything controlled from index.html.

Everything from swagger UI distro is now placed in swagger-ui directory
without any modification.

This helps us make the process to update to latest swagger UI
distribution easier.

All we need is to replace the content of swagger-ui directory.

JIRA: NETCONF-1302
Change-Id: I389b52026e832f3b21834546ec4d4362cbd518dd
Signed-off-by: Anton Okhrimenko <Anton.Okhrimenko@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoAdd ability to control width/depth from UI 09/111409/11
Anton Okhrimenko [Fri, 26 Apr 2024 22:21:27 +0000 (00:21 +0200)]
Add ability to control width/depth from UI

Added UI elements to control width and depth of the schema.

JIRA: NETCONF-1301, NETCONF-1320
Change-Id: Id7df9bc402f62591777b074da295c351202a0464
Signed-off-by: Anton Okhrimenko <Anton.Okhrimenko@pantheon.tech>
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoHardcode width and depth parameters 06/111406/7
Anton Okhrimenko [Tue, 23 Apr 2024 23:43:13 +0000 (01:43 +0200)]
Hardcode width and depth parameters

Hardcode width and depth parameters values for RESTCONF OpenAPI.
Our aim is to load big models in web browsers successfully by default.

JIRA: NETCONF-1300
Change-Id: Id628d156ab3ecb5daacc988d1c9136518f87b264
Signed-off-by: Anton Okhrimenko <Anton.Okhrimenko@pantheon.tech>
2 months agoImplement depth parameter 22/111222/53
Ivan Hrasko [Wed, 3 Apr 2024 13:31:08 +0000 (15:31 +0200)]
Implement depth parameter

Implement depth parameter to enable to retrieve OpenAPI
document in smaller chunks for every model.

JIRA: NETCONF-1298
Change-Id: Ia615a776b6daa1d1d1b0de6d0863613d9d29ee79
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoImplement width parameter 02/111502/30
Oleksandr Zharov [Tue, 23 Apr 2024 17:03:59 +0000 (19:03 +0200)]
Implement width parameter

Added width parameter that limit number of children that will be present
in every module/node of the result schema.

JIRA: NETCONF-1298
Change-Id: I86e9e2b5cf837a21f92be39ceb2579bb5d990757
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoDocument TLS "key-id" option 75/112275/8
Oleksandr Zharov [Tue, 25 Jun 2024 10:04:06 +0000 (12:04 +0200)]
Document TLS "key-id" option

Updated request payload for TLS device with newly added key-id
that specifies the set of keys used for the connection.

JIRA: NETCONF-1324
Change-Id: I3450a00be68c5dc655add454c2cb6db59053d941
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoOpenApi add POST request to device root 57/108357/24
Yaroslav Lastivka [Thu, 26 Oct 2023 10:32:41 +0000 (13:32 +0300)]
OpenApi add POST request to device root

Added root POST request example for first device model,
and first controller model

JIRA: NETCONF-1169
Change-Id: I45b668709e65ce97543b194b16372c12953eb5e2
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoCreate SchemasEntity class to simplify SchemasStream 52/110252/9
lubos-cicut [Thu, 15 Feb 2024 14:51:32 +0000 (15:51 +0100)]
Create SchemasEntity class to simplify SchemasStream

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

JIRA: NETCONF-1247
Change-Id: I5490a9b4694f01043dabef5ba6487538f89a20cd
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoMove client config creation to lockedConnect method 07/112007/5
Yaroslav Lastivka [Thu, 6 Jun 2024 09:34:21 +0000 (12:34 +0300)]
Move client config creation to lockedConnect method

NetconfNodeHandler has been refactored to handle client configuration
creation within the NetconfNodeHandler#lockedConnect method.

This approach allows nodeHandler to be successfully created even with
an invalid encrypted password and added into activeConnectors.
If the device has the max-connection-attempts parameter, we will attempt
to establish the connection a specified number of times.
If unsuccessful, the status will be changed to unable-to-connect.
On exception, the device's operational data is removed using a DELETE
request.

JIRA: NETCONF-1317
Change-Id: I3e13d2c904e01ddf195fc9d9a057c0f1e0828a66
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoOpenAPI: Improve anydata example 76/111976/3
lubos-cicut [Tue, 4 Jun 2024 12:15:57 +0000 (14:15 +0200)]
OpenAPI: Improve anydata example

Example template for anydata was
"<%s> ... </%s>", localName, localName
for both XML and JSON, which was incorrect.

Now we create empty object that is translatable to XML/JSON.
Into schema added description which informs the users that this is
unknown data and needs to be filled in by them.

JIRA: NETCONF-1319
Change-Id: I6440ff95f06ffa3d320ff50b93ee996ca1398052
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenApi: Test nonconfig input and output for actions 07/111207/5
lubos-cicut [Tue, 2 Apr 2024 16:06:00 +0000 (18:06 +0200)]
OpenApi: Test nonconfig input and output for actions

Test nonconfig inputs and outputs for actions

JIRA: NETCONF-1314
Change-Id: I58d60ee16b085b016ff57d4a03c8357cd0257cca
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoMake timeout and keep-alive configurable for Call-Home 27/109627/23
Samuel Schneider [Tue, 27 Jun 2023 07:52:21 +0000 (09:52 +0200)]
Make timeout and keep-alive configurable for Call-Home

Make request timeout and keep-alive configurable for Call-Home
services. And propagate connection timeout configuration
correctly.

Additionally, join configurations for both TLS and SSH services into
one so all configurations for callhome-provider bundle are in one
place.

JIRA: NETCONF-1213
Change-Id: I453d092bf3c5a77404e951cd4de5cce849727f2b
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoFix accumulating KeepaliveTask executions 63/111763/10
Martin Sunal [Sun, 5 May 2024 15:29:33 +0000 (17:29 +0200)]
Fix accumulating KeepaliveTask executions

Parallel RPC executions were causing additional KeepaliveTask
scheduling. This change ensures that KeepaliveTask is
not scheduled prematurely and preventing redundant executions.

JIRA: NETCONF-1318 NETCONF-1308
Change-Id: Ic20a3f5b1b2f56d2f272013c86faa1c0c08b60ea
Signed-off-by: Martin Sunal <martin@paxet.io>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoSimplify working with Capability objects 71/107471/37
Oleksandr Zharov [Tue, 22 Aug 2023 11:40:01 +0000 (13:40 +0200)]
Simplify working with Capability objects

Added Utility class with two methods to simplify creating/parsing
Capability objects. The first is a method that can parse an urn
string and create a Capability from it. The second is a method that
extracts capabilities from all present modules.

Added test for new logic.

JIRA: NETCONF-1015
Change-Id: I85edf4e20d6b53677c0fe216c83edf4e6bdb010c
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoDesign a Capability object model 46/105846/30
Robert Varga [Fri, 5 May 2023 00:21:03 +0000 (02:21 +0200)]
Design a Capability object model

Implemented YangModuleCapability and EXiCapability
which extend ParameterizedCapability.
These classes appear to represent YANG module capabilities
and have attributes like content, revision, module name,
features, deviations, etc.
Added enumeration of SimpleCapability which implements
the Capability interface, listing various NETCONF
capabilities based on different RFCs and drafts.

JIRA: NETCONF-1015
Change-Id: I6c935dc4818e1968d656ce00aa08fb82f7650fc5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoRemove unnecessary check for canceled future 27/112227/4
Peter Suna [Tue, 18 Jun 2024 16:20:33 +0000 (18:20 +0200)]
Remove unnecessary check for canceled future

The requests queue contains only instances of UncancellableFuture
with "uncancellable" set to "true". Thus checking for cancellation
is unnecessary.

Change-Id: If63f271ebc6659f3d90de3c1b502678f28b1268d
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoRelease semaphore after disconnection 26/112226/3
Peter Suna [Tue, 18 Jun 2024 16:13:36 +0000 (18:13 +0200)]
Release semaphore after disconnection

Ensure semaphore is released when requests are removed in
the tearDown method. This ensures that the concurrent RPC
limit corresponds accurately to the actual requests.

JIRA: NETCONF-1332
Change-Id: Id677b5d05805d50c193235f6b2a594bb76f0ef59
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
2 months agoCleanup OpenAPI tests 99/112299/3
Ivan Hrasko [Wed, 26 Jun 2024 11:16:26 +0000 (13:16 +0200)]
Cleanup OpenAPI tests

Use JUnit 5 code style (no more public test methods) and
remove unnecessary empty lines.

JIRA: NETCONF-1309
Change-Id: If14b89e2a6a39fe4b585a796bab4fffcaea7a339
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoCheck for netconf interleave capability 38/110738/14
Samuel Schneider [Thu, 14 Mar 2024 16:49:40 +0000 (17:49 +0100)]
Check for netconf interleave capability

Add check for interleave capability.
Do not allow notification subscription at all if it is not present.

JIRA: NETCONF-91
Change-Id: Id346ff8c1c73eb8c1be4a006216b15dadebf3dd4
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoPrevent NPE for Credentials 92/110192/50
Yaroslav Lastivka [Thu, 8 Feb 2024 13:22:54 +0000 (15:22 +0200)]
Prevent NPE for Credentials

Added mandatory field to Credential choice.
Changed the logic for writing device data into the OPERATIONAL
datastore to include credentials.

JIRA: NETCONF-1235
Change-Id: Ibb2640efcaf301c06e29199008a0c9cedf124a34
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoUse JUnit5 code style in BugDocumentTest 74/112274/2
lubos-cicut [Tue, 25 Jun 2024 08:45:32 +0000 (10:45 +0200)]
Use JUnit5 code style in BugDocumentTest

Remove unnecessary access modifiers and simplify source for
parameterized test.

JIRA: NETCONF-1309
Change-Id: Ibc1fe843701d006ee0f98e8ee32fba96f62dbea5
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoMigrate plugins/netconf-server-mdsal/notifications tests to JUnit5 10/111810/5
Oleksandr Zharov [Tue, 21 May 2024 17:59:27 +0000 (19:59 +0200)]
Migrate plugins/netconf-server-mdsal/notifications tests to JUnit5

Migrated plugins/netconf-server-mdsal/notifications tests from JUnit4
to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ic34fa191ae4ddf84953b7fc12555ac0b1eff61ec
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
2 months agoRemove unnecessary casting 81/111681/4
lubos-cicut [Mon, 13 May 2024 09:19:54 +0000 (11:19 +0200)]
Remove unnecessary casting

Removed unnecessary casting of DataSchemaNode.

Change-Id: I60748937179fb6fdcda3b311e71d3fdb8bf74cd4
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenapi: Missing schema for node processed by another parent test 80/111680/6
lubos-cicut [Mon, 13 May 2024 08:41:38 +0000 (10:41 +0200)]
Openapi: Missing schema for node processed by another parent test

If the same node was a child of more than one parent, only the first
one was processed.

Parent patch fixes this problem. Now when node is processed it will be
saved with the current parent. This patch tests if generated document
is as expected.

Created new test to simplify testing of new reported bugs.

JIRA: NETCONF-1309
Change-Id: I7cc72f5d12286154056da6f5b551a11429518332
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenapi: Missing schema for node processed by another parent 79/111679/3
lubos-cicut [Mon, 13 May 2024 07:05:04 +0000 (09:05 +0200)]
Openapi: Missing schema for node processed by another parent

If the same node was a child of more than one parent, only the first
one was processed.

This patch fixes this problem. Now when node is processed it will
check if his clear name is saved in set of names.

JIRA: NETCONF-1309
Change-Id: Ia8360b2e51084001cc2a7a4e4645b301801c3a4c
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoRemove most RestconfDocumentedException users 46/111346/18
Robert Varga [Tue, 18 Jun 2024 06:37:12 +0000 (08:37 +0200)]
Remove most RestconfDocumentedException users

ServerException provides equivalent facilities with better call
convention and semantics. Migrate most users over.

JIRA: NETCONF-1188
Change-Id: I1733374f38c645c25ab6a98ef6590530fbec17d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoEliminate TransactionUtil 21/112221/6
Robert Varga [Tue, 18 Jun 2024 08:38:17 +0000 (10:38 +0200)]
Eliminate TransactionUtil

The methods here are primarily used in RestconfStrategy implementations.
Rehost them there.

JIRA: NETCONF-1188
Change-Id: Ib0e2425a7664601981c6f0c2cfd352856a0bd358
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump sshd to 2.13.0 30/112230/1
Robert Varga [Wed, 19 Jun 2024 08:41:35 +0000 (10:41 +0200)]
Bump sshd to 2.13.0

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

Change-Id: I91417e758dcb2f9ee3d2fe08d8df692f646ebc5c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoSupport auth* service integration for HttpTransport 35/111735/7
Ruslan Kashapov [Fri, 17 May 2024 13:29:12 +0000 (16:29 +0300)]
Support auth* service integration for HttpTransport

Due to channel handler is stateful object using same auth*
handler for multiple connection causes error. Fixed by
replacing handler instance with handler factory usage.

Server API extended to accept custom authn/authz handler
factory. This allows external services integration.

JIRA: NETCONF-1316
Change-Id: I99cd267c0955b93d10e7f75de31897533edb5b9b
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoUse ServerException to report DOMRpcResult errors 19/112219/7
Robert Varga [Tue, 18 Jun 2024 06:05:43 +0000 (08:05 +0200)]
Use ServerException to report DOMRpcResult errors

Move RpcError mapping away from RestconfError and use it only in
ServerError.

Change-Id: I444aca99b2fe66167cb80bff3198484b768b4a7b
JIRA: NETCONF-1188
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMove RestconfFuture to rfc8040.rest.transations 18/112218/7
Robert Varga [Tue, 18 Jun 2024 04:18:02 +0000 (06:18 +0200)]
Move RestconfFuture to rfc8040.rest.transations

ExistenceCheck is the sole remaining user of RestconfFuture et al.
Relocate and hide these classes before we embark on more interation.

JIRA: NETCONF-1188
Change-Id: Ieb7590f75b0498a13b3e2793989da18a4bb3da79
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRemove RestconfDocumentedException throws 17/112217/8
Robert Varga [Tue, 18 Jun 2024 03:08:16 +0000 (05:08 +0200)]
Remove RestconfDocumentedException throws

Convert all remaining throwing callsites to throw ServerException
instead.

This introduces a ton of try/catch exception blocks around
RestconfTransaction. These will be dealth with in subsequent patches,
where RestconfTransaction gains proper ServerRequest integration.

This also flushes out a few tests which are asserting direct throws,
which we update here to use assertError() instead.

JIRA: NETCONF-1188
Change-Id: I0da8929a42496426cda8b172658014a828cb1c29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoRefactor ServerRequest 16/112216/6
Robert Varga [Mon, 17 Jun 2024 21:08:48 +0000 (23:08 +0200)]
Refactor ServerRequest

Our invocation currently routes responses via RestconfFuture and then
via RestconfCallback.

This is quite superfluous indirection, which we eliminate by expading
ServerRequest to being an entity that can be completed -- just like a
RestconfCallback.

We then create a specialized JaxRsServerRequest, which is essentially
what JaxRsRestconfCallback used to be, and use it instead of
RestconfFuture in RestconfServer.

JIRA: NETCONF-1188
Change-Id: I870d2dd444f43d71ebb2d249e76097af6d39c33f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate netconf-topology-singleton tests to JUnit5 91/111691/8
lubos-cicut [Tue, 14 May 2024 12:54:11 +0000 (14:54 +0200)]
Migrate netconf-topology-singleton tests to JUnit5

Migrate tests in apps/netconf-topology-singleton from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I0144238346fe180daaf30d865ddab58ba5db932f
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoUse ServerException in PatchBody.toPatchContext() 07/112207/1
Robert Varga [Mon, 17 Jun 2024 17:18:23 +0000 (19:18 +0200)]
Use ServerException in PatchBody.toPatchContext()

The errors we are reporting are rather simple, perform the obvious
migration.

JIRA: NETCONF-1188
Change-Id: Id8272742e587ed007b974906e7123c7f7e9dd189
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoModernize JsonPatchBody a bit 05/112205/1
Robert Varga [Mon, 17 Jun 2024 15:27:28 +0000 (17:27 +0200)]
Modernize JsonPatchBody a bit

Use arrows in switch cases to make things a bit more compact.

Change-Id: If89d745811c7ff4b3c9c985ad10d89beb08a0002
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoLimit usage of ensureParentsByMerge 52/111552/14
Yaroslav Lastivka [Mon, 29 Apr 2024 19:43:29 +0000 (22:43 +0300)]
Limit usage of ensureParentsByMerge

We should not used ensureParentsByMerge when communicating
with NETCONF devices.

EnsureParentsByMerge has been moved to MdsalRestconfTransaction
and will only be used for MdsalRestconfStrategy.

JIRA: NETCONF-1276
Change-Id: I14747d5b3e037ff2c98b4f05e613be8d0b5fdeda
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 months agoFix DefaultMapBodyOrder body sorting 86/112086/7
Robert Varga [Tue, 11 Jun 2024 18:03:45 +0000 (20:03 +0200)]
Fix DefaultMapBodyOrder body sorting

NormalizedNodeContainer allows a MapEntryNode to return its children in
any order. That means we can very much trigger a case when body ordering
does not match expectations.

Improve test coverage to 100%, fixing the accidental UOE path as well as
improving reported messages.

JIRA: NETCONF-1325
Change-Id: Ieb6942105521928744466ec8573ca3839cb970c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoFix typo in javadoc 98/112098/3
Samuel Schneider [Wed, 12 Jun 2024 10:04:45 +0000 (12:04 +0200)]
Fix typo in javadoc

Fix typo in javadoc of RemoteDeviceCommunicator#sendRequest method.

JIRA: NETCONF-1223
Change-Id: Ic88108540f17cd98e840224c763a1ea1f53dd335
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
3 months agoRemove RemoteDeviceCommunicator#sendRequest method 56/110356/14
Samuel Schneider [Tue, 27 Feb 2024 10:19:08 +0000 (11:19 +0100)]
Remove RemoteDeviceCommunicator#sendRequest method

Remove deprecated RemoteDeviceCommunicator#sendRequest method
with unused parameter.

JIRA: NETCONF-1223
Change-Id: I84a01dc67e55b6f6d5cb997944b635950d521efb
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
3 months agoMigrate ResourceBody to ServerException 69/112069/2
Robert Varga [Tue, 11 Jun 2024 11:42:06 +0000 (13:42 +0200)]
Migrate ResourceBody to ServerException

Clean up the overall migration tools and make sure ResourceBody uses
ServerException instead of RestconfDocumentedException.

JIRA: NETCONF-1188
Change-Id: Ic2b94a02c118c30632f345fde0f0607e17c32669
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoReplace qualified names with imports 74/112074/2
Ivan Hrasko [Tue, 11 Jun 2024 13:32:25 +0000 (15:32 +0200)]
Replace qualified names with imports

Replace qualified names with imports in CallHomeMountService class
documentation.

Change-Id: Id4b57e06ef4743aa6d2c442b379e8f51d7d5704c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 months agoDocument RemoteDeviceCommunicator#sendRequest method 65/110865/10
Samuel Schneider [Tue, 19 Mar 2024 11:42:38 +0000 (12:42 +0100)]
Document RemoteDeviceCommunicator#sendRequest method

Add documentation for RemoteDeviceCommunicator#sendRequest.
As one of the parameters is unused mark the method as deprecated.
Add new one without the parameter.

JIRA: NETCONF-1223
Change-Id: I154c6e2940ed35013a9c8c51349f7c1d9ef46209
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
3 months agoAdd test for length parameter 98/111698/9
Yaroslav Lastivka [Wed, 15 May 2024 10:51:44 +0000 (13:51 +0300)]
Add test for length parameter

Added test case for regex generated strings restricted by length parameter

JIRA: NETCONF-1312
Change-Id: If9766decae06dfa241dc9abeb1f59ae3444c60f2
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoAdd ability to limit string example length 56/111856/6
Yaroslav Lastivka [Mon, 27 May 2024 08:31:50 +0000 (11:31 +0300)]
Add ability to limit string example length

Implemented a new prepareExample method that provides the ability to
generate string based on regex and length parameters.

JIRA: NETCONF-1312
Change-Id: Ife7040c0ed474b4386acfb6d53c6e8a0e902a860
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoReport ServerException from OperationInputBody.toPayload() 67/112067/3
Robert Varga [Tue, 11 Jun 2024 08:18:24 +0000 (10:18 +0200)]
Report ServerException from OperationInputBody.toPayload()

This peels another set of users RDE and moves them to using
ServerException.

JIRA: NETCONF-1188
Change-Id: I76cf15a2c4a47363fcf1f550a1ca8d7e5744ff78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoReport ServerException from ChildBody.toPayload() 30/111730/6
Robert Varga [Sun, 19 May 2024 16:06:20 +0000 (18:06 +0200)]
Report ServerException from ChildBody.toPayload()

Migrate a set of users from RestconfDocumentedException to
ServerException.

This necessitates updating RestconfDocumentedException, so we can
properly propagate multiple errors and an EffectiveModelContext.

We also convert a number of RuntimeException to ServerException, so that
we have a more uniform error reporting semantics.

JIRA: NETCONF-1188
Change-Id: Iaacdaa519cdde6ee13730907a853a05d8f0dd764
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoMigrate netconf-client-mdsal tests to JUnit5 20/111720/14
Yaroslav Lastivka [Fri, 17 May 2024 13:28:31 +0000 (16:28 +0300)]
Migrate netconf-client-mdsal tests to JUnit5

Migrate tests in a netconf-client-mdsal from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I4f1622b5f41d96dce91d68500d2eedcbf327d68c
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoMigrate netconf/netconf-netty-util 01/111701/6
Samuel Schneider [Wed, 15 May 2024 12:52:55 +0000 (14:52 +0200)]
Migrate netconf/netconf-netty-util

Migrate netconf/netconf-netty-util to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ic68bca28f642dc689fe4036117da87e07b063665
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
3 months agoOpenAPI: Update module revision docs 69/111869/2
lubos-cicut [Tue, 28 May 2024 07:18:33 +0000 (09:18 +0200)]
OpenAPI: Update module revision docs

Updated documentation according changes made in NETCONF-1303. Revision
was changed to @QueryParam, so now we have to use
/mounts/1/toaster?revision=2009-11-20 for module with revision and
/mounts/1/definition-test for module without revision.

JIRA: NETCONF-1315
Change-Id: If3244d2e6f3b9a12154082eb9c499df8e3091072
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoUtilize key-id for TLS devices in netconf-topology 51/109151/13
Ruslan Kashapov [Tue, 19 Mar 2024 10:59:57 +0000 (12:59 +0200)]
Utilize key-id for TLS devices in netconf-topology

When SslHandler is created all the private keys from
configured keystore are used for each device being
connected via TLS protocol. In order to use per device
defined keys new key-id configuration property is used.

JIRA: NETCONF-821
Change-Id: Ia0ea8382f646f8a48f05e5ccad81b8068ed07b4a
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
3 months agoAdd key-id into device TLS parameters 67/110867/5
Ruslan Kashapov [Tue, 19 Mar 2024 10:59:57 +0000 (12:59 +0200)]
Add key-id into device TLS parameters

New key-id leaf-list added for TLS connection-configuration in order
to allow specify the keys which are used to establish secure connection
with device.

JIRA: NETCONF-821
Change-Id: I87c346ce5eea2b9f95ddb10066472e75407f62d6
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 months agoDocument netopeer2 TLS port 60/112060/1
Ivan Hrasko [Mon, 10 Jun 2024 10:35:09 +0000 (12:35 +0200)]
Document netopeer2 TLS port

Document that when we want to use netopeer2 with TLS
we have to enable port 6513.

JIRA: NETCONF-1284
Change-Id: I6e21c668f3f473c338167e79d3cf7a49867b4e16
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 months agoFix device notification accept type 55/112055/2
Ivan Hrasko [Mon, 10 Jun 2024 09:01:37 +0000 (11:01 +0200)]
Fix device notification accept type

After websockets removal application/xml is no more valid
accept type for getting notifications from device.

Change it to: text/event-stream.

JIRA: NETCONF-1321
Change-Id: I957ada1ac4e0dd68d24d03cf1ed3887039626859
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
3 months agoMigrate netconf-client-mdsal/spi tests to JUnit5 19/111719/10
Yaroslav Lastivka [Fri, 17 May 2024 13:27:25 +0000 (16:27 +0300)]
Migrate netconf-client-mdsal/spi tests to JUnit5

Migrate tests in a netconf-client-mdsal/spi from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I666a63da504be4cdd897353d42a64252c28206be
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoMigrate netconf-server tests to JUnit5 77/111777/3
lubos-cicut [Mon, 20 May 2024 12:37:06 +0000 (14:37 +0200)]
Migrate netconf-server tests to JUnit5

Migrate tests in protocol/netconf-server from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I6454472d9bbaaa57827c1ca38c190d6d193e0978
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoMigrate netconf-server/spi tests to JUnit5 76/111776/3
lubos-cicut [Mon, 20 May 2024 12:36:40 +0000 (14:36 +0200)]
Migrate netconf-server/spi tests to JUnit5

Migrate tests in protocol/netconf-server/spi from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ib46eb271178511bd205fa895f9ca50719c9fdb0b
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoMigrate plugins/netconf-server-mdsal/operations tests to JUnit5 09/111809/3
Oleksandr Zharov [Tue, 21 May 2024 17:25:20 +0000 (19:25 +0200)]
Migrate plugins/netconf-server-mdsal/operations tests to JUnit5

Migrated plugins/netconf-server-mdsal/operations tests from JUnit4
to JUnit5.

JIRA: NETCONF-1310
Change-Id: I82bcc37166645975e8633919d5e2da77270b446a
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
3 months agoMigrate protocol/netconf-client tests to JUnit5 03/111703/2
Matej Sramcik [Thu, 16 May 2024 04:57:52 +0000 (06:57 +0200)]
Migrate protocol/netconf-client tests to JUnit5

Migrate tests in protocol/netconf-client from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ica257e32bad20deebb525295eb6d97d8b36905a2
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
3 months agoMigrate restconf/restconf-nb tests to JUnit5 00/111700/12
Matej Sramcik [Wed, 15 May 2024 11:52:38 +0000 (13:52 +0200)]
Migrate restconf/restconf-nb tests to JUnit5

Migrate tests in arestconf/restconf-nb from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ib54819fa14b8673390d9986cd9669600f0b2985f
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
3 months agoRemove websocket from docs 26/111926/5
lubos-cicut [Mon, 3 Jun 2024 09:59:44 +0000 (11:59 +0200)]
Remove websocket from docs

Websocket based stream has been removed in NETCONF-1209. Adapted
NETCONF's user guide to reflect this change.

JIRA: NETCONF-1321
Change-Id: Ib68c110027e60a64f56c77e1e338e7906affd615
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
3 months agoMigrate netconf-client-mdsal/api tests to JUnit5 18/111718/8
Yaroslav Lastivka [Fri, 17 May 2024 13:25:37 +0000 (16:25 +0300)]
Migrate netconf-client-mdsal/api tests to JUnit5

Migrate tests in a netconf-client-mdsal/api from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I43265cae38624fb6f016cf152ec7bb8c28ddf186
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoMigrate netconf-client-mdsal/impl tests to JUnit5 17/111717/7
Yaroslav Lastivka [Fri, 17 May 2024 13:20:56 +0000 (16:20 +0300)]
Migrate netconf-client-mdsal/impl tests to JUnit5

Migrate tests in a netconf-client-mdsal/impl from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I6153b44dc30b204ae9a2782153fa3fc7cceed480
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
3 months agoRemove the option to deliver streams over WebSockets 11/111711/4
Robert Varga [Thu, 16 May 2024 17:34:20 +0000 (19:34 +0200)]
Remove the option to deliver streams over WebSockets

We have been providing SSE-based delivery for a very long time and have
deprecated WebSockets in NETCONF-1208.

This patch completely removes this mode of delivery.

JIRA: NETCONF-1209
Change-Id: Ifc45d4e815abe84f7797b977a985457cd2cebd08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 months agoBump versions to 8.0.0-SNAPSHOT 75/111875/1
Robert Varga [Tue, 28 May 2024 11:24:55 +0000 (13:24 +0200)]
Bump versions to 8.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: Ie73749dc4bea34bed11bfc79179362b1adac1e6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMigrate netconf-server/mapping tests to JUnit5 75/111775/1
lubos-cicut [Mon, 20 May 2024 12:36:20 +0000 (14:36 +0200)]
Migrate netconf-server/mapping tests to JUnit5

Migrate tests in protocol/netconf-server/mapping from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ia8578ea11320918012e236facbf2766f232df89c
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
4 months agoMigrate netconf-server/osgi tests to JUnit5 74/111774/1
lubos-cicut [Mon, 20 May 2024 12:35:31 +0000 (14:35 +0200)]
Migrate netconf-server/osgi tests to JUnit5

Migrate tests in protocol/netconf-server/osgi from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: I9062daee8f015e7dcbdbf615d28cb3f62bc840db
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
4 months agoMigrate netconf-server/api tests to JUnit5 73/111773/1
lubos-cicut [Mon, 20 May 2024 12:34:38 +0000 (14:34 +0200)]
Migrate netconf-server/api tests to JUnit5

Migrate tests in protocol/netconf-server/api from JUnit4 to JUnit5.

JIRA: NETCONF-1310
Change-Id: Ie99729cc76a6a88f29665e9f3b3790f51c055b5f
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
4 months agoBump versions to 7.0.6-SNAPSHOT 34/111734/1
Robert Varga [Mon, 20 May 2024 07:29:22 +0000 (09:29 +0200)]
Bump versions to 7.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: Iee9f890451738a8a151ecf057647074447b82e5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRelease netconf v7.0.5
jenkins-releng [Sun, 19 May 2024 18:03:50 +0000 (18:03 +0000)]
Release netconf

4 months agoOpenApi: Refactor inconsistent naming of modelContext 94/111694/5
lubos-cicut [Tue, 14 May 2024 16:17:32 +0000 (18:17 +0200)]
OpenApi: Refactor inconsistent naming of modelContext

In restconf-openapi is inconsistent naming of EffectiveModelContext,
this patch unify it to modelContext.

JIRA: NETCONF-1313
Change-Id: I64face48ef43b59bc489c3058fa5dfa4bcbb4e41
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
4 months agoUse ServerException in JaxRsRestconfCallback.transform() 29/111729/2
Robert Varga [Sun, 19 May 2024 15:23:26 +0000 (17:23 +0200)]
Use ServerException in JaxRsRestconfCallback.transform()

We have only a single implementation which throws, convert it to
ServerException.

JIRA: NETCONF-1188
Change-Id: I8127549346956632c311252c57e1dcb4c9d587e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoReport ServerException from ApiPathCanonizer 28/111728/3
Robert Varga [Sun, 19 May 2024 13:29:45 +0000 (15:29 +0200)]
Report ServerException from ApiPathCanonizer

This is the next step in RDE eradication.

JIRA: NETCONF-1188
Change-Id: I9123b37849636e7d38167b280265d0d900565a96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoReport ServerException from ApiPathNormalizer 24/111724/4
Robert Varga [Sat, 18 May 2024 22:54:15 +0000 (00:54 +0200)]
Report ServerException from ApiPathNormalizer

This patch takes a step away from RestconfDocumentedException by making
APiPath normalization requests report ServerException instead.

We also update ServerException to match RestconfDocumentedException's
behaviour of reporting cause message in error-info.

JIRA: NETCONF-1188
Change-Id: I51aa91d4b3c914a421fe28a9ed8a517be1e47571
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoEnhance Netconf message handling 74/111474/8
Yaroslav Lastivka [Mon, 22 Apr 2024 08:55:42 +0000 (11:55 +0300)]
Enhance Netconf message handling

Enhance the `onMessage` method in the NetconfServerSession handler to
include detailed response handling and error logging for outgoing
Netconf messages. This update introduces a listener to the
`sendMessage` call, which logs failures to send messages and
confirms successful transmissions. The changes aim to improve
debugging capabilities by providing specific message IDs for
each failed or successful send operation, aiding in better
traceability and error handling in the communication process.

JIRA: NETCONF-1261
Change-Id: I088da6832d3ab267717ee122d53371bf05e8360c
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoMigrate SessionNotificationProducer 23/111723/1
Robert Varga [Sat, 18 May 2024 22:52:10 +0000 (00:52 +0200)]
Migrate SessionNotificationProducer

Sessions pertain to oper state, hence in terms of notifications they are
cluster-global. This changes behaviour towards reflecting what the
injected DOMDataBroker is bound to see.

Change-Id: I35549c5a8ec59364de05fd18e5192992d7d69906
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoRemove DatabindFormattableBody 22/111722/1
Robert Varga [Sat, 18 May 2024 20:37:32 +0000 (22:37 +0200)]
Remove DatabindFormattableBody

This class does not bring much to the party, integrate it into its sole
subclass.

JIRA: NETCONF-773
Change-Id: I8caeedca764b7045ab40ad6d27e9c0af5be5a658
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 months agoUse ServerError in PatchStatus{Context,Entity} 21/111721/1
Robert Varga [Sat, 18 May 2024 20:11:31 +0000 (22:11 +0200)]
Use ServerError in PatchStatus{Context,Entity}

RestconfError is not properly structured, use ServerError, which
correctly models errors. This in turn allows PatchStatusContext to not
have a DatabindContext.

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