netconf.git
6 weeks agoTurn ApiPath into a record 63/111163/2
Robert Varga [Mon, 1 Apr 2024 21:31:21 +0000 (23:31 +0200)]
Turn ApiPath into a record

Expose the canonical constructor and adjust callers to use ApiPath.of().

JIRA: NETCONF-1264
Change-Id: I74f0e17b15d363f096cb7d4a369519a7ba879e7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoMake leaf-list parsing explicit 62/111162/2
Robert Varga [Mon, 1 Apr 2024 20:28:13 +0000 (22:28 +0200)]
Make leaf-list parsing explicit

We have an implicit fall-through which assumes leaf-list value. Make
that assumption explicit, along with the requirement to have exactly one
item.

JIRA: NETCONF-1264
Change-Id: Iab5638ccf76a8471050411835d9dd80146d93b01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoEliminate ApiPathNormalizer.modelContext 61/111161/1
Robert Varga [Mon, 1 Apr 2024 20:14:37 +0000 (22:14 +0200)]
Eliminate ApiPathNormalizer.modelContext

The EffectiveModelContext is a DatabindContext-invariant, eliminate the
intermediate field and defer to DatabindContext.modelContext().

Change-Id: Ie3f7b5d37cd20c154758e0c58594e908bd418009
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoFix ApiPathNormalizer value handling 55/111155/3
Robert Varga [Mon, 1 Apr 2024 16:20:23 +0000 (18:20 +0200)]
Fix ApiPathNormalizer value handling

RESTCONF API resources' values are defined in terms of RFC7951, plus
perscent escapes. Percent-escaping for values is already handled by
ApiPathParser, hence we can just pass the values to the codec,
simplifying ApiPathNormalizer quite a bit.

JIRA: NETCONF-1264
Change-Id: Ie97dfbf2a156dd2441c71d6333527a9ddcb71834
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoDocument ApiPathNormalizer 58/111158/1
Robert Varga [Mon, 1 Apr 2024 17:15:18 +0000 (19:15 +0200)]
Document ApiPathNormalizer

Document and improve the ApiPathNormalizer contract, part one. We
document the intent and the contract, moving implementation records
to Path.{Data,Action,Rpc}.

Change-Id: Ic3eac676d94f1dff2b3a8a3d0ff5331239afce20
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoSimplify upgradeCodecFactory() 39/111139/2
Robert Varga [Thu, 28 Mar 2024 13:32:26 +0000 (14:32 +0100)]
Simplify upgradeCodecFactory()

The lamda we return here is a simple if-else return.

JIRA: NETCONF-1248
Change-Id: Ia772eba569ccf9c0559abfab086772dbf31dce1b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoFix transport-http dependency 38/111138/2
Robert Varga [Thu, 28 Mar 2024 13:31:31 +0000 (14:31 +0100)]
Fix transport-http dependency

We have a missing netty-handler dependency, eliciting a warning. Fix
that.

JIRA: NETCONF-1248
Change-Id: I8021408a56a22855b85c3417d010454058854e3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoShare codepath in ServerChannelInitializer 37/111137/2
Robert Varga [Thu, 28 Mar 2024 12:36:26 +0000 (13:36 +0100)]
Share codepath in ServerChannelInitializer

The failure path shares the same epilogue as the success path. Dispatch
to onSuccess() to share the actual code.

JIRA: NETCONF-1248
Change-Id: I34f9bf37e3652fab6a1a5691ceabedf4132b4124
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 weeks agoBump upstreams 53/111153/1
Robert Varga [Mon, 1 Apr 2024 08:24:01 +0000 (10:24 +0200)]
Bump upstreams

Adopt:
- controller-9.0.2
- aaa-0.19.3

Change-Id: I239feed92922e9616a3191ec910cdd24cbe3798f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoFix POST request with insert parameter 96/109196/14
Samuel Schneider [Thu, 7 Dec 2023 11:53:59 +0000 (12:53 +0100)]
Fix POST request with insert parameter

Fix the issue when Fix POST request with insert parameter
were incorrectly trying to add data to parent of the parent
element. POST requests inherently operate on parent resources
in the path.

Add tests for this behavior.

JIRA: NETCONF-1178
Change-Id: I4bf3218321cf3348b1ecef2f841899c3f7dbf1d6
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
7 weeks agoHTTP transport implementation 91/110191/20
Ruslan Kashapov [Thu, 8 Feb 2024 11:48:57 +0000 (13:48 +0200)]
HTTP transport implementation

HTTP Client and Server implementation using Netty's
HTTP codecs. Existing TCP and TLS transport layers are used
as underlay. HTTP/2 and Basic Authentication support provided.

JIRA: NETCONF-1248
Change-Id: If02446a24f174663ff497148bde436923f73c8a6
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 weeks agoKeystore Plaintext Storage API and Local File implementation 89/110389/14
Ruslan Kashapov [Tue, 20 Feb 2024 09:47:23 +0000 (11:47 +0200)]
Keystore Plaintext Storage API and Local File implementation

Data is being persisted into local file with AES-GCM-SIV encryption
using 16 or 32 byte key and dynamically generated nonce.

New feature artifact includes plaintext storage api, local file
storage implementation and karaf shell commands (cli) to access
and modify the data.

JIRA: NETCONF-1257
Change-Id: I841d255c4bcda5ecee7560b28330e568591f8833
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
7 weeks agoFix OpenAPI explorer redirection URL 65/111065/2
Yaroslav Lastivka [Tue, 26 Mar 2024 13:30:09 +0000 (15:30 +0200)]
Fix OpenAPI explorer redirection URL

Previously, the redirection path was incorrectly leading to
a non-existent URL, causing the OpenAPI explorer to fail to load.

The redirection path in getApiExplorer method has been updated
to reflect the correct URL structure.

JIRA: NETCONF-1281
Change-Id: I2eec3b841c00de324d59d24267281beb2025ddf0
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
7 weeks agoRemove json-unit-assertj dependency 09/111009/2
Ivan Hrasko [Mon, 25 Mar 2024 15:48:39 +0000 (16:48 +0100)]
Remove json-unit-assertj dependency

We are not using json-unit-assertj dependency.
Remove it.

Change-Id: I03eb652257098212e91245c0c0213c29085e9f61
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 weeks agoFix TCPServer javadoc 12/111012/1
Ivan Hrasko [Tue, 26 Mar 2024 07:37:52 +0000 (08:37 +0100)]
Fix TCPServer javadoc

Fix javadoc for TCPServer#listen method.

Change-Id: I485dc2a0833dd7409bc1d7f0050d3566178902dd
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 weeks agoFix topology-singleton Import-Packages 94/110994/1
Robert Varga [Fri, 22 Mar 2024 15:05:40 +0000 (16:05 +0100)]
Fix topology-singleton Import-Packages

javax.annotation is optional, hence it should be marked as such.

JIRA: NETCONF-1280
Change-Id: I9aff41421ab56b82844b57f817c28be23b3670e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoFix parsing of union values 86/110986/5
Robert Varga [Thu, 21 Mar 2024 14:11:17 +0000 (15:11 +0100)]
Fix parsing of union values

TypeDefinitionAwareCodec is no longer handling unions because it cannot
reliably do so -- because they may indirect through leafref, or end up
being a complex type.

Since we are already handling leafref, identityref and
instance-identifier correctly, complete the translation by adding
explicit handling for unions.

JIRA: NETCONF-1265
Change-Id: I88980ba18df8e52d3395d5f0bcf8b8ef0c187949
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoSplit up prepareValueByType() 85/110985/4
Robert Varga [Thu, 21 Mar 2024 13:49:47 +0000 (14:49 +0100)]
Split up prepareValueByType()

This method does some heavy lifting in an atomic unit. Split out
DataSchemaNode type checking and clarify leafref resolution.

JIRA: NETCONF-1265
Change-Id: I7be50b5692ea7f33af5444688fc462edb2b591ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoFix instance-identifier ApiPath normalization 65/110965/7
Robert Varga [Thu, 21 Mar 2024 11:05:26 +0000 (12:05 +0100)]
Fix instance-identifier ApiPath normalization

ApiPathInstanceIdentifierCodec is a distraction which should not be
used.

ApiPathNormalizer acts as a ApiPath->YangInstanceIdentifier conversion
utility and therefore can handle instance identifiers internally, by
parsing them into ApiPath and invoking normalizeDataPath().

JIRA: NETCONF-1265
Change-Id: If9dca1a8b7f14f64ed7cf3f704b2bd9356922ed0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoBump versions to 7.0.4-SNAPSHOT 81/110881/1
Robert Varga [Tue, 19 Mar 2024 23:59:26 +0000 (00:59 +0100)]
Bump versions to 7.0.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I406a944f630c9be6738586bfa576e0fe3afe6836
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRelease netconf v7.0.3
jenkins-releng [Tue, 19 Mar 2024 20:15:14 +0000 (20:15 +0000)]
Release netconf

8 weeks agoFixup YangLibraryContentBuilderUtil javadoc 66/110866/1
Robert Varga [Tue, 19 Mar 2024 12:05:44 +0000 (13:05 +0100)]
Fixup YangLibraryContentBuilderUtil javadoc

Clean up missing parameters and update wording a bit.

JIRA: NETCONF-1277
Change-Id: I2fadfb2ae8cd4dfe5ee7ce2702f7af96d2da959f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoAlways clean up modules-state 62/110862/2
Robert Varga [Tue, 19 Mar 2024 07:54:03 +0000 (08:54 +0100)]
Always clean up modules-state

Make sure we clean up module-state even when we are not writing it.

JIRA: NETCONF-1277
Change-Id: Ia65340f790f5ceefe8208f73df424f7d2f6f58d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoUse yanglib-mdsal-writer is a cluster-wide singleton 61/110861/2
Robert Varga [Tue, 19 Mar 2024 06:34:43 +0000 (07:34 +0100)]
Use yanglib-mdsal-writer is a cluster-wide singleton

Writing to ietf-yang-library could be a source of datastore conflicts in
a cluster. Make sure we register run the updates only on one of the
cluster nodes.

JIRA: NETCONF-1277
Change-Id: I4fa03ea01fd205cb8e48497db3c93f3b8c58218e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoUse transaction in YangLibraryWriter 57/110857/2
Robert Varga [Tue, 19 Mar 2024 06:21:58 +0000 (07:21 +0100)]
Use transaction in YangLibraryWriter

Rapid updates could see us issue concurrent transaction, which in turn
would fail. Improve the situation by maintaining a transaction chain.

JIRA: NETCONF-1277
Change-Id: Ib5d7b9344404a22665d5123e4c3a8d0f2bf5216a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoClean up yanglib-mdsal-writer dependencies 56/110856/2
Robert Varga [Tue, 19 Mar 2024 05:55:43 +0000 (06:55 +0100)]
Clean up yanglib-mdsal-writer dependencies

We have a ton of dependencies we do not mention, leading to a warning.
Fix them up and enable strict dependency enforcement.

JIRA: NETCONF-1277
Change-Id: Iadd97732a8e93683243300695ce857a863b71e9f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoFixup yanglib-mdsal-writer 52/110852/3
Robert Varga [Mon, 18 Mar 2024 15:10:59 +0000 (16:10 +0100)]
Fixup yanglib-mdsal-writer

yanglib-mdsal-writer does not write out module-state by default, which
our CSIT expects. We also should be friendly to RFC7895 clients and have
this content by default.

Furthermore the @Inject needs to be separated from @Activate, as we do
not have OSGi configuration in javax.inject world. Use a compatible
writeLegacy=true default and Optional for URL provider.

Moreover there is a bug where the initial update would not be written if
the listener is executed before registration is stored into the object
field. Fix that by using an explicit boolean to track the closed state.

Finally enable multiple Urls to be reported in the RFC8525 container.
For RFC7895 compatibility we pick the first Url in iteration order.

JIRA: NETCONF-1277
Change-Id: I8cbb2af5e4e7b8ec713126bad981fb5a38c4240f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoOptimize data merge decision 51/110851/2
Robert Varga [Mon, 18 Mar 2024 22:13:26 +0000 (23:13 +0100)]
Optimize data merge decision

We have duplicate checking for configData == null. Rework the logic to
have fewer comparisons.

Change-Id: I61e040e972a177e86d77506b76f35a3ac2133e64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRemove odl-yanglib 47/110847/1
Robert Varga [Mon, 18 Mar 2024 15:21:24 +0000 (16:21 +0100)]
Remove odl-yanglib

This is an experimental feature which is ill-designed and cannot
reasonably work -- causing needless warnings.

JIRA: NETCONF-1068
Change-Id: I31434ca00742f79a7c0c44f0414aa0b06f8926b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMigrate yanglib-mdsal-writer QNameModule method users 82/110782/3
Robert Varga [Sat, 16 Mar 2024 15:17:05 +0000 (16:17 +0100)]
Migrate yanglib-mdsal-writer QNameModule method users

We have an Optional-free QNameModule.revision() method, which makes
things a tad easier on the eyes.

Change-Id: Ie1c040d54e6ec51ad05ca337e50154c0865a98a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMigrate netconf-client-mdsal use of QNameModule.create() 14/110814/2
Robert Varga [Sun, 17 Mar 2024 17:52:30 +0000 (18:52 +0100)]
Migrate netconf-client-mdsal use of QNameModule.create()

Use simpler QNameModule.ofRevision() instead.

Change-Id: Ia272342b22adc889123d83af792e178659991a7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoEliminate NcmountRpcs 07/110807/8
Robert Varga [Sun, 17 Mar 2024 08:48:26 +0000 (09:48 +0100)]
Eliminate NcmountRpcs

There is no need for a dedicated class -- just integrate it into
EndtoendTestService, removing the use of ClassToInstanceMap in the
process of doing so.

Change-Id: I64b15c6ff55c5e389de990096f56c1cde61ec26c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoBump versions to 7.0.3-SNAPSHOT 27/110827/1
Robert Varga [Sun, 17 Mar 2024 22:03:19 +0000 (23:03 +0100)]
Bump versions to 7.0.3-SNAPSHOT

This starts the next deveopment iteration.

Change-Id: I56d3812afc885b46c498709ac037f6342503a620
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoRelease netconf v7.0.2
jenkins-releng [Sun, 17 Mar 2024 20:20:06 +0000 (20:20 +0000)]
Release netconf

8 weeks agoUse more modern QNameModule methods in restconf-nb 83/110783/3
Robert Varga [Sat, 16 Mar 2024 15:27:50 +0000 (16:27 +0100)]
Use more modern QNameModule methods in restconf-nb

We can use better methods to express what we really need. Migrate over.

Change-Id: Ic3eea4484800468e331d30127671675a68834013
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoMigrate Builders references 09/110809/3
Robert Varga [Sun, 17 Mar 2024 08:58:35 +0000 (09:58 +0100)]
Migrate Builders references

We have a few easy-to-migrate references to Builders, replace them with
ImmutableNodes.

Change-Id: I2087f816f35c9861aebbd5c39ff82df0df355a4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
8 weeks agoApplication Protocol Negotiation support for TLS 97/110397/5
Ruslan Kashapov [Thu, 29 Feb 2024 06:40:48 +0000 (08:40 +0200)]
Application Protocol Negotiation support for TLS

HTTP/2 client and server require APN configured when
communicating over TLS transport

JIRA: NETCONF-1248
Change-Id: Ideada66d6528f6ecd4407c63b63d5db1cc8ec505
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoModernize netconf-topology 08/110808/3
Robert Varga [Sun, 17 Mar 2024 08:54:34 +0000 (09:54 +0100)]
Modernize netconf-topology

We have a better way of registering RPCs, use that instead of
ClassToInstanceMap. Also migrate an ImmutableNodes reference.

Change-Id: Ifac89c697e6a984af2f1edd240194cb55bf3b695
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoMigrate keystore-legacy RPC registration 06/110806/2
Robert Varga [Sun, 17 Mar 2024 08:41:26 +0000 (09:41 +0100)]
Migrate keystore-legacy RPC registration

We have an improved registerRpcImplementations(), use that to cut down
on ceremony.

Change-Id: Ib1b4278b422dc2ec8cdf676db2598f033b321ce1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFactor out MdsalDatabindProvider 05/110805/2
Robert Varga [Sun, 17 Mar 2024 08:06:34 +0000 (09:06 +0100)]
Factor out MdsalDatabindProvider

RpcImplementations require an instance of DatabindProvider, which is
provided by MdsalRestconfServer, which in turn takes RpcImplementations.
This leads to circular dependency during component activation.

Break this cycle by introducing MdsalDatabindProvider, which acts as a
common intermediary and update the component wiring accordingly.

JIRA: NETCONF-1236
Change-Id: Iec6e8dba67785b920274825d70c2a7171edef6e2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoImprove NetconfNodeHandlerTest 16/110516/5
Ivan Hrasko [Thu, 7 Mar 2024 09:15:23 +0000 (10:15 +0100)]
Improve NetconfNodeHandlerTest

Improve code style and add more precise asserts.

JIRA: NETCONF-1250
Change-Id: I101e1147fbdd0f12c4645ecdf8c0197164c4cccc
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoBump upstreams 81/110781/2
Robert Varga [Sat, 16 Mar 2024 15:05:32 +0000 (16:05 +0100)]
Bump upstreams

Adopt:
- odlparent-13.0.11
- infrautils-6.0.6
- yangtools-13.0.2
- mdsal-13.0.1
- controller-9.0.1
- aaa-0.19.2

Change-Id: I8e755e313ab0a69a1c25e776d5daefbd4d0a8320
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoEnsure successful registration of SubscribeDeviceNotificationRpc 36/110736/5
Yaroslav Lastivka [Thu, 14 Mar 2024 15:30:29 +0000 (17:30 +0200)]
Ensure successful registration of SubscribeDeviceNotificationRpc

Added service attribute to the @Component annotation within
SubscribeDeviceNotificationRpc implementation of
the RpcImplementation interface.
This addition ensures these class is successfully
registered within MdsalRestconfServer.

JIRA: NETCONF-1236
Change-Id: I5da8ebe9b5085195d718f833b6cbd79cb33ba867
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
2 months agoDocument RESTCONF base path configuration 78/110278/5
Samuel Schneider [Wed, 21 Feb 2024 16:23:56 +0000 (17:23 +0100)]
Document RESTCONF base path configuration

Add new configuration field "restconf" introduced by NETCONF-1218
to the documentation of restconf northbound configuration.

JIRA: NETCONF-1231
Change-Id: I8382182a0009a5de1ce5556734b81eb4b1232060
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoSmall refactor of NetconfRestconfStrategy class 34/110734/1
Ivan Hrasko [Thu, 14 Mar 2024 13:28:56 +0000 (14:28 +0100)]
Small refactor of NetconfRestconfStrategy class

Make small refactoring changes in NetconfRestconfStrategy class:
- NetconfFieldsTranslator.translate return type is NonNull thus 'tmp'
cannot be null, remove null check
- fix javadoc parameters and typos
- use diamond operator where possible

Change-Id: I6efc489d8e5a8352d0c2867ea4937d1df7829876
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoFix callhome device "DISCONNECTED" status 37/110637/3
Oleksandr Zharov [Mon, 11 Mar 2024 15:58:51 +0000 (16:58 +0100)]
Fix callhome device "DISCONNECTED" status

Fixed error when callhome device always has status "DISCONNECTED"
after adding it to allowed devices. This issue arose after refactoring
AuthorizedKeysDecoder class to use plain KeyStore access to acquire
provides. New code did not specify what exact provider we want to use
and thus caused confusion - instead of Bouncy Castle KeyFactory that
was used before new code returned Sun KeyFactory. That result in next
issue with searching for valid host key when adding new device and
all other errors that described in logs attached to Jira ticket.

JIRA: NETCONF-1249
Change-Id: I5689fa6ad173a5b7cd99f0210a366b77db74b0d5
Signed-off-by: Oleksandr Zharov <oleksandr.zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoOpenAPI: Add test for inner action schema 07/110407/12
lubos-cicut [Thu, 29 Feb 2024 21:31:49 +0000 (22:31 +0100)]
OpenAPI: Add test for inner action schema

Add test case to verify that schema for action which is nested
inside multiple containers is correctly referenced.

JIRA: NETCONF-1259
Change-Id: I98266506f24354cf3a3fb764bfee8d7ee6c74393
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenAPI: netopeer2 wrong schemas for actions 04/110404/14
lubos-cicut [Thu, 29 Feb 2024 14:32:28 +0000 (15:32 +0100)]
OpenAPI: netopeer2 wrong schemas for actions

Schemas for actions weren't generated correctly. There were
missing parent node name. In path ref if action was nested in more
containers were missing all parent nodes.

Edit of expected documents was necessary due to changes.

JIRA: NETCONF-1259
Change-Id: I0cf4769122ab00e62687ec01399d5de1b3bb3baf
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoOpenAPI: netopeer2 duplicated mapping key test 06/110406/4
lubos-cicut [Thu, 29 Feb 2024 21:35:56 +0000 (22:35 +0100)]
OpenAPI: netopeer2 duplicated mapping key test

Tests if schema with same name has picked expected discriminator.

JIRA: NETCONF-1254
Change-Id: Ib741a9096ef52ab5c066a52aecb398c745628eab
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoOpenAPI: netopeer2 duplicated mapping key 62/110262/7
lubos-cicut [Mon, 19 Feb 2024 10:24:21 +0000 (11:24 +0100)]
OpenAPI: netopeer2 duplicated mapping key

When we load netopeer2 modules, OpenAPI in browser returns duplicated
mapping key error. This change add discriminator to schemas which are
duplicated.

JIRA: NETCONF-1254
Change-Id: Ieaa5913bcf56cddbee0dcb2df9ad17cb1af078bd
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
2 months agoBump json to version 20240303 49/110549/1
Ivan Hrasko [Thu, 7 Mar 2024 16:00:50 +0000 (17:00 +0100)]
Bump json to version 20240303

https://github.com/stleary/JSON-java/releases/tag/20240303
https://github.com/stleary/JSON-java/releases/tag/20240205
https://github.com/stleary/JSON-java/releases/tag/20231013

Change-Id: I44b916a971e5ea8aab3c13c03ce248fb1fe4e07f
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 months agoFix RTD configuration 40/110540/1
Robert Varga [Thu, 7 Mar 2024 14:25:02 +0000 (15:25 +0100)]
Fix RTD configuration

We need more configuration, make sure this matches other projects.

Change-Id: I86fc9fa7c96133ffd9a23f498d4b870458f1c734
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoFix rtd build 21/110521/1
Robert Varga [Thu, 7 Mar 2024 12:17:04 +0000 (13:17 +0100)]
Fix rtd build

build.os is a required variable, otherwise the build is failing.

Change-Id: I8e94c93ce6948618b136523bb692b98806ff46e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoDo not use ISE in XmlNormalizedNodeBodyWriter 12/110512/1
Robert Varga [Thu, 7 Mar 2024 05:13:03 +0000 (06:13 +0100)]
Do not use ISE in XmlNormalizedNodeBodyWriter

We can safely throw IOException, so prefer that to throwing and
unchecked IllegalStateException.

Change-Id: Ib57512055a7a2698db5a568b8856ac5010d52f91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoThrow correct exception when keypair is not found 86/110486/4
Samuel Schneider [Wed, 6 Mar 2024 08:28:22 +0000 (09:28 +0100)]
Throw correct exception when keypair is not found

Throw UnsupportedConfigurationException when no keypair found
with given keyId. So the failure is handled properly.

JIRA: NETCONF-1250
Change-Id: I63b1f73b4c2bc13daf09507ace852ec49f9176c2
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
2 months agoBump versions to 7.0.2-SNAPSHOT 96/110496/1
Robert Varga [Wed, 6 Mar 2024 15:19:45 +0000 (16:19 +0100)]
Bump versions to 7.0.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I46124371b6e85c6e742ca585eb756ec09d68b17d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 months agoRelease netconf v7.0.1
jenkins-releng [Wed, 6 Mar 2024 13:43:15 +0000 (13:43 +0000)]
Release netconf

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

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

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

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

Add missing return statements and improve tests to cover these.

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

Use DOMDataTreeIdentifier.of() instead.

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

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

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

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

This starts the next development iteration.

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

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

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

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

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

All ODL adjustments perserved.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

We are using rfc8341 model, declare that fact.

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

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

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

Pull in JDT annotations.

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

Use JDT annotations and do not pull in JUnit itself.

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

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

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

Adjust dependencies to eliminate most of the reported warnings.

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

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

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

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

Migrate to using ImmutableNodes' methods instead.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This method is only used internally, reduce its visibility.

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

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

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

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

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

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

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

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

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

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