agosain [Fri, 8 Feb 2019 21:31:42 +0000 (13:31 -0800)]
Add flexible mount point naming strategy
The user can now configure mount point names to either contain
IP address and port (default), or just the IP address.
Change-Id: Iea07f49ace2f9d0c5826e08791847e414c261403
Signed-off-by: agosain <agosain@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5855a337cbe0657c8dfd9ef3fba2d2d94939965a)
Robert Varga [Tue, 21 May 2019 11:37:51 +0000 (13:37 +0200)]
Improve global config application
Rather than iterating through all reported changes and publishing
configuration for each of them, acquire the last component and
publish only that.
This leads to faster DTCL (as not all roots need to be acquired)
as well as better atomicity, as readers do not observe intermediate
state if there are multiple changes reported.
Change-Id: I5805566291ea6ebdd6a6c49594fded5aa4243bcb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3c9bfd451c6b862079a1eb5bb31ec98150b1d18f)
Robert Varga [Tue, 21 May 2019 11:27:02 +0000 (13:27 +0200)]
Fix unsafe global config access
Current global config is a volatile variable, hence it must be
acquired into a local variable for proper nullness checks --
otherwise it is open to TOCTOU race conditions leading to NPEs.
Change-Id: I9316b3ed976575726da7a065668c507e15fe0ddf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 May 2019 10:40:57 +0000 (10:40 +0000)]
Merge "Fix DeviceOp DTCL" into stable/neon
Robert Varga [Thu, 16 May 2019 15:32:36 +0000 (17:32 +0200)]
Fix DeviceOp DTCL
The did not account for the possiblity of null host keys, hence
it incurred NPEs when it was attempting to update its internal
cache.
This also refactor the code so that we share the code path between
DeviceOp and DeviceConfig.
JIRA: NETCONF-615
Change-Id: I1e3329604e1686ee4a79baeea96dc354c49c9e04
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
be977cc2f87dc153beb8542c2924c340848a453a)
Anna Bencurova [Mon, 20 May 2019 15:08:41 +0000 (17:08 +0200)]
Fix preparing action with path containing augment
- Augment does not have QName, so call getNodeType causes exception.
JIRA: NETCONF-620
Change-Id: Ib5f64eb1980784ad8df617a1ad9676cad9c2111c
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
(cherry picked from commit
45550671df11ff4df23dbd4072561b20919df1a2)
Robert Varga [Thu, 16 May 2019 14:15:35 +0000 (14:15 +0000)]
Merge "Fix mdsal-netconf-connector dependencies" into stable/neon
Robert Varga [Thu, 16 May 2019 14:15:19 +0000 (14:15 +0000)]
Merge "Remove dependencies on controller APIs" into stable/neon
Robert Varga [Tue, 14 May 2019 11:29:03 +0000 (13:29 +0200)]
Remove dependencies on controller APIs
We are no longer using these, remove the declarations.
Change-Id: If05a4d061e3d72caa15807dcf7eb312cbe2db0f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
cfe020f52220ba256f8eb646f181a1e542bc7254)
Robert Varga [Wed, 15 May 2019 09:18:14 +0000 (11:18 +0200)]
Do not deploy shaded-exificient-jar
This artifact should not be necessary for our operation, do not
deploy it.
Change-Id: I853b301c6c99db652c13d8a67b1a7049ba19dc53
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 14 May 2019 20:07:49 +0000 (22:07 +0200)]
Fix mdsal-netconf-connector dependencies
sal-broker-impl is not needed and it not pulling in in-memory DS
has broken the build. Fix up dependencies to pull in mdsal
counterparts, which is what we really need.
Change-Id: I5795877b16f55a9376e7635a360eadc962ff9b48
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
c55544c2ad343b1ebd38bd5db7deb9a81ccfa347)
jenkins-releng [Wed, 15 May 2019 00:05:51 +0000 (00:05 +0000)]
Bump versions by x.y.(z+1)
Change-Id: I4b21b3637d3573576a0e3c2c1f8abd832b417194
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Robert Varga [Tue, 7 May 2019 08:52:07 +0000 (08:52 +0000)]
Merge "Fixed deadlock between AsyncSshHandlerReader and AsyncSshHandler" into stable/neon
Robert Varga [Mon, 6 May 2019 20:56:54 +0000 (22:56 +0200)]
Capture server key before returning from callback
The key exchange structure is torn down immediately after
KeyEstablished callback returns, hence we need to capture
the server key before returning.
JIRA: NETCONF-614
Change-Id: Iebe69fe374a766f1502325cb610eed8dadb5f099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jaroslav Tóth [Sat, 30 Mar 2019 18:12:03 +0000 (19:12 +0100)]
Fixed deadlock between AsyncSshHandlerReader and AsyncSshHandler
First was fix in AsyncSshHandlerReader but there was another
deadlock after that. Therefore a change in AsyncSshHandler is also
needed. Both ABBA deadlockw occur when AsyncSshHandler.disconnect
(..) and AsyncSshHandlerReader.invokeDisconnect(..) methods are
executed concurrently within the same SSH session that is going
to be closed.
Note: Snippets from stack-traces are from Oxygen distribution, so
the line numbers don't have to match exactly.
Deadlock #1:
"nioEventLoopGroupCloseable-3-20":
at org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandlerReader.close(AsyncSshHandlerReader.java:96)
- waiting to lock <0x000000072ecffff8> (a org.opendaylight
.netconf.nettyutil.handler.ssh.client.AsyncSshHandlerReader)
at org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandler.disconnect(AsyncSshHandler.java:235)
- locked <0x000000072ed00020> (a org.opendaylight.netconf
.nettyutil.handler.ssh.client.AsyncSshHandler)
at org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandler.close(AsyncSshHandler.java:215)
...
"sshd-SshClient[
57f78db1]-nio2-thread-1":
at org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandler.disconnect(AsyncSshHandler.java:221)
- waiting to lock <0x000000072ed00020> (a org.opendaylight
.netconf.nettyutil.handler.ssh.client.AsyncSshHandler)
...
org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandlerReader.operationComplete(AsyncSshHandlerReader
.java:64)
- locked <0x000000072ecffff8> (a org.opendaylight.netconf
.nettyutil.handler.ssh.client.AsyncSshHandlerReader)
...
Deadlock #2:
"nioEventLoopGroupCloseable-3-19":
at org.apache.sshd.client.session.ClientSessionImpl
.signalAuthFailure(ClientSessionImpl.java:138)
- waiting to lock <0x000000072c800218> (a java.lang.Object)
at org.apache.sshd.client.session.ClientSessionImpl
.preClose(ClientSessionImpl.java:126)
at org.apache.sshd.common.util.closeable.AbstractCloseable
.close(AbstractCloseable.java:95)
at org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandler.disconnect(AsyncSshHandler.java:251)
- locked <0x000000072c800480> (a org.opendaylight.netconf
.nettyutil.handler.ssh.client.AsyncSshHandler)
...
"sshd-SshClient[
411a406d]-nio2-thread-8":
at org.opendaylight.netconf.nettyutil.handler.ssh.client
.AsyncSshHandler.disconnect(AsyncSshHandler.java:221)
- waiting to lock <0x000000072c800480> (a org.opendaylight
.netconf.nettyutil.handler.ssh.client.AsyncSshHandler)
...
org.apache.sshd.common.session.helpers.AbstractSession
.handleMessage(AbstractSession.java:499)
- locked <0x000000072c800218> (a java.lang.Object)
...
Change-Id: I42260213cad82250832451539d6ce11035ba37e2
Signed-off-by: Martin Sunal <msunal@frinx.io>
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 30 Apr 2019 03:12:01 +0000 (03:12 +0000)]
Merge changes from topic 'mri-neon-sr1' into stable/neon
* changes:
Bump mdsal to 3.0.8
Bump yangtools to 2.1.10
Bump odlparent to 4.0.10
Robert Varga [Wed, 24 Apr 2019 12:49:33 +0000 (14:49 +0200)]
Bump mdsal to 3.0.8
This brings in latest fixes and enhancements.
Change-Id: I9ff2b11a7f00a7d9c961aa7704d663aeb9613551
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Apr 2019 12:50:47 +0000 (14:50 +0200)]
Bump yangtools to 2.1.10
This brings in latest fixes and enhancements.
Change-Id: I34ed0f4e30dc12608cafabeefa860817846c7e05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 24 Apr 2019 12:49:55 +0000 (14:49 +0200)]
Bump odlparent to 4.0.10
This brings in significant upstream updates, most notably
mina-sshd-2.2.0.
Change-Id: Ibf0c195e333b2fdad52bba5f12f9262bce0f0133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jaroslav Tóth [Tue, 2 Apr 2019 03:41:32 +0000 (05:41 +0200)]
Fixed deadlock in AsyncSshHandlerWriter
Deadlock happened when listener for window is resized
and write is invoked at the same time.
Change-Id: I8c662d6cd5edbc3e36b31a754d826f79bec76434
Signed-off-by: Martin Sunal <msunal@frinx.io>
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
(cherry picked from commit
0f45153d60a0fc71a08d011e21fdf5e83c174290)
Robert Varga [Tue, 9 Apr 2019 13:37:43 +0000 (15:37 +0200)]
Migrate away from deprecated put() method
ObjectNode.put(String,JsonNode) has been deprecated in favor
of set()/replace(). Migrate to use set().
Change-Id: I3ebbdefe9238833ea994dac659a75972ebad835f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a085dfac5e7a237d76029bcbb3ae737804ae86f0)
Robert Varga [Tue, 9 Apr 2019 13:28:14 +0000 (15:28 +0200)]
Reduce use of getDataChildByName()
findDataChildByName() is a better replacement, use that instead.
Change-Id: I8e6be2dfd68c1146c231e8381ce16d64a35896ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
deb81986a6a314b95137c3809c93d511e827bd3f)
Robert Varga [Fri, 5 Apr 2019 21:38:53 +0000 (23:38 +0200)]
Reduce the use of AttrBuilders
NormalizedNode*AttrBuilders are going away, remove them from where
they are not necessary.
Change-Id: I72cb68e6565f9c05864e1c465d5db7611e5a9c02
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
682d341bba757ccc88436a635c19d5c7dec86c81)
Robert Varga [Fri, 5 Apr 2019 18:54:50 +0000 (20:54 +0200)]
Fix logging arguments
These are pointed out by upgraded spotbugs, fix them up.
Change-Id: I520c8be21d69c73c0ca9b51d15e63df158fd242a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
07fba4b036ae0df44f814f53b7d13a9fc79c0a75)
Robert Varga [Fri, 5 Apr 2019 18:54:50 +0000 (20:54 +0200)]
Fix logging arguments
These are pointed out by upgraded spotbugs, fix them up.
Change-Id: I766f1f26444fd10cc6858e5f064209fcf3d9860a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d41edebb31eda9b92e1d00a054472322e1da7d0a)
Robert Varga [Thu, 28 Mar 2019 20:21:06 +0000 (21:21 +0100)]
Remove a FindBugs suppression
Use Deque.remove() keeps SpotBugs happy, and does not change
anything, as we know the queue is non-empty at this point.
Change-Id: I307dd22eb9a2a56a9a18490ff1e45aa6d4f2a5e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
998aca7de4bc5ceff15646acefd6be3ed46ca260)
jenkins-releng [Mon, 18 Mar 2019 22:21:51 +0000 (22:21 +0000)]
Bump versions by x.y.(z+1)
Change-Id: I2ad25331e83efebfc7fdf32c9c6b7623bb67441f
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Jakub Morvay [Fri, 8 Feb 2019 13:01:16 +0000 (14:01 +0100)]
Allow no payload for RPCs with no input
Do not require empty payload for RPCs with no input defined. Invoking
such RPCs without any payload at all should be also supported.
JIRA: NETCONF-607
Change-Id: Ibf8ca7d65cf25ac54f8283f65f4706ad3f69c5ee
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Robert Varga [Thu, 7 Feb 2019 19:07:27 +0000 (20:07 +0100)]
Fix Revision confusion
yag-library-version is a YANG string, hence the leaf needs to be
set appropriately.
JIRA: NETCONF-606
Change-Id: Iae705bf924de943871b49a8d3b39f7b7b4a55906
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
c3338ee3c2a3250ec98a4a6a0f4fcf3322e0dec2)
jenkins-releng [Fri, 1 Feb 2019 22:43:44 +0000 (22:43 +0000)]
Update .gitreview to stable/neon
Change-Id: I40255bfeb84cdee16a47a2f5232917a5a871a15f
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Robert Varga [Wed, 30 Jan 2019 23:25:02 +0000 (00:25 +0100)]
Add custom EXI buffer management
Exificient's SAXDecoder by default does not free its internal buffer,
and allocates one for each decoder. With version 1.0.4 we have enough
visibility to perform buffer management.
This adds a thread-local buffer, which is reused during parse operation
and retained if it is under 64kB after the operation completes.
Change-Id: Ie2f7c72b1160d389a07c473fda6739b7eb7212cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>