netconf.git
5 years agoMake swagger generators configurable 09/79509/3
Juraj Veverka [Sun, 16 Dec 2018 09:48:02 +0000 (10:48 +0100)]
Make swagger generators configurable

Swagger generators use configurable base URL paths with defaults:
- BaseYangSwaggerGeneratorDraft02 uses "restconf"
- BaseYangSwaggerGeneratorRFC8040 uses "rests"
Defaults may be overridden per deployment scenario. This makes Swagger
document generator more flexible in out-of karaf deployment scenarios.

Change-Id: I5fdda329dd2911913137d25a48450a5e161af679
Signed-off-by: Juraj Veverka <juraj.veverka@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
(cherry picked from commit 55e2fe2242c35ee2d20168b29f0bc97313327b17)

5 years agoAdd shading checker script 97/79497/2
Robert Varga [Sat, 12 Jan 2019 13:32:44 +0000 (14:32 +0100)]
Add shading checker script

This simple script can be used to cheeck whether the shaded jar
does not contain any references which should also be shaded.

Change-Id: I3d62a3921a639a7ade45ba6c867d0d33ac9551da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not suppress module name for top-level elements 16/79416/6
Tomas Cere [Thu, 10 Jan 2019 14:25:45 +0000 (15:25 +0100)]
Do not suppress module name for top-level elements

RFC8040 states that top-level elements should start off fully
qualified -- hence we should disregard initial namespace when
for them.

JIRA: NETCONF-497
Change-Id: I1e638957510fe2efa8a42a430fb4c2ded48082ec
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Fix distribution generation"
Jakub Morvay [Mon, 14 Jan 2019 10:42:25 +0000 (10:42 +0000)]
Merge "Fix distribution generation"

5 years agoMerge "GET on /rests/operations with json always fails with 500"
Jakub Morvay [Mon, 14 Jan 2019 10:40:42 +0000 (10:40 +0000)]
Merge "GET on /rests/operations with json always fails with 500"

5 years agoMerge "Fix preparing result of action"
Jakub Morvay [Mon, 14 Jan 2019 09:36:06 +0000 (09:36 +0000)]
Merge "Fix preparing result of action"

5 years agoGET on /rests/operations with json always fails with 500 70/79470/2
Tomas Cere [Fri, 11 Jan 2019 12:20:41 +0000 (13:20 +0100)]
GET on /rests/operations with json always fails with 500

Stop throwing UnsupportedOperationException in FakeContainerSchemaNode
isPresence() method, since this container is only used for get on /rests/operations
we can assume this container is not a presence container.

JIRA: NETCONF-593
Change-Id: I06692da9d77e4230f32aa19aa25989ab72dd114a
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoShade exificient 71/77471/8
Robert Varga [Thu, 25 Oct 2018 00:02:50 +0000 (02:02 +0200)]
Shade exificient

Shade exificient and xerces, so they do not end up polluting
the container with a full XML stack.

JIRA: CONTROLLER-1867
JIRA: NETCONF-591
Change-Id: If9e5d468de08dd820636a5eeb8ecdb2871fe1a3f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix distribution generation 78/79478/1
Robert Varga [Fri, 11 Jan 2019 14:08:41 +0000 (15:08 +0100)]
Fix distribution generation

This is a hot-fix for creation of distro, just to get things
rolling.

Change-Id: Ibbfbf4872bf2561aa7449e0bfb313a75532fabd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix preparing result of action 71/79471/1
Anna Bencurova [Thu, 10 Jan 2019 14:21:17 +0000 (15:21 +0100)]
Fix preparing result of action

NullPointerException was thrown when action with no output
was defined and used and OK reply returned.

Change-Id: I2bcf846c501a650d754c943d2e1dc69e73a8dd37
JIRA: NETCONF-567
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
5 years agoBump mdsal to 3.0.4 33/79433/1
Robert Varga [Thu, 10 Jan 2019 15:46:26 +0000 (16:46 +0100)]
Bump mdsal to 3.0.4

This realigns odlparent/yangtools/mdsal and brings in the latest
improvements.

Change-Id: Ie66c86320c88917eaae481cedd734ccf81f506c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.7 22/79422/1
Robert Varga [Thu, 10 Jan 2019 15:27:54 +0000 (16:27 +0100)]
Bump yangtools to 2.1.7

This realigns odlparent/yangtools and brings in a few minor
improvements.

Change-Id: I7d30b2c61ee7124a44db810efe455aa6458f8b0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.8 64/79364/3
Stephen Kitt [Wed, 9 Jan 2019 14:54:55 +0000 (15:54 +0100)]
Bump to odlparent 4.0.8

Change-Id: I165ea8f9f5f21f0b35185900323758876049c696
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMerge "Fix testtool on input modules without revision"
Jakub Morvay [Thu, 10 Jan 2019 13:00:28 +0000 (13:00 +0000)]
Merge "Fix testtool on input modules without revision"

5 years agoMerge "Remove netconf-monitoring"
Jakub Morvay [Thu, 10 Jan 2019 12:16:39 +0000 (12:16 +0000)]
Merge "Remove netconf-monitoring"

5 years agoFix testtool on input modules without revision 38/79138/3
Jaroslav Tóth [Wed, 2 Jan 2019 14:13:20 +0000 (15:13 +0100)]
Fix testtool on input modules without revision

- According to RFC 7950 revision number in module is not
  mandatory (only recommended) - currently Netconf Testtool fails
  on such modules with NullPointerException because it cannot find
  revision line pattern.
- Revision number doesn't have to be placed in input YANG schema -
  the filename is kept unmodified.
- Regex pattern that matches date in revision is also supplemented
  by revision keyword and optional double-apostrophes - there could
  be a collision with date in include statement.
- YANG module capability model is modified so the revision can be
  null - reurning of Optional.absent().
- DummyMonitoringService sets empty string in place of null
  revision numbers.

Change-Id: I868d39c111d788a0de86251da10f76a448f47de4
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoRemove netconf-monitoring 74/79274/6
Jakub Morvay [Fri, 4 Jan 2019 15:48:49 +0000 (16:48 +0100)]
Remove netconf-monitoring

netconf-monitoring is a forgotten remark of CSS times. It used to be
netconf monitoring implementation for CSS netconf endpoint. CSS is gone
so we do not need to support netconf monitoring for it.

Move GetSchema class to mdsal-netconf-monitoring (only used class
here) and move the parts needed by testtool into testtool monitoring
while we decide what we want to do with them.

JIRA: NETCONF-589
Change-Id: Ic734ddab4e9a94547a8547f61b173f8eed1111ea
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoInstall both restconf northbounds with odl-restconf 43/79343/2
Robert Varga [Wed, 9 Jan 2019 12:49:38 +0000 (13:49 +0100)]
Install both restconf northbounds with odl-restconf

Now that we have separate packaging for both northbounds, make
sure we pull them into odl-restconf.

This eliminates the need for odl-restconf-nb-rfc8040-all, as that
is a subset of odl-restconf-all.

Change-Id: Iafda7f00aeb635414db6230410f055a857db032d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out odl-restconf-nb-bierman02 42/79342/2
Robert Varga [Wed, 9 Jan 2019 12:46:15 +0000 (13:46 +0100)]
Separate out odl-restconf-nb-bierman02

odl-restconf is our user-installable feature which we want to use
to install both northbounds. Separate out odl-restconf-nb-bierman02,
which is authenticated version of bierman02 and pull it in.

Change-Id: Idf8db9d41629824b881ad77145ec4d10c7b057e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSeparate out odl-restconf-nb-bierman02-noauth 41/79341/2
Robert Varga [Wed, 9 Jan 2019 12:41:50 +0000 (13:41 +0100)]
Separate out odl-restconf-nb-bierman02-noauth

odl-restconf-noauth is the top-level, default feature, which
we want to use to install both northbounds.

Separate out bierman02 into its own feature and make sure
odl-restconf-noauth depends on it.

Change-Id: Ib703d9a2912a3d6e4b546be6c0be72a93bbbf5c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRename odl-restconf-base to odl-restconf-nb-bierman02-base 40/79340/1
Robert Varga [Wed, 9 Jan 2019 12:35:25 +0000 (13:35 +0100)]
Rename odl-restconf-base to odl-restconf-nb-bierman02-base

This feature is hosting the base bierman02 bundle and configuration,
hence it should be named accordingly.

This reduces confusion a bit and allows us to install both
northbounds simultaneously.

Change-Id: Ie708fe7ab73958c009af0e8494d01f5329587a74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove odl-restconf dependency on jackson 39/79339/1
Robert Varga [Wed, 9 Jan 2019 12:19:17 +0000 (13:19 +0100)]
Remove odl-restconf dependency on jackson

Jackson is part of odl-restconf-common, it should not be in
the user-installable feature.

Change-Id: I2d4019b1aca6cb1942400b4469356a10b2dbbcb0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPrevent duplicate netty packaging 37/79337/1
Robert Varga [Wed, 9 Jan 2019 11:43:36 +0000 (12:43 +0100)]
Prevent duplicate netty packaging

With protocol-framework gone, odl-netty-api is missing
a dependency on odl-netty-4, preventing duplicates. Make sure
we have that in place.

Change-Id: I596502060610087e39d757db788ab715939963e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Migrate NetconfHelloMessage's use of Optional"
Jakub Morvay [Mon, 7 Jan 2019 17:01:42 +0000 (17:01 +0000)]
Merge "Migrate NetconfHelloMessage's use of Optional"

5 years agoMigrate NetconfHelloMessage's use of Optional 40/79240/8
Robert Varga [Fri, 4 Jan 2019 16:14:52 +0000 (17:14 +0100)]
Migrate NetconfHelloMessage's use of Optional

Use java.util.Optional, cascading that to all users.

Change-Id: I3ba97d060c8ea564bec378285bf6d8dbdb6a59d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Replace GsonProvider to JacksonJaxbJsonProvider"
Jakub Morvay [Mon, 7 Jan 2019 15:28:07 +0000 (15:28 +0000)]
Merge "Replace GsonProvider to JacksonJaxbJsonProvider"

5 years agoReplace GsonProvider to JacksonJaxbJsonProvider 38/78838/6
wsd [Mon, 17 Dec 2018 14:05:46 +0000 (22:05 +0800)]
Replace GsonProvider to JacksonJaxbJsonProvider

Problem: GsonProvider uses com.google.gson.Gson to convert a javabean to a json string
and is not compatitble with ApiDelaration which has a defined field:
com.fasterxml.jackson.databind.node.ObjectNode models for the swagger model object.
So it should use ObjectMapper to convert swagger api object instead of google Gson.
Obviously, com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider can achieve this conversion
by using the org.opendaylight.netconf.sal.rest.doc.jaxrs.JaxbContextResolver.

JIRA: NETCONF-588
Change-Id: Iee8a0528a29601a8737ed0247f183fddc9c5ebe5
Signed-off-by: wsd <wusandi@163.com>
5 years agoMerge "Prevent ssh hang during shutdown"
Jakub Morvay [Mon, 7 Jan 2019 12:07:32 +0000 (12:07 +0000)]
Merge "Prevent ssh hang during shutdown"

5 years agoPrevent ssh hang during shutdown 68/79268/5
Tomas Cere [Mon, 7 Jan 2019 10:21:09 +0000 (11:21 +0100)]
Prevent ssh hang during shutdown

Add a reference listener for netty executor service provided by blueprint
so we can close ssh servers while the bundle still exists. This prevents
the hang seen during shutdown since the executor was being shutdown before
the mdsal-netconf-ssh.

JIRA: NETCONF-577
Change-Id: I062c9e8afb349817435ea0b1dde796a54ebb22d2
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoSpecialize protocol-framework to netconf 37/79237/6
Robert Varga [Fri, 4 Jan 2019 14:24:23 +0000 (15:24 +0100)]
Specialize protocol-framework to netconf

As a first step towards sanity, we eliminate protocol-framwork
by moving it into netconf-api, but specialized to deal with
NETCONF protocol only.

This eliminates one level of abstraction, allowing us to reduce
the number of classes and artifacts involved. We also sacrifice
tests, as most of the mechanics should be covered by netconf-level
tests.

JIRA: NETCONF-554
Change-Id: Iba41c5ad72a0148d4e1d768d3122ddebce18f4c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDeprecate protocol-framework tests 30/79230/1
Robert Varga [Fri, 4 Jan 2019 13:09:41 +0000 (14:09 +0100)]
Deprecate protocol-framework tests

Since the framework is deprecated, deprecate its tests, too, so
we lower the compile-time noise.

Change-Id: I8502821f40e5c92898270b1861c1aa9646287164
JIRA: NETCONF-554
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove duplicate TimedReconnectStrategyFactory 28/79228/2
Robert Varga [Fri, 4 Jan 2019 12:27:19 +0000 (13:27 +0100)]
Remove duplicate TimedReconnectStrategyFactory

This code is duplicated between the two netconf-topology implementations
and is tightly coupled with TimedReconnectStrategy.

Move the class into protocol-framework and deprecate it, eliminating
duplication.

JIRA: NETCONF-554
Change-Id: I807b97e7d49b0e3a20a9200b42ec694f59f2c49a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRefactor client builder logic 25/79225/4
Robert Varga [Fri, 4 Jan 2019 10:12:27 +0000 (11:12 +0100)]
Refactor client builder logic

We acquire protocol multiple times, leading to it being flagged
for null violations. Refactor the code a bit to make it easier
to follow what is going on.

Change-Id: I5a9f4a709e49fc383b7573d9c8638c80559afc8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFactor out SslHandlerFactoryImpl 24/79224/2
Robert Varga [Fri, 4 Jan 2019 09:44:12 +0000 (10:44 +0100)]
Factor out SslHandlerFactoryImpl

SslHandlerFactoryImpl is a separate piece of logic independent
of AbstractNetconfTopology. Move it to its own package-protected
class and cleanup its use of Optional.

Change-Id: I93b1cba1c77185fd79e345e08a7d5be76b15509a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoModernize collection allocation 20/79220/3
Robert Varga [Fri, 4 Jan 2019 03:37:18 +0000 (04:37 +0100)]
Modernize collection allocation

Eliminate Maps.newHashMap(), Lists.newArrayList(), Sets.newHashSet()
and related calls in favor of explicit instantiation.

Also eliminate use of deprecated ConcurrentSet.

Change-Id: Ie9b961b9db0984480374be53795c308882d3cdaa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCache netconf operations 19/79219/1
Robert Varga [Fri, 4 Jan 2019 03:05:08 +0000 (04:05 +0100)]
Cache netconf operations

NetconfMonitoringOperationService is creating operations on demand,
where these are immutable and can be freely reused.

Instantiate them exactly once and keep them around for reuse.

Change-Id: If0ed07af0863dba0e715c4ce0447d22289a3475f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoIgnore NETCONF message document whitespace 99/79199/1
Robert Varga [Thu, 3 Jan 2019 18:43:38 +0000 (19:43 +0100)]
Ignore NETCONF message document whitespace

The transformer we use is specifically allowed to add whitespace,
which does not offer us with enough control as to what it is going
to be -- making it implementation-dependent.

Checking whitespace match actually breaks with Java11, so disable
that checking.

Change-Id: I8b3b5fa648ea2f13cc069b03ba374975be33e9d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd JAXB dependencies 35/79135/7
Robert Varga [Wed, 2 Jan 2019 13:09:16 +0000 (14:09 +0100)]
Add JAXB dependencies

Java 11 is shipping without JAXB, make sure we declare them where
they are used.

Change-Id: I8a6a9b2601484317991c0b3b2610c1cc492275bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 4.0.7 18/79118/3
Stephen Kitt [Wed, 2 Jan 2019 10:24:25 +0000 (11:24 +0100)]
Bump odlparent to 4.0.7

Change-Id: I3704dd326c9f99c49f60d94188fdcabd19044d8a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoSwitch to SpotBugs 49/79149/1
Robert Varga [Wed, 2 Jan 2019 15:38:16 +0000 (16:38 +0100)]
Switch to SpotBugs

findbugs does not work JDK9+, while spotbugs does. Switch to
SpotBugs.

Change-Id: I8c7b796210085fef354cbc8efb0a2ff84cd4c08d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix NamespaceContext test implementation 39/79139/2
Robert Varga [Wed, 2 Jan 2019 12:44:55 +0000 (13:44 +0100)]
Fix NamespaceContext test implementation

Java 10 changed the getPrefixes() to return Iterator<String>, making
this class fail to compile with JDK10+.

Fix this by adjusting the return type to match.

Change-Id: Id2807c1480462f249518613bfaa443fe36fe85bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix HardcodedNamespaceResolver 33/79133/1
Robert Varga [Wed, 2 Jan 2019 12:44:55 +0000 (13:44 +0100)]
Fix HardcodedNamespaceResolver

Java 10 changed the getPrefixes() to return Iterator<String>, making
this class fail to compile with JDK10+.

Fix this by adjusting the return type to match.

Change-Id: Iee84faebe2adddd710e40a229eb1705a324b50bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove unneeded aaa versions 09/79109/1
Robert Varga [Wed, 2 Jan 2019 09:37:03 +0000 (10:37 +0100)]
Remove unneeded aaa versions

AAA is advertizing proper versions in artifacts, address FIXMEs
to remove versions.

Change-Id: I29ed554fec891b3851186965ca265c38947e496a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump mdsal to 3.0.3 18/79018/1
Robert Varga [Sun, 23 Dec 2018 22:58:46 +0000 (23:58 +0100)]
Bump mdsal to 3.0.3

This brings in latest fixes and alignes with odlparent-4.0.5.

Change-Id: I34de450c25a0863628623aca59c286076c2c61ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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"