netconf.git
5 years agoGet rid of netconf-tcp project 54/79654/6
Jakub Morvay [Fri, 18 Jan 2019 11:16:05 +0000 (12:16 +0100)]
Get rid of netconf-tcp project

netconf-tcp includes basic TCP server implementation used in netconf
project. It also contains instantiation logic for tcp server used by
css netconf northbound.

css is no longer in the game. Remove TCP server instantiation logic for
css netconf northbound endpoint. Move NetconfNorthboundTcpServer class
(only class used elsewhere) to mdsal-netconf-tcp projects. This project
is its primary and only user now.

Change-Id: I7dea91f33f3c3f6364d57e5a590505a058fd7957
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Do not start netconf-impl for css netconf endpoint"
Tom Pantelis [Wed, 23 Jan 2019 02:13:37 +0000 (02:13 +0000)]
Merge "Do not start netconf-impl for css netconf endpoint"

5 years agoMerge "Remove netconf-impl's getConfig_candidate.xml"
Tom Pantelis [Wed, 23 Jan 2019 02:13:23 +0000 (02:13 +0000)]
Merge "Remove netconf-impl's getConfig_candidate.xml"

5 years agoDo not start netconf-impl for css netconf endpoint 94/79794/4
Jakub Morvay [Mon, 21 Jan 2019 15:46:17 +0000 (16:46 +0100)]
Do not start netconf-impl for css netconf endpoint

netconf-impl project contains both implementation of APIs defined in
netconf-api and netconf-mapping-api projects and also instantiation
logic of some base netconf server components for netconf css northbound
endpoint. Remove this logic, css is not used anymore, so it is its
netconf endpoint.

Change-Id: Iad381885d229e374957d87087a4a96ba46f75551
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove netconf-impl's getConfig_candidate.xml 95/79795/4
Jakub Morvay [Mon, 21 Jan 2019 16:28:19 +0000 (17:28 +0100)]
Remove netconf-impl's getConfig_candidate.xml

This resource is not used anywhere, get rid of it.

Change-Id: I9ecbecdf2b26db53344cb7362aa716d4b971f9bb
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove netconf-ssh project 24/79624/10
Jakub Morvay [Thu, 17 Jan 2019 17:34:16 +0000 (18:34 +0100)]
Remove netconf-ssh project

netconf-ssh contains logic for setting up ssh servers used in netconf
project (netconf test-tool, mdsal netconf northbound and css netconf
northbound). Moreover it also actually instantiates ssh server for css
netconf northbound.

Since css is no longer around, get rid of the above mentioned ssh server
instantiation logic. Move other classes to mdsal-netconf-ssh project --
it is their primary user now.

Change-Id: Ifffcf97429887cd6533def887c29dca9678ec815
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFinish bumping to yangtools 2.1.8 24/79824/1
Stephen Kitt [Tue, 22 Jan 2019 16:03:45 +0000 (17:03 +0100)]
Finish bumping to yangtools 2.1.8

Change-Id: I51f7a2b30d40ae2b694df000465d383d165d9a0d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to mdsal 3.0.6 12/79812/1
Stephen Kitt [Tue, 22 Jan 2019 08:52:46 +0000 (09:52 +0100)]
Bump to mdsal 3.0.6

Change-Id: I6bbb6fa8af6860d9da08fcdde165a43c4abc6998
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMerge "Bump mdsal to 3.0.5"
Stephen Kitt [Mon, 21 Jan 2019 18:05:52 +0000 (18:05 +0000)]
Merge "Bump mdsal to 3.0.5"

5 years agoMerge "Bump yangtools to 2.1.8"
Jakub Morvay [Mon, 21 Jan 2019 15:49:49 +0000 (15:49 +0000)]
Merge "Bump yangtools to 2.1.8"

5 years agoMerge "Bump to odlparent 4.0.9"
Stephen Kitt [Mon, 21 Jan 2019 14:33:45 +0000 (14:33 +0000)]
Merge "Bump to odlparent 4.0.9"

5 years agoDeprecate odl-restconf-noauth feature 91/79791/2
Jakub Morvay [Mon, 21 Jan 2019 11:18:12 +0000 (12:18 +0100)]
Deprecate odl-restconf-noauth feature

odl-restconf-noauth feature is just a historic relic. It does not really
have any usage and odl-restconf should be use instead (this has the same
functionality but with authentication).

Deprecate odl-restconf-noauth feature.

Change-Id: I5007a0318f75415ecbbec4ea02e123f8f6b35324
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoBump mdsal to 3.0.5 47/79747/4
Robert Varga [Sun, 20 Jan 2019 00:01:43 +0000 (01:01 +0100)]
Bump mdsal to 3.0.5

This aligns with odlparent-4.0.9 and yangtools-2.1.8.

Change-Id: I0a6aed6c6101eef6313b57a3608e56f0ae08f32f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.1.8 56/79656/4
Robert Varga [Fri, 18 Jan 2019 10:25:59 +0000 (11:25 +0100)]
Bump yangtools to 2.1.8

yangtools-2.1.8 should address compatibility issues with woodstox,
bump to it.

Change-Id: I417b22698df04edc8263b57e6fcd5d0a558c6ef4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 4.0.9 71/79671/3
Stephen Kitt [Fri, 18 Jan 2019 15:33:15 +0000 (16:33 +0100)]
Bump to odlparent 4.0.9

Change-Id: Ieaf9938f8f0439eed91e001a256612aae1bab2a7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCheck time expiry before attempting to format notification 62/79762/2
Robert Varga [Sun, 20 Jan 2019 16:34:20 +0000 (17:34 +0100)]
Check time expiry before attempting to format notification

If the listener is not started yet, or it has stopped, we should
not try to format the document. This splits the checking into two
phases, improving things and laying the foundation for a complete
factoring out the common bits.

Change-Id: Ibff73a4979a5d67385f10647ca7c9ab64a35f42a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix adapters retaining state 59/79759/2
Robert Varga [Sun, 20 Jan 2019 15:05:22 +0000 (16:05 +0100)]
Fix adapters retaining state

Storing notifications in a field causes them to be retained for
longer than needed.

Pass them as arguments, fixing the leak and making the adapters
stateless.

Change-Id: I3977a912280740a83a3209aadf2c190336fabe1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix bierman02 ListenerAdapter memory leak 58/79758/1
Robert Varga [Sun, 20 Jan 2019 15:05:22 +0000 (16:05 +0100)]
Fix bierman02 ListenerAdapter memory leak

Storing notifications in a field causes them to be retained for
longer than needed. Pass them as arguments, fixing the leak and
making the adapter stateless.

Change-Id: I8cfb335db0ad21d37d5cce79e6fdbe31efc1ab8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify NotificationListenerAdapter 57/79757/1
Robert Varga [Sun, 20 Jan 2019 13:52:19 +0000 (14:52 +0100)]
Simplify NotificationListenerAdapter

There is just no need for the ceremony around what sort of normalized
node a DOMNotification has -- just use ContainerNode.

Change-Id: I66e2e0e72b75b0ce58be359eaa40668bc0c53b81
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Fix NetconfKeystoreAdapter onDataTreeChanged method"
Jakub Morvay [Thu, 17 Jan 2019 15:56:04 +0000 (15:56 +0000)]
Merge "Fix NetconfKeystoreAdapter onDataTreeChanged method"

5 years agoFix NetconfKeystoreAdapter onDataTreeChanged method 18/79618/4
Jakub Morvay [Thu, 17 Jan 2019 14:19:32 +0000 (15:19 +0100)]
Fix NetconfKeystoreAdapter onDataTreeChanged method

Make sure to process all incoming DataObject modifications under
netconf-keystore:keystore container. Do not stop after handling
key-credential list items, handle also modified private-key and
trusted-certificate list items.

JIRA: NETCONF-598
Change-Id: I7e56791c46bd860f98259f73f2832e49abc2e3dc
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoFix typos in netconf-keystore YANG model 20/79620/1
Jakub Morvay [Thu, 17 Jan 2019 14:34:00 +0000 (15:34 +0100)]
Fix typos in netconf-keystore YANG model

Change-Id: I62d1d2a5fecbffb6c61cfddfc0f407d8e88c0297
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "Eliminate XmlUtil.createElement(Document, String)"
Jakub Morvay [Thu, 17 Jan 2019 14:11:46 +0000 (14:11 +0000)]
Merge "Eliminate XmlUtil.createElement(Document, String)"

5 years agoMigrate netconf-console to Karaf 4 way 11/79611/2
Jakub Morvay [Thu, 17 Jan 2019 11:06:09 +0000 (12:06 +0100)]
Migrate netconf-console to Karaf 4 way

Some migration of netconf-console commands has been already done. We
updated commands to use new Karaf shell-related APIs, but we are still
using blueprint XML to create and register these commands.

This does not work with the new API. Avoid using blueprint, use new
available annotations and refactor commands to be more Karaf 4
compliant.

See https://karaf.apache.org/manual/latest/update-notes.html#_commands
for more detail.

JIRA: NETCONF-599
Change-Id: Ib43ecf01e168f77528dadc6a9224dbf70fba4606
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoEliminate XmlUtil.createElement(Document, String) 92/79592/4
Robert Varga [Thu, 17 Jan 2019 01:13:29 +0000 (02:13 +0100)]
Eliminate XmlUtil.createElement(Document, String)

This is just a shorthand for Document.createElement(String), just
migrate users over to that.

Change-Id: Ia20d02b8566c5a2abd2b904c84c5916d63399385
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse XMLConstants for "xmlns" and its URI 91/79591/2
Robert Varga [Thu, 17 Jan 2019 00:54:01 +0000 (01:54 +0100)]
Use XMLConstants for "xmlns" and its URI

Rather than spelling this out in XmlUtil, use well-known place
defining these constants. While we are at it, eliminate one copy
of XmlUtil.createElement().

Change-Id: Ie4f91a731b3b5e5ce3584514f69e183506f2097c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Provide NetconfKeystoreService RPCs in clustered topology"
Jakub Morvay [Wed, 16 Jan 2019 18:17:48 +0000 (18:17 +0000)]
Merge "Provide NetconfKeystoreService RPCs in clustered topology"

5 years agoMerge "Remove jackson dependency from restconf"
Jakub Morvay [Wed, 16 Jan 2019 18:17:35 +0000 (18:17 +0000)]
Merge "Remove jackson dependency from restconf"

5 years agoProvide NetconfKeystoreService RPCs in clustered topology 80/79580/1
Jakub Morvay [Wed, 16 Jan 2019 15:55:33 +0000 (16:55 +0100)]
Provide NetconfKeystoreService RPCs in clustered topology

Since now we support Netconf over TLS in odl-netconf-clustered-topology,
we should provide users with RPCs for configuring keys and certificates
used in Netconf over TLS.

Make sure NetconfKeystoreService RPCs are exposed once
odl-netconf-clustered-topology is installed.

JIRA: NETCONF-595
Change-Id: Id435cabe44916e01171203dc4f6b6a9a49f3239b
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoSupport Netconf over TLS in clustered topology 78/79578/1
Jakub Morvay [Wed, 16 Jan 2019 15:40:37 +0000 (16:40 +0100)]
Support Netconf over TLS in clustered topology

Netconf over TLS support is already there, enable it also in
odl-netconf-clustered-topology.

JIRA: NETCONF-594
Change-Id: Ib4c234b070cb96bb6188fe99eab6ebe22efecf59
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove jackson dependency from restconf 77/79577/1
Robert Varga [Wed, 16 Jan 2019 14:55:58 +0000 (15:55 +0100)]
Remove jackson dependency from restconf

Restconf actually does not depend on jackson, but a single test
relies on woodstox-core's XML formatting behavior.

Remove odl-jackson dependency and add a temporary woodstox-core
dependency for testing only.

Change-Id: I34038dbaa7807f25fe03de2514eb9b469b4b7979
JIRA: NETCONF-591
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoModernize generex/automaton 71/79571/3
Robert Varga [Wed, 16 Jan 2019 12:04:33 +0000 (13:04 +0100)]
Modernize generex/automaton

This brings in couple of fixes and optimizations.

Change-Id: Ia496de4efb3e68ed8b9d05cc42b61cfea9423d76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge changes I2e5faece,Ie34e98bd,Id2112fcb
Jakub Morvay [Wed, 16 Jan 2019 12:45:49 +0000 (12:45 +0000)]
Merge changes I2e5faece,Ie34e98bd,Id2112fcb

* changes:
  Eliminate unneeded test dependencies
  Remove org.jboss.resteasy/jaxrs-api dependency
  Remove use of Throwables.propagate()

5 years agoMerge "Propagate error status codes correctly"
Jakub Morvay [Wed, 16 Jan 2019 12:44:40 +0000 (12:44 +0000)]
Merge "Propagate error status codes correctly"

5 years agoMerge "Make swagger generators configurable"
Jakub Morvay [Wed, 16 Jan 2019 12:44:22 +0000 (12:44 +0000)]
Merge "Make swagger generators configurable"

5 years agoEliminate unneeded test dependencies 70/79570/1
Robert Varga [Wed, 16 Jan 2019 11:57:20 +0000 (12:57 +0100)]
Eliminate unneeded test dependencies

These dependencies are declared by odlparent, there is no need to
repeat them.

Change-Id: I2e5faecee173630af746589d50bbc93b982e79d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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 agoRemove org.jboss.resteasy/jaxrs-api dependency 69/79569/2
Robert Varga [Wed, 16 Jan 2019 11:00:17 +0000 (12:00 +0100)]
Remove org.jboss.resteasy/jaxrs-api dependency

This dependency is superseded by javax.ws.rs-api, use that instead
of this relic.

JIRA: ODLPARENT-196
Change-Id: Ie34e98bd2e9a93a4242cd32e89082d1e0528849d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove use of Throwables.propagate() 66/79566/1
Robert Varga [Wed, 16 Jan 2019 10:47:49 +0000 (11:47 +0100)]
Remove use of Throwables.propagate()

We can throw a checked IOException, do not use a runtime exception
to report errors.

Change-Id: Id2112fcba473c7fce88dc932df135ddeb8064237
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPropagate error status codes correctly 67/79567/1
Tomas Cere [Wed, 16 Jan 2019 10:47:14 +0000 (11:47 +0100)]
Propagate error status codes correctly

All RestconfDocumentedExceptions were being incorrectly
reported with status code 50x since the status code was not
correctly forwared to the underlying WebApplicationException.

Change-Id: Ibe53c560053607abff665a2f36a524dece51a2fc
JIRA: NETCONF-511
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoMerge "Do not check whether two nodes can be merged with reference comparison"
Jakub Morvay [Tue, 15 Jan 2019 16:53:24 +0000 (16:53 +0000)]
Merge "Do not check whether two nodes can be merged with reference comparison"

5 years agoDo not check whether two nodes can be merged with reference comparison 36/79536/2
Tomas Cere [Tue, 15 Jan 2019 13:14:15 +0000 (14:14 +0100)]
Do not check whether two nodes can be merged with reference comparison

These need to be compared with .equals().
Also fixup the wording slightly.

Change-Id: Ib723a9a2de9810234bdbd725326d6ebd7c4c4151
JIRA: NETCONF-600
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
5 years agoCleanup BaseSchema 32/79532/1
Robert Varga [Tue, 15 Jan 2019 10:03:01 +0000 (11:03 +0100)]
Cleanup BaseSchema

There is no need to throw ExceptionInInitializerError, as that
will be propagated by the class initializer.

Also let's not use Lists.newArrayList(), but rather use variadic
arguments and wrap them with Arrays.asList().

Finally make BaseSchema implement SchemaContextProvider, so that
its getSchemaContext() method is properly documented.

Change-Id: Ic3667f00ff19aaf881eccc1d9076c561fb070449
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize NetconfMessageTransformer.toRpcRequest() 31/79531/1
Robert Varga [Tue, 15 Jan 2019 09:30:44 +0000 (10:30 +0100)]
Optimize NetconfMessageTransformer.toRpcRequest()

YangConstants provides a utility input QName factory method,
which is slighty more efficient than QName.create(), hence we use
that. Since the resulting QName is only used for lookups, we do
not intern it (it is short-lived anyway).

When we are determining the RPC definition, we unnecessarily
consult mappedRpcs twice -- store the result in a local variable
to make it a bit faster.

Change-Id: Iffa1f50af55b18a60c4adef17221f41661a278ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Include namespace in output element of json rpc responses"
Jakub Morvay [Mon, 14 Jan 2019 18:24:51 +0000 (18:24 +0000)]
Merge "Include namespace in output element of json rpc responses"

5 years agoFix preparing of action request 72/79472/7
Anna Bencurova [Thu, 10 Jan 2019 14:58:04 +0000 (15:58 +0100)]
Fix preparing of action request

When the YangInstanceIdentifier used for creation of action request
contained mixin path argument (e.g. list as whole), the list ID was in
request twice. Once for list as whole and once for the list entry.

Change-Id: Ic6507c0137abedb6c87718c4a536c983033488f6
JIRA: NETCONF-566
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoInclude namespace in output element of json rpc responses 11/79511/2
Tomas Cere [Mon, 14 Jan 2019 11:04:39 +0000 (12:04 +0100)]
Include namespace in output element of json rpc responses

According to the rfc these should be present.

JIRA: NETCONF-592
Change-Id: I461a04726ce8ab5bd4963902070000f5f78d5d45
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
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