netconf.git
6 weeks agoRemove sal-restconf-broker 95/112995/2
Robert Varga [Tue, 6 Aug 2024 14:25:34 +0000 (16:25 +0200)]
Remove sal-restconf-broker

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use aaa-0.20.0 instead of snapshots.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

All artifacts using bnd-parent must have precise dependencies.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This class is not used anywhere, remove it.

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

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

JIRA: NETCONF-773
Change-Id: I01d61d59c1bbc180b7dbdffef187c447d62a8133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd bnd-parent 53/112653/1
Robert Varga [Sat, 20 Jul 2024 13:13:17 +0000 (15:13 +0200)]
Add bnd-parent

bnd-parent is a much more modern take on bundle-parent. Unlike plain
'netconf-parent', it does not deal with YANG Binding generation.

JIRA: NETCONF-773
Change-Id: I2274a3635d3640afada0d1b606cdab0c84cd19c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoTurn restconf-server-api into a module 51/112651/1
Robert Varga [Sat, 20 Jul 2024 12:57:09 +0000 (14:57 +0200)]
Turn restconf-server-api into a module

Add module-info.java and clean up reported warnings.

JIRA: NETCONF-773
Change-Id: I5ae08908038ba695e657f7e4ac78f5b85218007b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoTurn restconf-server-api into a module 50/112650/1
Robert Varga [Sat, 20 Jul 2024 12:46:04 +0000 (14:46 +0200)]
Turn restconf-server-api into a module

Add module-info.java and clean up reported warnings.

JIRA: NETCONF-773
Change-Id: I5b541656d6cf16217b525a5dcb1e7e87ab078b0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoAdd restconf.api module documentation 49/112649/1
Robert Varga [Sat, 20 Jul 2024 12:45:09 +0000 (14:45 +0200)]
Add restconf.api module documentation

Add a simple block of Javadoc.

JIRA: NETCONF-773
Change-Id: I3379d619aca3359a0df902558043f6bd438a289e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoUse doCallRealMethod() instread of a mock QName 48/112648/1
Robert Varga [Sat, 20 Jul 2024 08:03:25 +0000 (10:03 +0200)]
Use doCallRealMethod() instread of a mock QName

EffectiveModelContext has a default method here, make use of that.

JIRA: NETCONF-1331
Change-Id: I7704a9600cb01d7c1c9927d49be657a21e58e095
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>