netconf.git
13 months agoFix YANG patch request for augmented element 96/104696/4
OleksandrZharov [Fri, 26 Aug 2022 15:43:24 +0000 (17:43 +0200)]
Fix YANG patch request for augmented element

When writing JSON data using yangtool's NormalizedNodeStreamWriter
we have to check if the result is instance of Augmentation.

In that case we have to use its child as data. Similar process
is applied in JsonNormalizedNodeBodyReader.

JIRA: NETCONF-747
Change-Id: I2c1d1abcd3cbb483b414408c2c768bdc5731b8ce
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
13 months agoFix YangLib media types 98/104598/1
Ivan Hrasko [Wed, 8 Mar 2023 09:22:03 +0000 (10:22 +0100)]
Fix YangLib media types

Fix YangLib media types to return "application/yang" with default
fallback to "text/plain".

JIRA: NETCONF-972
Change-Id: Ibd7a6939342cfbe4b525442d8606e4c27d3e8b65
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit e7996455d2d0e4a2369c5b40142cad0b0e176d23)

14 months agoEnforce idleTimeout/heartbeatInterval consistency 64/104664/1
Robert Varga [Wed, 1 Mar 2023 12:40:22 +0000 (13:40 +0100)]
Enforce idleTimeout/heartbeatInterval consistency

We should not allow a configuration where we time out before we send a
heartbeat. Enforce this invariant.

JIRA: NETCONF-970
Change-Id: Ic26319d7a3da4db9b28fa0aa2e39cdfe439fd786
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit e04ac4e328c7ea1de978ede2426c564f8d0b2190)

14 months agoReduce verbosity of websocket timeout logging 63/104663/1
Robert Varga [Wed, 1 Mar 2023 12:55:56 +0000 (13:55 +0100)]
Reduce verbosity of websocket timeout logging

A websocket timing out is not a big thing, do not log a complete stack
trace when it occurs.

JIRA: NETCONF-970
Change-Id: I04ec6da1957ba13a27561dfbff9c06a10f011083
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f1a717a15be5ff88a509958795c51c7a114b7312)

14 months agoFix web-socket timeout closure exceptions 62/104662/1
Ruslan Kashapov [Wed, 15 Feb 2023 13:58:40 +0000 (15:58 +0200)]
Fix web-socket timeout closure exceptions

As noted in WebSocketSessionHandler.onWebSocketClosed(), there is no
guarantee the session reports isOpen(). Performing the same check in
AbstractCommonSubscriber.removeSubscriber() (via isConnected()) can
therefore result in an ISE.

Fix this by removing the check.

JIRA: NETCONF-970
Change-Id: I6e437d9821e698e3faca121402a97b88ac486229
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
(cherry picked from commit 0d05f5be80762b833acc0b8337b68b353e4c673a)

14 months agoSimplify WebSocketSessionHandler.isConnected() 61/104661/1
Robert Varga [Wed, 1 Mar 2023 12:45:15 +0000 (13:45 +0100)]
Simplify WebSocketSessionHandler.isConnected()

Use a simple expression instead of a if/else.

Change-Id: Ie1a2e26f1731c799fa6e9e1b027563702809eb7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit ae13eecd3f9863754d5dc9a0feb5a22e708f12d0)

14 months agoReuse ObjectMapper instance 60/104660/1
Yaroslav Lastivka [Mon, 27 Feb 2023 09:01:55 +0000 (11:01 +0200)]
Reuse ObjectMapper instance

It's recommended to reuse ObjectMapper instances but in current codebase
we are recreating it.
ObjectMapper field was made static to prevent multiple object creation.

JIRA: NETCONF-938
Change-Id: If6ed5b5b1959b28d2330e3dc450afb3f20c15c29
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
(cherry picked from commit 83698fa3ec1d5d889f3ece39ebfd1cd54520e609)

14 months agoFix restconf-nb websocket initialization failure on karaf 90/104590/1
Ruslan Kashapov [Wed, 15 Feb 2023 13:58:40 +0000 (15:58 +0200)]
Fix restconf-nb websocket initialization failure on karaf

Websocket servlet is initialized using indirect dependency on
server bundle (string class name in code, dynamic-import in
manifest). This dependency require to be set explicitly. Then
required bundle will be installed with odl-restconf-nb feature
and missing artifacts will be available for restcong-nb
class loader.

JIRA: NETCONF-953
Change-Id: I82e9133af1aeb98518f97a14a3574b82573f92dc
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
(cherry picked from commit af9b71c6837f46cfa324f59467750648ecfa34d3)

14 months agoFix feature install inside scale-util 89/104589/1
Peter Suna [Thu, 16 Feb 2023 07:34:21 +0000 (08:34 +0100)]
Fix feature install inside scale-util

The feature "odl-restconf-nb-rfc8040" has been deprecated
and is no longer available. It has been replaced by
the "odl-restconf-nb" feature.

Change-Id: I5dce4d65fa241ef9453f90b13703612d8e7b5747
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
(cherry picked from commit f529c92c2a7b221ecdcdd1e70584222b54b6fade)

14 months agoUpdate documentation for YangLib feature 91/104391/1
Yaroslav Lastivka [Fri, 3 Feb 2023 08:43:12 +0000 (10:43 +0200)]
Update documentation for YangLib feature

Documentation was updated according to current model and default values.

JIRA: NETCONF-909
Change-Id: I514f3677b8ba6b02e6e146e47fdee09e5791a386
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
(cherry picked from commit 793d1d10337cc6dc4eb498f9a7989d95ea266832)

14 months agoFix odl-yanglib feature usage 90/104390/1
Yaroslav Lastivka [Thu, 19 Jan 2023 11:55:38 +0000 (13:55 +0200)]
Fix odl-yanglib feature usage

The problem is that Initialization stops working correctly and
expect non-empty YanglibConfig provided by blueprint.

Were set default cache-folder to cache/schema, binding-addr to
localhost and binding-port port 8181 by creating new config
file.

JIRA: NETCONF-909
Change-Id: I76455310d014a5ad87051cb0ac749f5ce9f010c1
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 11ced7438f39559415565864c085fc0ec4422f4d)

14 months agoBump json-unit-assertj to 2.36.1 60/104160/1
Ivan Hrasko [Wed, 8 Feb 2023 16:03:21 +0000 (17:03 +0100)]
Bump json-unit-assertj to 2.36.1

Fix CVE-2022-42003 by bumping json-unit-assertj to 2.36.1
which uses fixed jackson-databind version 2.14.0.

Change-Id: I3ab3cb9e03393ea1d223616e0b013f7f10e6a74c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit 4c0bdb9e23281e579ec9b90a510bd2f0844de502)

15 months agoReuse NetconfClientBuilder in NetconfCallHomeServer 53/104153/1
Peter Suna [Tue, 24 Jan 2023 12:18:07 +0000 (13:18 +0100)]
Reuse NetconfClientBuilder in NetconfCallHomeServer

To prevent issues with connecting to devices that
use old key exchange algorithms, use the default NetconfSshClient
inside the NetconfCallHomeServer.

JIRA: NETCONF-887
Change-Id: I379c26281dcec6df10dcdbe0ccbfa8c3bea7e8f0
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
(cherry picked from commit e3ad7c25673e9c59e750612c83adf73fdb1576a4)

15 months agoMigrate UnresolvedQName.unqualified() callers 64/103264/2
Robert Varga [Mon, 5 Dec 2022 17:24:44 +0000 (18:24 +0100)]
Migrate UnresolvedQName.unqualified() callers

This method has a better replacement, migrate to using it.

Change-Id: Ie8b59777665af8312a4453cf1aa6c8e932e143c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f58b21d05c3ab30415ac26a086ba49932cae9dca)

15 months agoBump versions to 4.0.6-SNAPSHOT 04/103904/1
Robert Varga [Tue, 3 Jan 2023 11:02:00 +0000 (12:02 +0100)]
Bump versions to 4.0.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I187f4f7fa3715bc3c05d70b47bc64152254b3fac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoDo not send 'commit' to the devices without candidate 67/103267/2
Sangwook Ha [Fri, 16 Dec 2022 01:06:05 +0000 (17:06 -0800)]
Do not send 'commit' to the devices without candidate

The 'commit' RPC should not be sent to the devices only with
'writable-running' and without 'candidate' capability.

Override the commit method for the 'Running' NetconfDataTreeService
to immediately return a DomRpcResult without any errors.

JIRA: NETCONF-933
Change-Id: Ic0e51135e3ae347213d8ef8dbc03deb282d47af3
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
(cherry picked from commit 3f566e5d24c17abd9643dd854b11d4345231a2e1)

15 months agoBump upstrems 03/103903/1
Robert Varga [Tue, 3 Jan 2023 09:31:43 +0000 (10:31 +0100)]
Bump upstrems

Adopt:
- odlparent-11.0.4
- infrautils-4.0.4
- yangtools-9.0.6
- mdsal-10.0.6
- controller-6.0.7
- aaa-0.16.7

Change-Id: I3a48c21b1630c28d01b68532544391d38ddaf164
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDo not use null input for discard-changes 41/103841/2
Sangwook Ha [Wed, 21 Dec 2022 18:27:10 +0000 (10:27 -0800)]
Do not use null input for discard-changes

There is already a NormalizedNode defined in NetconfMessageTransformUtil
for the content of the 'discard-changes' RPC.

Use the static variable instead of 'null'. This would make message
transformation more robust and fix an error caused by an augmentation
to the RPC input while generating NetconfMessage.

JIRA: NETCONF-934
Change-Id: I38777313d74e92bd955248ceea78e765729d9259
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
(cherry picked from commit f3cd4750c64f9002940b3bf20ea6be47a14344c3)

16 months agoFix duplicate in error message 49/103749/1
Ivan Hrasko [Mon, 12 Dec 2022 08:46:47 +0000 (09:46 +0100)]
Fix duplicate in error message

Fix duplicate occurrence of yang-ext:mount in error message
when operation is not found.

JIRA: NETCONF-926
Change-Id: I2d8f9f1e2f1c4257e3802f7e2df983597f34c6c4
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit 8de9afa5d61cc863e216a98d39a950bb300514d0)

16 months agoSimplify OperationsContext with yangtools 7.0.9+ 89/103689/1
OleksandrZharov [Wed, 14 Dec 2022 16:18:23 +0000 (17:18 +0100)]
Simplify OperationsContext with yangtools 7.0.9+

Simplified the logic in OperationsContent class with usage of
features available in yangtools 7.0.9.

Now we use EffectiveModelContext#findModuleStatements to find module
statements already sorted by revision.

JIRA: NETCONF-927
Change-Id: I5f0d3e310ac6cf499cb93c6e47e7142cf8653962
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 45a89bde4d8159468a6a1211b78cb421aab5fbc4)

16 months agoRemove NetconfDeviceFacade.salRegistrations() 54/103654/1
Robert Varga [Thu, 8 Dec 2022 19:56:40 +0000 (20:56 +0100)]
Remove NetconfDeviceFacade.salRegistrations()

This field is unused, remove it.

Change-Id: If7ede429196a5136f8680cef2ba245a4c996cf65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2e719163dd762200de1b276f3c18d5b75d9eabe3)

16 months agoBump versions to 4.0.5-SNAPSHOT 41/103541/2
Robert Varga [Sat, 3 Dec 2022 09:59:05 +0000 (10:59 +0100)]
Bump versions to 4.0.5-SNAPSHOT

This starts the next development iteration.

Change-Id: I06a1ec56ac89a59d4feb9fa91711286f22e8e160
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump upstrems 40/103540/2
Robert Varga [Sat, 3 Dec 2022 09:58:17 +0000 (10:58 +0100)]
Bump upstrems

Adopt:
- odlparent-11.0.3
- infrautils-4.0.3
- yangtools-9.0.5
- mdsal-10.0.5
- controller-6.0.5
- aaa-0.16.6

Change-Id: I5243bacf7507ba7703f742ef46cfeb5aa197b79b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoBump SSHD to 2.9.2 52/103252/1
Robert Varga [Wed, 16 Nov 2022 22:30:08 +0000 (23:30 +0100)]
Bump SSHD to 2.9.2

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

Change-Id: I7bc6d261e0666929abde410cad64cfaabf8506e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6bac0befd20952fc07aab28b9575b690a04c0f06)

17 months agoBump versions to 4.0.4-SNAPSHOT 45/102645/2
Robert Varga [Mon, 7 Nov 2022 00:30:38 +0000 (01:30 +0100)]
Bump versions to 4.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I24622b3fecb76ca9471b5556a48435932f637082
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 40199db98ceb28d9e303e9959167d1c6ab6e1355)

17 months agoClean up XML interactions 15/103115/1
Robert Varga [Sun, 6 Nov 2022 21:49:37 +0000 (22:49 +0100)]
Clean up XML interactions

We have a chunk of duplicated code, make sure we provide provide
utilities.

Change-Id: Ibb2b3e14f23c76aa101dcd3766d35aa6a15a5752
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoClean up namespace handling 14/103114/1
Robert Varga [Sun, 6 Nov 2022 21:29:33 +0000 (22:29 +0100)]
Clean up namespace handling

We should tie together namespaces and elements to the generated model,
so that these are kept consistent.

Change-Id: I2d1167e632b6695985bf93d4102794978d2811df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoAdd missing identifier for list node in fields RESTCONF query 00/99400/12
Peter Puškár [Thu, 20 Jan 2022 08:54:43 +0000 (09:54 +0100)]
Add missing identifier for list node in fields RESTCONF query

Fields filtering is currently completely failing for NETCONF nodes
when the fields query contains any list node, because we need both
NodeIdentifier (for the entire list) and NodeIdentifierWithPredicates
(for a concrete entry) to parse them correctly.

WriterFieldsTranslator provides both already and this is correctly
working on non-NETCONF nodes. Make this behaviour consistent for both.

JIRA: NETCONF-820
Change-Id: I24d6ec1752ba1a2f551fcd4149c6efde04f1a89c
Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUse switch expression for EventFormatterFactory selection 09/103109/1
Robert Varga [Sun, 6 Nov 2022 18:45:58 +0000 (19:45 +0100)]
Use switch expression for EventFormatterFactory selection

Useing a switch expression removes the unhandled case, promoting to a
compile-time error if things do not match up.

Change-Id: I8688e4bc76419194cb0d910105ff0733cd6d118f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoAdd the concept of a netconf client name 68/97568/9
Peter Puškár [Thu, 13 Oct 2022 13:25:41 +0000 (15:25 +0200)]
Add the concept of a netconf client name

Clients can be optionally named with a simple string, this is then
propagated to AsyncSshHandler and used for logging purposes.

JIRA: NETCONF-896
Change-Id: Iebb6c094c50ff4646b8ef3e9221cebd3dbebe5e3
Signed-off-by: Zdenko Filip <zfilip@frinx.io>
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUse try-with-resources in SSHTest 07/103107/2
Robert Varga [Sun, 6 Nov 2022 17:45:35 +0000 (18:45 +0100)]
Use try-with-resources in SSHTest

SshProxyServer is autocloseable, we should use try-with-resources to
manage it.

Change-Id: I797064a83b793767a7041d51fa1ab507b79b781f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoBump upstrems 80/103080/3
Robert Varga [Fri, 4 Nov 2022 14:40:05 +0000 (15:40 +0100)]
Bump upstrems

Adopt:
- odlparent-11.0.2
- infrautils-4.0.2
- yangtools-9.0.2
- mdsal-10.0.3
- controller-6.0.3
- aaa-0.16.4

Change-Id: I58f8179456cb8f0b2adc300bb0397b2636612d57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoDo not reference individual builders 46/103046/1
Robert Varga [Thu, 3 Nov 2022 01:24:02 +0000 (02:24 +0100)]
Do not reference individual builders

We are about to hide individual builders, make sure we go through either
Builders or ImmutableNodes.

Change-Id: I9ece3328ffe148e09e5e232e79cc8db24214161b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump sshd to 2.9.1 01/101901/9
Robert Varga [Fri, 29 Jul 2022 11:23:16 +0000 (13:23 +0200)]
Bump sshd to 2.9.1

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

JIRA: NETCONF-894
Change-Id: I54ecf8d02d4adfea742ce47ac6e164b1df2f6615
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoUse property setters 14/103014/1
Robert Varga [Wed, 2 Nov 2022 12:23:54 +0000 (13:23 +0100)]
Use property setters

SSHD configuration properties can be nicely set via a type-safe system,
make sure we use that instead of mucking with maps directly.

Change-Id: If1193c70d7057e16430ebf91e4dc78cc1d8f1745
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix mdsal-netconf-ssh shutdown 84/102584/6
Ivan Hrasko [Fri, 7 Oct 2022 18:32:15 +0000 (20:32 +0200)]
Fix mdsal-netconf-ssh shutdown

Initialize AsynchronousChannelGroup thread pool with
ForwardingExecutorService with NO-OP shutdown method
in order to prevent throwing UnsupportedOperationException
from OSGiGlobalEventExecutor.

JIRA: NETCONF-900
Change-Id: Ibedb95413bf5476f5d22ae899e71496951fb6ed7
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoReorder dependencies 16/102916/1
Robert Varga [Fri, 28 Oct 2022 09:20:41 +0000 (11:20 +0200)]
Reorder dependencies

Make sure org.json is first, removing the need for exclusions.

Change-Id: I6243ba7663d62c76f34e483dba406c7ed45ddb60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump org.json/json to 20220924 04/102904/2
Robert Varga [Thu, 27 Oct 2022 16:15:42 +0000 (18:15 +0200)]
Bump org.json/json to 20220924

This version is in public domain, resolving potential licensing issues
around "do no evil" restriction. Also update other testing frameworks.

Change-Id: I55c4ba72c53bad8a33ba42c712db84e8bfece57c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix docgen failure on multi-level choice definition 75/102875/1
Ruslan Kashapov [Wed, 26 Oct 2022 07:38:35 +0000 (10:38 +0300)]
Fix docgen failure on multi-level choice definition

+ minor refactoring: duplicate code replaced with recursive function

JIRA: NETCONF-883
Change-Id: Ie577f930fe7fc104bc92a93286a2788b93c04ac6
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
18 months agoClean up *NormalizedNodeBody{Reader,Writer} 67/102867/1
Robert Varga [Tue, 25 Oct 2022 10:20:38 +0000 (12:20 +0200)]
Clean up *NormalizedNodeBody{Reader,Writer}

Use local variable type inference and instanceof patterns to clean up
casting and checks.

Change-Id: I410848132908f36dc5dd8a1b4ae309d872dd9b90
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoUse instanceof patterns in DefinitionGenerator 65/102865/2
Robert Varga [Mon, 24 Oct 2022 19:55:19 +0000 (21:55 +0200)]
Use instanceof patterns in DefinitionGenerator

We can simplify a bit with using a check-and-assign patterns.

Change-Id: Ib301dfa2f80ab7ad598cae5efc891ebbad021d06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoAdd {keystore,truststore}-api and none implementations 05/102205/41
Robert Varga [Mon, 22 Aug 2022 13:08:15 +0000 (15:08 +0200)]
Add {keystore,truststore}-api and none implementations

The configuration bits for NETCONF/RESTCONF clients and server are part
of a large scale effort in NETCONF WG. In particular the concept of
crypto types and a keystore/truststore are shared between SSH and TLS
transports.

This patch adds the YANG models and an a 'none' implementation, which
the central keystore/truststore.

JIRA: NETCONF-590
Change-Id: I0827756df83aa9cfc83e98ee50b1e44f6310e82e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix TCPClientServerTest stability 21/102821/1
Robert Varga [Thu, 20 Oct 2022 15:01:20 +0000 (17:01 +0200)]
Fix TCPClientServerTest stability

Client's toString() changes when the connection completes. Move the
check to after we have waited for callbacks.

JIRA: NETCONF-590
Change-Id: I1ad7e375ca60d350affd1b226fa11ffc87106fe6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix transport-{api,tcp} dependencies 20/102820/1
Robert Varga [Thu, 20 Oct 2022 15:00:50 +0000 (17:00 +0200)]
Fix transport-{api,tcp} dependencies

netty-common is used by api, not by tcp, fix that up.

Change-Id: I338e1113506217905f6c8a779ab90d0025ccf2f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoAdd transport-{api,tcp} 24/102124/59
Robert Varga [Wed, 10 Aug 2022 18:23:21 +0000 (20:23 +0200)]
Add transport-{api,tcp}

NETCONF (and potentially RESTCONF) has rather well-defined concepts
how it works on the transport layer. Furthermore there are quite mature
YANG models covering the configuration of both NETCONF server and
NETCONF client.

This patch introduces the transport-level APIs to establish a transport
stack and its interactions with protocol negotiation and then the
messages layer. A baseline implementation based on plain TCP is also
provided.

JIRA: NETCONF-590
Change-Id: I29c207a2036e1c54ea1f6d7fe48f7eb42a3a4a7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix netconf WebInitializer url patterns 52/102552/3
OleksandrZharov [Tue, 4 Oct 2022 09:56:19 +0000 (11:56 +0200)]
Fix netconf WebInitializer url patterns

Fixed url patterns in WebInitializer so they all correspond
to specification.

JIRA: AAA-233
Change-Id: I2cfdabc7243e2c2d94debc3e02f6875d8ad13293
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove OSGiBaseNetconfSchemas 60/102760/1
Robert Varga [Wed, 19 Oct 2022 11:47:15 +0000 (13:47 +0200)]
Remove OSGiBaseNetconfSchemas

We have constructor injection and therefore can easily reuse
DefaultBaseNetconfSchemas in OSGi environment as well.

Change-Id: I1677a9d208990eb60a74349f8b9fae921ac33096
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoTie together model namespace 46/102746/2
Robert Varga [Tue, 18 Oct 2022 17:40:39 +0000 (19:40 +0200)]
Tie together model namespace

We have a well-known constant at the ready which defines the model
revision we are bound to. Cross reference to ensure things work out
okay.

Change-Id: Ie6677b0070928df2f9de1c527d2524703a9f9cac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoReplace replaceHelloMessageOutboundHandler() 57/102757/4
Robert Varga [Tue, 18 Oct 2022 21:07:52 +0000 (23:07 +0200)]
Replace replaceHelloMessageOutboundHandler()

This is a utility method to manipulate pipeline, with a single caller.
Inline the method so the manipulations are clearly visible.

Change-Id: I7aafce20947559753f213cfcb686a14e74f6bb7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSimplify error checking in writeWithPendingDetection() 55/102755/4
Robert Varga [Tue, 18 Oct 2022 21:33:28 +0000 (23:33 +0200)]
Simplify error checking in writeWithPendingDetection()

We are only interested in seeing the failure, as we are guarateed to see
a completed future.

JIRA: NETCONF-905
Change-Id: I3fa0236592ff785be49e0cb69a20d7c08b9432e9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoIgnore incoming messages in State.FAILED 56/102756/2
Robert Varga [Tue, 18 Oct 2022 23:45:41 +0000 (01:45 +0200)]
Ignore incoming messages in State.FAILED

Once we transition to FAILED state, we should not process any other
messages, as we just waiting for close() to complete.

JIRA: NETCONF-905
Change-Id: Id7d7f657e50bb7c7ad25c1445fa0b69e1e57cdb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoCheck for early message send failures 51/102751/6
Robert Varga [Tue, 18 Oct 2022 19:37:29 +0000 (21:37 +0200)]
Check for early message send failures

The transition to start session negotiation does not truly start if we
fail to send the hello message. Check for this condition before
manipulating any other channel state.

JIRA: NETCONF-905
Change-Id: I024a39abc8c6219019531c2abedaf124a25b3f27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSequence state transitions during negotiation start 50/102750/5
Robert Varga [Tue, 18 Oct 2022 19:27:51 +0000 (21:27 +0200)]
Sequence state transitions during negotiation start

If we fail to write out the initial proposal, we will end up running
listener actions before other negotiation start transitions -- hence
messing up our state.

Inline sendMessage() and dispatch the listener as a last operation of
start().

JIRA: NETCONF-905
Change-Id: I06b3b266ed2c37ec388aff4abb988f84e6fa3863
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSimplify isStateChangePermitted() 54/102754/1
Robert Varga [Wed, 19 Oct 2022 00:01:35 +0000 (02:01 +0200)]
Simplify isStateChangePermitted()

We have a duplicate check of old state value, merge two 'if' statements
together.

Change-Id: I36611230ef27de80f91a61b604e7bd71646c4718
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoClean up netconf-client tests 53/102753/3
Robert Varga [Tue, 18 Oct 2022 20:23:01 +0000 (22:23 +0200)]
Clean up netconf-client tests

Remove unneeded throws declarations and do not use mockito internals.

Change-Id: If25da046270c1e097f9e24c7e43dbad53720a293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoClean up netconf-api tests 52/102752/2
Robert Varga [Tue, 18 Oct 2022 20:16:48 +0000 (22:16 +0200)]
Clean up netconf-api tests

Remove unneeded throws declaration, @Before instantiation and use of
mockito internals.

Change-Id: I7831f67d408c45582f1d97e8e21719700847b08d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoUse Future.cause() for error checking 49/102749/1
Robert Varga [Tue, 18 Oct 2022 18:59:34 +0000 (20:59 +0200)]
Use Future.cause() for error checking

Include error trace when terminating session.

Change-Id: I02faabd68cf8f9ad89dc0273e9a85641d12c8db6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoUse Future.cause() for completion checking 48/102748/1
Robert Varga [Tue, 18 Oct 2022 18:45:14 +0000 (20:45 +0200)]
Use Future.cause() for completion checking

We know the future has completed, hence nullability of Future.cause()
is a quicker check for success.

Change-Id: Ie7baadb7fd744a8b7cfd58b01097997e71045ccd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoImprove default client parameters 41/102741/1
Robert Varga [Tue, 18 Oct 2022 15:15:14 +0000 (17:15 +0200)]
Improve default client parameters

Properties can be directly set, use that instead of mucking with strings
and maps.

Change-Id: I90dbef2431dff8206532445998177b7cb903928c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoCheck disconnected flag on each operation 40/102740/5
Robert Varga [Tue, 18 Oct 2022 14:44:39 +0000 (16:44 +0200)]
Check disconnected flag on each operation

We are performing a staggered setup during which we may encounter an
asynchronous disconnect. We have an atomic flag guarding this, which is
always flipped before disconnect enters critical region.

Check the flag at each synchronized connect stage and abort connection
if it is observed as flipped -- ensuring we cannot accidentally signal
channel activation after the channel has been close()d.

Also ditch the AtomicBoolean and instead use a simple VarHandle, saving
a few bytes of overhead.

JIRA: NETCONF-905
Change-Id: I857b1768b083c13ac5060a803a9ba6d4008c5e4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRun AsyncSshHandler.onOpenComplete() on event loop 24/102724/3
Robert Varga [Tue, 18 Oct 2022 11:24:39 +0000 (13:24 +0200)]
Run AsyncSshHandler.onOpenComplete() on event loop

onOpenComplete() runs ctx.fireChannelActive(), which in turn talks to
other handlers. Netty silently delays the invocation if it is called
from a different thread.

Make sure we run onOpenComplete() on the appropriate executor, so that
the state transition and handler updates run synchronously.

JIRA: NETCONF-905
Change-Id: Id8c2f4cb1e045d5d5bb446801deec341ccb27e87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMake AsyncSshHandler final 23/102723/5
Robert Varga [Tue, 18 Oct 2022 09:50:10 +0000 (11:50 +0200)]
Make AsyncSshHandler final

AsyncSshHandler is a fixed-functionality block dealing with
multi-threaded transitions. Make sure it is final so we can reason about
what is going on.

JIRA: NETCONF-905
Change-Id: If494145662d8705eb81c3a5e7ee55a989c218ae1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRework AsyncSshHandler callback locking 22/102722/5
Robert Varga [Tue, 18 Oct 2022 09:15:33 +0000 (11:15 +0200)]
Rework AsyncSshHandler callback locking

We have top-half and bottom-half dispatch going on here, with both paths
acquiring the object lock. Unify callbacks and lock object before
deciding which path to take.

JIRA: NETCONF-905
Change-Id: Ic42a652ed06ea8bc90cbe504963cc1405dad7fdc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRun safelyDisconnect() on event loop 21/102721/5
Robert Varga [Tue, 18 Oct 2022 09:10:15 +0000 (11:10 +0200)]
Run safelyDisconnect() on event loop

The disconnect() operation needs to inform handlers of state
transitions, which should not be delayed. Netty provides indirects these
calls silently on thread mismatch, which we do not want.

Make sure to schedule safelyDisconnect() on the event loop, so that that
it cannot run concurrently with other channel tasks.

JIRA: NETCONF-905
Change-Id: Iffe98db142f9c407fca9f92e5d336a0484ef1eff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename AsyncSshHandler.handleSshSetupFailure() 20/102720/4
Robert Varga [Tue, 18 Oct 2022 09:02:06 +0000 (11:02 +0200)]
Rename AsyncSshHandler.handleSshSetupFailure()

Rename this method to onOpenFailure() and move it to a more appropriate
place.

JIRA: NETCONF-905
Change-Id: I9ab3b6d4e7701fe3ee432ee0965322426dda0bec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove AsyncSshHandler.handleSshChanelOpened() 19/102719/4
Robert Varga [Tue, 18 Oct 2022 08:58:35 +0000 (10:58 +0200)]
Remove AsyncSshHandler.handleSshChanelOpened()

This is the locked bottom of onOpenComplete(), rename it and co-locate
it with its sole caller, making the code progression linear.

JIRA: NETCONF-905
Change-Id: I5a8fba44767535fb1e59bf48e3f4a422c0db3b59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove AsyncSshHandler.handleSshAuthenticated() 18/102718/3
Robert Varga [Tue, 18 Oct 2022 08:55:29 +0000 (10:55 +0200)]
Remove AsyncSshHandler.handleSshAuthenticated()

This method is the locked bottom of onAuthComplete(), rename it and
split out onOpenComplete(), making the flow more linear. Also switch
to use getException() to discern success/failure, fixing up badly-named
mocks.

JIRA: NETCONF-905
Change-Id: I7a0c20b872b19b66e99144d0ce83636d6b4cd400
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove AsyncSshHandler.handleSshSessionCreated() 17/102717/2
Robert Varga [Tue, 18 Oct 2022 08:44:52 +0000 (10:44 +0200)]
Remove AsyncSshHandler.handleSshSessionCreated()

This method is the synchronized part of onConnectComplete(), move it
closer to its source and split out onAuthComplete(). Also switch to
using getException() to check for success/failure.

JIRA: NETCONF-905
Change-Id: Ic8a49491afa92d68cb0585538a3fc9ffb044e9cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoAdd AsyncSshHandler.onConnectComplete() 16/102716/2
Robert Varga [Tue, 18 Oct 2022 08:27:19 +0000 (10:27 +0200)]
Add AsyncSshHandler.onConnectComplete()

Rather than using an anonymous listener, document the lifecycle event,
allowing us to refactor locking and extraction in the future. Also use
getException() to check for success.

JIRA: NETCONF-905
Change-Id: I8569ca007aefad634aff54294b475e565ac4f669
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoInline AsyncSshHandler.startSsh() 11/102711/2
Robert Varga [Mon, 17 Oct 2022 18:51:13 +0000 (20:51 +0200)]
Inline AsyncSshHandler.startSsh()

There is just no reason to have this method split out, inline it to its
sole user -- which is making interactions a bit clearer. We also see
that there is a blocking call, holding up the caller until the
connection succeeds.

JIRA: NETCONF-905
Change-Id: Iae781a743e670498c9329162bb05a7475f32d370
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix a typo 91/102691/1
Robert Varga [Fri, 14 Oct 2022 00:32:01 +0000 (02:32 +0200)]
Fix a typo

'underlyinch' vs 'underlying'.

Change-Id: Icc224eadb60cb6029caafdc9e9bb603638e57bce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFinish the sentence 71/102671/1
Robert Varga [Thu, 13 Oct 2022 14:30:11 +0000 (16:30 +0200)]
Finish the sentence

The fix here broke off mid-sentence, finish that up.

Change-Id: I4e991d84e048e9fb1c9312444527b4a2dbb7c618
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoExpire negotiation on event loop 15/102615/2
Robert Varga [Wed, 12 Oct 2022 11:54:06 +0000 (13:54 +0200)]
Expire negotiation on event loop

Rather than having to completely synchronize state transitions, make
sure we run expiry on the event loop.

JIRA: NETCONF-827
Change-Id: I8d02c025ceaf78d547848e7e92861cb125405141
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoUse switch expression to dispatch session 14/102614/1
Robert Varga [Wed, 12 Oct 2022 11:29:27 +0000 (13:29 +0200)]
Use switch expression to dispatch session

We are displating on an enum: use a switch expression to ensure it is
always exhaustive.

Change-Id: I0623fefd3d81b2fe538509fdbaf790a6ee5cbbaf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoDo not use Optional for SslHandler 13/102613/1
Robert Varga [Wed, 12 Oct 2022 09:50:31 +0000 (11:50 +0200)]
Do not use Optional for SslHandler

Use a simple @Nullable return instead wrapping and unwrapping it again.

Change-Id: I97d3475d4a8090ca7ac75e67c56d37997a58b859
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoAdd draft-ietf-netconf-crypto-types model 01/102301/10
Robert Varga [Wed, 7 Sep 2022 10:27:37 +0000 (12:27 +0200)]
Add draft-ietf-netconf-crypto-types model

This is a prerequisite for other client/server models, most notably used
by the forthcoming transport-api implementations.

JIRA: NETCONF-590
Change-Id: Ib005461637dd1bdab7b1d7a37efbb9f070911bbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump versions to 4.0.3-SNAPSHOT 44/102444/1
Robert Varga [Thu, 22 Sep 2022 15:24:08 +0000 (17:24 +0200)]
Bump versions to 4.0.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I7d37dc37de0971a4a775b41237804d79b13e5d37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump aaa to 0.16.3 43/102443/1
Robert Varga [Thu, 22 Sep 2022 13:09:29 +0000 (15:09 +0200)]
Bump aaa to 0.16.3

Pick up a fix from upstream.

Change-Id: I8d4cca5582ff2663155c58164e89370fecb5f929
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoTeach netconf-impl about maximum incoming chunk size 02/102302/4
DanielCV [Wed, 7 Sep 2022 10:51:21 +0000 (16:21 +0530)]
Teach netconf-impl about maximum incoming chunk size

Negotiators can specify custom maximum chunk size, this patch teaches
netconf-impl's configuration to take advantage of that.

JIRA: NETCONF-898
Change-Id: I1532a7e56e496c55af0d510e0259479fe2508eb4
Signed-off-by: DanielCV <daniel.viswanathan@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump upstreams 03/102403/1
Robert Varga [Fri, 16 Sep 2022 19:44:08 +0000 (21:44 +0200)]
Bump upstreams

Adopt:
- mdsal-10.0.2
- controller-6.0.2
- aaa-0.16.2

Change-Id: I209dbfd3e08cb6b08eebf7d8406b380c17cfed0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoCorrect test package 76/102376/1
Robert Varga [Wed, 14 Sep 2022 14:53:51 +0000 (16:53 +0200)]
Correct test package

Unit tests should reside in the same package as the classes they are
testing. Fix that up.

Change-Id: If286b23228bfaa2a753522a013bd77dcc4cdc6f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoUse Set.of() in ApiDocApplication 75/102375/1
Robert Varga [Wed, 14 Sep 2022 14:51:19 +0000 (16:51 +0200)]
Use Set.of() in ApiDocApplication

Use an immutable set instead of a HashSet.

Change-Id: I9bc8a44c4224b28efe7a968e6b1abbe58614555b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoCleanup WebInitializer a bit 53/102353/4
Robert Varga [Mon, 12 Sep 2022 15:32:37 +0000 (17:32 +0200)]
Cleanup WebInitializer a bit

This class should be final and should specify its close() method.

Change-Id: Ia3e839781f5f7ea658af9ff5157260be197ff28e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoSlim down NetconfKeystoreAdapter 29/102329/2
Robert Varga [Fri, 9 Sep 2022 21:57:30 +0000 (23:57 +0200)]
Slim down NetconfKeystoreAdapter

There is no need to store DataBroker and our listen path, ditch these
two fields.

Change-Id: Ie5c1e13eaacebcb6f4636712ec352a449a201f43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoClean up SslHandlerFactoryImpl a bit 28/102328/2
Robert Varga [Fri, 9 Sep 2022 12:03:17 +0000 (14:03 +0200)]
Clean up SslHandlerFactoryImpl a bit

Use an instanceof pattern and if/else chain instead of a checkArgument.
Also prefer Set.of().

Change-Id: I643fd75bd5191f1f9d9f434844d1b0e924433ad2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoClean up callhome TLS implementation 22/102322/2
Robert Varga [Fri, 9 Sep 2022 08:59:41 +0000 (10:59 +0200)]
Clean up callhome TLS implementation

We have fields for single-use listeners and we are using
GenericFutureListener with suppressions. Clean that up.

Change-Id: I59908f032a422a15ef67ee48f18e90ec5d2695e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoClean up TcpClientChannelInitializer 21/102321/2
Robert Varga [Fri, 9 Sep 2022 08:58:29 +0000 (10:58 +0200)]
Clean up TcpClientChannelInitializer

There is no need to reference GenericFutureListener/DefaultPromise.
Adjust code accordingly.

Change-Id: I0518ab00611c45ddcf2c19b802ecb810fc94ca94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoBump jquery to 3.6.1 51/102351/1
Robert Varga [Mon, 12 Sep 2022 13:31:28 +0000 (15:31 +0200)]
Bump jquery to 3.6.1

https://blog.jquery.com/2022/08/26/jquery-3-6-1-maintenance-release/

Change-Id: I5e5ae541c1acc5a1f0c8dc5699066ec6c2734851
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoRemove TestableContext 93/102293/1
Robert Varga [Mon, 5 Sep 2022 16:14:55 +0000 (18:14 +0200)]
Remove TestableContext

Use a simple spy() instead of a subclass here.

Change-Id: Ib714741641b125697984b1559e2f84d25ebeb309
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 months agoImprove callhome-protocol unit tests 92/102292/1
Robert Varga [Mon, 5 Sep 2022 15:50:12 +0000 (17:50 +0200)]
Improve callhome-protocol unit tests

Do not mix Mockito references -- just use static imports. Also use
assertThrows() instead of Test(expected).

Change-Id: I3734828f3322665f330f9460042638adfbf7f3f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoRemove unused parameter in CallHomeSessionContext.java 79/101779/13
Ivan Martiniak [Fri, 8 Jul 2022 12:24:51 +0000 (14:24 +0200)]
Remove unused parameter in CallHomeSessionContext.java

Parameter in the constructor 'final SocketAddress remoteAddress'
was marked as unused.
Method and tests related to this constructor were adjusted.

Resolved FIXME: Enable test
failureToOpenTheChannelShouldCauseTheSessionToClose().
Mock-maker-inline is used to be able to successfully run this test.

JIRA: NETCONF-681
Change-Id: Ifd8a76c6edcf801e432b7b925873806014b43b1a
Signed-off-by: Ivan Martiniak <ivan.martiniak@pantheon.tech>
20 months agoRemove draft paths from tests 17/102217/2
Ivan Hrasko [Thu, 25 Aug 2022 07:49:06 +0000 (09:49 +0200)]
Remove draft paths from tests

Remove old RESTCONF draft paths usage from tests. Now the only
available implementation is located at /rests/.

Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Change-Id: Id2b79f6c4c5ef83fb356aeccc12d4859d0a6b746

20 months agoRemove not-relevant swagger README 16/102216/2
Ivan Hrasko [Thu, 25 Aug 2022 07:41:00 +0000 (09:41 +0200)]
Remove not-relevant swagger README

Remove README file which contains no more relevant information:

- there are no multiple (RFC and draft) swagger UI links

- maven generator is no more available

JIRA: NETCONF-902
Change-Id: I80c055545babb0948ec35b314497d2c97d38c4f0
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
20 months agoRemove draft paths from swagger index.html 15/102215/2
Ivan Hrasko [Thu, 25 Aug 2022 07:36:30 +0000 (09:36 +0200)]
Remove draft paths from swagger index.html

RESTCONF draft 18 paths are no more used.
Remove them from swagger index.html.

JIRA: NETCONF-902
Change-Id: I7a72d3bdc634248ae88f087548f53442ce5e3601
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
20 months agoRemove draft paths from swagger 14/102214/2
Ivan Hrasko [Thu, 25 Aug 2022 07:33:17 +0000 (09:33 +0200)]
Remove draft paths from swagger

Nowadays we have only one RESTCONF implementation.
Remove RESTCONF draft 18 paths from swagger WebInitializer.

JIRA: NETCONF-902
Change-Id: I8605597b1c66caecc6a1e083078ab26a1484c6f7
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
20 months agoFix periodic NETCONF Call Home connection dropping 33/100133/37
ivan.martiniak [Tue, 28 Jun 2022 05:00:58 +0000 (07:00 +0200)]
Fix periodic NETCONF Call Home connection dropping

Callhome devices make reconnection every hour due to key re-exchange,
which is part of SSHD implementation.

When a specific session is authenticated and activated,
in case of key re-exchange, authentication (invoking of doAuth() method)
does not need to be made again.

While we are at it, also make sure CallHomeSessionContext's constructor
does not have side-effects -- while this cannot quite happen since we do
not reuse ClientSessions, it is a needless leak.

JIRA: NETCONF-681
Change-Id: I824c92d230c7570570d5eed21d489c435bdc8b22
Signed-off-by: Ivan Martiniak <ivan.martiniak@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoDo not embed netconf-impl 03/102203/1
Robert Varga [Mon, 22 Aug 2022 11:00:57 +0000 (13:00 +0200)]
Do not embed netconf-impl

Rather than embedding the dependency, use proper imports to satisfy the
needs of blueprint container.

JIRA: NETCONF-899
Change-Id: Iee2e2564384d3aa2660169c99ff375358b949a15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump versions to 4.0.2-SNAPSHOT 59/102159/1
Robert Varga [Thu, 18 Aug 2022 21:54:43 +0000 (23:54 +0200)]
Bump versions to 4.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I630b0fa640d8c4c805b07a841c26bdf2539d6d70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoTeach netconf-client abount maximum incoming chunk size 24/101924/5
Robert Varga [Fri, 29 Jul 2022 17:37:09 +0000 (19:37 +0200)]
Teach netconf-client abount maximum incoming chunk size

Negotiators can specify custom maximum chunk size, this patch teaches
netconf-client's configuration to take advantage of that.

JIRA: NETCONF-897
Change-Id: I3ae11a860a61b4fb061ca785a545a38381b90e7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump upstreams 58/102158/1
Robert Varga [Thu, 18 Aug 2022 21:50:28 +0000 (23:50 +0200)]
Bump upstreams

Adopt:
- odlparent-11.0.1
- yangtools-9.0.1
- infrautils-4.0.1
- mdsal-10.0.1
- controller-6.0.1
- aaa-0.16.1

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