netconf.git
4 years agoTeach RFC8040 URL parser about actions 66/82866/12
ajay.dp001 [Mon, 1 Jul 2019 11:40:03 +0000 (12:40 +0100)]
Teach RFC8040 URL parser about actions

RFC8040 allows invocation of actions, but unfortunately our
parser is not equipped to deal with them.

This updates the utilities to try to locate actions when the
data is not found.

JIRA: NETCONF-619
Change-Id: I93d69ea76fd928f963cb7a8c703c97c125820818
Signed-off-by: ajay.dp001 <ajay.deep.singh@ericsson.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix odlparent reference 12/83112/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 5.0.0.

Change-Id: Ia238cf79c1324b3764ede4e920d8bd8caac2ca97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAttempt netconf remount regardless of error-type 78/82678/13
Jakub Toth [Mon, 24 Jun 2019 09:17:16 +0000 (05:17 -0400)]
Attempt netconf remount regardless of error-type

Even if there's a 'no more sources' for schema context, go through
normal remount cycle. It's added a new optional boolean to the netconf
mount fields specifically for this, default to false/ current behavior.

JIRA: NETCONF-611
Change-Id: If983ef0dded606fb75b5e41236c9d0f8328ab7c6
Signed-off-by: Jakub Toth <jtoth@luminanetworks.com>
4 years agoNetconf stack by default locks the data store before issuing 21/82521/11
Jakub Toth [Fri, 14 Jun 2019 15:32:00 +0000 (11:32 -0400)]
Netconf stack by default locks the data store before issuing
edit-config, and then unlocks it.

This poses some scalabilty issues when multiple requests for
the same device arrives. Also some devices automatically
queues the requests at the device itself.

The patch provides an option to allow lock/unlock operations
for edit-config. Default value is true which defaults to today's
behavior.

JIRA: NETCONF-629
Change-Id: I0531b27c0807dfb586f9e80c9b9fc9b189e3cadf
Signed-off-by: Jakub Toth <jtoth@luminanetworks.com>
4 years agoUpdate netconf user guide with the information 20/83020/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>
4 years agoFix testtool GetSchema broken since v1.6.0 13/82913/2
Eliezio Oliveira [Mon, 1 Jul 2019 16:53:52 +0000 (17:53 +0100)]
Fix testtool GetSchema broken since v1.6.0

Offending commit: af7babe

Change-Id: Ia43cdcf10b54d9528921675fed321665771bd667
JIRA: NETCONF-624
Signed-off-by: Eliezio Oliveira <eliezio.oliveira@est.tech>
4 years agoAdd E2E testing for testtool 12/82912/2
Eliezio Oliveira [Fri, 28 Jun 2019 08:41:49 +0000 (09:41 +0100)]
Add E2E testing for testtool

Change-Id: I87d7de23c210f5b4b0480a8737323d3f8ac78eb9
JIRA: NETCONF-630
Signed-off-by: Eliezio Oliveira <eliezio.oliveira@est.tech>
4 years agoConvert anyxml nodes lazily 14/82514/8
Jakub Toth [Sun, 12 May 2019 20:15:34 +0000 (13:15 -0700)]
Convert anyxml nodes lazily

The problem is talking about the direct creating of ContainerNode
from the Anyxml in the NetconfMessageTransformer. Later, while
the YT is parsing data, it expects the anyxml on that place
according to the schema context. In this way, we need to use
the AnyXml builder while the NetconfMessage is processing.

Transformation to a container-based layout is performed afterwards
as needed.

JIRA: NETCONF-616
Change-Id: I8ca6d93e42a845de67721209e5e6362c47703db9
Signed-off-by: Jakub Toth <jtoth@luminanetworks.com>
4 years agoRemove aaa-encrypt-service version 86/82886/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>
(cherry picked from commit 9612e983a55540fdd30631db943bb303520f890c)

4 years agoJETTY web-sockets client tool 48/81648/14
Jaroslav Tóth [Sun, 14 Apr 2019 17:40:12 +0000 (19:40 +0200)]
JETTY web-sockets client tool

- Testing tool is place in new module "tools" under "restconf"
  root module and the name of the testtool executable file with
  all dependencies is named ${project.artifactId}
  -${project.version}-executable.
- See ApplicationSettings class for possible input parameters
  of the application as well as the usage. Mandatory parameter is
  stream/s name/s using which the web-socket sessions are
  established. Other parameters can be categorized into two groups:
  1) setup of ping messages (enabled, interval, message)
  2) TLS configuration for WSS streams - keystore, trustore,
     passwords, cipher suites, protocols, ...

JIRA: NETCONF-623
Change-Id: Ifaf340ee1e0ba26c203bb1c663588cc94fb5496d
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoPorting of WebSockets to Jetty in RFC-8040 RESTCONF 24/81424/17
Jaroslav Tóth [Sun, 7 Apr 2019 18:23:42 +0000 (20:23 +0200)]
Porting of WebSockets to Jetty in RFC-8040 RESTCONF

- Reimplementation of the web-socket servlet using JETTY library:
  1) added configuration holder with persistent-id="websockets"
     - configurable maximum web-socket frame length, session idle
     timeout, and ping control frames interval.
  2) implemented web-socket initilizer that represents servlet -
     configuration of web-socket factory
  3) imlemented web-socket factory that creates new web-socket
     session based on input URI from which the stream-name can be
     extracted
  4) implemented session handler that just reflects netty's session
     hadler with these differences:
     - configurable heartbeat interval (PING intialized at server)
     - configurable max. frame length that breaks longer messages
       to smaller fragments (in old config. long notifications
       caused issues)
     - PONG frames are sent implicitly (respondation using PING)
     - TCP list. port is not specified, because we want to reuse
       web server's port (it is possible to share WS/WSS with
       HTTP/HTTPS)
- Integration of web-socket servlet in WebInitialzer; we had to
  modify stream paths, so they contain also "rests" prefix before
  stream name - it is not possible to register more context path
  roots... and the upgrade reqests go to common web session.
- Removal of old web-socket server implementation with netty's
  dependencies and replacing of Channel references with
  WebSocketSessionHandler that is now responsible for communication
  with remote endpoint.

JIRA: NETCONF-623
Change-Id: I568aa6375ea3c6a5db3183a54324ef02aa0bd74a
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove use of StringBuffer 39/82639/2
Robert Varga [Fri, 21 Jun 2019 05:32:36 +0000 (07:32 +0200)]
Remove use of StringBuffer

StringBuilder is a faster replacement for StringBuffer, use that.
Also cleans up append() usage, so we do not do superfluous string
concatenations.

Change-Id: I2dd973dab6199290e2cbdd840f36b754b14827ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove use of Objects.isNull/nonNull 75/82575/4
Robert Varga [Thu, 20 Jun 2019 09:16:33 +0000 (11:16 +0200)]
Remove use of Objects.isNull/nonNull

These methods obscure null checks from static analysis tools,
and are explicitly documented to be intended for method references
only -- remove them in favor of proper null checks.

Change-Id: Ibe0a20015eb55d92f19b0ac487a8e48a186216a3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReturn new generatedKeyPair in loadKeys of testtool 72/82572/2
Anna Bencurova [Wed, 19 Jun 2019 19:50:53 +0000 (21:50 +0200)]
Return new generatedKeyPair in loadKeys of testtool

This can be done to avoid sendKexInit() no resolved signatures available
error while first login.

JIRA: NETCONF-612
Change-Id: I32f5b8ea5f3c9a9c613e000932ca0fe205451c74
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
4 years agoFix building of wrong YANG notify stream 30/82530/2
Jaroslav Tóth [Mon, 17 Jun 2019 14:54:10 +0000 (16:54 +0200)]
Fix building of wrong YANG notify stream

- Identification of stream should start with "notification-stream"
  and not "create-notification-stream".
- Added missing '/' before JSON suffix.

JIRA: NETCONF-623
Change-Id: Ia3b78ba8af1b0f53f60dd88b39dff8b92b881ffd
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
4 years agoRemove deadlock scenario in ListenersBroker 29/82529/2
Jaroslav Tóth [Mon, 17 Jun 2019 13:41:29 +0000 (15:41 +0200)]
Remove deadlock scenario in ListenersBroker

- After call to removeAndCloseDataChangeListener(..),
  the dataChangeListenersLock is allocated but inside this method
  removeAndCloseDataChangeListenerTemplate(..) is called too which
  tries to allocate the same lock again.

JIRA: NETCONF-623
Change-Id: Iaa56ce8936bb2f659b8b42357d19df999621eff1
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
4 years agoFix for deviation list mapping in Restconf 82/82482/9
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 agoAnother update to SerializationUtils update 08/82408/1
Robert Varga [Wed, 5 Jun 2019 08:08:05 +0000 (10:08 +0200)]
Another update to SerializationUtils update

Write-side of serialization changed, this updates our only caller.

Change-Id: Ife1537be690b9d662c3be13558a78349823e379d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate SerializationUtils method 07/82407/1
Robert Varga [Wed, 5 Jun 2019 07:28:12 +0000 (09:28 +0200)]
Update SerializationUtils method

SerializationUtils changed API, this updates our use of it.

Change-Id: Ie6c15b005cbc6437f88c9c414cd6f2cca54bb858
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRevert "Convert anyxml nodes lazily" 96/82396/2
Robert Varga [Tue, 4 Jun 2019 15:18:30 +0000 (17:18 +0200)]
Revert "Convert anyxml nodes lazily"

This reverts commit 49988c53b1741cca9797373eba0c8d7f21a7da3d,
as it breaks CSIT.

JIRA: NETCONF-616
Change-Id: I48bdde78422006c188096620d4029e255b950bc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not attempt to form leaf metadata on empty path 78/81878/10
Robert Varga [Thu, 2 May 2019 17:05:38 +0000 (19:05 +0200)]
Do not attempt to form leaf metadata on empty path

This thinko was introduced during Sodium MRI integration. As
NormalizedNodes no longer hold attributes, the corresponding
metadata needs to be constructed -- but only in the case
we have created the structure ourselves.

In order to fix this, we iterate over both the node and the path,
thus correctly mirroring the structure.

JIRA: NETCONF-613
Change-Id: Ib2c9736c577c5dbdd8f4c826f13acbd7cbc21418
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump mdsal to 4.0.2 70/82270/5
Robert Varga [Tue, 28 May 2019 07:20:03 +0000 (09:20 +0200)]
Bump mdsal to 4.0.2

This picks up the latest improvements.

Change-Id: Iec9465229b165cb177cf2568ac43e16c8a102c26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 3.0.1 69/82269/4
Robert Varga [Tue, 28 May 2019 07:19:52 +0000 (09:19 +0200)]
Bump yangtools to 3.0.1

This picks up yangtools-3.0.1, which contains a fix required
for NETCONF-613.

Change-Id: I4d9df3fdbbaeaba31e9fc695fdd57bae1561d1a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove dependency on sal-connector-api 72/82372/2
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 agoConvert anyxml nodes lazily 01/82001/13
Jakub Toth [Sun, 12 May 2019 20:15:34 +0000 (13:15 -0700)]
Convert anyxml nodes lazily

The problem is talking about the direct creating of ContainerNode
from the Anyxml in the NetconfMessageTransformer. Later, while
the YT is parsing data, it expects the anyxml on that place
according to the schema context. In this way, we need to use
the AnyXml builder while the NetconfMessage is processing.

Transformation to a container-based layout is performed afterwards
as needed.

JIRA: NETCONF-616
Change-Id: Iab00b9ef712dbebf0661546550b10bf04507e97a
Signed-off-by: Jakub Toth <jtoth@luminanetworks.com>
Signed-off-by: Miroslav Macko <mmacko@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImprove NetconfMessageTransformer.isBaseOrNotificationRpc() 36/82336/2
Robert Varga [Thu, 30 May 2019 14:02:44 +0000 (16:02 +0200)]
Improve NetconfMessageTransformer.isBaseOrNotificationRpc()

Rather than performing up to three equality comparisons, keep
matching URIs in a constant set and perform Set.contains().

Change-Id: Iaddf2bfee70ed0f53d633998f005bf9bb2290099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup NodeIdentifier instantiation 35/82335/2
Robert Varga [Thu, 30 May 2019 13:55:28 +0000 (15:55 +0200)]
Cleanup NodeIdentifier instantiation

We have pre-computed NodeIdentifier instances for most cases where
we are using just a QName. This patch exposes constants and makes
sure we rely on them.

Change-Id: I8165e1679773c1ba390a17008061e2e0574f0e8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDo not compare path to YangInstanceIdentifier.EMPTY 37/82337/1
Robert Varga [Thu, 30 May 2019 14:06:08 +0000 (16:06 +0200)]
Do not compare path to YangInstanceIdentifier.EMPTY

YangInstanceIdentifier has a highly efficient isEmpty() method,
use that instead of .equals(EMPTY).

Change-Id: I755560f3cbb204015a2469b6995691cb1f5d1b83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix typo: s/then/than 86/82286/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>
4 years agoTeach ModelGenerator about AnyDataSchemaNodes 84/82284/2
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>
4 years agoAdd ietf-netconf-nmda data model 35/82235/4
Robert Varga [Fri, 24 May 2019 14:30:12 +0000 (16:30 +0200)]
Add ietf-netconf-nmda data model

This adds NMDA and with-defaults models, so that we can build up
the implementation.

Change-Id: I33104b40863983df23b0f1984922daf294c2fa4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd ietf-netconf-with-defaults model 34/82234/3
Robert Varga [Fri, 24 May 2019 14:33:29 +0000 (16:33 +0200)]
Add ietf-netconf-with-defaults model

This model is a dependency of NMDA, add it first, so we can
implement it separately, if need be. Also clean up odl-netconf-api
dependencies, so we specify the bare minimum and pull the rest
as dependencies.

Change-Id: I78a09d11f3e1ae78dabe16de8b30a3b8549cdb9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse version ranges for mdsal features 37/82237/1
Robert Varga [Fri, 24 May 2019 14:48:45 +0000 (16:48 +0200)]
Use version ranges for mdsal features

This eases up migration by allowing features to be resolved
by any subsequent version.

Change-Id: Ic64b9a86855bce3f81971a94902682b0aff32e8a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd flexible mount point naming strategy 49/80549/5
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>
4 years agoImprove global config application 88/82188/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>
4 years agoFix unsafe global config access 85/82185/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"
Robert Varga [Tue, 21 May 2019 10:40:50 +0000 (10:40 +0000)]
Merge "Fix DeviceOp DTCL"

5 years agoFix preparing action with path containing augment 77/82177/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)

5 years agoFix DeviceOp DTCL 50/82150/2
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>
5 years agoMerge "Do not deploy shaded-exificient-jar"
Robert Varga [Wed, 15 May 2019 14:10:23 +0000 (14:10 +0000)]
Merge "Do not deploy shaded-exificient-jar"

5 years agoRemove dependencies on controller APIs 31/82031/5
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>
5 years agoDo not deploy shaded-exificient-jar 80/82080/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>
5 years agoMerge "Close read-only transactions"
Tomas Cere [Wed, 15 May 2019 07:15:30 +0000 (07:15 +0000)]
Merge "Close read-only transactions"

5 years agoFix mdsal-netconf-connector dependencies 44/82044/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>
5 years agoBump mdsal to 4.0.1 25/81825/4
Robert Varga [Tue, 30 Apr 2019 11:52:18 +0000 (13:52 +0200)]
Bump mdsal to 4.0.1

This bumps mdsal to 4.0.1.

Change-Id: I42366367b001b64d2ae23b88992fcdebcaa881d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoClose read-only transactions 50/81950/1
Robert Varga [Tue, 7 May 2019 17:54:18 +0000 (19:54 +0200)]
Close read-only transactions

Transactions are resources just as any other, make sure we close
them as soon as we do not need them.

Change-Id: Ic11becba1a76f2aeecbf5c1e17401f6a55fd84cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoCapture server key before returning from callback 27/81927/2
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 agoMerge changes from topic 'web-sockets'
Robert Varga [Tue, 7 May 2019 06:54:14 +0000 (06:54 +0000)]
Merge changes from topic 'web-sockets'

* changes:
  Removal of EventBusChangeRecorder
  Refactoring of web-sockets in RESTCONF RFC-8040

5 years agoFixed deadlock between AsyncSshHandlerReader and AsyncSshHandler 14/81714/3
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 agoRemoval of EventBusChangeRecorder 26/81526/6
Jaroslav Tóth [Wed, 10 Apr 2019 06:40:44 +0000 (08:40 +0200)]
Removal of EventBusChangeRecorder

- Reasons to remove :
  1) AbstractCommonSubsriber notifies event bus and then event bus
     performs operations on AbstractCommonSubsriber - what is the
     reason for this indirection?
  2) AbstractCommonSubsriber does nearly nothing; only brokes input
     events to subscribers based on EventType.
  3) There are only two possible types of subsribers that have
     common parent in which all logic is performed.
- Correction of synchronization in AbstractCommonSubscriber -
  concurrent set is not enough, because in postData(..) method this
  set is accessed twice --> explicit sync using monitor or lock is
  required.

Change-Id: Iac70127b7ebbbbe0c0ff849120818ddf71278a94
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoRefactoring of web-sockets in RESTCONF RFC-8040 43/80943/12
Jaroslav Tóth [Sun, 17 Mar 2019 19:21:10 +0000 (20:21 +0100)]
Refactoring of web-sockets in RESTCONF RFC-8040

- Notificator is removed and replaced by ListenersBroker; mods.:
  A. One stream-name can be associated only with one YANG
     notification listener, because it is sufficient (XML/JSON
     format is distinguished directly in stream name).
  B. YANG notification streams are divided from data-change event
     streams; refactored method signatures.
  C. Added synchronization (R/W locking that also differs between
     access to data-change and YANG notification listeners).
- Exposing of public subsriber methods to BaseListenerInterface.
- Refactoring of CreateStream utilities and RPC processors.
- Refactoring of SubsribeToStream utilities and RPC processors.

Change-Id: I521f3b893a5cfa53d59a438e871924c54d6f4d7d
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoRemove duplicate assignment 88/81788/2
Jie Han [Fri, 26 Apr 2019 03:57:00 +0000 (11:57 +0800)]
Remove duplicate assignment

Since it has been in a synchronized block, just remove
this line.

Change-Id: I3f6159640d76c4027ff97be447351cc8668e57d9
Signed-off-by: Jie Han <han.jie@zte.com.cn>
5 years agoFixed deadlock in AsyncSshHandlerWriter 13/81713/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>
5 years agoBump mdsal to 4.0.0 73/81273/18
Robert Varga [Thu, 28 Mar 2019 19:41:39 +0000 (20:41 +0100)]
Bump mdsal to 4.0.0

This bumps mdsal to 4.0.0, adjusting to changed APIs:
- 'type empty' mapped to yang.common.Empty
- RPC method invocation using ListenableFuture instead of FluentFuture
- DOMDataTreeReadWriteTransaction no longer having close() method

Change-Id: I7e4f3bba8cab75af750784d77c2a62ca2460e542
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReplace EditOperationNormalizedNodeStreamWriter 90/81390/18
Robert Varga [Tue, 2 Apr 2019 16:40:19 +0000 (18:40 +0200)]
Replace EditOperationNormalizedNodeStreamWriter

Since NormalizedNodes no longer hold attributes directly, but these
are rather a separate structure communicated through an extension
to NormalizedNodeStreamWriter, the entire implementation of how
edit-config is split into individual changes needs to be reworked.

This patch replaces EditOperationNormalizedNodeStreamWriter and
DataTreeChangeTracker with SplittingNormalizedNodeMetadataStreamWriter,
which is the primary receiver of events. It takes care of delegating
them to an ImmutableNormalizedNodeStreamWriter, subclassed as
ComponentNormalizedNodeStreamWriter, which exposes build() operation,
which peels off the current builder and builds it.

Since ModifyAction hosted in yangtools was only used as an attribute
in NormalizedNodes and hence was removed, it is introduced here
in netconf-api.

The sal-netconf-connector part of this change takes care of emitting
the ModifyAction request in terms of NormalizedNodeMetadataStreamWriter.

Change-Id: I83affe10d1334ecebc9fafb9c76021c2de389239
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 3.0.0 72/81272/15
Robert Varga [Thu, 28 Mar 2019 19:42:16 +0000 (20:42 +0100)]
Bump yangtools to 3.0.0

This bumps yangtools to 3.0.0, adjusting by API changes introduced
in this release:
- EffectiveModelContextFactory is required by yang.model.repo.api
  constructs
- JSONParserStream.create() deprecated methods removed
- ParserConfigurationException no longer thrown from UntrustedXML
- strict if-feature validation by YANG parser
- SchemaUtils.getNodeIdentifierForAugmentation() removal
- LeafrefSchemaNode correctly using PathExpression and not the
  overly-general RevisionAwareXPath
- NormalizedNodeStreamWriter updates
- NormalizedNodes no longer having attributes

The last two items require a complete overhaul of how edit operation
is disassembled in EditOperationNormalizedNodeStreamWriter. This
is addressed in a follow-up patch.

Change-Id: Ic58c7392d6326bc785bc2f1da9f5dee866e830dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 5.0.0 71/81271/11
Robert Varga [Thu, 28 Mar 2019 19:42:52 +0000 (20:42 +0100)]
Bump odlparent to 5.0.0

This bumps odlparent to 5.0.0.

Change-Id: Icc2404f5862639639bb4936fd273c2f5a19a1f8c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoSimplify getDescription invocation 19/81519/1
Robert Varga [Wed, 10 Apr 2019 06:56:04 +0000 (08:56 +0200)]
Simplify getDescription invocation

Previous patch was needlessly complicated, use flatMap()
with a method handle instead.

Change-Id: I99cddca3e81c3b40c98a6ef859701cc54d6f8501
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMigrate away from deprecated put() method 91/81491/1
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>
5 years agoReduce use of getDataChildByName() 90/81490/1
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>
5 years agoMake javax.inject dependencies optional 89/81489/1
Robert Varga [Tue, 9 Apr 2019 13:15:09 +0000 (15:15 +0200)]
Make javax.inject dependencies optional

We do not require javax.inject to be present, make it an optional
dependency.

Change-Id: I4166174cbcb1a5dfb32ce4d997401a0ca8580530
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoReduce the use of AttrBuilders 09/81409/3
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>
5 years agoFix logging arguments 08/81408/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: I520c8be21d69c73c0ca9b51d15e63df158fd242a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix logging arguments 06/81406/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>
5 years agoShorten java.util.Optional references 05/81405/1
Robert Varga [Fri, 5 Apr 2019 18:44:48 +0000 (20:44 +0200)]
Shorten java.util.Optional references

We are getting less exposure to Guava Optional, which was forcing
us to use java.util.Optional through full reference. Fix references
to reflect the fact we can freely import it.

Change-Id: I1a87aafdac2861b0e71df1d51994ece7ff6cb78c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Remove a FindBugs suppression"
Robert Varga [Fri, 29 Mar 2019 16:56:00 +0000 (16:56 +0000)]
Merge "Remove a FindBugs suppression"

5 years agoMerge "SchemaSourceCache init using YangModuleInfo"
Jakub Morvay [Fri, 29 Mar 2019 11:35:39 +0000 (11:35 +0000)]
Merge "SchemaSourceCache init using YangModuleInfo"

5 years agoRemove a FindBugs suppression 74/81274/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>
5 years agoMerge "Hide credentials from logs"
Jakub Morvay [Thu, 28 Mar 2019 14:01:41 +0000 (14:01 +0000)]
Merge "Hide credentials from logs"

5 years agoMerge "Added implementation of ActionFactory"
Jakub Morvay [Thu, 28 Mar 2019 14:01:33 +0000 (14:01 +0000)]
Merge "Added implementation of ActionFactory"

5 years agoAdded implementation of ActionFactory 17/81117/3
Jaroslav Tóth [Fri, 22 Mar 2019 14:10:12 +0000 (15:10 +0100)]
Added implementation of ActionFactory

- Added device action factory implementation that creates
  DOMActionService implementations using netconf message
  transformer, and remote device communicator.
- Injected ActionFactory to netconf topology and callhome topogy.

JIRA: NETCONF-448
Change-Id: I48261d0ae7639f63bec3ae04a88a15a78ed56962
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoHide credentials from logs 56/81256/2
Jaroslav Tóth [Thu, 28 Mar 2019 11:54:14 +0000 (12:54 +0100)]
Hide credentials from logs

- Netconf credentials are replaced by '***' in
  AbstractNetconfTopology class (security fix).

Change-Id: I9276f82a3d39e10fdb41a5f5730446548ff39a30
JIRA: NETCONF-609
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoMerge "Output-less RPCs should return 204 (old restconf)"
Jakub Morvay [Thu, 28 Mar 2019 09:34:26 +0000 (09:34 +0000)]
Merge "Output-less RPCs should return 204 (old restconf)"

5 years agoMerge "Fix parsing of fields parameters"
Jakub Morvay [Thu, 28 Mar 2019 08:16:55 +0000 (08:16 +0000)]
Merge "Fix parsing of fields parameters"

5 years agoOutput-less RPCs should return 204 (old restconf) 22/81222/4
Jaroslav Tóth [Wed, 27 Mar 2019 12:50:21 +0000 (13:50 +0100)]
Output-less RPCs should return 204 (old restconf)

- draft-bierman-netconf-restconf-02 (5.4 Operation Resource):
  "... If the "rpc" statement has an "output" section, then a message
  body MAY be sent by the server in the response.  Otherwise the server
  MUST NOT include a message body in the response message, and MUST send
  a "204 No Content" Status-Line instead."
- Old restconf implementation is modified - the RPCs with empty
  output throws WebApplicationException with status code 204 (both,
  with or withput input payload versions).

Change-Id: Ie9eb836b82725b5ab7eaaf4e3b7c932815b928e6
JIRA: NETCONF-366
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoMerge "Allow double slashes in RESTCONF URLs"
Jakub Morvay [Thu, 28 Mar 2019 07:54:45 +0000 (07:54 +0000)]
Merge "Allow double slashes in RESTCONF URLs"

5 years agoOutput-less RPCs should return 204 (new restconf) 21/81221/2
Jaroslav Tóth [Wed, 27 Mar 2019 11:52:22 +0000 (12:52 +0100)]
Output-less RPCs should return 204 (new restconf)

- RFC-8040 (4.4.2 - Invoke Operation Mode):
  "If the POST request succeeds, a "200 OK" status-line is returned
  if there is a response message-body, and a "204 No Content"
  status-line is returned if there is no response message-body."
  The example in RFC confirms on specific RPC without output (also
  in section 4.4.2).
- Restconf RFC 8040 RPC handler is modified so it is checked
  against empty data in output container. If there is no data child
  under otuput container, WebApplicationException with status code
  204 is thrown.

Change-Id: I3e9396db8096571719ad7947cb46f6196cc54532
JIRA: NETCONF-366
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoFix parsing of fields parameters 95/81195/1
Jaroslav Tóth [Tue, 26 Mar 2019 15:02:24 +0000 (16:02 +0100)]
Fix parsing of fields parameters

- Multiple nested schema nodes splitted by semilcolon can be placed
  on one level of QNames, also, when the nested schema nodes are
  specified by multiple-nodes path; example:
  fields=service(type;instance/name;instance/provider)
- Previously, multiple-nodes nested path to schema node had to be
  listed as the last parameter in brackets without any other
  multi-nodes nested path.

Change-Id: I0d2f76047342e19a996fea0abe4001597d1c0a03
JIRA: NETCONF-320
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoAllow double slashes in RESTCONF URLs 44/81144/1
Jaroslav Tóth [Mon, 25 Mar 2019 13:47:47 +0000 (14:47 +0100)]
Allow double slashes in RESTCONF URLs

- Allowing of double slashes in URI - empty part of URI is ignored
  if list with one or more keys doesn't preceed it.
- Fix for old RESTCONF spec.

Change-Id: If3c4a6cd7c81d3e09500f74f6da3843bb525fc19
JIRA: NETCONF-24
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoSchemaSourceCache init using YangModuleInfo 41/81041/2
Jaroslav Tóth [Wed, 20 Mar 2019 12:26:39 +0000 (13:26 +0100)]
SchemaSourceCache init using YangModuleInfo

- SchemaSourceCache is initialized directly using set of
  YangModuleInfo, not just by paths to modules.
- Updated Configuration && ConfigurationBuilder with
  Set<YangModuleInfo>.

Change-Id: Ief27da31fdb19576bca938843042386a3965fc80
JIRA: NETCONF-528
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoMerge "NETCONF-527 Holding of key-pair in memory"
Jakub Morvay [Tue, 19 Mar 2019 10:20:23 +0000 (10:20 +0000)]
Merge "NETCONF-527 Holding of key-pair in memory"

5 years agoNETCONF-527 Holding of key-pair in memory 81/80981/1
Jaroslav Tóth [Tue, 19 Mar 2019 09:28:18 +0000 (10:28 +0100)]
NETCONF-527 Holding of key-pair in memory

- Generated key-pair is not saved in file but rather kept only in
  memory.
- Created VirtualKeyPairProvider that allows creation of only one
  key-pair that is returned in loadKeys(..) method.

Change-Id: If51f7ae7205bfa85c95649ce327fc01d276c0e6b
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
5 years agoNETCONF-608 - Change Netconf keepalives to not send during large payload replies 91/80391/6
Jakub Tóth [Wed, 20 Feb 2019 10:11:35 +0000 (11:11 +0100)]
NETCONF-608 - Change Netconf keepalives to not send during large payload replies

  * stop to send the keepalive rpc to device while ODL is waiting/processing
    the response from the device
  * junit tests

Change-Id: Ib5f4c9a8e2c4cac92887750b687ea8c50e58f3c0
Signed-off-by: Jakub Tóth <jtoth@luminanetworks.com>
5 years agoUpdate DataTreeChangeTracker 94/80694/1
Robert Varga [Wed, 6 Mar 2019 09:51:57 +0000 (10:51 +0100)]
Update DataTreeChangeTracker

DataTreeChangeTracker is treated as a pure DTO, whereas it has some
characteristics attached, but kept in EditConfig support.

Refactor it to remove collection leaks and duplicate code. Also optimize
current path snapshotting by instatiating YangInstanceIdentifier
eagerly.

Change-Id: I05b4e9e6d2cfd49a289b20b6ee2072fc755a0377
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoGet rid of string payload RestconfService#invokeRpc 41/80241/5
Jakub Morvay [Fri, 8 Feb 2019 18:14:42 +0000 (19:14 +0100)]
Get rid of string payload RestconfService#invokeRpc

This method was deprecated a while ago and should not be used and
provided. invokeRpc method with NormalizedNodeContext payload is enough
and should be used on all occasions.

Change-Id: I3098861d6fd9c4923d8b5fd291344865b977d8a2
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMerge "introduce Rfc8040RestConfWiring for standalone (simple) environments"
Jakub Morvay [Fri, 8 Feb 2019 18:41:41 +0000 (18:41 +0000)]
Merge "introduce Rfc8040RestConfWiring for standalone (simple) environments"

5 years agoMerge "Allow no payload for RPCs with no input"
Jakub Morvay [Fri, 8 Feb 2019 18:38:15 +0000 (18:38 +0000)]
Merge "Allow no payload for RPCs with no input"

5 years agoFix error message 40/80240/3
Jakub Morvay [Fri, 8 Feb 2019 13:38:57 +0000 (14:38 +0100)]
Fix error message

This fixes obviously wrong error message propagated to user when RPC
with an input section defined is tried to be invoked without any/empty
payload.

Change-Id: I7cb6f5b6e0b7ea6fa16907d94028502957c90166
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoAllow no payload for RPCs with no input 37/80237/2
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 agointroduce Rfc8040RestConfWiring for standalone (simple) environments 14/80214/8
Michael Vorburger [Thu, 7 Feb 2019 17:50:37 +0000 (18:50 +0100)]
introduce Rfc8040RestConfWiring for standalone (simple) environments

very similar to the previous Bierman02RestConfWiring

including a non-regression test

Change-Id: If7b7fdabe85c39ddfb4af351daed4f8771b2bcbe
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoRemove javax.annotation nullness annotations 19/80219/2
Robert Varga [Thu, 7 Feb 2019 21:49:40 +0000 (22:49 +0100)]
Remove javax.annotation nullness annotations

These annotations should not be used and they interfere with Java EE
annotations. Migrate/eliminate them as needed.

Change-Id: Ifa3a80f2accdba369d916aaffde43025ded20b1b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix Revision confusion 18/80218/2
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>
5 years agointroduce Bierman02RestConfWiring for standalone (simple) environments 88/79388/11
Michael Vorburger [Wed, 9 Jan 2019 22:19:37 +0000 (23:19 +0100)]
introduce Bierman02RestConfWiring for standalone (simple) environments

This comes out of https://github.com/vorburger/opendaylight-simple
(and see JavaDoc for the history & ACK/nod to Lighty.io)

This (now, not originally) requires
I3c632adbb4c4a9d9ac7bed4557bcaaece47dd0cf in AAA.

Change-Id: I614a48bcc425db8faa1a79ebd6236236bcd09e73
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoGet rid of some Guava dependencies 38/80138/4
Jakub Morvay [Mon, 4 Feb 2019 20:01:11 +0000 (21:01 +0100)]
Get rid of some Guava dependencies

Use Java 8 Optional and Objects requireNonNull instead of their guava
counterparts.

Change-Id: Ieaebd36ec8b3fc9745739c243b3ee8285de8a04b
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoMake netconf node tcp-only leaf have default value 37/80137/3
Jakub Morvay [Sat, 2 Feb 2019 17:40:27 +0000 (18:40 +0100)]
Make netconf node tcp-only leaf have default value

Netconf node tcp-only leaf defines if we should use SSH or TCP as an
underlying protocol for netconf session to a netconf device.

Currently it does not have any default value defined. That means if we
forgot to fill in tcp-only field when configuring netconf mount point,
netconf topology implementation will not know what protocol to use and
will throw NPE. However, it would be more user friendly to have some
default protocol defined. We should aim to use SSH by default as it is
more secure protocol than just plain TCP.

Make tcp-only field default to false.

JIRA: NETCONF-488
Change-Id: I99d17ad54db55089b9ec3e417d69e711058c760a
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoDisable servlet sessions for /rests web context 32/80132/2
Jakub Morvay [Mon, 4 Feb 2019 11:52:39 +0000 (12:52 +0100)]
Disable servlet sessions for /rests web context

Follow-up patch to https://git.opendaylight.org/gerrit/#/c/80006/.

Disable servlet sessions for /rests web context for the same reasons why
we disable it for /restconf web context. That is, it seems we do not
have to keep track of Servlet API HTTP Sesssion objects.

Change-Id: I8d8165a0a8e515db85718dd08fd3a40a4a8ffed5
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agodisable Servlet sessions for /restconf web context 06/80006/2
Michael Vorburger [Tue, 29 Jan 2019 20:49:55 +0000 (21:49 +0100)]
disable Servlet sessions for /restconf web context

Unless RESTCONF, or JAX RS, is doing something I am not aware of, I
doubt that we need our chosen Servlet Container (currently Jetty) tokeep
track of Servlet API HTTP Sesssion objects for connections to /restconf?

This probably saves a (little bit) of memory in Jetty & Co.

Change-Id: Ia57c22036b65b03eada81991e1566fc9da65ecb6
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
5 years agoMerge bierman02-auth and bierman02-base features 23/80123/7
Jakub Morvay [Sat, 2 Feb 2019 10:01:00 +0000 (11:01 +0100)]
Merge bierman02-auth and bierman02-base features

We do not need odl-restconf-nb-bierman02-base feature now. It is
bierman-02 restconf implementations and used to be pulled by both
bierman02-auth and bierman02-noauth features. These two features just
initialized the web application (with or without authentication).

Since bierman02-noauth is no longer with us, merge remaining two
features into odl-restconf-nb-bierman02 feature.

Change-Id: I121e3c109ca1b5f60aac66e76af011cef0774f7d
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoRemove bierman02-noauth feature 22/80122/5
Jakub Morvay [Sat, 2 Feb 2019 09:30:00 +0000 (10:30 +0100)]
Remove bierman02-noauth feature

odl-restconf-nb-bierman02-noauth was deprecated in Neon. Get rid of it
now in Sodium.

Change-Id: I848f09af7a82d91fc564842838c9ba535decad69
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
5 years agoBump versions by x.y.(z+1) 90/80090/1
jenkins-releng [Fri, 1 Feb 2019 13:06:30 +0000 (13:06 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I5c4aee9a480a4fbec891d07af883dbe3c916d16d
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>