netconf.git
17 months agoFix retrieving operations resource 69/103969/36
Yaroslav Lastivka [Tue, 10 Jan 2023 09:39:21 +0000 (11:39 +0200)]
Fix retrieving operations resource

Fix retrieving operations resource from controller and mount points
by adapting getOperationsJSON/XML to accept identifiers and enhancing
its functionality with ability to match exact operation.

This way we enhance solution proposed by NETCONF-822 to cover
all use cases and avoid error 500.

JIRA: NETCONF-928
JIRA: NETCONF-929
Change-Id: Ic8f0ca5b07e060d36747a110f9049d3d9a2b96c8
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
17 months agoFix netconf README 21/106121/4
OleksandrZharov [Mon, 22 May 2023 13:56:55 +0000 (15:56 +0200)]
Fix netconf README

Fixed links and typos in netconf README.

JIRA: NETCONF-1035
Change-Id: I3de42dbcad4c0f73b7ded895e0d650e6fef5f6c0
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoAdd unit test for request parameters 96/105896/18
OleksandrZharov [Fri, 12 May 2023 09:21:41 +0000 (11:21 +0200)]
Add unit test for request parameters

Added unit test that checks for correct amount of parameters in
requests.

JIRA: NETCONF-1023
Change-Id: I9a448173c5d066ff019cf6b3d07b720d75a73e40
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoUpdate ParameterAwareNormalizedNodeWriter 99/106099/7
Robert Varga [Sun, 21 May 2023 13:05:36 +0000 (15:05 +0200)]
Update ParameterAwareNormalizedNodeWriter

Three distinct changes are being made here:

- use instanceof patterns to remove explicit casts
- reduce instanceof() checks by taking into account ordering
- eliminate childSizeHint() and use directly-exposed size()

Change-Id: If0ffaf9c34575ed4d7fef3a5a7c0dc13ce6ba687
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoDo not use mocks in NodeWriterFields tests 11/106111/6
Robert Varga [Mon, 22 May 2023 06:49:07 +0000 (08:49 +0200)]
Do not use mocks in NodeWriterFields tests

Use Builders to create fully functional test objects instead of mocking
internals.

Change-Id: I7c287e174f5afbbc7395514bf146f33edcd1b0ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoGet rid of JsonUtil#copy 73/105873/8
Ivan Hrasko [Wed, 10 May 2023 10:35:30 +0000 (12:35 +0200)]
Get rid of JsonUtil#copy

We can use ArrayNode#addAll method instead of JsonUtil#copy.

This means we no more need JsonUtil class.

JIRA: NETCONF-1023
Change-Id: Ia6bbca83c4e5f0b11740d8dff627f41135b29077
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoBump SSHD to 2.10.0 49/105949/4
Robert Varga [Mon, 15 May 2023 11:13:51 +0000 (13:13 +0200)]
Bump SSHD to 2.10.0

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

Change-Id: I173b317909ece001843cab8cce269cc02f758a5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoRemove NetconfUtil.newWriter() 36/105736/3
Robert Varga [Fri, 28 Apr 2023 13:35:46 +0000 (15:35 +0200)]
Remove NetconfUtil.newWriter()

This is a internal utility method which is no longer needed, as YANG
tools correctly handles null path.

Change-Id: Id7e7754f33fe76eb2a68eb0a78cbe54b67594f6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoRework README to markdown 67/106067/3
OleksandrZharov [Fri, 19 May 2023 16:12:09 +0000 (18:12 +0200)]
Rework README to markdown

.rst files are not parsed by GitHub thus for correct display
of our README we should translate it into .md format.

JIRA: NETCONF-1035
Change-Id: I0416dbd4ca22bd66a490a486c48f223cfe499a91
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoAdd odl-yanglib into experimental features 97/105897/8
Šimon Ukuš [Fri, 12 May 2023 09:37:30 +0000 (11:37 +0200)]
Add odl-yanglib into experimental features

During reorganizing of netconf features we have lost odl-yanglib
feature.

Create features-netconf-experimental which installs odl-yanglib.

JIRA: NETCONF-1028
Change-Id: I8f9ecb9d498d04d7edbb2d8c75ddebbcbf6ab371
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRemove "Generex" dependency 73/104973/26
Yaroslav Lastivka [Tue, 21 Mar 2023 12:39:19 +0000 (14:39 +0200)]
Remove "Generex" dependency

Removed "Generex" and replaced with direct usage of "Automaton"
to generate random strings as "Genegex" seems to be no longer
actively developed project.

In fact the previous logic to generate example strings was broken.
We have fixed it by using RegularExpressionString instead of
JavaPatternString.

Now we have the same examples generated every run which helps us
to write better tests with assertions.

JIRA: NETCONF-980
Change-Id: I52e6d9d1a0f0cf43eb17b99309d9101c32d75a42
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRename restconf bundles 30/106030/2
Ivan Hrasko [Thu, 18 May 2023 10:41:28 +0000 (12:41 +0200)]
Rename restconf bundles

Rename restconf bundles to get rid of MD SAL mention and reflect
actual state of codebase (Rest Api Doc -> openapi).

JIRA: NETCONF-1034
Change-Id: If8a150f9f67f94b3b6641f9c651904e5b8f9c84a
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoOpenAPI: Eliminate JsonUtil#addFields method 21/106021/3
OleksandrZharov [Tue, 16 May 2023 10:30:38 +0000 (12:30 +0200)]
OpenAPI: Eliminate JsonUtil#addFields method

JsonUtil#addFields method is no more used.
addFields method was removed.

JIRA: NETCONF-1025
Change-Id: Ia95cb0aaa9273f6735f59f000005f5b4fd789b69
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRename convertToJsonSchema method 32/106032/6
Ivan Hrasko [Thu, 18 May 2023 13:13:27 +0000 (15:13 +0200)]
Rename convertToJsonSchema method

We are no more returning JSON ObjectNode but Map of Schema.
Rename method accordingly.

JIRA: NETCONF-1024
Change-Id: Ib1d03f2be463c754a0eda2564b50162a9eb9ab45
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoUse Java Schema object instead of JsonNode 89/105989/12
OleksandrZharov [Tue, 16 May 2023 10:30:38 +0000 (12:30 +0200)]
Use Java Schema object instead of JsonNode

Created Schema.java object and replaced ObjectNode schemas inside
Components class with Map<String, Schema>. This allowed us remove
JsonUtil#addFields method which is addressed by another issue.

JIRA: NETCONF-1024
Change-Id: I13477fae13298b782df4af6e100fe9f807b331bd
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRemove unused "resourcePath" parameter 34/106034/2
Ivan Hrasko [Thu, 18 May 2023 13:21:52 +0000 (15:21 +0200)]
Remove unused "resourcePath" parameter

This parameter is not used. Remove it.

Change-Id: I4fa8799b98a8ba1c7906a24fb8c098d06511baf6
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRename odl-mdsal-apidocs feature to odl-restconf-openapi 90/105990/3
Yaroslav Lastivka [Tue, 16 May 2023 13:35:57 +0000 (16:35 +0300)]
Rename odl-mdsal-apidocs feature to odl-restconf-openapi

Accordingly to renaming implementation of OpenApi to restconf-openapi,
odl-mdsal-apidocs was renamed to odl-restconf-openapi.

JIRA: NETCONF-1029
Change-Id: If6bf59644b5e4334513b8ad6f28deffbbf351776
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
17 months agoOpenAPI: Avoid null values in JSON 18/105918/6
Yaroslav Lastivka [Fri, 12 May 2023 08:54:49 +0000 (11:54 +0300)]
OpenAPI: Avoid null values in JSON

The resulted JSON from Restconf openapi endpoints
contain null values for unset fields.

Jackson annotations were aded to ignore null fields.

JIRA: NETCONF-1027
Change-Id: Ia56790b951ba8db649c0bcb0ce688071de70fac7
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoMove openapi test utilities 10/106010/1
Ivan Hrasko [Wed, 17 May 2023 10:35:21 +0000 (12:35 +0200)]
Move openapi test utilities

AbstractOpenApiTest and DocGenTestHelper are meant to be
in org.opendaylight.restconf.openapi package.

We have accidentally changed their position. Fix it now accordingly.

JIRA: NETCONF-1011
Change-Id: I2c1ed7282642e430af24fa1a57345f6bc31dd734
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.util 70/105870/8
OleksandrZharov [Tue, 9 May 2023 13:34:35 +0000 (15:34 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.util

Renamed package org.opendaylight.netconf.sal.rest.doc.util to
org.opendaylight.restconf.openapi.util.

JIRA: NETCONF-1011
Change-Id: Ia75829170a18bb0eda0e42bc28779dd96fb7eb17
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.openapi 69/105869/5
OleksandrZharov [Tue, 9 May 2023 13:18:47 +0000 (15:18 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.openapi

Renamed package org.opendaylight.netconf.sal.rest.doc.openapi to
org.opendaylight.restconf.openapi.model.

Renamed openapi package to model because openapi is now a module
name and we are expressing that we are storing here Java classes
that are used to model OpenAPi objects.

JIRA: NETCONF-1011
Change-Id: I1324f1858ee424b354e5f04b758edb19c801b74a
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.mountpoints 66/105866/6
OleksandrZharov [Tue, 9 May 2023 12:30:32 +0000 (14:30 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.mountpoints

Renamed package org.opendaylight.netconf.sal.rest.doc.mountpoints to
org.opendaylight.restconf.openapi.mountpoints.

JIRA: NETCONF-1011
Change-Id: I4f359419c7297eb2e7f561a3266e043699b1db68
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.model.builder 65/105865/5
OleksandrZharov [Tue, 9 May 2023 12:25:06 +0000 (14:25 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.model.builder

Renamed package org.opendaylight.netconf.sal.rest.doc.model.builder to
org.opendaylight.restconf.openapi.model.builder.

JIRA: NETCONF-1011
Change-Id: I97075d87129996114e75cf7c150ff5e854e00cb9
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.jaxrs 64/105864/6
OleksandrZharov [Tue, 9 May 2023 10:42:24 +0000 (12:42 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.jaxrs

Renamed package org.opendaylight.netconf.sal.rest.doc.jaxrs to
org.opendaylight.restconf.openapi.jaxrs.

JIRA: NETCONF-1011
Change-Id: I0e70e36a0bdacb7efeb8458ae3172767260f190e
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.impl 63/105863/6
OleksandrZharov [Tue, 9 May 2023 10:59:13 +0000 (12:59 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.impl

Renamed package org.opendaylight.netconf.sal.rest.doc.impl to
org.opendaylight.restconf.openapi.impl.

JIRA: NETCONF-1011
Change-Id: I0f0fef987a5150903e1cee3f508960e89f7ef120
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoRefactor org.opendaylight.netconf.sal.rest.doc.api 62/105862/8
OleksandrZharov [Tue, 9 May 2023 10:42:24 +0000 (12:42 +0200)]
Refactor org.opendaylight.netconf.sal.rest.doc.api

Renamed package org.opendaylight.netconf.sal.rest.doc.api to
org.opendaylight.restconf.openapi.api.

JIRA: NETCONF-1011
Change-Id: I681caea35a57e02f445713adf27084fb0c142305
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoChange artifactId in sal-rest-docgen 61/105861/6
OleksandrZharov [Tue, 9 May 2023 10:24:36 +0000 (12:24 +0200)]
Change artifactId in sal-rest-docgen

Changed artifactId in sal-rest-docgen pom.xml to be restconf-openapi
and renamed folder accordingly.

JIRA: NETCONF-1011
Change-Id: I7c628396319da6cc2fb4ae5e93c827b39608c39a
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoRename *ApiDoc* classess to *OpenApi* classes 30/105830/8
OleksandrZharov [Thu, 4 May 2023 17:26:21 +0000 (19:26 +0200)]
Rename *ApiDoc* classess to *OpenApi* classes

Rename all classes and methods in sal-rest-docgen which have
*ApiDoc* in their name to *OpenApi* instead.

JIRA: NETCONF-1012
Change-Id: I46779d465885d6e8411f8405d10fbf3505efbfde
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoDo not create OpenApiObject twice 21/105821/10
Peter Suna [Wed, 3 May 2023 14:29:30 +0000 (16:29 +0200)]
Do not create OpenApiObject twice

Refactor the getMountPointApi method to prevent the creation
of two OpenApiObject instances. Currently,
this duplication occurs because the method is responsible for both
creating the required paths and generating the OpenApiObject.

To improve the code, separate these two functions and use only
the method that creates the data-store paths. This change will make
the code cleaner and more efficient, and help to avoid any potential
issues caused by duplicate objects.

JIRA: NETCONF-1007
Change-Id: I5ff38b706ce34c270f43fd4cf00a98efcbdaf888
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoImprove MountPointOpenApiTest 26/105726/19
OleksandrZharov [Thu, 23 Mar 2023 12:45:50 +0000 (13:45 +0100)]
Improve MountPointOpenApiTest

In previous patch there was case when despite successful build
swagger failed to load device. Improved corresponding unit test
to cover blindspot in tests.

JIRA: NETCONF-997
Change-Id: Ie38319f83ac83c1e9ac1dd64a557b129941a4e23
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
17 months agoUse Java Path object instead of JsonNode 62/105462/18
OleksandrZharov [Thu, 23 Mar 2023 12:45:50 +0000 (13:45 +0100)]
Use Java Path object instead of JsonNode

Path object is well described in OpenApi specification.
Thus we can model it using Java.

JIRA: NETCONF-997
Change-Id: Idc6c40a386fdd4124aa79d1f0e8b316d2a247304
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoClean-up sal-rest-docgen test classes 27/105827/9
OleksandrZharov [Thu, 4 May 2023 16:10:48 +0000 (18:10 +0200)]
Clean-up sal-rest-docgen test classes

Moved test classes to according packages so now they have same name
as tested classes.

JIRA: NETCONF-1013
Change-Id: I50571453da52bff901801a454709171d8b9f0c7c
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoRename SwaggerObjectTest 59/105859/3
OleksandrZharov [Tue, 9 May 2023 09:07:52 +0000 (11:07 +0200)]
Rename SwaggerObjectTest

For some reason we missed out on renaming SwaggerObjectTest
during NETCONF-984. Renamed this class here.

JIRA: NETCONF-984
Change-Id: I82ab9ff279b3ec8864c91feab8be383182cb0c81
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
17 months agoOpenAPI: Add possibility to change base path 68/105868/2
Ivan Hrasko [Tue, 9 May 2023 13:24:02 +0000 (15:24 +0200)]
OpenAPI: Add possibility to change base path

Create new constructor that enables users to configure
OpenAPI base path.

JIRA: NETCONF-1020
Change-Id: I5507a46cca9da24d274d40b6f679da532bbf4a5c
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
18 months agoAdd netconf.api.NamespaceURN 50/105850/1
Robert Varga [Sat, 6 May 2023 10:44:17 +0000 (12:44 +0200)]
Add netconf.api.NamespaceURN

XmlNetconfConstants is a huge constant holder, with very baroque names
for namespaces. Split out NamespaceURN, which holds these namespaces in
the same way CapabilityURN holds capability namespaces.

JIRA: NETCONF-1019
Change-Id: Iae8cd44438fac353877e282a0de451b095dd35e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoAdd netconf.api.CapabilityURN 48/105848/7
Robert Varga [Fri, 5 May 2023 21:18:56 +0000 (23:18 +0200)]
Add netconf.api.CapabilityURN

We have NETCONF capability strings strewn all over the codebase, in
various forms and at various layers. Centralize the definitions based
on the current contents of the IANA registry (plus the EXI part, which
is just proposed).

Centralize the use of the constants, eliminating a number of
XmlNetconfConstants, i.e. disconnecting code from the XML encoding to a
certain extent.

JIRA: NETCONF-1017
Change-Id: Id03708c24d48fd65547f294827d8c15d9d7dd6e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoFix notification namespace reference 49/105849/4
Robert Varga [Fri, 5 May 2023 23:04:19 +0000 (01:04 +0200)]
Fix notification namespace reference

The code is getting confused here -- it is using the capability URN
instead of namespace URN. Introduce constant to fix that up.

This also fixes the obviously wrong test cases introduced as part of
Ieae248057d890071c6ac5b05b22f1a05a0a98b0c.

JIRA: NETCONF-1018
Change-Id: I4976c24c2e16f11823a64a0ca152ca144d3557a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove netconf.api.capability to netconf.server.api.monitoring 47/105847/3
Robert Varga [Fri, 5 May 2023 20:38:15 +0000 (22:38 +0200)]
Move netconf.api.capability to netconf.server.api.monitoring

Having capabilities in the baseline package is confusing, as they are
only used on the server side. While performing the move, refactor
YangModuleCapability to not require yang-model-api and adjust callers
accordingly.

This allows us to remove odl-yangtools-parser-api from
odl-netconf-api's dependencies, restoring dependency sanity.

JIRA: NETCONF-1016
Change-Id: I081e4b7ffad3e5863863e9353969634a42dc133f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoClean up netconf-client-mdsal dependencies 45/105845/1
Robert Varga [Thu, 4 May 2023 22:23:11 +0000 (00:23 +0200)]
Clean up netconf-client-mdsal dependencies

Fix warnings reported by declaring all used dependencies.

Change-Id: I46fe2fc676b066148dc2cc0ba6e73b6286bcb38c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename netconf.sal.connect.netconf.sal 44/105844/1
Robert Varga [Thu, 4 May 2023 21:36:31 +0000 (23:36 +0200)]
Rename netconf.sal.connect.netconf.sal

Use netconf.client.mdsal.spi as a stop-gap until we figure out where to
move things around -- which will require a completely separate pass over
the integrations.

JIRA: NETCONF-1006
Change-Id: I8447f8b8e83d8cc9934c6b46774554a39caaf97c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoClean up use of constants 43/105843/2
Robert Varga [Thu, 4 May 2023 21:24:02 +0000 (23:24 +0200)]
Clean up use of constants

We have the names in XmlNetconfContants, use them from there.

JIRA: NETCONF-1006
Change-Id: Ib826f3ef4fdd32d5bb066fcd5c3e8451351c23e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate netconf.sal.connect.netconf.listener 42/105842/1
Robert Varga [Thu, 4 May 2023 21:18:48 +0000 (23:18 +0200)]
Eliminate netconf.sal.connect.netconf.listener

Integrate this package in netconf.client.mdsal, reducing package
tangles.

JIRA: NETCONF-1006
Change-Id: I12cbafd1bf441d571623c65599023407c5ec72c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate NetconfMessageTransformUtil.MESSAGE_ID_ATTR 41/105841/2
Robert Varga [Thu, 4 May 2023 21:14:46 +0000 (23:14 +0200)]
Eliminate NetconfMessageTransformUtil.MESSAGE_ID_ATTR

We have this constant defined in XmlNetconfConstants, eliminate it.

JIRA: NETCONF-1006
Change-Id: I3212f3c7cdf9d12e44bbc2471c0e309c88573f4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate NetconfMessageTransformUtil.checkValidReply() 40/105840/2
Robert Varga [Thu, 4 May 2023 21:02:42 +0000 (23:02 +0200)]
Eliminate NetconfMessageTransformUtil.checkValidReply()

This is method is used only by a single caller -- inline it, eliminating
a try/catch block and reducing verbosity.

JIRA: NETCONF-1006
Change-Id: Ie2193156c1d1ab65b577ac261fc401ed52256d17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate NetconfMessageTransformUtil.checkSuccessReply() 38/105838/2
Robert Varga [Thu, 4 May 2023 20:53:43 +0000 (22:53 +0200)]
Eliminate NetconfMessageTransformUtil.checkSuccessReply()

We have a single caller, who is actually decoding the exception, without
having to remap it. Inline the logic and ditch use of
NetconfDocumentedException, which is a useless wrapper.

JIRA: NETCONF-1006
Change-Id: I600230adbadfa6fbb7d7df8503e47b387147607c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoDo not use FluentFutures needlessly 39/105839/1
Robert Varga [Thu, 4 May 2023 20:55:43 +0000 (22:55 +0200)]
Do not use FluentFutures needlessly

Use Futures, as we only return a ListenableFuture, cutting the
dependencies a bit.

JIRA: NETCONF-1006
Change-Id: I2b6a3be9335a7d8a0fec2a25b8d36bb0737e4c3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove toRpcError/toRpcResult() 37/105837/1
Robert Varga [Thu, 4 May 2023 20:45:40 +0000 (22:45 +0200)]
Move toRpcError/toRpcResult()

These two methods are only used in NetconfDeviceCommunicator, move then
there to reduce the tangle that is NetconfMessageTransformUtil.

JIRA: NETCONF-1006
Change-Id: Idd484ae56e18ebf0255e2a942a5846a49c34f63c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove NetconfDeviceCapabilities 36/105836/1
Robert Varga [Thu, 4 May 2023 20:35:11 +0000 (22:35 +0200)]
Move NetconfDeviceCapabilities

This is an immutable DTO referenced by
netconf.client.mdsal.NetconfDevice -- co-locate the two for better
ergonomics.

JIRA: NETCONF-1006
Change-Id: I50926c8a0857b19b22b6a51d22c0739bc0e48925
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove NetconfSessionPreferences 35/105835/2
Robert Varga [Thu, 4 May 2023 20:29:53 +0000 (22:29 +0200)]
Move NetconfSessionPreferences

This is a well-known API contract, which is actually an immutable DTO.
Move it to netconf.client.mdsal.api, so it can be readily found.

JIRA: NETCONF-1006
Change-Id: Ia588cfb3479f6631be913c0791017100457cf0be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove sal.connect.netconf.util 34/105834/1
Robert Varga [Thu, 4 May 2023 20:12:52 +0000 (22:12 +0200)]
Remove sal.connect.netconf.util

All these classes are an implementation-internal thing, move them away
from util package, so they are not directly reachable.

JIRA: NETCONF-1006
Change-Id: Ib50cecd6d247b91e3404b29f5fbe0a6c76f25f8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove netconf.sal.connect.util 33/105833/2
Robert Varga [Thu, 4 May 2023 20:06:04 +0000 (22:06 +0200)]
Remove netconf.sal.connect.util

Move MessageCounter into client.mdsal.impl, where it is properly hidden
at least in OSGi and clean it up.

JIRA: NETCONF-1006
Change-Id: I48e8e1fe78b4ff46a8ee88111435d546e3c84575
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoHide SslHandlerFactorImpl 32/105832/1
Robert Varga [Thu, 4 May 2023 19:18:16 +0000 (21:18 +0200)]
Hide SslHandlerFactorImpl

We go through quite some hoops only to instantiate a SslHandlerFactory.
Rather that exposing the implementation directly, hide it behind a
specific interface, which allows us to optimize the dispatch and share
the actual factory instances.

JIRA: NETCONF-1006
Change-Id: I111e3af5d96f238899e0618cfbf4017b2f8554b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSplit up NetconfKeystoreAdapter 29/105829/2
Robert Varga [Thu, 4 May 2023 16:42:46 +0000 (18:42 +0200)]
Split up NetconfKeystoreAdapter

We have conflated interfaces for constructing KeyStores and looking up
KeyCredential objects. Split these two up, so they can be evolved
separately. This turns CredentialProvider into a very simple class.

JIRA: NETCONF-1006
Change-Id: I600ce21ccceb46ec3e2d5e3b1ccf7fd5022fd2f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoOptimize DefaultNetconfKeystoreAdapter 28/105828/2
Robert Varga [Thu, 4 May 2023 14:11:46 +0000 (16:11 +0200)]
Optimize DefaultNetconfKeystoreAdapter

Use an intermediate utility class to hold our interactions with
java.security. This allows us to cache factories for reuse if we hit
them multiple times.

Also clean up use of intermediate collections, so that the code is quite
straightforward.

JIRA: NETCONF-1010
Change-Id: Ibee1399333b90bf55c390a1b36ebc944068de711
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSslHandlerFactory.createSslHandler() is a default method 31/105831/1
Robert Varga [Thu, 4 May 2023 18:48:09 +0000 (20:48 +0200)]
SslHandlerFactory.createSslHandler() is a default method

Provide a simple common implementantion, as that is what we end up doing
anyway.

Change-Id: I24c7b29d68402b60daa0d4569d210ed3491bbc21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove locking from DefaultNetconfKeystoreAdapter 24/105824/5
Robert Varga [Wed, 3 May 2023 20:24:13 +0000 (22:24 +0200)]
Remove locking from DefaultNetconfKeystoreAdapter

Encapsulate state into State and perform atomic updates when the
datastore contents changes. Also mark more bits and pieces for
improvement.

JIRA: NETCONF-1010
Change-Id: I98d8b1a10ccbd2c4ced7e7d1a8c9d8381b5bb258
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRefactor NetconfKeystoreAdapter 19/105819/7
Robert Varga [Wed, 3 May 2023 17:37:15 +0000 (19:37 +0200)]
Refactor NetconfKeystoreAdapter

NetconfKeystoreAdapter is being instantiated all over the place, whereas
this really should be a singleton service. Factor out the common API and
provide it as an on-demand service, which is injected into all users.

JIRA: NETCONF-1006
Change-Id: Ib532c130d26fcc68796d401239da7b8e57b39382
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate convertToServers method 26/105826/3
OleksandrZharov [Thu, 4 May 2023 12:30:10 +0000 (14:30 +0200)]
Eliminate convertToServers method

Removed BaseYangOpenApiGenerator#convertToServers because
is used only once and what is does is useless.

JIRA: NETCONF-1009
Change-Id: Iba105501f42aa0d7642e4d3ffd71d912ff8d9c12
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
18 months agoGet rid of ImmutableList.of in sal-rest-docgen 25/105825/2
OleksandrZharov [Thu, 4 May 2023 10:04:31 +0000 (12:04 +0200)]
Get rid of ImmutableList.of in sal-rest-docgen

Replaced guava’s ImmutableList.of with java’s List.of
in sal-rest-docgen package.

JIRA: NETCONF-1008
Change-Id: Iefa7a20432fbbabda8d67e2166f658bacfe75eb8
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
18 months agoAdd missing slf4j-api dependency to testtool 23/105823/2
Peter Suna [Thu, 4 May 2023 08:23:37 +0000 (10:23 +0200)]
Add missing slf4j-api dependency to testtool

This depenency was removed and causing:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

Change-Id: Ie20b156d484055a8f0325f9047c284defbf95a32
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
18 months agoRemove privateKey{Path,Passphrase} fields 20/105820/1
Robert Varga [Wed, 3 May 2023 18:00:40 +0000 (20:00 +0200)]
Remove privateKey{Path,Passphrase} fields

These fields are not used, remove them along with their setters.

Change-Id: I982b0374d6989f8ce561f7789f647b1ed2c1e32f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate sal.connect.netconf.sal.tx package 18/105818/1
Robert Varga [Wed, 3 May 2023 16:49:13 +0000 (18:49 +0200)]
Eliminate sal.connect.netconf.sal.tx package

Transactions in this package are an implementation detail of the
sal.connect.netconf.sal package. Move them and their tests, hiding
them from outside view.

JIRA: NETCONF-1006
Change-Id: I3f3cc23ca54bc1a0e3b25fb4a29f5c75a3d8bd5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate action-related constants 17/105817/1
Robert Varga [Wed, 3 May 2023 16:30:34 +0000 (18:30 +0200)]
Eliminate action-related constants

The YANG namespace is a well-known constant in YangConstants, reuse it
from there. Also inline "action" to its sole user.

JIRA: NETCONF-1006
Change-Id: I9715cd8e391f177cbd4aa154ed3458eedb5a29fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMigrate more capabilities to XmlNetconfConstants 16/105816/1
Robert Varga [Wed, 3 May 2023 16:23:30 +0000 (18:23 +0200)]
Migrate more capabilities to XmlNetconfConstants

We have multiple constants still lurking in NetconfMessageTransformUtil,
migrate them to XmlNetconfConstants so they are widely available.

JIRA: NETCONF-1006
Change-Id: Ic6c5f8d161e7533e2f9537901cc841615b7aaabd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove NetconfMessageTransformUtil.NETCONF_NOTIFICATONS_URI 15/105815/1
Robert Varga [Wed, 3 May 2023 16:13:39 +0000 (18:13 +0200)]
Remove NetconfMessageTransformUtil.NETCONF_NOTIFICATONS_URI

This constant is well-known in XmlNetconfConstants, use it from there.

JIRA: NETCONF-1006
Change-Id: I7c68997108b7a0722ae783de6cb6808cb53648c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate NetconfMessageTransformUtil.NETCONF_CANDIDATE_URI 14/105814/1
Robert Varga [Wed, 3 May 2023 16:08:47 +0000 (18:08 +0200)]
Eliminate NetconfMessageTransformUtil.NETCONF_CANDIDATE_URI

This constant is well-known in XmlNetconfConstants in String form,
remove it and migrate users -- removing external dependencies on
NetconfMessageTransformUtil.

JIRA: NETCONF-1006
Change-Id: I732cf9af2564d4df1d7e4df5e84df763ff6ccd14
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRefactor sal.connect.netconf.schema.mapping 12/105812/2
Robert Varga [Wed, 3 May 2023 15:11:55 +0000 (17:11 +0200)]
Refactor sal.connect.netconf.schema.mapping

This package is a combined API + impl package, where implementations are
only referenced internally. Move components into
netconf.client.mdsal.{api,impl} -- properly exposing or hiding them.

JIRA: NETCONF-1006
Change-Id: I76d10988c53da5aa0c7893e1dd3b1da42ba07be2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSplit up OSGiCallHomeProvider 11/105811/1
Robert Varga [Wed, 3 May 2023 14:48:31 +0000 (16:48 +0200)]
Split up OSGiCallHomeProvider

We can inject classes through OSGi DS, which allows us to make
CallHomeMountDispatcher an actual component.

JIRA: NETCONF-949
Change-Id: Ib9c0739e6821fbb41567816a5d79b0234adc70ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate blueprint from callhome-provider 80/104280/19
Robert Varga [Wed, 3 May 2023 12:18:14 +0000 (14:18 +0200)]
Eliminate blueprint from callhome-provider

The final bits here are quite easy: translate the XML into a simple
component.

JIRA: NETCONF-949
Change-Id: Id9062a74ea6da9468093359f5a91dcc7fbcdd2ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove definitions from OpenApiObject 61/105461/19
Ivan Hrasko [Thu, 13 Apr 2023 17:54:36 +0000 (19:54 +0200)]
Remove definitions from OpenApiObject

OpenApi object should not contain definitions according
to OpenApi specification.

definitions object was a remnant from swagger 2.0.

JIRA: NETCONF-991
Change-Id: I3973c40951056105ec695de1e475269c40508d79
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
18 months agoEliminate CommonApiObject 89/104989/27
OleksandrZharov [Thu, 23 Mar 2023 12:45:50 +0000 (13:45 +0100)]
Eliminate CommonApiObject

Eliminated CommonApiObject together with SwaggerObject.

Enhanced OpenApiObject with some fields from SwaggerObject to
replace last one with OpenApiObject and removed their former
common interface.

JIRA: NETCONF-984
Change-Id: Ia641f0183b599a2a1b98f45a6ce8a1bdf57ed174
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
18 months agoRename *Swagger* classes to *OpenApi* 97/105697/7
Ivan Hrasko [Wed, 26 Apr 2023 07:26:57 +0000 (09:26 +0200)]
Rename *Swagger* classes to *OpenApi*

We are in process of removing support for OpenApi 2 (aka Swagger).
As a preparation rename the majority of swagger classes to openapi
classes.

We will eliminate the remaining SwaggerObject class in next patch.

JIRA: NETCONF-984
Change-Id: I848314da6d8f2a4a5efe3ebc8dcf7b0cd46fee53
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
18 months agoMove swagger classes into openapi package 50/105650/4
OleksandrZharov [Tue, 25 Apr 2023 08:33:29 +0000 (10:33 +0200)]
Move swagger classes into openapi package

Changed package name for swagger files in prepare
for next patches where swagger will be removed.

JIRA: NETCONF-984
Change-Id: Ie992d707875103952244fadaeac95ef4c21e9da7
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
18 months agoRemove hard-coded "topology-netconf" reference 07/105807/7
Robert Varga [Wed, 3 May 2023 03:26:14 +0000 (05:26 +0200)]
Remove hard-coded "topology-netconf" reference

At the end of the day the topology should not be hard-coded in
blueprint, lift it up to Java code and reference the well-known
constant instead.

JIRA: NETCONF-949
Change-Id: I1483a3d51a3151e8deaeee43ea8d87d3634eaf09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoReducate IetfZeroTouchCallHomeServerProvider ceremony 06/105806/7
Robert Varga [Wed, 3 May 2023 03:16:24 +0000 (05:16 +0200)]
Reducate IetfZeroTouchCallHomeServerProvider ceremony

Use Uint16 to reduce the dance around mount.Configuration, as we simply
cannot hit IllegalValueException.

While we are at it, remove init() and initialize within the constructor,
makes things consistent w.r.t. AutoCloseable contract.

JIRA: NETCONF-949
Change-Id: I5dffdd64bfc126bbbf4d068a74ca68c16fefada9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove NetconfCallHomeTlsService.init() 05/105805/5
Robert Varga [Wed, 3 May 2023 03:01:36 +0000 (05:01 +0200)]
Remove NetconfCallHomeTlsService.init()

Initialization is inherent to the constructor, really, as otherwise we
end up with a bunch of single-use private fields. This restructures the
invocation so that we do not need a separate init() method and ensures
there are no side-effects we need to worry about.

JIRA: NETCONF-949
Change-Id: I8899bc1aa5959072756404f3cf0d551ec1ea9a83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate NetconfCallHomeTlsConfiguration 04/105804/5
Robert Varga [Wed, 3 May 2023 02:54:08 +0000 (04:54 +0200)]
Eliminate NetconfCallHomeTlsConfiguration

This is a rather huge anti-pattern: configuration should be dynamic
somehow. Factor the defaults out of blueprint into Java code so it can
be evolved further.

JIRA: NETCONF-949
Change-Id: Ie07c5f7aa64643d4d890bd9c4cf72d8a17db4d13
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoInline onCloseHandler 03/105803/5
Robert Varga [Wed, 3 May 2023 02:43:51 +0000 (04:43 +0200)]
Inline onCloseHandler

There is no point to keep the callback an explicit member: inline the
lambda in its sole caller.

JIRA: NETCONF-949
Change-Id: I0b2b82cce4d567de3c90590a00651628c08989a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove NetconfSalKeystoreService 00/105800/7
Robert Varga [Tue, 2 May 2023 23:58:24 +0000 (01:58 +0200)]
Move NetconfSalKeystoreService

Move NetconfSalKeystoreService into netconf.client.mdsal.impl package,
along with its test. This hides it from its potential (ab)users.

JIRA: NETCONF-1006
Change-Id: I43cd0c3889ef58f46b7d7a640fae9b28501881f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove YangLibrarySchemaYangSourceProvider 99/105799/8
Robert Varga [Tue, 2 May 2023 23:43:46 +0000 (01:43 +0200)]
Move YangLibrarySchemaYangSourceProvider

Rename and move YangLibrarySchemaYangSourceProvider to
netconf.client.mdsal.

JIRA: NETCONF-1006
Change-Id: Idcd268f964df6c831dee06b3232518d26b40f75e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRefactor NetconfRemoteSchemaYangSourceProvider 98/105798/9
Robert Varga [Tue, 2 May 2023 23:11:55 +0000 (01:11 +0200)]
Refactor NetconfRemoteSchemaYangSourceProvider

This provider is based on ietf-netconf-monitoring. Split out the
YangTextSchemaSource implementation to CachedYangTextSchemaSource
and the the provider into netconf.client.mdsal, making it very clear
as to what is going on.

JIRA: NETCONF-1006
Change-Id: Ieff749ce67c94fa125ce780dd8d1fa4dfd79622d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate org.opendaylight.netconf.sal.connect.netconf.auth 97/105797/7
Robert Varga [Tue, 2 May 2023 22:44:58 +0000 (00:44 +0200)]
Eliminate org.opendaylight.netconf.sal.connect.netconf.auth

This is mostly a useless package, move its sole occupant to
netconf.cliuent.mdsal.

JIRA: NETCONF-1006
Change-Id: Ib17b511b662fbd4d59487da1ab075c1391bfc219
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename org.opendaylight.netconf.sal.connect.netconf 96/105796/8
Robert Varga [Tue, 2 May 2023 22:35:06 +0000 (00:35 +0200)]
Rename org.opendaylight.netconf.sal.connect.netconf

A more fitting name is org.opendaylight.netconf.client.mdsal, use that
for the generic unsorted mess.

JIRA: NETCONF-1006
Change-Id: I6d1fb7d1eccf0b123e376daa450a9456ece742c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename org.opendaylight.netconf.sal.connect.impl 95/105795/5
Robert Varga [Tue, 2 May 2023 22:18:46 +0000 (00:18 +0200)]
Rename org.opendaylight.netconf.sal.connect.impl

Use a more natural name, org.opendaylight.netconf.client.mdsal.impl.

JIRA: NETCONF-1006
Change-Id: Ie38706f6787f09e1a2b88378e7c3ab002e7731ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename netconf.sal.connect.api to netconf.client.mdsal.api 94/105794/6
Robert Varga [Tue, 2 May 2023 22:04:15 +0000 (00:04 +0200)]
Rename netconf.sal.connect.api to netconf.client.mdsal.api

The new package better aligns with the artifact name.

JIRA: NETCONF-1006
Change-Id: Ibdec974faec3b9971f46def001f638bb70e7336a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename sal-netconf-connector to netconf-client-mdsal 93/105793/2
Robert Varga [Tue, 2 May 2023 21:48:05 +0000 (23:48 +0200)]
Rename sal-netconf-connector to netconf-client-mdsal

The old name does not reflect what the artifact does, rename it to
reflect the fact it is the integration of netconf-client with MD-SAL
services.

JIRA: NETCONF-1006
Change-Id: I2185038ac21c0b0aa388f588dbd873ba5ea00b13
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoIntegrate netconf-events-mdsal 90/105790/1
Robert Varga [Tue, 2 May 2023 18:28:35 +0000 (20:28 +0200)]
Integrate netconf-events-mdsal

Events are an integral part of the MD-SAL implementation, integrate
them as they have no configuration dependencies.

JIRA: NETCONF-945
Change-Id: I76f121e0bbd6e04d8a9c86ab63c086c2f9852b87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoIntegrate mdsal-netconf-monitoring 89/105789/3
Robert Varga [Tue, 2 May 2023 17:43:55 +0000 (19:43 +0200)]
Integrate mdsal-netconf-monitoring

The implementation here is a plugin-level thing. Integrate GetSchema
operation into netconf-server-mdsal and the rest into netconf-nb, as we
have configuration dependencies there.

JIRA: NETCONF-945
Change-Id: I9bca2b26b3c180f20d5d2cdb135c579e6970360e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoPackage keystore/truststore/transport-api 61/105761/9
Robert Varga [Sun, 30 Apr 2023 20:58:20 +0000 (22:58 +0200)]
Package keystore/truststore/transport-api

We have an incoming implementation of proper transport layer, add
features to support them. Note this does not separate
keystore/truststore APIs.

JIRA: NETCONF-590
Change-Id: I65b061c34c77fc0d55d893fec9d329cab95c05b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSeparate out model packaging 70/105770/1
Robert Varga [Tue, 2 May 2023 08:20:18 +0000 (10:20 +0200)]
Separate out model packaging

Add separate features for standard IETF models. Also clean up other
dependencies, minimizing duplicate packaging of artifacts.

JIRA: NETCONF-1005
Change-Id: Id076ac8a1fdc2c3ee3521f31ec8f5a6af3e5cb69
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoCleanup feature repositories 60/105760/7
Robert Varga [Sun, 30 Apr 2023 19:58:11 +0000 (21:58 +0200)]
Cleanup feature repositories

Eliminate per-protocol/per-layer feature repositories.

JIRA: NETCONF-1005
Change-Id: I587b8e29bd5425892da5759af32bbed192faed09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoWorkaround Karaf not exposing jdk.net 62/105762/2
Robert Varga [Sun, 30 Apr 2023 22:26:01 +0000 (00:26 +0200)]
Workaround Karaf not exposing jdk.net

Karaf is not exposing jdk.net, hence we cannot rely on ExtendedOptions
being available.

JIRA: NETCONF-590
Change-Id: Ibcbe23a1ae789955b880814c1466e57ea0fb0bb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate mdsal-netconf-ssh 57/105757/8
Robert Varga [Sun, 30 Apr 2023 18:46:45 +0000 (20:46 +0200)]
Eliminate mdsal-netconf-ssh

The SSH transport is something that is inherent to netconf-nb, integrate
it there. At some point this will be replaced by the use of
transport-ssh.

JIRA: NETCONF-945
Change-Id: I9f3606363eee4f0e78a2cbfd2427ce65221acd59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename aaa-authn-odl-plugin to netconf-auth-aaa 59/105759/2
Robert Varga [Sun, 30 Apr 2023 19:39:20 +0000 (21:39 +0200)]
Rename aaa-authn-odl-plugin to netconf-auth-aaa

This a plugins/ layer thing, as it integrates with AAA. Rename the
artifact, updating references. Also eliminate the -no-cluster part, as
it completely the same as odl-aaa-netconf-plugin.

JIRA: NETCONF-944
Change-Id: I8fdf72415c647647602857bcb6426aa05c15d52c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoSplit out DefaultPasswordCredentials 58/105758/2
Robert Varga [Sun, 30 Apr 2023 19:29:31 +0000 (21:29 +0200)]
Split out DefaultPasswordCredentials

We would really like a default implementation coming from the API, but
this is really the best we can do for now.

Change-Id: I0cf30a2e86da0efc6c480f0404cf59dd0c2c9cc0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoEliminate odl-netconf-tcp 56/105756/2
Robert Varga [Sun, 30 Apr 2023 18:41:53 +0000 (20:41 +0200)]
Eliminate odl-netconf-tcp

Integrate the TCP server into netconf-nb, where it really belongs. At
some point this will be eliminated via adoption of individual
transports.

JIRA: NETCONF-945
Change-Id: Iffdc234a655a9643589ab7280c6a6d00d2b805ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRename mdsal-netconf-impl to netconf-nb 55/105755/1
Robert Varga [Sun, 30 Apr 2023 18:27:31 +0000 (20:27 +0200)]
Rename mdsal-netconf-impl to netconf-nb

This is a northbound NETCONF application bound to MD-SAL, rename it as
such.

JIRA: NETCONF-945
Change-Id: I7c01fbeea0145e5707f3c0d9fde1409db51fc039
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoMove NetconfMapperAggregator 54/105754/2
Robert Varga [Sun, 30 Apr 2023 18:05:43 +0000 (20:05 +0200)]
Move NetconfMapperAggregator

NetconfMapperAggregator is well-known among the various implementations
for its aggregation capability. Move it one layer down, so it gets
provided by netconf-server-mdsal, allowing more services to be moved
there.

JIRA: NETCONF-945
Change-Id: I69da96397683ad1181e27ccdcfefa6c7ea1bef6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoRemove NetconfMapperAggregator.OSGI_TYPE 53/105753/1
Robert Varga [Sun, 30 Apr 2023 17:52:02 +0000 (19:52 +0200)]
Remove NetconfMapperAggregator.OSGI_TYPE

We do not want strong binding here, as it just obscures our
dependencies. At the end of the day we want to make things a lot more
modular, but that will require a significant re-thinking of how the
server is wired.

JIRA: NETCONF-945
Change-Id: Iacd243dffe5a8d8884a1777ddc744168e470ab00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoClean up NetconfSessionMonitoringService 52/105752/1
Robert Varga [Sun, 30 Apr 2023 17:24:11 +0000 (19:24 +0200)]
Clean up NetconfSessionMonitoringService

Use direct collection to ImmutableList and BindingMap to simplify
indexing.

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