netconf.git
6 years agoRelease Carbon release/carbon-sr2
jenkins-releng [Mon, 9 Oct 2017 19:04:32 +0000 (19:04 +0000)]
Release Carbon

6 years agoBUG-9132: don't provide a value for restconf/streams/events 55/63855/1
Evan Zeller [Thu, 28 Sep 2017 01:15:31 +0000 (18:15 -0700)]
BUG-9132: don't provide a value for restconf/streams/events

The yang type of events leaf is 'type empty', meaning there should be no value.
As of Carbon performing a GET on restconf/streams causes a cast
exception due to the empty string value here. See EmptyJSONCodec in
yangtools.

Change-Id: If0501b9c5459f4255096a4f070968c87a749407e
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
(cherry picked from commit 9ae46c73bc2437dc1dab54498b3a64c0600fa9e8)

6 years agoMinor cleanup of blueprint config 14/62114/2
Atul Gosain [Tue, 22 Aug 2017 00:46:01 +0000 (17:46 -0700)]
Minor cleanup of blueprint config

The path for private file was left here due to which the netconf module
looks for the private key file and shows error in the log which is a false alarm.
Cleaning up the configuration

Change-Id: Ied9cc137ab67cab158318a6c2f34da19dc174fe0
Signed-off-by: Atul Gosain <atul.gosain@gmail.com>
Signed-off-by: Atul Gosain <agosain@brocade.com>
6 years agoBug 8989 - Create just one DS for each test-tool's simulated netconf device 43/62643/1
Jakub Morvay [Fri, 18 Aug 2017 08:28:03 +0000 (10:28 +0200)]
Bug 8989 - Create just one DS for each test-tool's simulated netconf device

When using netconf test-tool with option --md-sal set to true, we expect
that each test-tool's simulated netconf device will have its own md-sal
persistent datastore. However, current implementation creates own
datastore for each netconf session.

Map newly created simulated device's datastore to its server socket
instead of netconf session's socket.

Change-Id: I2d5a0295c8cbff6d29baafa36bdbbe6aba8119c6
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
(cherry picked from commit c65ab49a8a2f72446e13e0bb0f8395722c455c6b)

6 years agoBug 8977 - Failed on binary key type 10/61610/4
Jakub Toth [Tue, 15 Aug 2017 15:07:14 +0000 (17:07 +0200)]
Bug 8977 - Failed on binary key type

  * fix validating of uri with input data for binary key type
  * tests

Change-Id: I70ac6e10f9999bc0feca2ba600124fa639eef842
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
6 years agoRPC for netconf node addition. Supports encrypt option for password encryption. 21/60621/12
Atul Gosain [Fri, 21 Jul 2017 04:44:33 +0000 (21:44 -0700)]
RPC for netconf node addition. Supports encrypt option for password encryption.

Change-Id: I34beb880cbe2ccc6a3fe8e5f6cd4253f7e1938f4
Signed-off-by: Atul Gosain <atul.gosain@gmail.com>
Signed-off-by: Atul Gosain <agosain@brocade.com>
6 years agoEnable public key based authentication for netconf 37/59537/12
Atul Gosain [Tue, 27 Jun 2017 02:13:26 +0000 (19:13 -0700)]
Enable public key based authentication for netconf

Change-Id: Icca97924515537b670688767d41ddd4bd6e1bbf6
Signed-off-by: Atul Gosain <agosain@brocade.com>
6 years agoMerge "Bug 8832 - rpc-error in keepalive rpc-reply shouldn't bounce the session"...
Tomas Cere [Mon, 17 Jul 2017 10:10:44 +0000 (10:10 +0000)]
Merge "Bug 8832 - rpc-error in keepalive rpc-reply shouldn't bounce the session" into stable/carbon

6 years agoMerge "Bug 8824 - NETCONF request hangs when rpc-rply has invalid xml" into stable...
Tomas Cere [Mon, 17 Jul 2017 10:10:41 +0000 (10:10 +0000)]
Merge "Bug 8824 - NETCONF request hangs when rpc-rply has invalid xml" into stable/carbon

6 years agoDo not pull in yang-maven-plugin 25/60325/2
Robert Varga [Thu, 13 Jul 2017 16:06:13 +0000 (18:06 +0200)]
Do not pull in yang-maven-plugin

This plugin is not used and pollutes the build environment with
incorrect version.

Change-Id: I55512253dc8a034274c79b095906b017190f0dfa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 55ff44f854bfb9c8d6d72ba85107780451484ff2)

6 years agoBug 8824 - NETCONF request hangs when rpc-rply has invalid xml 96/60096/4
Alexis de Talhouët [Fri, 7 Jul 2017 17:00:43 +0000 (13:00 -0400)]
Bug 8824 - NETCONF request hangs when rpc-rply has invalid xml

The decoder handler is blindly throwing the SAXException but
nobody is there to intercept it. Also, as we're in the netty
world, to be able to propagate the exception, we're using the
NetconfMessage POJO.
That latest has been modified to accept either the decoded message
or an exception, if exception is thrown.

Change-Id: I62af5a885cc4e9f459c4aa71871b7d9331c4b946
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
6 years agoBump versions by x.y.(z+1) 59/60359/1
jenkins-releng [Fri, 14 Jul 2017 12:49:20 +0000 (12:49 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I09555360e9dc17a5d2f78dc06c0aefed1dbbec47
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoBUG 8839: Revert "Make netconf utilize encrypted passwords only" 06/60206/2
Tomas Cere [Tue, 11 Jul 2017 14:57:59 +0000 (14:57 +0000)]
BUG 8839: Revert "Make netconf utilize encrypted passwords only"

This reverts commit 1867bf17d781f21473dabcde2ad3f85b9b1defc6.

Change-Id: Ia5d97c118d805bdeff9e47f466a9ec64b58c03ca
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoBug 8832 - rpc-error in keepalive rpc-reply shouldn't bounce the session 52/60152/3
Alexis de Talhouët [Mon, 10 Jul 2017 17:30:10 +0000 (13:30 -0400)]
Bug 8832 - rpc-error in keepalive rpc-reply shouldn't bounce the session

Change-Id: I2ef4153b5910e56c3401c08d57465741f1002691
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
6 years agoMake netconf utilize encrypted passwords only 83/58783/3
Atul Gosain [Tue, 13 Jun 2017 05:48:55 +0000 (22:48 -0700)]
Make netconf utilize encrypted passwords only

Change-Id: I8df56a761735f1dfc46fa831276367fbabc1a8f3
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Signed-off-by: Atul Gosain <agosain@brocade.com>
Signed-off-by: Colin Dixon <colin@colindixon.com>
(cherry picked from commit 7901b519a09351061e5a1dd061f7f7c0cc738fb8)

6 years agoMerge "Bug 8490 - Ignore unstable SSHServerTest" into stable/carbon
Tomas Cere [Wed, 28 Jun 2017 11:41:11 +0000 (11:41 +0000)]
Merge "Bug 8490 - Ignore unstable SSHServerTest" into stable/carbon

6 years agoBUG-8697: select correct transformer for schemaless netconf mounts 68/59068/2
Gwenael Lambrouin [Thu, 22 Jun 2017 12:27:42 +0000 (14:27 +0200)]
BUG-8697: select correct transformer for schemaless netconf mounts

Getting or editing the configuration of a schemaless-mounted netconf device
from the code of an ODL application results in a NullPointerException.

This patch fixes the NetconfBaseOps constructor so that the RPC structure
transformer dedicated to schemaless mount points is actually selected.

Change-Id: Ib0b2d1c9910613f4354bdcb4f1c56e9be36a95b2
Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@b-com.com>
6 years agoMerge "Fixing NPE caused when rpc definition does not include "input" or "output...
Tomas Cere [Thu, 22 Jun 2017 11:10:36 +0000 (11:10 +0000)]
Merge "Fixing NPE caused when rpc definition does not include "input" or "output"" into stable/carbon

6 years agoRemove UriInfo from JSONRestconfService API methods 16/59216/1
Tom Pantelis [Wed, 14 Jun 2017 18:42:41 +0000 (14:42 -0400)]
Remove UriInfo from JSONRestconfService API methods

https://git.opendaylight.org/gerrit/#/c/48369/ added a UriInfo parameter
to several JSONRestconfService API methods in Carbon. However this was an
undocumented API change which will break downstream users. Further,
there is no available implementation of UriInfo so each user would have
to provide an implementation which would pretty much render the API
unusable. We do not need to expose UriInfo in this API so I've remove the
parameters.

We'll need to cherry-pick to stable/carbon for SR1 to minimize breakage.

Change-Id: I74285413c2a3a92510398a57ea82567b646c6d27
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoUn-deprecate JSONRestconfService(Impl) 70/58970/1
Tom Pantelis [Fri, 2 Jun 2017 03:41:01 +0000 (23:41 -0400)]
Un-deprecate JSONRestconfService(Impl)

Patch https://git.opendaylight.org/gerrit/#/c/56391/ deprecated
JSONRestconfService and JSONRestconfServiceImpl however no reason
was given in the patch message (in fact the patch was about fixing
checkstyle violations) nor were any comments added to the classes
as to why they're deprecated.

There really shouldn't be any reason to deprecate these classes
as they are useful and are used in applications. Therefore I remove
the @Deprecated annotation.

Change-Id: I335c8e8665cc2b489e4d3b690d8cac7dbd157b4f
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG-8085: create missing parent augmentation node 12/58312/1
Marek Gradzki [Mon, 5 Jun 2017 14:28:44 +0000 (16:28 +0200)]
BUG-8085: create missing parent augmentation node

Augmentation nodes do not exist in serialized form
(e.g. in edit-config message), but are required by DataTree-based
DOMDataBroker implementations, so should be created if data from
augment is present.

This patch creates missing augment nodes by issuing merge on augmentation
before put operation (based on current behaviour for ListSchemaNodes).

Change-Id: If657ae96e914fc46617099042a833c7d4d5883b7
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoBUG 8566 direct writes to ordered list fail 05/58105/1
Tomas Cere [Wed, 31 May 2017 12:53:57 +0000 (14:53 +0200)]
BUG 8566 direct writes to ordered list fail

Incorrect handling of direct writes into a mapEntry which tries
to merge an empty parent list instead of an exists check but doesnt
correctly handle the possibility of an OrderedMapNode as a parent.

Change-Id: Ia2c75cc50e6ff4c9c7c9be36846c08cc85cff491
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoFixing NPE caused when rpc definition does not include "input" or "output" 70/58070/1
Srini Seetharaman [Wed, 31 May 2017 17:30:12 +0000 (10:30 -0700)]
Fixing NPE caused when rpc definition does not include "input" or "output"

Change-Id: I90cd8da7abfbb24015a87c1b2a7cf7dc3f047b4a
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
6 years agoMerge "Bug 7933: NPE when posting using XML" into stable/carbon
Tomas Cere [Mon, 29 May 2017 10:43:47 +0000 (10:43 +0000)]
Merge "Bug 7933: NPE when posting using XML" into stable/carbon

6 years agoMerge changes Ieb46b050,I6bff6467 into stable/carbon
Tomas Cere [Mon, 29 May 2017 10:42:59 +0000 (10:42 +0000)]
Merge changes Ieb46b050,I6bff6467 into stable/carbon

* changes:
  Bug 8533: Not possible to invoke RPC on mount points with new Restconf
  Bug 7933: NPE when posting using XML

6 years agoMerge "Bug 8455: Yang Patch response is not having the error details" into stable...
Tomas Cere [Mon, 29 May 2017 10:15:42 +0000 (10:15 +0000)]
Merge "Bug 8455: Yang Patch response is not having the error details" into stable/carbon

6 years agoBump versions by x.y.(z+1) 55/57855/1
jenkins-releng [Thu, 25 May 2017 18:18:08 +0000 (18:18 +0000)]
Bump versions by x.y.(z+1)

Change-Id: Iccde43caf965f4f6d147cc96027f8585125e6229
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoBug 8533: Not possible to invoke RPC on mount points with new Restconf 85/57685/3
Ivan Hrasko [Tue, 23 May 2017 12:27:04 +0000 (14:27 +0200)]
Bug 8533: Not possible to invoke RPC on mount points with new Restconf

- put identifer of RPC into InstanceIdentiferContext
instead of mount point identifer which leads to fail
in unit test

- when working with mount point use mount point's
schema context to find RPC module, previously used
controller's schema context leads to NPE

- repaired imports in RestconfApplication to use
new implementation

Change-Id: Ieb46b050e881c89ea58bb9f521be69554733d575
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 7933: NPE when posting using XML 83/57683/2
Ivan Hrasko [Tue, 23 May 2017 12:21:01 +0000 (14:21 +0200)]
Bug 7933: NPE when posting using XML

PUT operation:
- fix issue when putting malformed XML body did not
fail with appropriate status.

Change-Id: I6bff6467f4b99bed9adf1ac39def54822899761e
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 7933: NPE when posting using XML 84/57684/1
Ivan Hrasko [Tue, 23 May 2017 12:24:11 +0000 (14:24 +0200)]
Bug 7933: NPE when posting using XML

- NPE was thrown because leaf value was not parsed,
thus data value was null
- fixed by adding condition to parse leaf nodes
- log warning when unknown schema node type was
not parsed
- fixed in old and new restconf

Change-Id: I13c8e419e35999980548e09f6963b0d407a45b31
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8455: Yang Patch response is not having the error details 00/57400/1
Ivan Hrasko [Tue, 16 May 2017 08:55:04 +0000 (10:55 +0200)]
Bug 8455: Yang Patch response is not having the error details

- add error-info to error message

Change-Id: I0d637871969ff91850749228e92bda2055c71eef
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8490 - Ignore unstable SSHServerTest 83/57283/2
Andrej Mak [Wed, 17 May 2017 13:23:10 +0000 (15:23 +0200)]
Bug 8490 - Ignore unstable SSHServerTest

Temporary ignore because of intermittent failures
in autorelease.

Change-Id: I15790eaa5e01765cceba7ed6cae9b0840f33d425
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
6 years agoBug 8421 - Revert "Resolve exception from registerClusterSingletonService" 36/56836/2
Andrej Mak [Thu, 11 May 2017 08:27:10 +0000 (10:27 +0200)]
Bug 8421 - Revert "Resolve exception from registerClusterSingletonService"

This change causes, that whole topology is closed, when
cluster singleton service registration fails, which is incorrect.

This reverts commit 25e450c382211e0b80d873f7697c7b9807be54af.

Change-Id: I37053d4fda7830ef53dc61fcbda3d149f11bbdbe
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
6 years agoMerge "Bug 8074 - actor name [test-device] is not unique!" into stable/carbon
Jakub Morvay [Wed, 10 May 2017 21:46:52 +0000 (21:46 +0000)]
Merge "Bug 8074 - actor name [test-device] is not unique!" into stable/carbon

6 years agoBug 8074 - actor name [test-device] is not unique! 73/54873/7
miroslav.kovac [Mon, 3 Apr 2017 12:39:19 +0000 (14:39 +0200)]
Bug 8074 - actor name [test-device] is not unique!

When creating a new actor with same name as an old one, it might fail
becuase old actor might not be completely gone at this point.

This creates a slaveActor which will never be closed, but instead
every time that mountpoint is closed or master is changed, it would
update NetconfNodeActor data and keep the same actor.

Only time that actor is closed is when node was deleted. Or slave
became a master

The name of the actor is removed - letting akka to handle that -
log the akka created name.

Change-Id: I6d10db7b8902048632e336fb5a9701a797b363c6
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
6 years agoResolve exception from registerClusterSingletonService 88/56788/1
miroslav.kovac [Wed, 10 May 2017 09:05:14 +0000 (11:05 +0200)]
Resolve exception from registerClusterSingletonService

registerClusterSingletonService return RuntimeException in
case of problems with registration and client should implement
strategy to resolve this issue

Change-Id: If6350969f1d1c2917c78850f4c66629b52137b0b
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
(cherry picked from commit dbcd66681f76ef4175917d1620b9066b86f2a267)

6 years agoBug 8405: Add close check to NetconfDevice 20/56720/9
Andrej Mak [Tue, 9 May 2017 11:17:48 +0000 (13:17 +0200)]
Bug 8405: Add close check to NetconfDevice

Since schema resolution runs in its own thread, it is possible,
that handleSalInitializationSuccess is called when
NetconfDeviceCommunicator was closed meanwhile. Add check to
prevent this.

Change-Id: If93d32b26f0b98c4c0d47fdd65fdb5104db20bc5
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoMerge "Bug 8364: Set bundle context when module reloads" into stable/carbon
Jakub Morvay [Sat, 6 May 2017 07:50:18 +0000 (07:50 +0000)]
Merge "Bug 8364: Set bundle context when module reloads" into stable/carbon

7 years agoMerge "Bug 8361 - NetconfConnector cannot be created due to NullPointerException...
Tomas Cere [Fri, 5 May 2017 13:52:20 +0000 (13:52 +0000)]
Merge "Bug 8361 - NetconfConnector cannot be created due to NullPointerException" into stable/carbon

7 years agoBug 8364: Set bundle context when module reloads 82/56582/1
Andrej Mak [Fri, 5 May 2017 09:05:46 +0000 (11:05 +0200)]
Bug 8364: Set bundle context when module reloads

Fix for bug Bug 8214 handles waiting for AAA, when Restconf
is installed for the first time. Override handleChangedClass
to do the same thing for reinstall case. Also close old
module to release bound ports and started threads.

Change-Id: I00f5f330fca39bb63f66517dddd8d1371ae353e8
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 8361 - NetconfConnector cannot be created due to NullPointerException 63/56463/2
Martin Mihálek [Wed, 3 May 2017 11:24:02 +0000 (13:24 +0200)]
Bug 8361 - NetconfConnector cannot be created due to NullPointerException

- Adds Nullpointer checks in RemoteDeviceConnecterImpl
- If Yang module capabilities are missing its override flag is set to false
- If Non module capabilities are missing its override flag is set to false

Change-Id: I25d172e94a1013d79c0c7db37c930c89ad2ed94f
Signed-off-by: Martin Mihálek <mamihale@cisco.com>
7 years agoBug 7891: Add ssh feature to netconf-netty-util 60/56460/3
Andrej Mak [Wed, 3 May 2017 07:06:48 +0000 (09:06 +0200)]
Bug 7891: Add ssh feature to netconf-netty-util

Odl-netconf-netty-util needs sshd-core bunde to work.
It is provided by karaf. However, if odl-netconf-netty-util
is placed to featuresBoot, ssh provided by karaf isn't
started, so ResolutionException is thrown. To prevent this
add ssh feature to odl-netconf-netty-util.

Change-Id: Iaf5ecddaa726ea892191b5cf47095c1df3b096f6
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 8311 - Apidoc: Incomprehensible 500 id model is wrong 25/56425/2
miroslav.kovac [Tue, 2 May 2017 13:05:11 +0000 (15:05 +0200)]
Bug 8311 - Apidoc: Incomprehensible 500 id model is wrong
Bug 8266 - Apidoc explorer is broken after installing Boron SR3

Depending on path if it is relative or absolute module has to be
resolved different ways. If it is relative path it will have to
be resolved through DataSchemaNote which returns namespace and
revision of module in which node is situated. If it is absolute
path we need TypeDefinition which returns a namespace and
revision of original module.

Change-Id: I522ea66383ba1d65e6674d5e8ff67ec31e019303
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
7 years agoBug 8084 - FilterContentValidator.getKeyValues creates invalid YII key values 69/54869/3
miroslav.kovac [Tue, 28 Mar 2017 15:51:39 +0000 (17:51 +0200)]
Bug 8084 - FilterContentValidator.getKeyValues creates invalid YII key values

Change-Id: Ie6c65c9cb005f9f1be85e04a8cf643e48e07bb94
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
7 years agoBug 8032 - Initialization in sal failed, disconnecting from device 74/54874/13
miroslav.kovac [Tue, 4 Apr 2017 13:27:06 +0000 (15:27 +0200)]
Bug 8032 - Initialization in sal failed, disconnecting from device

MountpointService is initialized with blueprint and therefore it
should never throw null pointer exception anymore.

All the binding and dom broker are deleted because they are
not needed any more.

Change-Id: I9aa9064752043819bc73043f7b667b4ea2c0fd0a
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
7 years agoBug 8289 - 409 in cluster restperfclient test 56/56056/8
miroslav.kovac [Wed, 26 Apr 2017 09:18:06 +0000 (11:18 +0200)]
Bug 8289 - 409 in cluster restperfclient test

To ensure message ordering we need ReadWriteTransactionActor. This
way we are sure that all reads and writes will be executed in
the order that they are sent.

Change-Id: I7a76f6b4d9e6e348ec0d58abe24e56dfeae66f24
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
7 years agoMerge "Bug 8197: Deregister schema sources on actor stop" into stable/carbon
Jakub Morvay [Fri, 28 Apr 2017 07:21:08 +0000 (07:21 +0000)]
Merge "Bug 8197: Deregister schema sources on actor stop" into stable/carbon

7 years agoBug 8197: Deregister schema sources on actor stop 81/55981/3
Andrej Mak [Mon, 24 Apr 2017 13:08:27 +0000 (15:08 +0200)]
Bug 8197: Deregister schema sources on actor stop

NetconfNodeActor registers schema source provider
to schema registry. When mountpoint is removed, this
registration should be removed too. If it isn't,
following issue can happen:

1. Create mountpoint for device1
2. Master actor for device1 is registered as mod-1.yang provider
3. Delete device1
4. Create mountpoint for device2
5. Master actor for device2 is registered as mod-1.yang provider
6. Register slave -
   schemaContextFactory.createSchemaContext(sourceIdentifiers)
   is called
7. Since dead device1 master is still registered as provider,
   ask in ProxyYangTextSourceProvider timeouts
8. After timeout device2 master is queried
9. Device 2 slave mountpoint registered

This delays slave mountpoint registration.

Change-Id: I060c8b1988ba7b54f9a93d7eb37adb5c5e48b23b
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoFix odl-netconf-ssh single feature test 47/56147/1
Jakub Morvay [Mon, 24 Apr 2017 17:19:15 +0000 (19:19 +0200)]
Fix odl-netconf-ssh single feature test

Add dependency on odl-netconf-tcp and odl-netconf-util modules so we
will see their features repositories generated in odl-netconf-ssh
feature.xml file.

Also set dependency="true" atribute for both dependency features when
overriding generated feature.xml file.

Change-Id: I290f63d36961c1eb9cac06d48dfeb2bfee4dace4
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
(cherry picked from commit 855980926d53f158e8d3e76eb0fbe9e13661fb43)

7 years agoMerge "Bug 8214: Consume AAAService" into stable/carbon
Jakub Morvay [Thu, 27 Apr 2017 08:45:53 +0000 (08:45 +0000)]
Merge "Bug 8214: Consume AAAService" into stable/carbon

7 years agoBug 8181 - Add karaf4 feat to artifacts 39/56039/3
Ivan Hrasko [Mon, 24 Apr 2017 08:58:57 +0000 (10:58 +0200)]
Bug 8181 - Add karaf4 feat to artifacts

Change-Id: Ied3f487b8292b41b2a863bedc2ccf2aefaea662d
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 8214: Consume AAAService 50/56050/1
Ryan Goulding [Wed, 19 Apr 2017 18:37:14 +0000 (14:37 -0400)]
Bug 8214: Consume AAAService

Consume AAAService ensuring the bundles are available from the BundleContext
prior to trying to load the rest of RESTCONF.

Change-Id: If3e081712d475e65799b805ce0cdcd6f946c93f2
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
7 years agoRefactor netconf clustered topology tests 03/56003/1
Andrej Mak [Tue, 25 Apr 2017 06:19:53 +0000 (08:19 +0200)]
Refactor netconf clustered topology tests

- split long tests into smaller
- remove duplicated code

Change-Id: I64913380fd0768394b430971ef5ff118d56b7b6b
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 8152: Add way to configure idle timeout 75/55975/1
Andrej Mak [Wed, 19 Apr 2017 08:32:18 +0000 (10:32 +0200)]
Bug 8152: Add way to configure idle timeout

Clustered apps should be configurable via datastore
to allow config distribution to all nodes according to
https://wiki.opendaylight.org/view/Using_Blueprint#Using_the_Datastore
Add such configuration for clustered topology.

Change-Id: I1a318590c75c6c95da48cb1e0521994f0b83dfe4
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 8152: Transaction is already opened 66/55866/2
Andrej Mak [Wed, 19 Apr 2017 06:12:36 +0000 (08:12 +0200)]
Bug 8152: Transaction is already opened

This issue happens, when for some reason transaction
submit or cancel message isn't delivered to master
node. With current implementation, only one device
transaction can be opened at the time, so submit or
cancel delivery failure will lock device forever.

To prevent this, this patch introduces write trancaction
idle timeout. Write transaction actor will be stopped
and its device transaction cancelled, when no message
is received for given time. Cancellation unlocks device,
so mountpouint is usable again.

Change-Id: I37bef30038cf6fd10fa5149a3fa949540ac16eab
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
(cherry picked from commit 95dc1455a7303eac56c755d01a37ca1f203543c0)

7 years agoMerge changes I220c5a0e,I9f5dca23,Ibf5628f6 into stable/carbon
Tomas Cere [Fri, 21 Apr 2017 15:21:45 +0000 (15:21 +0000)]
Merge changes I220c5a0e,I9f5dca23,Ibf5628f6 into stable/carbon

* changes:
  Make EditConfig methods static
  Eliminate ReadWriteTransaction proliferation
  BUG-5581: batch read check

7 years agoChange handling of netconf cluster transactions 97/55797/1
Andrej Mak [Fri, 24 Feb 2017 07:58:01 +0000 (08:58 +0100)]
Change handling of netconf cluster transactions

Own actor is created on master for every transaction.
Proxy transactions use this actor for mount point access.
Creation of proxy transaction initiates sending of message
to the master node actor. Master node actor starts
transaciton actor if needed.
Both master and slaves communicate with device via
proxy transactions.

For write transaction, submit and cancel cause actor stop.
There can be single instance of read actor, which can be
reused for all transactions.

Change-Id: Iea39d794e8f2026b76f049409a718b6d94f41649
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
(cherry picked from commit 446738525190ad92736f1a8868e3263737276aff)

7 years agoMake EditConfig methods static 95/55795/1
Robert Varga [Fri, 21 Apr 2017 09:24:49 +0000 (11:24 +0200)]
Make EditConfig methods static

Some of these do not refer to object state and hence we can
make them static.

Change-Id: I220c5a0ed9340bc9cdd8f2ce7541568a2eaa7613
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoEliminate ReadWriteTransaction proliferation 93/55793/1
Robert Varga [Fri, 21 Apr 2017 09:00:55 +0000 (11:00 +0200)]
Eliminate ReadWriteTransaction proliferation

Many of the internal methods really need only a WriteTransaction,
hence adjust the type to make it more clear what a method can
actually do.

Change-Id: I9f5dca23c5174f2668f269fbf40e811e7046862d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoBUG-5581: batch read check 24/55224/3
Robert Varga [Wed, 19 Apr 2017 12:54:55 +0000 (14:54 +0200)]
BUG-5581: batch read check

When posting data we are executing potentially a lot of reads,
which can hurt if the backend is not residing on the node which
is executing the operations.

Fix this by issuing read requests in a batch and then collecting
the results, which means we will amortize request latency.

Change-Id: Ibf5628f6fdf56b7845b4a4623255ff4d417c4546
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoMerge "Bug-8187: call home throwing exception on startup" into stable/carbon
Jakub Morvay [Thu, 20 Apr 2017 11:42:49 +0000 (11:42 +0000)]
Merge "Bug-8187: call home throwing exception on startup" into stable/carbon

7 years agoMerge "Close read-only transactions" into stable/carbon
Jakub Morvay [Thu, 20 Apr 2017 08:06:40 +0000 (08:06 +0000)]
Merge "Close read-only transactions" into stable/carbon

7 years agoClose read-only transactions 52/55252/2
Robert Varga [Wed, 19 Apr 2017 17:12:53 +0000 (19:12 +0200)]
Close read-only transactions

As noted in API, read-only transactions are resources and must
be closed just as any other external resource.

Change-Id: I0f2d888a31edf242bc48410e6f2d4dfeed43a6b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoMigrate to karaf4 for the local karaf distribution 48/55248/1
Ryan Goulding [Wed, 22 Mar 2017 10:26:25 +0000 (06:26 -0400)]
Migrate to karaf4 for the local karaf distribution

Several folks have put in incredible effort to make karaf4 a reality in ODL.
Kudos to those folks for this great effort.  This patch officially converts
netconf's local karaf distribution to use odlparent's karaf4-parent artifact.

The karaf4 implementation will still be accessible at the following well-known
path:

> karaf/target/assembly

Change-Id: I00a1e5b93f5c57447e95a714d40e0635b5747393
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
(cherry picked from commit cb106fb29817db6c9e39ae6f47a3c3276d8e5e92)

7 years agoBUG-7868: perform checks before starting modifications 05/55205/1
Robert Varga [Wed, 19 Apr 2017 11:10:28 +0000 (13:10 +0200)]
BUG-7868: perform checks before starting modifications

The codepath for makeNormalPost() performs sub-optimal emulation
of create().

This patch changes the logic to first check for presence and then
perform modifications. This saves cycles as continuous modify/read
cycles incur heavy penalty on DataTree and also allows batching
of modification requests.

Change-Id: Ic8e18ada094334948170f2a147da806db7db1a16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
7 years agoBug 8115: Change URI decoding from ISO-8859-1 to UTF-8 41/54941/1
Ivan Hrasko [Thu, 13 Apr 2017 08:02:00 +0000 (10:02 +0200)]
Bug 8115: Change URI decoding from ISO-8859-1 to UTF-8

Change-Id: I3bcc7cae197aa267a43c8598f54050e987712c9a
Signed-off-by: lbeles <lbeles@frinx.io>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug-8187: call home throwing exception on startup 66/54866/1
allan clarke [Fri, 7 Apr 2017 17:19:23 +0000 (12:19 -0500)]
Bug-8187: call home throwing exception on startup

Remove distracting exception in log.
Restore ability to change the call home server port.
Move to using blueprint for configuration instead of
using ad hoc logic.

Change-Id: I273156ba13237b1ed8efc0e6ff9861b1aa5feb3b
Signed-off-by: allan clarke <clarkea@brocade.com>
(cherry picked from commit a03f9c965b43c9d7b78a78ab9e56935a5da07a88)

7 years agoUpdate .gitreview to stable/carbon 57/54657/1
Anil Belur [Tue, 11 Apr 2017 01:26:30 +0000 (11:26 +1000)]
Update .gitreview to stable/carbon

Change-Id: I05e7984e429355925418639de94a02f85b78a9aa
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoMerge "Fix formatting in callhome-provider"
Tomas Cere [Fri, 7 Apr 2017 12:37:46 +0000 (12:37 +0000)]
Merge "Fix formatting in callhome-provider"

7 years agoMerge "BUG-7529: Karaf 4 Migration"
Jakub Morvay [Thu, 6 Apr 2017 09:52:06 +0000 (09:52 +0000)]
Merge "BUG-7529: Karaf 4 Migration"

7 years agoFix formatting in callhome-provider 14/54314/1
Tomas Cere [Tue, 4 Apr 2017 14:09:38 +0000 (16:09 +0200)]
Fix formatting in callhome-provider

Change-Id: Iaf85efcc8a1233717f947ada3ff9a47ad2a6d328
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoBug 8095: Add operational devices to call home collection. 02/54002/10
Allan Clarke [Tue, 28 Mar 2017 18:36:55 +0000 (19:36 +0100)]
Bug 8095: Add operational devices to call home collection.

Original call home feature has config presence but not operational.
Operational devices are more convenient for monitoring
populations of call home devices (and will be richer model
in future).

Change includes adding a call home status (connected, disconnected, ...)
to operational devices.

Address "functional" checkstyle issues. Turn on checkstyle to list all
issues and fix all that have a non-cosmetic impact (unused imports,
catching exceptions, ...).

Reenable @Ignored unit tests

Change-Id: I3382e67414a9208c65b967c1a2ebaa3247cd4fba
Signed-off-by: Allan Clarke <clarkea@brocade.com>
7 years agoBUG-7529: Karaf 4 Migration 94/54194/2
Claudio D. Gasparini [Fri, 31 Mar 2017 15:37:23 +0000 (17:37 +0200)]
BUG-7529: Karaf 4 Migration

Add missing karaf 4 features to artifacts.

Change-Id: Ie259e875aa8f2c6cf743ee7b821fa25b144bf255
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
7 years agoMerge "Bug 8086 - Cannot mount honeycomb in clustered odl on CentOS"
Tomas Cere [Fri, 31 Mar 2017 11:05:37 +0000 (11:05 +0000)]
Merge "Bug 8086 - Cannot mount honeycomb in clustered odl on CentOS"

7 years agoMerge "Option to receive only leaf nodes in websocket notifs"
Tomas Cere [Thu, 30 Mar 2017 11:43:46 +0000 (11:43 +0000)]
Merge "Option to receive only leaf nodes in websocket notifs"

7 years agoBug 8086 - Cannot mount honeycomb in clustered odl on CentOS 17/54017/2
Jakub Morvay [Wed, 29 Mar 2017 08:22:16 +0000 (10:22 +0200)]
Bug 8086 - Cannot mount honeycomb in clustered odl on CentOS

Change-Id: I596cc8b7e0ed04b224bad6b7fa98555c8ef172e2
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "BUG-1422 Introduce Call-Home functionality for the NETCONF Topology."
Jakub Morvay [Tue, 28 Mar 2017 15:04:01 +0000 (15:04 +0000)]
Merge "BUG-1422 Introduce Call-Home functionality for the NETCONF Topology."

7 years agoBUG-1422 Introduce Call-Home functionality for the NETCONF Topology. 53/49253/21
Balaji [Wed, 11 Jan 2017 17:04:27 +0000 (09:04 -0800)]
BUG-1422 Introduce Call-Home functionality for the NETCONF Topology.

Introduce Call-Home reversed SSH support.

Basic support for host key based white-list and authorization by username/password.
Rebased with master; some code flaws fixed
Addressed minor code fixes
Addressed most of Tomas' review issues
Addressed Jakub's review issues
Addressed more or Tomas' review issues
Removed mistaken hoisting of odl-netconf-callhome-ssh to be topmost feature
Reenabled "ignored" unit tests

Change-Id: If3e3c9fdd0af0c97043f8930b7f922586863cabf
Signed-off-by: Balaji <bvaradar@brocade.com>
Signed-off-by: Mike Arsenault <mike@mike-arsenault.com>
Signed-off-by: Allan Clarke <clarkea@brocade.com>
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
7 years agoBug 8072: Fix decoding of URLs with external identityref 88/53788/3
Marek Gradzki [Fri, 24 Mar 2017 09:49:52 +0000 (10:49 +0100)]
Bug 8072: Fix decoding of URLs with external identityref

Mount point schema (rather than global) should be used
to decode identitirefs defined in external modules.

Change-Id: I51f135fe0cd5ceee39d5a2e6f0fc62631cf4437b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
7 years agoFix LibraryModulesSchemasTest failure 77/53777/5
Jakub Morvay [Fri, 24 Mar 2017 08:59:11 +0000 (09:59 +0100)]
Fix LibraryModulesSchemasTest failure

LibraryModulesSchemasTest#testCreateInvalidModulesEntries() tests
filtering invalid modules entries during resolving
ietf-netconf-yang-library/modules-state/modules node.

Resolution goes as follows. We parse xml document containing
ietf-netconf-yang-library/modules-state retrieved from the device with
help of DomToNormalizedNodeParserFactory. Then we filter invalid modules
entries from the parsed modules list node. Module entry is considered
invalid if its revision or schema url are invalid.

However, change in yangtools
https://git.opendaylight.org/gerrit/#/c/53553 causes that parsing
invalid revision will fail whole parsing xml process with unchecked
exception.

For now, do not test modules with bad revision. This is intended just as
a temporary solution. We will also need to slightly change our
ietf-netconf-yang-library/modules-state/modules node resolution logic.
Opened BUG 8071 to track that.

Change-Id: If12ae8d7bf94528088aac81e78b24058c5152283
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Handle shcema without namespace."
Jakub Morvay [Wed, 22 Mar 2017 14:21:52 +0000 (14:21 +0000)]
Merge "Handle shcema without namespace."

7 years agoHandle shcema without namespace. 67/52667/12
David Goldberg [Thu, 2 Mar 2017 16:16:03 +0000 (18:16 +0200)]
Handle shcema without namespace.

currently when the ODL connects to a device and recieves a schema
without a namespace it disconnects.
This fix allows the ODL to ignore schemas without namespaces, but still
maintains the connection and handles the rest of the schemas which do
have a namespace.

Change-Id: I9134fce17a85a2b5111e5acd0c63516f4c356db8
Signed-off-by: David Goldberg <gdavid@hpe.com>
7 years agoBug: 8037 YANG Patch using "replace" instead of "merge" 39/53639/2
Wenbo Hu [Tue, 21 Mar 2017 23:46:39 +0000 (10:46 +1100)]
Bug: 8037 YANG Patch using "replace" instead of "merge"

Change-Id: Ic53b0649b52529e9bf244b82d85582d343aa95e9
Signed-off-by: Wenbo Hu <huwenbo1988@gmail.com>
7 years agoFix autorelease by using correct prerequisite version 19/53619/1
Vratko Polak [Tue, 21 Mar 2017 15:25:43 +0000 (16:25 +0100)]
Fix autorelease by using correct prerequisite version

Change-Id: I404274ec27d6f4a0b9306c6a69a0cda174a15e35
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBug 7812: NPE when NetconfDeviceSalProvider.close 46/52346/8
Andrej Mak [Tue, 28 Feb 2017 09:14:50 +0000 (10:14 +0100)]
Bug 7812: NPE when NetconfDeviceSalProvider.close

Clustered connector close logic could be called twice on master.
Add boolean guard field to prevent this.

Add null check to netconf device sal provider close method
to prevent NPE.

Change-Id: Ib84be162826726169fb254a933781bb39dce604a
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoOption to receive only leaf nodes in websocket notifs 73/52173/8
Josh [Wed, 22 Feb 2017 13:06:36 +0000 (15:06 +0200)]
Option to receive only leaf nodes in websocket notifs

Change for Bug-7718 in the netvirt project.

The notifications sent over websockets contain the
entire subtree, even if just one node changed. This is
very inefficient for monitoring subtrees that may have
large numbers of nodes. Point in case, we need to monitor
changes to the port statuses under /neutron/ports/ but we
do not want to have to IO and parse the entire list of
ports for each change. This change proposes a new query
parameter to the "data-change-event-subscription" REST call
that specifies that the subscriber is only interested in
receiving the leaf nodes that have changed. Each leaf node
is (already) accompanied by its path.

Here are examples of the notifications sent with the query
param and without. The notification is generated by one of
two port's status transitioning from DOWN to ACTIVE.

Here it is without the query param. Note how all existing
ports are sent. Note how the status is sent three times
and the port twice (the notification send each level of the
tree in it's entirety):
{
    "notification": {
        "data-changed-notification": {
            "data-change-event": [
                {
                    "data": {
                        "status": {
                            "content": "ACTIVE",
                            "xmlns": "urn:opendaylight:neutron"
                        }
                    },
                    "operation": "updated",
                    "path": "/neutron:neutron/neutron:ports/neutron:port[neutron:uuid='97a251dc-3bbe-49b1-a08f-b164922bb0c3']/neutron:status"
                },
                {
                    "data": {
                        "port": {
                            "status": "ACTIVE",
                            "uuid": "97a251dc-3bbe-49b1-a08f-b164922bb0c3",
                            "xmlns": "urn:opendaylight:neutron"
                        }
                    },
                    "operation": "updated",
                    "path": "/neutron:neutron/neutron:ports/neutron:port[neutron:uuid='97a251dc-3bbe-49b1-a08f-b164922bb0c3']"
                },
                {
                    "data": {
                        "ports": {
                            "port": [
                                {
                                    "status": "ACTIVE",
                                    "uuid": "97a251dc-3bbe-49b1-a08f-b164922bb0c3"
                                },
                                {
                                    "status": "ACTIVE",
                                    "uuid": "2278122f-1e21-4557-8631-c9cef5299ba4"
                                }
                            ],
                            "xmlns": "urn:opendaylight:neutron"
                        }
                    },
                    "operation": "updated",
                    "path": "/neutron:neutron/neutron:ports"
                }
            ],
            "xmlns": "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"
        },
        "eventTime": "2017-02-22T02:42:08+02:00",
        "xmlns": "urn:ietf:params:xml:ns:netconf:notification:1.0"
    }
}

Here is the same exact notification but generated with a registration
using the new query param:
{
    "notification": {
        "data-changed-notification": {
            "data-change-event": {
                "data": {
                    "status": {
                        "content": "ACTIVE",
                        "xmlns": "urn:opendaylight:neutron"
                    }
                },
                "operation": "updated",
                "path": "/neutron:neutron/neutron:ports/neutron:port[neutron:uuid='d6e6335d-9568-4949-aef1-4107e34c5f28']/neutron:status"
            },
            "xmlns": "urn:opendaylight:params:xml:ns:yang:controller:md:sal:remote"
        },
        "eventTime": "2017-02-22T02:27:32+02:00",
        "xmlns": "urn:ietf:params:xml:ns:netconf:notification:1.0"
    }
}

Here is an example of the REST call with the new query param:
curl -u admin:admin http://10.9.8.1:8181/restconf/streams/stream/data-change-event-subscription/neutron:neutron/neutron:ports/datastore=OPERATIONAL/scope=SUBTREE?odlLeafNodesOnly=true

Also fixed the existing unit test and added one. However,
there are some issues with jersey where sporadically the
InputStream it passes in to read the post data is EoF.

Change-Id: Ic383a28396f32132da73d4d92fc020c93278eb00
Signed-off-by: Josh <jhershbe@redhat.com>
7 years agoFix autorelease fail 86/53386/1
Ivan Hrasko [Thu, 16 Mar 2017 08:28:34 +0000 (09:28 +0100)]
Fix autorelease fail

- fix regression caused by https://git.opendaylight.org/gerrit/#/c/53297

Change-Id: Ib2a53de21d7fd050bcaa37bcf040853ac617f5f7
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 7987: Json HTTP PATCH: Problem parsing simple leaf value 13/53313/2
Ivan Hrasko [Wed, 15 Mar 2017 07:41:54 +0000 (08:41 +0100)]
Bug 7987: Json HTTP PATCH: Problem parsing simple leaf value

Change-Id: I8094797fc2a26bd809631d995a29e111320e664e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 7906: Fixed json parsing on patch request 88/52888/8
David Goldberg [Sun, 5 Mar 2017 12:50:33 +0000 (14:50 +0200)]
Bug 7906: Fixed json parsing on patch request

Currently lists with simple objects (string, int, etc.) are not
supported in the patch request. This commit adds support for that.

Change-Id: I4310a683aa42271b914c5dd8c3349bb2bac9e971
Signed-off-by: David Goldberg <gdavid@hpe.com>
7 years agoSwitch time keeping to java.time interfaces 89/53189/8
Robert Varga [Sun, 12 Mar 2017 00:15:44 +0000 (01:15 +0100)]
Switch time keeping to java.time interfaces

Date-based interfaces are not thread-safe and ambiguous, Java 8
gives us java.time, which has proper domain model.

Change-Id: I6b0fa37c008a96ed6a47afc68a809570fd1848a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoEliminate ListenerConstants 88/53188/7
Robert Varga [Sat, 11 Mar 2017 23:03:08 +0000 (00:03 +0100)]
Eliminate ListenerConstants

These constatns are used only in AbstractNotificationData, inline them
in that class.

lso convert to using Java 8 Time API to fix thread-safety issues with
SimpleDateFormat. Since we need to choose an appropriate API, we choose
to report instants in UTC, so we do not have a dependency on the concept
of the local time zone.

Change-Id: I68153d525960d47e6ff60634df976d472beb2176
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoClean up revision formatting 94/53194/1
Robert Varga [Sun, 12 Mar 2017 10:41:10 +0000 (11:41 +0100)]
Clean up revision formatting

Remove open-coded revision formats and use cached formatted
revisions where available.

Change-Id: I0f41f3f449cb0fd1abab11ef5e93adb636c19b8b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoSimplify data encoding in AbstractNotificationsData 87/53187/1
Robert Varga [Sat, 11 Mar 2017 22:49:39 +0000 (23:49 +0100)]
Simplify data encoding in AbstractNotificationsData

Rather than performing a two-step conversion via a writer,
output stream directly into bytes and then convert the result
into a String via StandardCharsets.UTF_8.

Change-Id: I010c1f46d2a2f78b619cf7af03c565ec68b6b457
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoImprove AbstractQueryParams XML parsing 86/53186/1
Robert Varga [Sat, 11 Mar 2017 22:39:12 +0000 (23:39 +0100)]
Improve AbstractQueryParams XML parsing

Use a shared, hardened, DocumentBuilderFactory and do not pass
the XML via a field but rather as an argument.

Change-Id: Id4a1792598b7d202149e62de6fc8292308c2c170
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMass conversion to static methods 82/53182/4
Robert Varga [Sat, 11 Mar 2017 18:44:41 +0000 (19:44 +0100)]
Mass conversion to static methods

This is mechanic fixup of methods which Eclipse points out as
being potentially-static.

Secondary effect is use of lambdas where the conversion can be made
automatic.

Change-Id: I33d3b81bd4737f2c2b55c5d973ed081ae58a3a0a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoUse UntrustedXML for interfacing with Documents 81/53181/4
Robert Varga [Sat, 11 Mar 2017 18:09:14 +0000 (19:09 +0100)]
Use UntrustedXML for interfacing with Documents

Eliminate duplicated factory setup call sites in favor of using
centralized UntrustedXML.

Change-Id: If302e8551df80d3f5967fcd912be3737fac70616
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoRemove unneded semicolon 80/53180/2
Robert Varga [Sat, 11 Mar 2017 18:08:55 +0000 (19:08 +0100)]
Remove unneded semicolon

This is an eclipse warning, fix it.

Change-Id: I1dd4c24ef69f3a436a2e2f28f01d5d8bbdbcdc13
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoDo not include duplicate models 83/53183/1
Robert Varga [Sat, 11 Mar 2017 19:59:58 +0000 (20:59 +0100)]
Do not include duplicate models

Adding same module into the CrossSourceStatementReactor guarantees
namespace conflicts, which are flushed out by BUG-7424 handling.

Make sure we do not add same modules multiple times.

Change-Id: I76a300c14392e1de02d8f055100c75a5c66fe61b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 7741 - "Please try again" should not result in http code 500 84/51684/19
matus.kubica [Fri, 10 Feb 2017 14:02:34 +0000 (15:02 +0100)]
Bug 7741 - "Please try again" should not result in http code 500

Change ErrorType to TRANSPORT
Change ErrorTag of DocumentedException to RESOURCE_DENIED
Change ErrorSeverity to ERROR
Add mapping in BrokerFacade to 503
Edit RPCError in NetconfReadOnlyTransaction
Add JUnit test for BrokerFacade

Change-Id: I039886d80a89e0ef4d376229617b3b4b7520a04c
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
7 years agoMerge "Bug 6645 - 2 digits milliseconds can not be parsed in notification eventTime"
Jakub Morvay [Tue, 7 Mar 2017 18:17:48 +0000 (18:17 +0000)]
Merge "Bug 6645 - 2 digits milliseconds can not be parsed in notification eventTime"