Jakub Morvay [Thu, 31 Jan 2019 05:30:50 +0000 (05:30 +0000)]
Merge "Bump exificient to 1.0.4"
Robert Varga [Wed, 30 Jan 2019 22:52:45 +0000 (23:52 +0100)]
Bump exificient to 1.0.4
This brings in a xerces upgrade, allowing us to remove the override
we have been carrying.
Change-Id: If2c8cd061b5c034ad62fedd15d76966785863d97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jakub Morvay [Wed, 30 Jan 2019 19:19:54 +0000 (20:19 +0100)]
Initialize EXISchema grammars lazily
Creating schema-backed netconf grammar is costly operation. Do not
create it until we actually need it.
This way we do not introduce any performance regression for netconf
sessions that do not want to use schema-informed grammars for EXI
encoding.
Also do not force grammar instantiation when a mismatching option
is specified by the peer.
JIRA: NETCONF-584
Change-Id: I83f5e18f423cd21c1dc993980f42e030f36a12ed
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Michael Vorburger [Tue, 29 Jan 2019 23:01:48 +0000 (00:01 +0100)]
remove curious hard-coded yangtools 2.1.8 which seems no longer needed
This appears to have been introduced in
I417b22698df04edc8263b57e6fcd5d0a558c6ef4, but with the subsequent "Bump
to mdsal 3.0.6" in I6bbb6fa8af6860d9da08fcdde165a43c4abc6998 (and
"Finish bumping to yangtools 2.1.8" in
I51f7a2b30d40ae2b694df000465d383d165d9a0d) can be removed, given that
mdsal 3.0.6 already pulls yangtools 2.1.8.
Change-Id: Iaefc1c066b13aa7181c93e1f2963d798c43f121b
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Tom Pantelis [Mon, 28 Jan 2019 16:45:00 +0000 (11:45 -0500)]
Move BP xml files to standard OSGI-INF/blueprint
Change-Id: I879cabdb7591fccfbe22d84cd64d4cdae66a9cc8
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Michael Vorburger [Wed, 23 Jan 2019 19:03:26 +0000 (20:03 +0100)]
destroyInstance() WebSocketServer in two tests
This is required so that other tests can createInstance() again.
JIRA: NETCONF-604
Change-Id: Id374487105bb71bd24de21717bb5e3fa763062af
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Jakub Morvay [Wed, 23 Jan 2019 08:50:04 +0000 (08:50 +0000)]
Merge changes I22b99bc2,I3f296862
* changes:
Remove netconf-ssh from netconf-artifacts
Remove netconf-notification
Jakub Morvay [Wed, 23 Jan 2019 07:47:21 +0000 (07:47 +0000)]
Merge "Remove netconf-impl test resources"
Jakub Morvay [Wed, 23 Jan 2019 07:42:36 +0000 (08:42 +0100)]
Remove netconf-ssh from netconf-artifacts
netconf-ssh does not longer exist, remove it also from
netconf-artifacts.
Change-Id: I22b99bc278c656bf89c3c022463c63e1f7797c63
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Jakub Morvay [Fri, 18 Jan 2019 13:19:43 +0000 (14:19 +0100)]
Remove netconf-notification
Remove netconf-notification project. This project has two
functions. It provides implementation of netconf notifications logic in
netconf servers. The second function is that it also starts netconf
notification infrastructure. This used to be wired with other netconf
server components and together they formed netconf server for css.
css does not longer exist. Get rid of netconf-notification instantiation
logic (Activator and other related classes). It is not longer needed.
Also move other classes to mdsal-netconf-notification project. This
project just starts this notification infrastructure for mdsal netconf
northbound endpoint and now is primary user of this classes.
Change-Id: I3f2968623295beff9bcfbce6aa48c82532ef1502
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Jakub Morvay [Wed, 23 Jan 2019 06:46:29 +0000 (07:46 +0100)]
Remove netconf-impl test resources
netconf-impl test resources do not seem to have any usage. Remove them.
Change-Id: I05e9e5159ca02e72e886f23bcb23d7f85f9b82f6
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Jakub Morvay [Wed, 23 Jan 2019 06:11:08 +0000 (07:11 +0100)]
Remove empty monitoring classes
Remove empty remaining monitoring classes. These were missed during
removal of netconf-monitoring project.
Change-Id: Id7d520ebb7f8eb80a7180a3b2691d10d2fb2246f
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
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>
Tom Pantelis [Wed, 23 Jan 2019 02:13:37 +0000 (02:13 +0000)]
Merge "Do not start netconf-impl for css netconf endpoint"
Tom Pantelis [Wed, 23 Jan 2019 02:13:23 +0000 (02:13 +0000)]
Merge "Remove netconf-impl's getConfig_candidate.xml"
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>
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>
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>
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>
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>
Stephen Kitt [Mon, 21 Jan 2019 18:05:52 +0000 (18:05 +0000)]
Merge "Bump mdsal to 3.0.5"
Jakub Morvay [Mon, 21 Jan 2019 15:49:49 +0000 (15:49 +0000)]
Merge "Bump yangtools to 2.1.8"
Stephen Kitt [Mon, 21 Jan 2019 14:33:45 +0000 (14:33 +0000)]
Merge "Bump to odlparent 4.0.9"
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>
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>
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>
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>
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>
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>
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>
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>
Jakub Morvay [Thu, 17 Jan 2019 15:56:04 +0000 (15:56 +0000)]
Merge "Fix NetconfKeystoreAdapter onDataTreeChanged method"
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>
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>
Jakub Morvay [Thu, 17 Jan 2019 14:11:46 +0000 (14:11 +0000)]
Merge "Eliminate XmlUtil.createElement(Document, String)"
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>
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>
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>
Jakub Morvay [Wed, 16 Jan 2019 18:17:48 +0000 (18:17 +0000)]
Merge "Provide NetconfKeystoreService RPCs in clustered topology"
Jakub Morvay [Wed, 16 Jan 2019 18:17:35 +0000 (18:17 +0000)]
Merge "Remove jackson dependency from restconf"
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>
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>
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>
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>
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()
Jakub Morvay [Wed, 16 Jan 2019 12:44:40 +0000 (12:44 +0000)]
Merge "Propagate error status codes correctly"
Jakub Morvay [Wed, 16 Jan 2019 12:44:22 +0000 (12:44 +0000)]
Merge "Make swagger generators configurable"
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>
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)
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>
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>
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>
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"
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>
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>
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>
Jakub Morvay [Mon, 14 Jan 2019 18:24:51 +0000 (18:24 +0000)]
Merge "Include namespace in output element of json rpc responses"
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>
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>
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>
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>
Jakub Morvay [Mon, 14 Jan 2019 10:42:25 +0000 (10:42 +0000)]
Merge "Fix distribution generation"
Jakub Morvay [Mon, 14 Jan 2019 10:40:42 +0000 (10:40 +0000)]
Merge "GET on /rests/operations with json always fails with 500"
Jakub Morvay [Mon, 14 Jan 2019 09:36:06 +0000 (09:36 +0000)]
Merge "Fix preparing result of action"
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>
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>
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>
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>
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>
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>
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>
Jakub Morvay [Thu, 10 Jan 2019 13:00:28 +0000 (13:00 +0000)]
Merge "Fix testtool on input modules without revision"
Jakub Morvay [Thu, 10 Jan 2019 12:16:39 +0000 (12:16 +0000)]
Merge "Remove netconf-monitoring"
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>
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>
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>
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>
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>
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>
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>
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>
Jakub Morvay [Mon, 7 Jan 2019 17:01:42 +0000 (17:01 +0000)]
Merge "Migrate NetconfHelloMessage's use of Optional"
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>
Jakub Morvay [Mon, 7 Jan 2019 15:28:07 +0000 (15:28 +0000)]
Merge "Replace GsonProvider to JacksonJaxbJsonProvider"
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>
Jakub Morvay [Mon, 7 Jan 2019 12:07:32 +0000 (12:07 +0000)]
Merge "Prevent ssh hang during shutdown"
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>