netconf.git
2 years agoRefactor Swagger unit tests 47/96547/5
Ivan Hrasko [Wed, 16 Jun 2021 09:52:31 +0000 (11:52 +0200)]
Refactor Swagger unit tests

Get rid of incorrect equals call on module revision by
using SchemaContext#findModule methods to find
module according to namespace (and revision).

Because of incorrect equals call the tests
were just passing without any assertions and
were not maintained for long time, some of the
assertions needed to be adapted.

Remove unnecessary code to load EffectiveModelContext
from DocGenTestHelper and instead use YangParserTestUtils
methods directly in tests.

Refactor DocGenTestHelper to be utility class.
Refactor tests code, make tests logic more simple.
Also, introduce tests for ApiDocGeneratorRFC8040.

JIRA: NETCONF-785
Change-Id: I195acbca354cdfe80241430255254436d0dac23f
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoFix multiple keys path in RFC8040 swagger 30/96530/3
Ivan Hrasko [Tue, 15 Jun 2021 07:46:05 +0000 (09:46 +0200)]
Fix multiple keys path in RFC8040 swagger

ListPathBuilder for RFC8040 needs to change its state
when processing multiple keys (= to ,) thus we have
to create it before the iteration over all list keys.

JIRA: NETCONF-708
Change-Id: If617ff1508e63b1001ab7857e3b3fdebff287f74
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMark netconf node with ext:mount 01/96501/1
Robert Varga [Wed, 9 Jun 2021 16:00:39 +0000 (18:00 +0200)]
Mark netconf node with ext:mount

Add an explicit marker for netconf topology nodes.

JIRA: NETCONF-783
Change-Id: Ie037ea099ed2ebb426242922cf3f7b791e5f7dc4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 99/96099/50
Robert Varga [Sun, 9 May 2021 20:18:07 +0000 (22:18 +0200)]
Bump MRI upstreams

Adopt latest versions, namely;
- odlparent-9.0.2
- yangtools-7.0.2-SNAPSHOT
- infrautils-2.0.2
- mdsal-8.0.0-SNAPSHOT
- controller-4.0.0-SNAPSHOT
- aaa-0.14.0-SNAPSHOT

Change-Id: Ic4cbc01d88134df26416cd2d6f3e7ac64a03dc1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse InstanceIdentifier.empty() 24/96424/1
Robert Varga [Fri, 4 Jun 2021 13:01:57 +0000 (15:01 +0200)]
Use InstanceIdentifier.empty()

We do not need a builder here, just use the empty identifier.

Change-Id: I65d6cd0d27e71316b5a8eed330157b583e406474
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoHandle NetconfDocumentedExceptions correctly 97/96397/3
Tomas Cere [Tue, 1 Jun 2021 08:41:51 +0000 (10:41 +0200)]
Handle NetconfDocumentedExceptions correctly

These need to be wrapped in TransactionCommitFailedException
so they are handled correctly, so restconf can map these and
return correct status code on failure.

JIRA: NETCONF-777
Change-Id: Id4833bfe46da6f97a216163452dd2a44af599063
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCorrect stream instance identifier 95/96395/1
Robert Varga [Mon, 31 May 2021 12:25:40 +0000 (14:25 +0200)]
Correct stream instance identifier

Constructed path has a mismatch in both depth and map identifier QName,
fix that up.

JIRA: NETCONF-773
Change-Id: Ib0ce3c3727f5cf340d8d1d6ea8e449bf3f83f2f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd sample how to use karaf static distribution for NETCONF and RESTCONF 84/94784/15
Oleksii Mozghovyi [Mon, 25 Jan 2021 12:21:20 +0000 (14:21 +0200)]
Add sample how to use karaf static distribution for NETCONF and RESTCONF

This shows how the combination of NETCONF connector and RESTCONF can be
packaged inside the static karaf distribution.

JIRA: INTDIST-116
Change-Id: I4b21b0cde3ae3ca3276133355b166e662d3212e7
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix augment argument 84/96384/1
Robert Varga [Thu, 27 May 2021 22:48:41 +0000 (00:48 +0200)]
Fix augment argument

As per RFC6020 section 7.15, augment statement used under a module
(or submodule} statement MUST use absolute form must be used.
Fix our test model.

Change-Id: I0b6a566f448464643c0796714de268464412bff6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixup netconf-parent path 58/96358/1
Robert Varga [Tue, 25 May 2021 09:11:02 +0000 (11:11 +0200)]
Fixup netconf-parent path

netconf-parent's directory is just 'parent', fix that up.

Change-Id: I863f07415ec49cb8ecda0c60de316ce048c27d9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup FilterContentValidator 36/96336/2
Robert Varga [Mon, 24 May 2021 12:03:22 +0000 (14:03 +0200)]
Cleanup FilterContentValidator

Make sure we do not mutate our argument and do not access children
until necessary.

Change-Id: Ic2a1a7561fc321b75f2e63a6968eb20507cdda43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoInitialize FilterTree.children 35/96335/1
Robert Varga [Mon, 24 May 2021 11:06:29 +0000 (13:06 +0200)]
Initialize FilterTree.children

This is a simple move of initializer, so that it is obvious what
is going on.

Change-Id: I002cc767bd0d98855c31a172d45ccdc39389a5b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoModernize netconf-util tests 03/96303/1
Robert Varga [Sun, 23 May 2021 18:06:45 +0000 (20:06 +0200)]
Modernize netconf-util tests

Use assertThrows() and fixup imports a bit.

Change-Id: I2816141af08815afb0dc926e78ace962ba561ded
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup netconf-impl tests 02/96302/1
Robert Varga [Sun, 23 May 2021 17:57:41 +0000 (19:57 +0200)]
Cleanup netconf-impl tests

Use static imports for assert methods, and use assertThrows() instead
of try/catch blocks.

Change-Id: I0054becc441cbe33c6aedf156b267429eb53e224
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup NetconfMDSalMappingTest 00/96300/1
Robert Varga [Fri, 21 May 2021 13:05:37 +0000 (15:05 +0200)]
Cleanup NetconfMDSalMappingTest

Use assertThrows() and remove unused code.

Change-Id: Ia0c1ab438ad93026fff28c476254e409bd2cc4ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate RuntimeRpc a bit 99/96299/1
Robert Varga [Fri, 21 May 2021 12:50:14 +0000 (14:50 +0200)]
Update RuntimeRpc a bit

Move Element cast to the method which is producing it, saving one
import.

Change-Id: Ie00e716681666ae64f2774cf068a202e54fbeb81
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove restconf-parent 98/96298/1
Robert Varga [Fri, 21 May 2021 12:14:38 +0000 (14:14 +0200)]
Remove restconf-parent

This pom is a useless wrapper around netconf-parent. Eliminate it and
migrate its users.

Change-Id: Id3c0cc6458855a7c4bd9eeb6a2e8e3d47d57b9da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove superfluous version/groupId declarations 97/96297/1
Robert Varga [Fri, 21 May 2021 12:12:04 +0000 (14:12 +0200)]
Remove superfluous version/groupId declarations

We can inherit these declarations from our parent structure, making
poms a tad leaner.

Change-Id: Ia56733a45566af971d8963b1465341925de4ce7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEnable TCP_NODELAY for SSH client/server 09/96209/3
Robert Varga [Mon, 17 May 2021 15:10:45 +0000 (17:10 +0200)]
Enable TCP_NODELAY for SSH client/server

Both NETCONF northbound (SshProxyServer) and southbound
(AsyncSshHandler) plugins exhibit latencies caused by Nagle's algorithm.
These are superfluous, as we typically work in request-response manner,
with reasonable level of buffering going on in the intermediate layers.

Set TCP_NODELAY flag to get rid of these artifacts.

JIRA: NETCONF-776
Change-Id: I68a87cc2bef4f0032e104833b8d241f5b1f7566b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup RFC8040 media type handling 77/96277/3
Robert Varga [Wed, 19 May 2021 21:40:48 +0000 (23:40 +0200)]
Cleanup RFC8040 media type handling

Promote Rfc8040.MediaTypes to a top-level types, adding documentation
and proper constants mimicking the layout of javax.ws.rs.core.MediaType.

As part of this exercise, also correct the media types produced by our
JAX-RS services so they accurately comply with RFC8040, RFC8072 and
RFC6415.

JIRA: NETCONF-779
JIRA: NETCONF-780
Change-Id: Iaaf192e9d30858f5ce6f8e3484ea232fbf69e92f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSwitch to using SseEventSink 08/96208/2
Robert Varga [Mon, 17 May 2021 14:00:42 +0000 (16:00 +0200)]
Switch to using SseEventSink

JAX-RS 2.1 has a standard way of working with SSE, do not use
Jersey-specific APIs (except in test).

JIRA: NETCONF-775
Change-Id: I46c2b80be52d2313ab9193361da788f41923c175
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse MediaType.SERVER_SENT_EVENTS 05/96205/4
Robert Varga [Mon, 17 May 2021 12:47:31 +0000 (14:47 +0200)]
Use MediaType.SERVER_SENT_EVENTS

We are using JAX-RS 2.1, hence we have SSE support built-in. Reduce
dependency surface by using MediaType constant instead of Jersey's
Feature.

JIRA: NETCONF-775
Change-Id: I27338775dd3cd92681a4c1f953f71145100f24ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImprove event fragmentation 07/96207/2
Robert Varga [Mon, 17 May 2021 14:03:41 +0000 (16:03 +0200)]
Improve event fragmentation

Rather than instantiating String objects, use StrinBuilder's ability to
append CharSequence parts.

Change-Id: I1283791c50a9e41fd1703786cbf2aefe71e75484
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse a simple isEmpty() check 71/96271/2
Robert Varga [Wed, 19 May 2021 19:10:44 +0000 (21:10 +0200)]
Use a simple isEmpty() check

Rather than checking size() == 0, use isEmpty(), which is clearer
and potentially fasterUse a simple isEmpty() check

Rather than checking size() == 0, use isEmpty(), which is clearer
and potentially faster.

Change-Id: I0aadff4a55258f2fbb0bd60c26993b08b3b8e7b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor ietf-restconf constants 70/96270/2
Robert Varga [Wed, 19 May 2021 14:21:01 +0000 (16:21 +0200)]
Refactor ietf-restconf constants

We have a number of constants which overlap with definitions generated
for the ietf-restconf module. Use QNames from generated code and rehost
all constants to their users.

JIRA: NETCONF-773
Change-Id: Ic6fe0a8fedf4029fabc5cdf3ea634975b5949515
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse ImmutableNodes.leafNode() 69/96269/2
Robert Varga [Wed, 19 May 2021 13:49:35 +0000 (15:49 +0200)]
Use ImmutableNodes.leafNode()

Do not use schema-aware builder, use a straight-up shortcut to a
LeafNode.

JIRA: NETCONF-773
Change-Id: I306dde8b7f8857945d1036945545c65fc98c4c3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor constants relating to restconf-monitoring 68/96268/3
Robert Varga [Wed, 19 May 2021 13:30:48 +0000 (15:30 +0200)]
Refactor constants relating to restconf-monitoring

We have a number of constants scattered around, some of which can
have better names and placement, or are duplicates of constants
generated for the ietf-restconf binding.

Reuse generated constants and construct native YangInstanceIdentifiers,
so we minimize duplication.

JIRA: NETCONF-773
Change-Id: I5a17cbdd863fcdbaf75db56d4a8b0daddfe5e7a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup Rfc8040 constants 61/96261/1
Robert Varga [Wed, 19 May 2021 10:24:55 +0000 (12:24 +0200)]
Cleanup Rfc8040 constants

A number of constants here are unused, remove them.

JIRA: NETCONF-773
Change-Id: If75073a19eff52da4cf68c9601c1b775258a42d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRename SessionHandlerInterface 04/96204/1
Robert Varga [Mon, 17 May 2021 11:36:13 +0000 (13:36 +0200)]
Rename SessionHandlerInterface

The 'Interface' part is obvious, but it is not immediately obvious
what sort of 'session' and 'handler' we are talking about. Rename
it to StreamSessionHandler.

Change-Id: I76fe4f0a7fc87134ce15dece17bb5bdd2075b779
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove SSEInitializer 03/96203/1
Robert Varga [Mon, 17 May 2021 10:32:39 +0000 (12:32 +0200)]
Remove SSEInitializer

SSEInitializer is a simple indirection between RestconfDataStreamServiceImpl
and streams.Configuration. Eliminate the indirection.

JIRA: NETCONF-773
Change-Id: I88429d8a58720589fd73f1c6da7cb3d2176bf88f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUnmask NotificationListenerAdapter 02/96202/1
Robert Varga [Mon, 17 May 2021 09:41:47 +0000 (11:41 +0200)]
Unmask NotificationListenerAdapter

Use .orElseThrow() to acquire a nice instance, without needing to issue
multiple .get()s.

JIRA: NETCONF-773
Change-Id: If67fb5391642e437ce27c2d9f21688c875de4561
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove the ability to inject differing DOMDataBroker 01/96201/1
Robert Varga [Mon, 17 May 2021 08:41:26 +0000 (10:41 +0200)]
Remove the ability to inject differing DOMDataBroker

We only have one implementation of DOMDataBroker therefore tuning
the injection via Config Admin is useless -- remove it.

JIRA: NETCONF-774
Change-Id: I024866c51b2c825032169fbff768833ac03c7195
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove Service(Notif)Wrapper 00/96200/1
Robert Varga [Sun, 16 May 2021 21:13:06 +0000 (23:13 +0200)]
Remove Service(Notif)Wrapper

The wrappers are a remnant of the Config Subsystem wiring, and are not
really useful. Remove them, along with Rfc8040RestConfWiring, which is
no longer needed.

JIRA: NETCONF-773
Change-Id: I2534a6418dc0ca1f1d6aad3d41f874781ea1930d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUnmask NotificationListenerAdapter 99/96199/2
Robert Varga [Sat, 15 May 2021 13:16:45 +0000 (15:16 +0200)]
Unmask NotificationListenerAdapter

Use .orElseThrow() to acquire a nice instance, without needing to issue
multiple .get()s.

JIRA: NETCONF-773
Change-Id: Ic499f6eee7f19cba1796e62cad47892b64a28b4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup WebInitializer 98/96198/2
Robert Varga [Sat, 15 May 2021 08:24:44 +0000 (10:24 +0200)]
Cleanup WebInitializer

Use a simple List.of() and clean up code formatting to make it clearer
what we are trying to do.

Change-Id: I1bb44e4c75fb7f3c86e580255df9a3119044be7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove {Base,Transaction}ServicesWrapper 96/96196/2
Robert Varga [Sat, 15 May 2021 08:10:02 +0000 (10:10 +0200)]
Remove {Base,Transaction}ServicesWrapper

These interfaces are just simple combination of JAX-RS services, remove
them to make inheritance a bit clearer.

JIRA: NETCONF-773
Change-Id: I47c4cc866f64143d8042a729bfe56d4a9860cec1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove services API 95/96195/1
Robert Varga [Sat, 15 May 2021 08:05:57 +0000 (10:05 +0200)]
Move services API

We seem to have two packages for JAX-RS services, without any
explanation of the split. Arbitrarily pick rests.services as the
target package, mostly vacating services.simple.

JIRA: NETCONF-773
Change-Id: I9642309916d0503081211f15394fd94762382eb4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReuse local RestconfStrategy 94/96194/1
Robert Varga [Sat, 15 May 2021 07:38:58 +0000 (09:38 +0200)]
Reuse local RestconfStrategy

RestconfStrategy is now completely stateless, hence we can reuse the
same object, reducing GC pressure a bit.

JIRA: NETCONF-773
Change-Id: Ic6c7968f1279bd0aa7c5f58452af499d16079464
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up Root Resource Discovery implementation 90/96190/1
Robert Varga [Fri, 14 May 2021 18:05:04 +0000 (20:05 +0200)]
Clean up Root Resource Discovery implementation

Move the implementation to other service implementations and make sure
it has configurable root -- which should be coming from WebInitializer.

JIRA: NETCONF-773
Change-Id: I1fd8936d622c0ee51bd151a0ebd34b05dd76d2b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReduce preliferation of TransactionChainHandler 71/96171/3
Robert Varga [Fri, 14 May 2021 08:05:04 +0000 (10:05 +0200)]
Reduce preliferation of TransactionChainHandler

RestconfStrategy does not need to work on transaction chains -- we are
really dealing with standalone transactions every step of the way. This
ends up simplifying the flow quite a bit.

JIRA: NETCONF-773
Change-Id: I70c49e7c2f9da250c53ebfc32ddb99456f9b2c46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove DOMMountPointServiceHandler 70/96170/2
Robert Varga [Thu, 13 May 2021 15:44:06 +0000 (17:44 +0200)]
Remove DOMMountPointServiceHandler

This is a useless indirection over DOMMountPointService, just remove it,
making lifecycle a bit more clearer.

JIRA: NETCONF-773
Change-Id: I0cf083b11e98c10b5af28784e20fc7e8fda25110
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove DOMDataBrokerHandler 69/96169/3
Robert Varga [Thu, 13 May 2021 15:18:28 +0000 (17:18 +0200)]
Remove DOMDataBrokerHandler

This is a useless indirection over DOMDataBroker, just remove it, making
lifecycle a bit more clearer.

JIRA: NETCONF-773
Change-Id: I349baf5e184c7f18092e41149cf93efc13e72ac1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove NotificationServiceHandler 68/96168/1
Robert Varga [Thu, 13 May 2021 15:09:47 +0000 (17:09 +0200)]
Remove NotificationServiceHandler

This is a useless indirection over DOMNotificationService, remove it,
making interactions tad easier to follow.

JIRA: NETCONF-773
Change-Id: I91f4da713f3ff66d0efa7cd3feeda6fc01a83fad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove RpcServiceHandler 67/96167/2
Robert Varga [Thu, 13 May 2021 14:29:40 +0000 (16:29 +0200)]
Remove RpcServiceHandler

This is a useless indirection class, just remove it and deal with
DOMRpcService instead.

JIRA: NETCONF-773
Change-Id: I3808997bc1226d384d012a5153701cbd95fb6028
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove ActionServiceHandler 66/96166/2
Robert Varga [Thu, 13 May 2021 13:10:45 +0000 (15:10 +0200)]
Remove ActionServiceHandler

This is a useless indirection class, just remove it and deal with
DOMActionService instead.

JIRA: NETCONF-773
Change-Id: I4e9fc4aec72427f9d39852cf1518666dd18ab0c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove Handler interface 65/96165/1
Robert Varga [Thu, 13 May 2021 13:03:27 +0000 (15:03 +0200)]
Remove Handler interface

This interface is utterly useless now, remove it and mark its
implementations for further evolution -- which really means eliminating
them.

JIRA: NETCONF-773
Change-Id: If6dadcaa47aa3eb77ac5b394b40e6946f09975b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove UpdateHandlers 64/96164/2
Robert Varga [Thu, 13 May 2021 12:21:47 +0000 (14:21 +0200)]
Remove UpdateHandlers

This interface is not used anywwhere and it throws a wrench in what
otherwise would be a simple dependency graph.

JIRA: NETCONF-773
Change-Id: If8b916813bcf5fcc9b2a81813ecb3d71383693ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove JSONRestconfService 62/96162/2
Robert Varga [Thu, 13 May 2021 11:08:03 +0000 (13:08 +0200)]
Remove JSONRestconfService

This service is not used in ODL proper and it is blocking a number of
refactors due to how it interacts with other services. Remove it now.

JIRA: NETCONF-773
Change-Id: I58112507807fce8fa58625119a8613f13e05a344
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoReduce project.version proliferation 63/96163/2
Robert Varga [Thu, 13 May 2021 11:56:41 +0000 (13:56 +0200)]
Reduce project.version proliferation

Rely on netconf-artifacts to propagate versions around the build
reactor, so that we are always self-consistent.

Change-Id: I1e680c649b97dad16a90d57d83b89502eadb4b6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove odl-messagebus feature and messagebus-netconf 38/95938/10
Robert Varga [Mon, 26 Apr 2021 11:07:39 +0000 (13:07 +0200)]
Remove odl-messagebus feature and messagebus-netconf

Controller is removing the PoC infrastructure we were relying on,
let's just remove the component as well.

JIRA: NETCONF-768
Change-Id: Idaa58b1c8ad06c3cb7bf90c0b654c967bc07eb49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 2.0.0-SNAPSHOT 61/96161/1
Robert Varga [Thu, 13 May 2021 10:54:22 +0000 (12:54 +0200)]
Bump versions to 2.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: Ic0b6b16f27880c1b38ffd1e6dc7423f717e77d12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not use schema-aware builders in RestconfMappingNodeUtil 41/96141/5
Robert Varga [Thu, 13 May 2021 05:22:36 +0000 (07:22 +0200)]
Do not use schema-aware builders in RestconfMappingNodeUtil

These builders are going away as they bring little to the table for the
cost they force upon us.

Change-Id: I2359ab28dd6c3632cd0a4f6eeaadf62af517d72d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate RestconfDataServiceImpl stream lifecycle 57/96157/1
Robert Varga [Thu, 13 May 2021 08:26:21 +0000 (10:26 +0200)]
Update RestconfDataServiceImpl stream lifecycle

This is a follow-up patch to cleanup more checkExist() invocations,
which are no longer needed, as the datastore handles container/list
lifecycle.

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

3 years agoMinimize another set of dependencies 39/96139/2
Robert Varga [Wed, 12 May 2021 22:36:45 +0000 (00:36 +0200)]
Minimize another set of dependencies

MWe are not exposing the repo as part of running contrary to upstream.
Each to their own.

Change-Id: I301ff878ea7f4a1d01ecefbaf3a39804fee3cf13
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 1.13.3-SNAPSHOT 40/96140/1
Robert Varga [Wed, 12 May 2021 22:48:21 +0000 (00:48 +0200)]
Bump versions to 1.13.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Iad0085c6bf0eed251ead9622c4aee4e56ad926db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdded full YIID to ietf-restconf-monitoring DS 84/83284/23
Jaroslav Tóth [Tue, 16 Jul 2019 11:14:31 +0000 (13:14 +0200)]
Added full YIID to ietf-restconf-monitoring DS

- Currently local-name of the QName is used as key to the list
  of created streams - that is a bug because local-name doesn't
  have to be unique in scope of one module or whole schema context.
- This fix puts the whole serialized YIID to DS as stream name.

JIRA: NETCONF-726
Change-Id: I28012a478b958b933af993c2ede5f91c2eb8e211
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup datastore interactions 35/96135/4
Robert Varga [Wed, 12 May 2021 20:01:05 +0000 (22:01 +0200)]
Cleanup datastore interactions

Datastore handles lifecycle of non-semantic portions, hence we do not
need utterly ugly special-cases dealing with container/list
initialization. This removes a chunk of crud, makes things more
type-safe and more straightforward.

Change-Id: I7fe72a0c37cd0a1ef94f2921fb3c66800eccfa26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFurther dependency cleanups 38/96138/1
Robert Varga [Wed, 12 May 2021 21:32:14 +0000 (23:32 +0200)]
Further dependency cleanups

We have two other unused dependencies, remove them as well.

Change-Id: I2870ffd2450ce7783609bf58b1b26209adbde0fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup dependencies a bit 37/96137/1
Robert Varga [Wed, 12 May 2021 21:14:18 +0000 (23:14 +0200)]
Cleanup dependencies a bit

There are a number of unnecessary dependencies we are using, which are
getting flagged by odlparent-9. Clean the most obvious ones, reducing
our footprint.

Change-Id: I0881d82f4928505998254088c4c729057c86bb7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix infrautils version 36/96136/2
Robert Varga [Wed, 12 May 2021 20:16:28 +0000 (22:16 +0200)]
Fix infrautils version

We have a misaligned version here, make sure it is 1.9.8, as it should
be.

Change-Id: I677f9f0ad89e61e6664bb239e09a844f970e2c8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpgrade restconf-nb-rfc8040 to use RFC8525 46/93046/8
Robert Varga [Wed, 14 Oct 2020 10:47:41 +0000 (12:47 +0200)]
Upgrade restconf-nb-rfc8040 to use RFC8525

Ditch the old yang library and just use the new one instead.

JIRA: NETCONF-725
Change-Id: I99c9678146ef58d525dda626087a5e74b0e270e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse schemaless builders in RestconfMappingNodeUtil 34/96134/1
Robert Varga [Wed, 12 May 2021 18:36:09 +0000 (20:36 +0200)]
Use schemaless builders in RestconfMappingNodeUtil

The code here is extremely flaky, relying very much on declared layout
of ietf-yang-library -- which is utterly wrong, as we should be using
effective model.

Schema-aware builders are going away anyway, so just use normal
builders, forgoing all the unneeded complexity.

JIRA: NETCONF-725
Change-Id: I2454a7872341fb2a977463513a5a1a6a3937c8d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdded doc for fields filtering 87/95687/4
Jaroslav Tóth [Wed, 7 Apr 2021 06:53:43 +0000 (08:53 +0200)]
Added doc for fields filtering

- User guide - using fields query parameter to leverage NETCONF
  subtree filtering with selected multiple subtrees.
- Developer guide - tutorial for using:
  a. NetconfDOMDataBrokerFieldsExtension
  b. NetconfDataTreeService with added methods

JIRA: NETCONF-735
Change-Id: I8fed93dc45b626ddc99447f0656e671890ad8f17
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
3 years agoIntegration of RESTCONF fields to NETCONF filters 90/93390/16
mhurban [Wed, 25 Nov 2020 19:02:01 +0000 (20:02 +0100)]
Integration of RESTCONF fields to NETCONF filters

Added:
- NETCONF subtree filtering aware parser (ParserFieldsParameter)
- check if get request is for mountpoint data (ReadDataTransactionUtil)
- new mountpoint fields parameter (WriterParameters)

JIRA: NETCONF-735
Change-Id: I293993958893df866908fa5f16992bf38bd6b085
Signed-off-by: mhurban <mar.hurban@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
3 years agoRework mdsal-netconf-yang-library 31/96131/1
Robert Varga [Wed, 12 May 2021 10:40:38 +0000 (12:40 +0200)]
Rework mdsal-netconf-yang-library

The primary intent here is elimination of blueprint, but while we
are at it, we also remove duplicated code and unify the two exporters
into a single class.

JIRA: NETCONF-770
Change-Id: I70bba28b1776001d6c71e367b10d87d59399c13a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMerge OSGiCredentialServiceAuthProvider 30/96130/1
Robert Varga [Wed, 12 May 2021 09:00:14 +0000 (11:00 +0200)]
Merge OSGiCredentialServiceAuthProvider

We now have OSGi R7, hence we can safely use constructor injection,
eliminating the need for an extra class.

Change-Id: I41a1bc06d6aec1be89979327e9b530952cd673ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate testtool arguments 82/95182/13
Illia [Mon, 15 Feb 2021 21:19:41 +0000 (23:19 +0200)]
Update testtool arguments

1. Remove edit-content argument. Instead of using node config template
in form of file node config will be created, modified by corresponding
Java models and than converted to request body string with GSON.
2. Split auth argument to controller-auth-username,
controller-auth-password. Add default value(admin) for them.
3. Split controller-destination argument to controller-ip,
controller-port.

JIRA: NETCONF-758
Change-Id: Iccf19c9482727b88d3f21a85008d13f554a8da08
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoAdd GSON models for device registration 77/95177/9
Illia [Mon, 15 Feb 2021 18:03:51 +0000 (20:03 +0200)]
Add GSON models for device registration

Intention is to use the PATCH method for node registration(no matter if
that's a single node registration or multiple nodes).

JIRA: NETCONF-758
Change-Id: Ia624cfe2f953f6f5dc7a4ebd0d7cfbb0c0185f1a
Signed-off-by: Illia <illia.ihushev@pantheon.tech>
3 years agoEndToEnd test tool 35/95335/11
Iaroslav [Wed, 10 Feb 2021 10:31:08 +0000 (12:31 +0200)]
EndToEnd test tool

Added EndToEnd test tool for adding routes to test device using REST.
Part of feature: features-netconf-testing.

Test tool implements endpoint from ncmount.yang, finds device from
provided payload, transforms and sent routes from payload to target device.

Write route processing provides by REST endpoint:
/rests/operations/ncmount:write-routes
with a payload which contains the device name and route.

JIRA: NETCONF-759
Change-Id: Iba141c91a315b3d13d1890b8315dd17bb899cda9
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse Optional.isEmpty() 63/95263/3
Jaroslav Tóth [Mon, 22 Feb 2021 08:04:13 +0000 (09:04 +0100)]
Use Optional.isEmpty()

Java 11 introduced Optional.isEmpty(), which allows us to convert
!Optional.isPresent() callsites. Perform this conversion across the
entire repostitory.

Change-Id: I515a550bb6aa56b6d89cea020f5399ca27884833
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse ReadOperations.exists() to check existence 13/96113/1
Robert Varga [Tue, 11 May 2021 11:35:20 +0000 (13:35 +0200)]
Use ReadOperations.exists() to check existence

There is no point transferring all the data, just invoke the exists()
operation instead.

Change-Id: I54db6026ee641703196b6a8120245c4e60a60aa2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate javax.inject artifact references 01/96101/1
Robert Varga [Sun, 9 May 2021 20:25:49 +0000 (22:25 +0200)]
Migrate javax.inject artifact references

We are using GuicedEE instead of the ancient (and broken) javax.inject
jar. Migrate references.

Change-Id: I262c155b97aefced7a834de3db0efd839cf45fbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate osgi.core references 00/96100/1
Robert Varga [Sun, 9 May 2021 20:24:19 +0000 (22:24 +0200)]
Migrate osgi.core references

OSGi R7's core artifact has been renamed, use that as the dependency.

Change-Id: Idbf50537a9e2f9ea9a486d2bb76f37752caa496e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDeprecate JSONRestconfService 94/96094/1
Robert Varga [Sun, 9 May 2021 08:08:40 +0000 (10:08 +0200)]
Deprecate JSONRestconfService

This service is type-unsafe and does not have users in OpenDaylight
proper. The contract is actively hurtful as it seeks to steer users
towards opaque blobs, not expressing their service and data
dependencies. Furthermore the implementation structure forces an ugly
interface on the actual RESTCONF services, preventing reasonable
refactors.

Deprecate the service for removal, so that we can get rid of this burden
in the next major release.

Change-Id: I96d3fd86ba773fa8986454d1ac4825723b15152d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump MRI upstreams 93/96093/4
Robert Varga [Sun, 9 May 2021 05:47:39 +0000 (07:47 +0200)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.2
- infrautils-1.9.8
- yangtools-6.0.6
- mdsal-7.0.7
- controller-3.0.8
- aaa-0.13.3

Change-Id: Ib48792875c6c54a1f328e466a5de47d7d2af8850
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse project.version for all artifact declarations 37/95937/1
Robert Varga [Mon, 26 Apr 2021 11:05:43 +0000 (13:05 +0200)]
Use project.version for all artifact declarations

We have a coordinated version for all artifacts, hence we can use a
simple project.version -- making things a tad more consistent.

Change-Id: I16f07a512bcf2facd33a2272f8397539a9480407
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBinary data shall be emitted in the form of hexa numbers. 60/92760/7
Iaroslav [Tue, 29 Sep 2020 09:05:03 +0000 (12:05 +0300)]
Binary data shall be emitted in the form of hexa numbers.

Added converter character->to HEX in AsyncSshHandlerWriter class logging.

JIRA: NETCONF-135
Change-Id: I462baf94eecbc67221ca349f2b900eedf80ea483
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
3 years agoStream name should be used instead of BASE_STREAM_NAME 67/92767/10
Iaroslav [Tue, 29 Sep 2020 09:43:41 +0000 (12:43 +0300)]
Stream name should be used instead of BASE_STREAM_NAME

Refactored onNotification method to use stream parameter instead of "BASE_STREAM_NAME".
Fix ConcurrentModificationException while closing listeners/publishers.

JIRA: NETCONF-306
Change-Id: I3f08a294adf53e34c31dd23ca8d9627a46fb585c
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
3 years agoReduce memory usage of perf-client 95/95395/7
Iaroslav [Mon, 1 Mar 2021 11:06:02 +0000 (13:06 +0200)]
Reduce memory usage of perf-client

Moved payload creation from test tool start to message send. It will
prevent store huge amount of the objects and reduce memory usage.

JIRA: NETCONF-762
Change-Id: I4932f259391af5770edf8d941f9dc27f022f2277
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
3 years agoMissing notification model. 84/95284/4
Iaroslav [Mon, 22 Feb 2021 16:33:17 +0000 (18:33 +0200)]
Missing notification model.

In case server provides schema it should check if notifications
supported by the remote session. According to this it should provide schema
with notifications or without.

JIRA: NETCONF-754
Change-Id: Ifc37ebded7051aabf9150f9f49ecadaf81746261
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
3 years agoBump versions to 1.13.2-SNAPSHOT 25/95425/2
Robert Varga [Mon, 8 Mar 2021 20:24:13 +0000 (21:24 +0100)]
Bump versions to 1.13.2-SNAPSHOT

THis starts the next development iteration.

Change-Id: I49f970edb50f658cc5f1534c09351d9dae584f7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd diffie-hellman-group14-sha1 to the list of default key exchange algorithms 60/95460/2
Oleksii Mozghovyi [Wed, 10 Mar 2021 10:47:55 +0000 (12:47 +0200)]
Add diffie-hellman-group14-sha1 to the list of default key exchange algorithms

The list of key exchange algorithms enabled by default has been changed
with a Mina SSHD uplift to the version of 2.6.0, leaving some of the
SHA1 algorithms disabled by default. Some the devices might still use
this algorithm, so this change brings back the
'diffie-hellman-group14-sha1' algorithm to the list.

JIRA: NETCONF-765
Change-Id: Iea58448981e19f1632799d05dbda8784415ebf1f
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
3 years agoFix lock/unlock/commit issues for the NetconfRestconfTransactions 59/95359/26
Oleksii Mozghovyi [Wed, 24 Feb 2021 20:11:04 +0000 (22:11 +0200)]
Fix lock/unlock/commit issues for the NetconfRestconfTransactions

- Fix the problem when one transaction could suddenly remove
configuration-lock created by another one.
- Fix the problem when transaction without successful lock operation
could execute edit-config operations
- Fix the problem when failure to acquire a lock on a candidate could
lead to unexpected unlocking of the running configuration
- Fix the problem when commit didn't take into account results of
previous operations
- Execute operation futures in a chain to guarantee the correct order of
operations inside the transaction
- Fix the problem when commit operation was executed for yang-patch even
if some operations failed (JIRA: NETCONF-746)

JIRA: NETCONF-705
Change-Id: I588c6e2788983aef20b92726463930038abde3c9
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix permanent lock on the running configuration via RESTconf 58/95358/3
Oleksii Mozghovyi [Wed, 24 Feb 2021 21:41:34 +0000 (23:41 +0200)]
Fix permanent lock on the running configuration via RESTconf

This resolves the issue when the NETCONF device with both
:writable-running and :candidate capabilities gets permanently
locked after the commit happens via RESTconf.

JIRA: NETCONF-705
Change-Id: I90c6ec104a9309dd25fc66cd74f469c2f033ee5f
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
3 years agoBump MRI upstreams 69/95369/1
Robert Varga [Fri, 26 Feb 2021 15:18:30 +0000 (16:18 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.1
- infrautils-1.9.6
- yangtools-6.0.5
- mdsal-7.0.6
- controller-3.0.7
- aaa-0.13.2

Change-Id: Id8e35132aeb7eb902514e3373ef14c6d2b26cd18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse java.nio.file for file operations 43/95243/3
Robert Varga [Sun, 21 Feb 2021 15:55:05 +0000 (16:55 +0100)]
Use java.nio.file for file operations

java.nio.file is more expressive than java.io.File, use it to
perform reads and atomic renames.

Also clean up constant use and assertions a bit.

JIRA: NETCONF-756
Change-Id: Ia42c61f8cca4253a7db297e188053fcf2b63ec35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix futures handling in the NetconfRestconfTransaction 27/95327/2
Oleksii Mozghovyi [Tue, 23 Feb 2021 16:06:05 +0000 (18:06 +0200)]
Fix futures handling in the NetconfRestconfTransaction

This change solves the problem when the NetconfDataTreeService.lock()
returns an immutable list of futures, and the NetconfRestconfTransaction
wrapper can't change items on the list.

JIRA: NETCONF-705
Change-Id: Ie98f23382660683e269d3c1cdad6419be72545e5
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
3 years agoBump versions to 0.13.1-SNAPSHOT 55/95255/1
Robert Varga [Sun, 21 Feb 2021 18:16:42 +0000 (19:16 +0100)]
Bump versions to 0.13.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I0802546c10d5c845869a19bb7b150fe8c823aa21
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd feature-parent 25/83825/17
Robert Varga [Tue, 20 Aug 2019 18:16:15 +0000 (20:16 +0200)]
Add feature-parent

This centralizes a feature-parent pom.xml for reuse in single
feature artifacts.

Change-Id: I7153166a86721dea9d732e5a13174f82865e24c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump project version 23/83823/13
Robert Varga [Sun, 21 Feb 2021 16:56:25 +0000 (17:56 +0100)]
Bump project version

This bumps project version to 1.13.0-SNAPSHOT in preparation for unifying
artifact versions.

Change-Id: I4a230e8e0cadb23e34ba57ed77c365ae302cea6b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFixed reading whole list/leaf-list using GET/GET-CONFIG RPC 21/94921/7
Jaroslav Tóth [Mon, 25 Jan 2021 15:00:20 +0000 (16:00 +0100)]
Fixed reading whole list/leaf-list using GET/GET-CONFIG RPC

- The source of the issue was in skipping of empty list/leaf-list
  nodes in XMLStreamNormalizedNodeStreamWriter - the NETCONF
  filter structure was created correctly, but it wasn't correctly
  serialized into XML. However, in NETCONF, it is valid to read
  whole list/leaf-list - we must be able to build NormalizedNode
  structure from subtree-filter which "ends" by list/leaf-list.
- Fixed by introduction EmptyListXmlWriter which is responsible
  for serialization of empty list/leaf-list. Other operations
  are delegated to XMLStreamNormalizedNodeStreamWriter
  implementation.

JIRA: NETCONF-744
Change-Id: Id4b665aa45a397ab25a53e12f4eb7c1a6539d428
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdded schemaless creation of filter structure 52/93352/12
Jaroslav Tóth [Sun, 25 Oct 2020 18:31:56 +0000 (19:31 +0100)]
Added schemaless creation of filter structure

- Added procedure for creation of filter structure for schemaless
  mountpoints.
- Added two unit tests that cover most of the cases.

JIRA: NETCONF-735
Change-Id: Ib276ddaf79e5306ff6c2193a03a8b0f57f005991
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExplicit reading of list keys using subtree filtering 51/93351/12
Jaroslav Tóth [Sun, 25 Oct 2020 07:43:08 +0000 (08:43 +0100)]
Explicit reading of list keys using subtree filtering

- According to RFC-6241, section 6.2.5, NETCONF server doesn't
  have to provide values of list keys, if NETCONF client doesn't
  ask for these fields; see following statement:

  o  If any sibling nodes of the selection node are instance
     identifier components for a conceptual data structure (e.g.,
     list key leaf), then they MAY also be included
     in the filter output.

JIRA: NETCONF-735
Change-Id: I9bb048010578fd89190f616664e2175c3d3326ae
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoImplement subtree filtering using fields 54/93154/19
Jaroslav Tóth [Mon, 19 Oct 2020 07:28:13 +0000 (09:28 +0200)]
Implement subtree filtering using fields

- Fields are used for selection of specific subtrees under
  parent path - this way it is possible to limit requested
  data to specific entities without the necessity to send
  multiple get/get-config RPCs.
- Look at added unit tests to understand the functionality.

JIRA: NETCONF-735
Change-Id: I17cd364e11f8c8e61e5537fcff71a7ecedefdba3
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFile should be closed before rename 06/95106/10
Iaroslav [Wed, 10 Feb 2021 09:47:03 +0000 (11:47 +0200)]
File should be closed before rename

Rename file will make clone of file with new name and remove initial
file. This file not closed while removing so it will make impossible
file deletion on Windows due to default locking.

JIRA: NETCONF-756
Change-Id: I0f81507285811607a7ee8d40c0b50018603dd557
Signed-off-by: Iaroslav Kholiavko <iaroslav.kholiavko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd tool to measure southbound notification performance 15/94915/7
Oleksii Mozghovyi [Wed, 27 Jan 2021 12:37:19 +0000 (14:37 +0200)]
Add tool to measure southbound notification performance

This is an updated version of the tool existed in coretutorials project,
aligned with the latest API changes
- Tool is packaged into a new feature odl-netconf-test-tools
- For the testing purposes models from the original coretutorials
project are used
- Tool listens for mounted devices with prefix "perf-"
- Notification counter is only applied for devices that end with the following
pattern '*-notif-([0-9]+)', and the number after notif suffix indicates
how many notifications should be counted
- Once the mounted device is ready tool invokes create subscription
  request towards device, and counts incoming notifications

JIRA: NETCONF-759
Change-Id: I5a584032dca9a40e90dec23186562543f8752bad
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpgrade sshd to 2.6.0 64/94964/8
Iaroslav [Tue, 2 Feb 2021 14:31:46 +0000 (16:31 +0200)]
Upgrade sshd to 2.6.0

Upgrade sshd to version 2.6.0

JIRA: NETCONF-752
Change-Id: Iaf6fd1ab232458aeb58636590bc84d3d8d2036f6
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
3 years agoReturn correct code 503 when a mountpoint is not mounted. 12/94612/8
Iaroslav [Tue, 12 Jan 2021 10:31:59 +0000 (12:31 +0200)]
Return correct code 503 when a mountpoint is not mounted.

In case of mount point not mounted status code should be 503 and error
tag 'resource-denied-transport'

JIRA: NETCONF-341
Change-Id: I290b29e23952d30196c6d83d7984d5ebee4690a1
Signed-off-by: Iaroslav Kholiavko <iaroslav.kholiavko@pantheon.tech>
3 years agoAdd fields-aware NETCONF DOM API 74/93074/15
Jaroslav Tóth [Thu, 15 Oct 2020 06:17:25 +0000 (08:17 +0200)]
Add fields-aware NETCONF DOM API

- Added option to specify fields that are read from NETCONF device.
  Currently it is possible to only read one whole subtree
  using get/get-config NETCONF RPC. However, NETCONF RFC allows
  more complex subtree filtering including multiple subtrees
  in single RPC.
- It is implemented as:
  1) DOMDataBroker extension - option to create customized
     read-only, read-write transactions, and transaction chains.
  2) NetconfDataTreeService methods - using get(..) and
     getConfig(..) calls.

JIRA: NETCONF-735
Change-Id: I584bb9740f3ba6756ce283067198f9b344c75f9c
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor NetconfDataTreeServiceImpl 32/95232/3
Robert Varga [Fri, 19 Feb 2021 09:44:07 +0000 (10:44 +0100)]
Refactor NetconfDataTreeServiceImpl

Rather than using boolean dispatch, create three specific
implementations to drive the logic behind the calls.

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