netconf.git
4 years agoUpdate user-guide.rst 12/83612/2
Mario Abraham [Wed, 14 Aug 2019 10:18:22 +0000 (12:18 +0200)]
Update user-guide.rst

- added info about 2 different endpoints
related to RESTCONF

Issue-ID: NETCONF-500
Signed-off-by: Mario Abraham <mario.abraham@pantheon.tech>
Change-Id: I3ab9517e6ac2afe3e061eb31dfa8b642e1d34614
(cherry picked from commit 5bc455ab7471a308b77e1455da43f1d8202aa89c)

4 years agoBump mdsal to 3.0.10 17/83117/1
Robert Varga [Thu, 18 Jul 2019 13:35:30 +0000 (15:35 +0200)]
Bump mdsal to 3.0.10

This brings in latest fixes/improvements.

Change-Id: Ida49ef543f765fd8f828761d7804e5b51a93b1b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix odlparent reference 13/83113/1
Robert Varga [Thu, 18 Jul 2019 12:15:41 +0000 (14:15 +0200)]
Fix odlparent reference

We should not be referncing odlparent-4.0.2, but rather 4.0.11.

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

4 years agoUpdate netconf user guide with the information 60/83060/1
esobmar [Thu, 11 Jul 2019 12:43:47 +0000 (13:43 +0100)]
Update netconf user guide with the information
on how to use custom RPC with test-tool.

Change-Id: Ie5c9c91ed19f7c25880a4b8590a28bd07d1be98e
JIRA: NETCONF-633
Signed-off-by: Mariusz Sobucki <mariusz.sobucki@est.tech>
(cherry picked from commit 44bab5078f37190e02784708a09de10a22885bc2)

4 years agoBump mdsal to 3.0.9 21/82821/5
Robert Varga [Mon, 1 Jul 2019 06:57:07 +0000 (08:57 +0200)]
Bump mdsal to 3.0.9

This picks up latest fixes and improvements.

Change-Id: I1490643c699041d6b0b6ba87f4093abf538cb04f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 2.1.11 20/82820/4
Robert Varga [Mon, 1 Jul 2019 06:56:53 +0000 (08:56 +0200)]
Bump yangtools to 2.1.11

This picks up latest fixes.

Change-Id: I1899419692268f89c11dfa422aae65569344ec76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 4.0.11 19/82819/4
Robert Varga [Mon, 1 Jul 2019 06:56:39 +0000 (08:56 +0200)]
Bump odlparent to 4.0.11

This adopts latest upgrades. An update to the test suite is needed,
as netty-4.1.35+ will skip invocation of methods marked as @Skip.

Change-Id: I742b39bdfe90b825950e590e9c73f9f950bd96fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove aaa-encrypt-service version 57/82857/1
Robert Varga [Mon, 1 Jul 2019 09:10:00 +0000 (11:10 +0200)]
Remove aaa-encrypt-service version

This version is propagated out of aaa-artifacts, remove it.

Change-Id: Ia4cf3ab202f96027a97a1e5568f9a87607db5eea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix for deviation list mapping in Restconf 05/82505/2
Tibor Král [Tue, 11 Jun 2019 09:02:34 +0000 (11:02 +0200)]
Fix for deviation list mapping in Restconf

RESTCONF NBP initialization fails with
RestconfDocumentedException when global schema context
contains yang models using deviations.

JIRA: TRNSPRTPCE-126

Change-Id: I480ac6641006e3e82ffd6ac3aa4cf169fe8b665d
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
4 years agoRemove dependency on sal-connector-api 73/82373/1
Robert Varga [Fri, 31 May 2019 16:20:01 +0000 (18:20 +0200)]
Remove dependency on sal-connector-api

We are not using anything from this artifact, just remove
the dependency.

Change-Id: I89fe3482a9482bdaf2fce88d66fd778539c0a55d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix typo: s/then/than 98/82298/2
jluhrsen [Tue, 28 May 2019 19:34:31 +0000 (12:34 -0700)]
Fix typo: s/then/than

Change-Id: Iee0d7d34f4bdcd24b3baadb54820a7060c205d4b
Signed-off-by: jluhrsen <jluhrsen@gmail.com>
(cherry picked from commit 3392af44f061e24dd352eb6cb57da5ab65fefa6e)

4 years agoTeach ModelGenerator about AnyDataSchemaNodes 88/82288/1
Robert Varga [Tue, 28 May 2019 16:29:15 +0000 (18:29 +0200)]
Teach ModelGenerator about AnyDataSchemaNodes

anydata is a valid construct coming from YANG 1.1, effectively
replacing anyxml. This patch adds the support for processing anydata
nodes.

JIRA: NETCONF-622
Change-Id: I71207f5a053d718daaeaa4f3dcd6aa9ab27e3d57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 101d39b9a007c963a8f57ee4e2660abb63e33790)

4 years agoAdd flexible mount point naming strategy 02/81402/2
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)

4 years agoImprove global config application 33/82233/1
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)

4 years agoFix unsafe global config access 86/82186/1
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>
4 years agoMerge "Fix DeviceOp DTCL" into stable/neon
Robert Varga [Tue, 21 May 2019 10:40:57 +0000 (10:40 +0000)]
Merge "Fix DeviceOp DTCL" into stable/neon

4 years agoFix DeviceOp DTCL 81/82181/1
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)

4 years agoFix preparing action with path containing augment 76/82176/1
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)

4 years agoMerge "Fix mdsal-netconf-connector dependencies" into stable/neon
Robert Varga [Thu, 16 May 2019 14:15:35 +0000 (14:15 +0000)]
Merge "Fix mdsal-netconf-connector dependencies" into stable/neon

4 years agoMerge "Remove dependencies on controller APIs" 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

4 years agoRemove dependencies on controller APIs 87/82087/1
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)

4 years agoDo not deploy shaded-exificient-jar 81/82081/1
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>
4 years agoFix mdsal-netconf-connector dependencies 79/82079/1
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)

4 years agoBump versions by x.y.(z+1) 59/82059/1
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>
5 years agoMerge "Fixed deadlock between AsyncSshHandlerReader and AsyncSshHandler" into stable...
Robert Varga [Tue, 7 May 2019 08:52:07 +0000 (08:52 +0000)]
Merge "Fixed deadlock between AsyncSshHandlerReader and AsyncSshHandler" into stable/neon

5 years agoCapture server key before returning from callback 18/81918/5
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>
5 years agoFixed deadlock between AsyncSshHandlerReader and AsyncSshHandler 24/81924/1
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>
5 years agoMerge changes from topic 'mri-neon-sr1' into stable/neon
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

5 years agoBump mdsal to 3.0.8 42/81742/6
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>
5 years agoBump yangtools to 2.1.10 41/81741/6
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>
5 years agoBump odlparent to 4.0.10 40/81740/5
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>
5 years agoFixed deadlock in AsyncSshHandlerWriter 83/81783/1
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)

5 years agoMigrate away from deprecated put() method 18/81518/2
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)

5 years agoReduce use of getDataChildByName() 17/81517/2
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)

5 years agoReduce the use of AttrBuilders 19/81419/2
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)

5 years agoFix logging arguments 18/81418/2
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)

5 years agoFix logging arguments 11/81411/1
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)

5 years agoRemove a FindBugs suppression 28/81328/1
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)

5 years agoBump versions by x.y.(z+1) 69/80969/1
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>
5 years agoAllow no payload for RPCs with no input 39/80239/1
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>
5 years agoFix Revision confusion 26/80226/1
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)

5 years agoUpdate .gitreview to stable/neon 11/80111/1
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>
5 years agoAdd custom EXI buffer management 46/76546/7
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>
5 years agoMerge "Bump exificient to 1.0.4"
Jakub Morvay [Thu, 31 Jan 2019 05:30:50 +0000 (05:30 +0000)]
Merge "Bump exificient to 1.0.4"

5 years agoBump exificient to 1.0.4 52/80052/1
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>
5 years agoInitialize EXISchema grammars lazily 47/80047/7
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>
5 years agoremove curious hard-coded yangtools 2.1.8 which seems no longer needed 10/80010/1
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>
5 years agoMove BP xml files to standard OSGI-INF/blueprint 64/79964/3
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>
5 years agodestroyInstance() WebSocketServer in two tests 60/79860/1
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>
5 years agoMerge changes I22b99bc2,I3f296862
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

5 years agoMerge "Remove netconf-impl test resources"
Jakub Morvay [Wed, 23 Jan 2019 07:47:21 +0000 (07:47 +0000)]
Merge "Remove netconf-impl test resources"

5 years agoRemove netconf-ssh from netconf-artifacts 38/79838/1
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>
5 years agoRemove netconf-notification 57/79657/8
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>
5 years agoRemove netconf-impl test resources 35/79835/1
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>
5 years agoRemove empty monitoring classes 34/79834/1
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>
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"