netconf.git
5 years agoBump to yangtools-2.1.6 05/79005/1
Robert Varga [Sun, 23 Dec 2018 07:05:32 +0000 (08:05 +0100)]
Bump to yangtools-2.1.6

This brings in latest fixes and odlparent-4.0.5 alignment.

Change-Id: I40da0b34682dd3727a5f479b3c5256accf70b43f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.5 16/78916/2
Stephen Kitt [Fri, 21 Dec 2018 09:10:42 +0000 (10:10 +0100)]
Bump to odlparent 4.0.5

Change-Id: I7cd70354f83290483ba26827ffb57ee2c6bbe361
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoApiDocServiceImpl.getListOfMounts should return an Object instead of JSON string 29/78729/4
wsd [Thu, 13 Dec 2018 05:38:44 +0000 (13:38 +0800)]
ApiDocServiceImpl.getListOfMounts should return an Object instead of JSON string

Problem: when swagger access mounted resources via /apidoc/explorer/index.html,
the explorer can't show mounted resources, only some undefined.

Reason: The JSON string in response entity is escaped by GsonProvider.

JIRA: NETCONF-587
Change-Id: Ida30a50fd7168d96904ba59fb275cf4d24817bfa
Signed-off-by: wsd <wusandi@163.com>
5 years agoMerge "Remove test-tool CSS references"
Tom Pantelis [Wed, 5 Dec 2018 15:08:26 +0000 (15:08 +0000)]
Merge "Remove test-tool CSS references"

5 years agoDo not deploy/install netconf-tools POM 56/78456/1
Jakub Morvay [Wed, 5 Dec 2018 12:47:08 +0000 (13:47 +0100)]
Do not deploy/install netconf-tools POM

netconf-tools is aggregate POM, do not deploy/install its artifact to
repo/nexus.

Change-Id: Ieef8627b66939287fa507cb8c1cc5cbe05a0d4cc
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove test-tool CSS references 55/78455/1
Jakub Morvay [Wed, 5 Dec 2018 12:39:23 +0000 (13:39 +0100)]
Remove test-tool CSS references

Change-Id: Ia9e4be7c9ff8c01ed45c1d8121144abc2f2817ac
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Get rid of checked futures in tests"
Jakub Morvay [Wed, 5 Dec 2018 12:38:56 +0000 (12:38 +0000)]
Merge "Get rid of checked futures in tests"

5 years agoMerge "Use FluentFuture in DOMDataTransactionValidator"
Jakub Morvay [Wed, 5 Dec 2018 12:38:46 +0000 (12:38 +0000)]
Merge "Use FluentFuture in DOMDataTransactionValidator"

5 years agoMerge "Refactor bad local variable name in KeepaliveSalFacade"
Jakub Morvay [Wed, 5 Dec 2018 12:38:30 +0000 (12:38 +0000)]
Merge "Refactor bad local variable name in KeepaliveSalFacade"

5 years agoMerge changes Ie852df32,I731a0066,I2e8558f1
Jakub Morvay [Wed, 5 Dec 2018 12:38:20 +0000 (12:38 +0000)]
Merge changes Ie852df32,I731a0066,I2e8558f1

* changes:
  Fix some of Java 8 IDE migration warnings
  Fix Java 7 IDE migration warnings
  Fix Java 5 IDE migration warnings

5 years agoMerge "Remove references to controller.git"
Jakub Morvay [Wed, 5 Dec 2018 12:38:04 +0000 (12:38 +0000)]
Merge "Remove references to controller.git"

5 years agoUse FluentFuture in DOMDataTransactionValidator 25/78425/4
Jakub Morvay [Tue, 4 Dec 2018 14:56:50 +0000 (15:56 +0100)]
Use FluentFuture in DOMDataTransactionValidator

Instead of CheckedFuture, use FluentFuture in
DOMDataTransactionValidator interface. This way it will get unified with
MD-SAL APIs since they are relying on FluentFutures.

Change-Id: I17c80c76a8c90c6bc1ae9091978038d8e97db839
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoGet rid of checked futures in tests 24/78424/3
Jakub Morvay [Tue, 4 Dec 2018 13:28:16 +0000 (14:28 +0100)]
Get rid of checked futures in tests

We switched netconf components to MD-SAL APIs. MD-SAL APIs rely on
FluentFuture not on CheckedFuture. Use FluentFuture when mocking MD-SAL
APIs.

Change-Id: I1e4f71a0e1f57d16c7074c46fb42b6bcd836202a
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRefactor bad local variable name in KeepaliveSalFacade 31/78431/2
Jakub Morvay [Tue, 4 Dec 2018 15:38:45 +0000 (16:38 +0100)]
Refactor bad local variable name in KeepaliveSalFacade

domRpcResultDOMRpcExceptionCheckedFuture -> rpcResultFuture

Change-Id: I62624d593dd1562a427656efba5af5db8da3aaec
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix NetconfDocumentedExceptionTest iterator 08/78408/2
Robert Varga [Tue, 4 Dec 2018 08:50:50 +0000 (09:50 +0100)]
Fix NetconfDocumentedExceptionTest iterator

Iterator should return Strings, fix that.

Change-Id: Ia9b16756520929c7fae48c18cc5e400631073baa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix some of Java 8 IDE migration warnings 18/78418/4
Jakub Morvay [Tue, 4 Dec 2018 12:25:55 +0000 (13:25 +0100)]
Fix some of Java 8 IDE migration warnings

- anonymous type can be replaced with lambda
- anonymous type can be replaced with method reference
- statement lambda can be replaced with expression lambda

Change-Id: Ie852df32bf6590e322655e8c983672914a139028
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix Java 7 IDE migration warnings 15/78415/4
Jakub Morvay [Tue, 4 Dec 2018 12:15:32 +0000 (13:15 +0100)]
Fix Java 7 IDE migration warnings

- explicit type argument can be replaces with <>
- identical 'catch' branches in 'try' statement

Change-Id: I731a00664a50fae9d4fa5f3fe9a908779948adfb
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix Java 5 IDE migration warnings 14/78414/3
Jakub Morvay [Tue, 4 Dec 2018 12:08:21 +0000 (13:08 +0100)]
Fix Java 5 IDE migration warnings

- 'StringBuffer' can be replaced with 'StringBuilder'
- get rid of unnecessary boxing and unboxing
- 'while' loop replaceable with 'foreach'

Change-Id: I2e8558f1aef8a2598cfc022e614b2f4f6e212785
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove references to controller.git 09/78409/2
Jakub Morvay [Tue, 4 Dec 2018 08:50:26 +0000 (09:50 +0100)]
Remove references to controller.git

This removes references to controller.git in maven scm plugin
configuration.

Change-Id: I939fc8be9f57d3867c4a8ddef117e0f3819c52af
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoDo not deploy/install features aggragator POMs 97/78397/1
Jakub Morvay [Mon, 3 Dec 2018 22:48:08 +0000 (23:48 +0100)]
Do not deploy/install features aggragator POMs

These POMs are for build itself only, do not produce their artifacts in
repo/nexus.

This is a follow-up patch to https://git.opendaylight.org/gerrit/#/c/78234/

Change-Id: If55df5f98e21285018870ccaf9125d80847f3460
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoAggregator POMs shouldn't have dependencies 96/78396/1
Jakub Morvay [Mon, 3 Dec 2018 22:32:27 +0000 (23:32 +0100)]
Aggregator POMs shouldn't have dependencies

features-netconf-connector-aggregator does not need any dependencies, it
is aggregator POM. Get rid of the declared dependencies.

Change-Id: I28413f336e7fca2f01746caed79bfc92aaa839b0
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMigrate netconf to MD-SAL APIs 06/77506/41
Robert Varga [Mon, 5 Nov 2018 13:08:50 +0000 (14:08 +0100)]
Migrate netconf to MD-SAL APIs

This patch mass-migrates netconf components to use MD-SAL APIs.

Change-Id: I2ddd0004ef0e72a7fa1fc7a9d7df26515326ca4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Bump to yangtools-2.1.4 and mdsal-3.0.2"
Anil Belur [Sat, 1 Dec 2018 07:18:26 +0000 (07:18 +0000)]
Merge "Bump to yangtools-2.1.4 and mdsal-3.0.2"

5 years agoSupport modules w/o revision in restconf/modules 62/78262/3
Jakub Morvay [Wed, 28 Nov 2018 11:24:51 +0000 (12:24 +0100)]
Support modules w/o revision in restconf/modules

Modules do not have to have revision. We should be able to handle such
modules in RescontfImpl getModules methods (GET resconf/modules invokes
these). When building modules container (as a response to such request)
use empty string for revision leaf to indicate that model does not have
revision.

Change-Id: Ie639c419dd27a4531194ee92a7d2d0bde4e89f70
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Log the address and port on bind errors"
Jakub Morvay [Wed, 28 Nov 2018 13:34:42 +0000 (13:34 +0000)]
Merge "Log the address and port on bind errors"

5 years agoLog the address and port on bind errors 50/78250/1
Stephen Kitt [Wed, 28 Nov 2018 09:23:02 +0000 (10:23 +0100)]
Log the address and port on bind errors

This ensures the address and port are available in the logs when we
fail to bind.

Change-Id: I100f68112d90573333340b4dc3e0a6f73c8ad90a
JIRA: NETCONF-585
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to yangtools-2.1.4 and mdsal-3.0.2 43/78143/3
Robert Varga [Mon, 26 Nov 2018 09:22:45 +0000 (10:22 +0100)]
Bump to yangtools-2.1.4 and mdsal-3.0.2

This bumps the dependencies to 2.1.4 and 3.0.2, respectively.

Change-Id: If39649ccf1d8002d9730cfc423df9bbca034f54a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not deploy/install aggregator poms 34/78234/2
Robert Varga [Tue, 27 Nov 2018 23:28:26 +0000 (00:28 +0100)]
Do not deploy/install aggregator poms

These poms are for build system only, do not not produce their
artifacts in repo/nexus.

Change-Id: I746c00addb1faf0486dba7a84285a75e113037a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd handling for aggregater sonar reports 33/78233/2
Robert Varga [Tue, 27 Nov 2018 23:25:50 +0000 (00:25 +0100)]
Add handling for aggregater sonar reports

This adds the maven-side of things for having UT coverage
aggregated for the entire project.

Change-Id: I215dd159d96941a487ce80d70ea468dd0d6e0390
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump exificient to 1.0.4 28/77928/1
Robert Varga [Mon, 19 Nov 2018 08:37:39 +0000 (09:37 +0100)]
Bump exificient to 1.0.4

The new release improves memory overhead for idle sessions, bump
to it.

Change-Id: Iabea0dc5d4e2a02eadd6428271c67f409d259bee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Migrate restconf to MD-SAL APIs"
Jakub Morvay [Sat, 17 Nov 2018 14:17:25 +0000 (14:17 +0000)]
Merge "Migrate restconf to MD-SAL APIs"

5 years agoMerge "Support consecutive slashes in RFC 8040 URIs"
Tom Pantelis [Sat, 17 Nov 2018 02:56:38 +0000 (02:56 +0000)]
Merge "Support consecutive slashes in RFC 8040 URIs"

5 years agoMigrate restconf to MD-SAL APIs 86/77486/22
Robert Varga [Mon, 5 Nov 2018 00:04:50 +0000 (01:04 +0100)]
Migrate restconf to MD-SAL APIs

This performs a mass-migration to MD-SAL APIs, switching Optional
to Java 8 and eliminating all references to CheckedFuture.

Change-Id: I4df9679ab0f16239a43a1df90eca3c6106ee7f75
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse odl hello message capabilities 97/77797/1
Anna Puchyova [Tue, 13 Nov 2018 14:27:36 +0000 (15:27 +0100)]
Use odl hello message capabilities

Fill the parameter of odl hello message capabilities
into NetconfReconnectingClientConfiguration to be used,
when connecting to the device.

JIRA: NETCONF-580
Change-Id: I9a4b2b97f335c2db330f0c1c7e86b76c4e2cffae
Signed-off-by: Anna Puchyova <Anna.Puchyova@pantheon.tech>
5 years agoSupport consecutive slashes in RFC 8040 URIs 93/77693/5
Jakub Morvay [Mon, 12 Nov 2018 18:14:20 +0000 (19:14 +0100)]
Support consecutive slashes in RFC 8040 URIs

Users often assume restconf URLs behave just as HTTP does by squashing
multiple slashes into a single one. Make sure we do not trigger an error
about an empty element in this case.

This deals with URIs in RFC 8040 restconf implementation.

NETCONF-24
Change-Id: I1c3a2085528e4177b09a2d330a6b05bb1b100147
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix continuation indentation in restconf UTs 72/77672/2
Jakub Morvay [Sun, 11 Nov 2018 20:55:16 +0000 (21:55 +0100)]
Fix continuation indentation in restconf UTs

According to our java style guide, when line-wrapping, each line after
the first (each continuation line) is indented at least +4 from the
original line.

Format RestconfSchemaServiceTest and ParserIdentifierTest according to
that.

Change-Id: Iac8ad245624c6d4a2bc2df635517d8c7d5d80fef
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoDo not use deprecated mountpoint registration 71/77671/1
Robert Varga [Sun, 11 Nov 2018 18:09:23 +0000 (19:09 +0100)]
Do not use deprecated mountpoint registration

Use proper builder pattern to talk to the mount point.

Change-Id: I7b4463e7fa5d04ef309b09e0f6ce5ecd8146271a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Migrate netconf to mockito ArgumentMatchers"
Jakub Morvay [Thu, 8 Nov 2018 14:09:10 +0000 (14:09 +0000)]
Merge "Migrate netconf to mockito ArgumentMatchers"

5 years agoMerge "Migrate restconf to mockito ArgumentMatchers"
Tom Pantelis [Thu, 8 Nov 2018 13:00:19 +0000 (13:00 +0000)]
Merge "Migrate restconf to mockito ArgumentMatchers"

5 years agoMigrate netconf to mockito ArgumentMatchers 13/77613/2
Jakub Morvay [Thu, 8 Nov 2018 11:20:11 +0000 (12:20 +0100)]
Migrate netconf to mockito ArgumentMatchers

org.mockito.Matchers is deprecated in Mockito 2. We should use
org.mockito.ArgumentMatchers instead.

Change-Id: Ib6a17cb55c95635435c14aa5f885d67ab2b02410
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoUse mockito ArgumentMatchers in protocol-framework 15/77615/1
Jakub Morvay [Thu, 8 Nov 2018 11:34:10 +0000 (12:34 +0100)]
Use mockito ArgumentMatchers in protocol-framework

org.mockito.Matchers class is deprecated so use
org.mockito.ArgumentMatchers class instead in protocol-framework
ServerTest.

Change-Id: Ia7e2d0daf40bb8ef1f3b616638e1a91f0c3ba30a
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMigrate restconf to mockito ArgumentMatchers 14/77614/2
Jakub Morvay [Thu, 8 Nov 2018 11:27:47 +0000 (12:27 +0100)]
Migrate restconf to mockito ArgumentMatchers

org.mockito.Matchers is deprecated in Mockito 2. We should use
org.mockito.ArgumentMatchers instead. Use this class in restconf UTs.

Change-Id: I3bca3a847a00f9ee5885683c9aa4c6d253c49938
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMigrate sal-rest-docgen to MD-SAL APIs 85/77485/8
Robert Varga [Sun, 4 Nov 2018 23:59:58 +0000 (00:59 +0100)]
Migrate sal-rest-docgen to MD-SAL APIs

This performs a straight-forward migration of sal-rest-docgen.

Change-Id: I18dd4382e16b0716b8551ead1cf15abb9dc14eca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate from JSONCodecFactory.getShared() 28/77528/1
Robert Varga [Tue, 6 Nov 2018 09:30:18 +0000 (10:30 +0100)]
Migrate from JSONCodecFactory.getShared()

This method is deprecated, move to using its replacement.

Change-Id: I8dd4a8ed31d43dacd3bfc9dc0fe9ac7581333384
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify MultivaluedHashMap.getFirst() 26/77526/3
Robert Varga [Tue, 6 Nov 2018 08:36:29 +0000 (09:36 +0100)]
Simplify MultivaluedHashMap.getFirst()

Rather than using an if/else block, use a trigraph, fixing a minor
eclipse warning about an unnecessary 'else'.

Change-Id: I8cc0d6d5bb4ac51fb2672e5aa047030919a47202
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify MultivaluedHashMap.addAll(Object, Object...) 25/77525/3
Robert Varga [Tue, 6 Nov 2018 08:33:15 +0000 (09:33 +0100)]
Simplify MultivaluedHashMap.addAll(Object, Object...)

This method is a copy of addAll(Object, List) and it induces
a varargs warnings. Make it final, annotate it with @SafeVarArgs
and use Arrays.asList() to forward to addAll(Object, List).

This saves some code and fixes the warning.

Change-Id: I5d4ab405de168d54a0b941afdb28d13d6ed7dcef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not allocate a short-lived ByteBuf 24/77524/3
Robert Varga [Tue, 6 Nov 2018 08:21:26 +0000 (09:21 +0100)]
Do not allocate a short-lived ByteBuf

ByteBuf.writeCharSequence() allows us to bypass manual buffer
management, use that.

Change-Id: I85dc57a8411a057843ec45b5b70fea8907ae9bed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not hard-code OK status code 23/77523/3
Robert Varga [Tue, 6 Nov 2018 08:18:19 +0000 (09:18 +0100)]
Do not hard-code OK status code

HttpStatusResponse.OK gives us everything we need, simplify
response handling using its equals() method.

Change-Id: I16cb7bc0a6e6e8a8ac10a046538566e32019a59c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate use of deprecated netty API elements 22/77522/3
Robert Varga [Tue, 6 Nov 2018 08:11:42 +0000 (09:11 +0100)]
Migrate use of deprecated netty API elements

Straightforward change to use recommended equivalents.

Change-Id: I092eb6f0a2c745b5b39cde3f35ab21f612a62215
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove use of commons-lang3 in restconf-nb-rfc8040 97/77497/1
Robert Varga [Mon, 5 Nov 2018 09:42:21 +0000 (10:42 +0100)]
Remove use of commons-lang3 in restconf-nb-rfc8040

ODL uses its own Builder concept, use that instead of pulling
in commons-lang3.

Change-Id: I27ab400ddc67f8535a651c8c0018846ac04be45f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReduce of CheckedFuture in RestconfImpl 84/77484/1
Robert Varga [Sun, 4 Nov 2018 23:56:16 +0000 (00:56 +0100)]
Reduce of CheckedFuture in RestconfImpl

RPC invocation is not using checkedGet(), hence a plain
ListenableFuture is okay. This reduces the number of warnings
and prepares us for migration to MD-SAL.

Change-Id: I9b3f739c070b14d70af61536ada88d0fc2a5ba24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Get rid of odl-netconf-connector-ssh feature"
Jakub Morvay [Wed, 31 Oct 2018 11:08:25 +0000 (11:08 +0000)]
Merge "Get rid of odl-netconf-connector-ssh feature"

5 years agoGet rid of odl-netconf-connector-ssh feature 80/77280/4
Jakub Morvay [Thu, 25 Oct 2018 17:40:16 +0000 (19:40 +0200)]
Get rid of odl-netconf-connector-ssh feature

The feature is historically linked with config-subsystem northbound
endpoint and loopback connection to this endpoint. It has been
deprecated for a while and now it just wraps odl-netconf-topology
feature.

Delete this feature as it does not provide any added value over
using odl-netconf-topology feature directly.

Change-Id: Iaabe2fc4dc2be797531fb2898f2042c38a077c76
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Add subscribeToStream to JSONRestConfService"
Tom Pantelis [Tue, 30 Oct 2018 12:47:36 +0000 (12:47 +0000)]
Merge "Add subscribeToStream to JSONRestConfService"

5 years agoMerge "Fix mounting logic in clustered topology"
Jakub Morvay [Mon, 29 Oct 2018 10:06:25 +0000 (10:06 +0000)]
Merge "Fix mounting logic in clustered topology"

5 years agoMerge "Upgrade xercesImpl"
Jakub Morvay [Mon, 29 Oct 2018 08:05:37 +0000 (08:05 +0000)]
Merge "Upgrade xercesImpl"

5 years agoAdd subscribeToStream to JSONRestConfService 10/77310/3
Josh [Sun, 28 Oct 2018 12:34:50 +0000 (14:34 +0200)]
Add subscribeToStream to JSONRestConfService

The idea here is to allow applications to
pre-register websocket listeners.

Change-Id: Ic7e55f19251e0b139256435ad215b44a596b84d9
Signed-off-by: Josh <jhershbe@redhat.com>
5 years agoRemove test dependency on xerces 95/77295/1
Robert Varga [Fri, 26 Oct 2018 09:25:05 +0000 (11:25 +0200)]
Remove test dependency on xerces

The test is mucking into a concrete implementation, use normal
API method to acquire the value for assertion.

Change-Id: I32699f6e37f922ca43d1791d0fa2604dd0aa9412
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix mounting logic in clustered topology 53/77153/7
Jakub Morvay [Thu, 25 Oct 2018 17:28:58 +0000 (19:28 +0200)]
Fix mounting logic in clustered topology

https://git.opendaylight.org/gerrit/#/c/75655/ prepared netconf
southbound plugin to support action statements, but it missed to adjust
clustered netconf topology MasterSalFacade to the changes.

Fix that.

JIRA: NETCONF-575
Change-Id: I0b2fa9258cf362d1227f62127c2c3b44126677f3
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoUpgrade xercesImpl 65/77265/1
Robert Varga [Wed, 24 Oct 2018 18:06:25 +0000 (20:06 +0200)]
Upgrade xercesImpl

exificient is pulling in an old xerces implementation, let's
override it so we do not lug around five-year old buggy code.

Change-Id: I317c8d9e09914fa19007c635f111e28dd123575e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoIntegrate MRI projects for Neon 66/74966/53
Robert Varga [Thu, 9 Aug 2018 10:07:50 +0000 (12:07 +0200)]
Integrate MRI projects for Neon

This patch bumps:
- odlparent to 4.0.2
- yangtools to 2.1.2
- mdsal to 3.0.1

It deals with the fallout in following ways:
- xmlunit -> xmlunit-legacy
- fix unstubbed methods
- migrate to java.util.Optional where needed
- update test data to account for automatic list removal
- update to sshd-2.0.0
- account for ietf-{inet,yang}-types moving
- remove explicit null in blueprint
- use isNull() instead of any(Class<T>) where we want to match null
- prevent UnnecessaryStubbingException in TestRestconfUtils class
- remove jersey-related version overrides
- reuse NoOpListenerRegistration

JIRA: NETCONF-555
JIRA: NETCONF-564
Change-Id: Ib2b6bc8cfe868f1c268b243052429e6a10cfb5e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRelease the buffer only after we are done with it 84/77084/1
Robert Varga [Thu, 18 Oct 2018 15:25:55 +0000 (17:25 +0200)]
Release the buffer only after we are done with it

We may end up touching the buffer after we have release()'d it,
which means it may have been recycled by the time we call
resetReaderIndex().

Move the release() call to after the check so we do not end up
releasing it prematurely.

Change-Id: I43156dbe2e6c53a552a322e7b5ea27f8da3873c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReuse AbstractListenerRegistration 34/76734/1
Robert Varga [Mon, 8 Oct 2018 09:32:51 +0000 (11:32 +0200)]
Reuse AbstractListenerRegistration

Instead of brewing our own, non-idempotent implementation of
ListenerRegistration use AbstractListenerRegistration which takes
care of being idempotent and holding the listener instance.

Change-Id: I1525f5011c455a0f170d492f164cdeb3b7290b9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Remove use of ThreadPools in sal-netconf-connector"
Jakub Morvay [Mon, 1 Oct 2018 22:14:57 +0000 (22:14 +0000)]
Merge "Remove use of ThreadPools in sal-netconf-connector"

5 years agoMerge changes I629c0bbd,Ia47c3163
Jakub Morvay [Mon, 1 Oct 2018 22:01:18 +0000 (22:01 +0000)]
Merge changes I629c0bbd,Ia47c3163

* changes:
  Use a dedicated no-op listener class
  Do not retain the list of RPCs

5 years agoMerge "Fix AbstractCommonSubscriber close method"
Jakub Morvay [Mon, 1 Oct 2018 21:10:26 +0000 (21:10 +0000)]
Merge "Fix AbstractCommonSubscriber close method"

5 years agoRemove use of ThreadPools in sal-netconf-connector 36/76536/4
Robert Varga [Mon, 1 Oct 2018 16:20:15 +0000 (18:20 +0200)]
Remove use of ThreadPools in sal-netconf-connector

We really just need a {Listening,Scheduled}ExecutorService, nothing
else. Propagating this outwords from NetconfDevice(Builder), eliminates
the need for per-session ListeningDecorator and proxies, saving us
at least 56 bytes for each connected device.

Change-Id: Ide69bd1a8f36eca1473313e3fd2cafb76d754464
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse a dedicated no-op listener class 38/76538/3
Robert Varga [Mon, 1 Oct 2018 16:50:17 +0000 (18:50 +0200)]
Use a dedicated no-op listener class

This saves a few bytes per session by not retaining anything
but the listener implementation.

Change-Id: I629c0bbd686ec734f36d8e8d307df3f1f733fa1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not retain the list of RPCs 37/76537/3
Robert Varga [Mon, 1 Oct 2018 16:45:43 +0000 (18:45 +0200)]
Do not retain the list of RPCs

These RPCs are only used when a listener registers, there is simply
no point to retain them in a transformed collection. We can always
re-create them as needed from the SchemaContext.

Change-Id: Ia47c3163bff5232d079f8768420bfa6360fe3b49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix AbstractCommonSubscriber close method 41/76541/2
Jakub Morvay [Mon, 1 Oct 2018 18:10:29 +0000 (20:10 +0200)]
Fix AbstractCommonSubscriber close method

Check for null registration before trying to close it.

JIRA: NETCONF-565
Change-Id: I23861ce7c1857c00334ca40fac91389200368fed
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoCleanup SimulatedCreateSubscription 35/76535/1
Robert Varga [Thu, 27 Sep 2018 12:04:11 +0000 (14:04 +0200)]
Cleanup SimulatedCreateSubscription

Using .get().get() twice is ugly, create a local variable.

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

5 years agoMerge "Fix config-only thinko"
Tom Pantelis [Wed, 26 Sep 2018 11:59:39 +0000 (11:59 +0000)]
Merge "Fix config-only thinko"

5 years agoMerge "Allow SshProxyServer to share AsynchronousChannelGroup"
Jakub Morvay [Wed, 26 Sep 2018 11:54:56 +0000 (11:54 +0000)]
Merge "Allow SshProxyServer to share AsynchronousChannelGroup"

5 years agoHonor EXI flag in testtool 54/76454/1
Robert Varga [Wed, 26 Sep 2018 09:47:19 +0000 (11:47 +0200)]
Honor EXI flag in testtool

NETCONF test tool should honor the exi flag and translate it to
proper capabilities.

Change-Id: I50acf9188eb5fd2aea60d593dfd9713e54badda4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAllow SshProxyServer to share AsynchronousChannelGroup 52/76452/1
Robert Varga [Tue, 25 Sep 2018 17:51:33 +0000 (19:51 +0200)]
Allow SshProxyServer to share AsynchronousChannelGroup

For testing purposes it is good to have the ability to share a single
thread group, as ach of them implies a dedicated thread. This patch
exposes an alternative constructor and allows multiple SshProxyServers
to share that group -- lowering resources needed significantly, both
in terms of threads, memory and file descriptors used.

Change-Id: I237ab0790e9a70c26288a116c59f5a541f236a74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix config-only thinko 43/76443/1
Robert Varga [Tue, 25 Sep 2018 13:07:24 +0000 (15:07 +0200)]
Fix config-only thinko

This fixes JSON template thinko, so that the variable matches
XML.

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

5 years agoMerge "NETCONF-553 : Stack traces need to suppressed and error messages should be...
Jakub Morvay [Mon, 24 Sep 2018 13:51:29 +0000 (13:51 +0000)]
Merge "NETCONF-553 : Stack traces need to suppressed and error messages should be propagated for mounted devices"

5 years agoNETCONF-553 : Stack traces need to suppressed and error messages should 97/75597/2
Balaji Varadaraju [Thu, 30 Aug 2018 23:23:35 +0000 (18:23 -0500)]
NETCONF-553 : Stack traces need to suppressed and error messages should
be propagated for mounted devices

Traversed entire error info to capture all error messages returned by the
NETCONF device. Also suppressed the stack traces in the RESTCONF output.

Change-Id: I9afc5948a9b48c12e649b9960d011870a4d9ee73
Signed-off-by: Balaji Varadaraju <bvaradar@luminanetworks.com>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Cleanup NetconfRemoteSchemaYangSourceProvider"
Jakub Morvay [Sun, 23 Sep 2018 13:38:46 +0000 (13:38 +0000)]
Merge "Cleanup NetconfRemoteSchemaYangSourceProvider"

5 years agoCleanup NetconfRemoteSchemaYangSourceProvider 46/76346/5
Robert Varga [Fri, 21 Sep 2018 12:15:53 +0000 (14:15 +0200)]
Cleanup NetconfRemoteSchemaYangSourceProvider

Use Java 8 constructs instead of Guava where needed, cleanup source
code formatting and turn an internal class into a simple(r) lambda.

Change-Id: Ie79188f18186bd0afa2cfb5ab781e25123ed1549
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Remove use of deprecated Guava methods from testtool"
Jakub Morvay [Sat, 22 Sep 2018 18:09:41 +0000 (18:09 +0000)]
Merge "Remove use of deprecated Guava methods from testtool"

5 years agoRemove use of deprecated Guava methods from testtool 48/76348/1
Robert Varga [Fri, 21 Sep 2018 14:26:13 +0000 (16:26 +0200)]
Remove use of deprecated Guava methods from testtool

Files.read() and Files.write() are scheduled for removal,
use their replacements.

Change-Id: Ic4b49611c6371c39a194b1f248b298e04e5d0c76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSpeed up YangLibrarySchemaYangSourceProvider 43/76343/1
Robert Varga [Fri, 21 Sep 2018 12:04:07 +0000 (14:04 +0200)]
Speed up YangLibrarySchemaYangSourceProvider

We can potentially have a lot of schemas for a mount point, hence
we should be using an immutable map. Also do not use Map.contains()
before issuing a Map.get(), saving one lookup.

Change-Id: Ic80d2299fa5e67afcbb1578db5e43f999b1a96e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCache SchemaPath for well-known netconf operations 42/76342/1
Robert Varga [Fri, 21 Sep 2018 11:48:25 +0000 (13:48 +0200)]
Cache SchemaPath for well-known netconf operations

Rather than invoking toPath(QName) on each invocation, allocate
a SchemaPath constant for common operations and reuse it across
invocations.

Change-Id: Iefd0b24ec3dd900ddfe54dc4f89baffa1eec91a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate netconf docs to project repo 88/76188/2
Thanh Ha [Mon, 17 Sep 2018 16:41:56 +0000 (12:41 -0400)]
Migrate netconf docs to project repo

Issue: DOCS-69
Change-Id: I2941d5aa1ea90ee99c9ffe9269b118ea70648fcb
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoBootstrap netconf documentation 87/76187/2
Thanh Ha [Mon, 17 Sep 2018 16:38:37 +0000 (12:38 -0400)]
Bootstrap netconf documentation

Issue: DOCS-69
Change-Id: I131c540aca45c6ad742565193801204227554d43
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
5 years agoFix missing support of actions in KeepaliveSalFacade 14/75814/1
Jakub Tóth [Thu, 6 Sep 2018 09:23:38 +0000 (11:23 +0200)]
Fix missing support of actions in KeepaliveSalFacade

Change-Id: I1696a92d699debbd5d97219769f9beabc6ef8624
Signed-off-by: Jakub Tóth <jakub.toth@pantheon.tech>
(cherry picked from commit 332280c42305db34b1b1ca0b59f59964cb5e305f)

5 years agoDo not instantiate NormalizedNodes for filter 13/75513/8
Robert Varga [Mon, 27 Aug 2018 10:43:27 +0000 (12:43 +0200)]
Do not instantiate NormalizedNodes for filter

Using ImmutableNodes.fromInstanceId() does not work for leaf nodes,
as we do not have a value, which violates LeafNode contract -- leading
to an IllegalStateException when a user attempts to read() a single
leaf via a transaction.

As it turns out, this is completely unnecessary, as all we are doing
is iterating through the temporary NormalizedNode and creating
NormalizedNodeStreamWriter events based on that.

This patch replicates ImmutableNodes.fromInstanceId() logic, but
simplifies it for this particular task, short-cutting NormalizedNode
creation and emitting events directly as we are iterating over
the YangInstanceIdentifier.

JIRA: NETCONF-563
Change-Id: I0781e81d812ee979deaafb9dfa811e143866f4af
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not allocate an AtomicBoolean 86/75486/1
Robert Varga [Sun, 26 Aug 2018 20:14:00 +0000 (22:14 +0200)]
Do not allocate an AtomicBoolean

This is costing us an object and therefore a potential cache miss.
We can do better with an explicit AtomicFieldUpdater, saving 16-28
bytes per instance.

Change-Id: Ie5680fed2d6c20487d475621978cf455c492229b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize sal-netconf-connector translation 74/75474/3
Robert Varga [Fri, 24 Aug 2018 15:29:05 +0000 (17:29 +0200)]
Optimize sal-netconf-connector translation

Use pre-computed filter type and notably NodeIdentifiers rather than
creating them from QName constants.

Change-Id: I388594484c09757b6f66f5f9e5120359658b02ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAbstractEdit: improve error message on missing schema node 66/75366/1
Marek Gradzki [Tue, 21 Aug 2018 13:47:45 +0000 (15:47 +0200)]
AbstractEdit: improve error message on missing schema node

Include node name in the error message.

Change-Id: Ife8f95cb333e2e1065c2c27d51acb406710cc375
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
5 years agoMerge "Add the ability to use schema-aware coding"
Jakub Morvay [Tue, 21 Aug 2018 09:15:53 +0000 (09:15 +0000)]
Merge "Add the ability to use schema-aware coding"

5 years agoMerge "NETCONF-557: Add support for URL capability"
Jakub Morvay [Tue, 21 Aug 2018 09:15:07 +0000 (09:15 +0000)]
Merge "NETCONF-557: Add support for URL capability"

5 years agoAdd the ability to use schema-aware coding 36/35136/26
Robert Varga [Wed, 17 Jan 2018 18:43:52 +0000 (19:43 +0100)]
Add the ability to use schema-aware coding

With the switch to Exificient we can actually use schema-informed
encoding -- add basic support for that.

Change-Id: If24a418302d151114407ee647ec5e12c3d3b3e76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReturn Set instead of Iterable in test setup 35/75335/1
Robert Varga [Mon, 20 Aug 2018 17:20:30 +0000 (19:20 +0200)]
Return Set instead of Iterable in test setup

This allows us to define equality in superclass, hence return
proper Set.

Change-Id: I48c37054440e5983e5033a0ed927080a7d255e72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix argument strings 23/75323/9
Robert Varga [Mon, 20 Aug 2018 10:29:30 +0000 (12:29 +0200)]
Fix argument strings

When logging an exception we should not have an explicit placeholder
and also we should properly constify arguments. This is pointed out
by updated findbugs.

Change-Id: I71a0b23b5510a36bfe9808dfe92c27717e24fbb3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix checkstyle violations 22/75322/1
Robert Varga [Mon, 20 Aug 2018 10:45:14 +0000 (12:45 +0200)]
Fix checkstyle violations

Updated checkstyle is better at catching violations, fix them up
before upgrading.

Change-Id: I6a2e6f262dabbb753f905f12c1f2161c409a94ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoNETCONF-557: Add support for URL capability 17/75317/1
Marek Gradzki [Thu, 9 Aug 2018 11:45:54 +0000 (13:45 +0200)]
NETCONF-557: Add support for URL capability

This patch brings support of URL capability
in <edit-config> and <copy-config> RPCs
to mdsal-netconf-connector.

Remote config upload is not supported.
Remote to remote operations are not supported.

The capability is advertised as:

urn:ietf:params:netconf:capability:url:1.0?scheme=file

but config download is also supported via http and https.

Change-Id: Idb5bae4e24ff2a098bc60bf24c36fb40113fd8f5
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
5 years agoPrepare netconf to support YANG 1.1 actions 45/74745/17
Jakub Tóth [Mon, 6 Aug 2018 14:11:29 +0000 (16:11 +0200)]
Prepare netconf to support YANG 1.1 actions

This allows implementation of a factory for creating of DOMActionService
of a connected device. This service is going to be part of services provided
by the device's mountpoint.

Change-Id: I1c79b4bc8f1b1c63f7ffb2306f07ea9872f15882
Signed-off-by: Jakub Tóth <jakub.toth@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump argparse4j to 0.8.1 35/75135/2
Robert Varga [Sat, 11 Aug 2018 12:53:26 +0000 (14:53 +0200)]
Bump argparse4j to 0.8.1

Major bump.

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