netconf.git
5 years agoKeepalives for netconf callhome 86/80786/1 stable/oxygen
agosain [Mon, 28 Jan 2019 22:01:47 +0000 (14:01 -0800)]
Keepalives for netconf callhome

This commit provides the support for keepalives for callhome sessions.
An additional change in yang has been introduced for keepalive delay.
This is an optional attribute. If not provided, no keepalive will be used.

Change-Id: Iec71dd8d56a2b199bd28dc4da2bdcaa21cd03326
Signed-off-by: agosain <agosain@luminanetworks.com>
5 years agoBump yangtools to 2.0.6.7 25/79725/1
Robert Varga [Fri, 18 Jan 2019 23:47:13 +0000 (00:47 +0100)]
Bump yangtools to 2.0.6.7

These are latest fixes, with odlparent-3.1.6.

Change-Id: I119e5e2bd04eefe5f279b54fcc6e20177edba25e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump to odlparent 3.1.6 97/79697/1
Stephen Kitt [Fri, 18 Jan 2019 15:46:30 +0000 (16:46 +0100)]
Bump to odlparent 3.1.6

Change-Id: Ic84d1089965100e68000b8aa61abdbecaf3ccc65
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoNECONF-524 : Setting the netconf keepalive logic to be more proactive. 08/78308/4
Atul Gosain [Thu, 29 Nov 2018 23:25:27 +0000 (15:25 -0800)]
NECONF-524 : Setting the netconf keepalive logic to be more proactive.

NETCONF-524" target="_blank" rel="nofollow">https://jira.opendaylight.org/browse/NETCONF-524

When a NETCONF device loses connection with the controller in exceptional
conditions such as the management interface going down, underlying TCP
connection would not be closed as there will be no fin packet exchange or
reset. At this point NETCONF state will be set as connected until the
underlying OS determines the connection is stale which can happen after
considerable amount of time. This fix makes the Keepalive packets more
proactive to determine such conditions.This fix also sets the listener
properly which is required for this fix as well.

Change-Id: I0c1cce8dd06f3fab91cb8465859928dc61645f09
Signed-off-by: Atul Gosain <agosain@luminanetworks.com>
5 years agoExtra superfluous edit-config RPC sent - Netconf-482 25/78925/2
Atul Gosain [Tue, 7 Nov 2017 01:57:51 +0000 (17:57 -0800)]
Extra superfluous edit-config RPC sent - Netconf-482

Extra superfluous edit-config RPC sent just prior to correct edit-config RPC for top-level lists
POST & PUT to certain top-level lists in a mounted device's model returns a 500 error via Restconf,
although in some cases (device-dependent) the config appears to have committed.
This problem first appeared in Boron-SR3, and continues in Carbon SR-1.

Change-Id: I473e6e1f34d6f2bb9aa63f12b90fc479e4a8e3cd
Signed-off-by: Atul Gosain <agosain@luminanetworks.com>
Signed-off-by: Miroslav Macko <mmacko@luminanetworks.com>
5 years agoNETCONF-553 : Stack traces need to suppressed and error messages should 07/78307/5
Atul Gosain [Thu, 29 Nov 2018 23:02:38 +0000 (15:02 -0800)]
NETCONF-553 : Stack traces need to suppressed and error messages should
be propagated for mounted devices

Traversed entire error info to capture all error messages returned by the
NETCONF device. Also suppressed the stack traces in the RESTCONF output.

Change-Id: I3fbf3fe21c9032f6b91194c04835ffc7ee96dd20
Signed-off-by: Atul Gosain <agosain@luminanetworks.com>
Signed-off-by: Miroslav Macko <mmacko@luminanetworks.com>
5 years agoBump versions by x.y.(z+1) 00/78700/1
jenkins-releng [Wed, 12 Dec 2018 11:58:17 +0000 (11:58 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I8b9d9f4b74d08fe892103f9ca46fa4521efff1d4
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoFix callhome start problem 07/78107/1
Luis Gomez [Tue, 23 Oct 2018 18:10:08 +0000 (11:10 -0700)]
Fix callhome start problem

Make sure we align bootstrap class with the service factory.

Change-Id: I84baad3d7ab816ec67f50c8445c38e7f2433eae4
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit da2fd18957143013ae4b921b867fb485c5cce9e7)

5 years agoMerge "Bump to odlparent 3.1.4 and yangtools 2.0.6.5" into stable/oxygen
Thanh Ha (zxiiro) [Thu, 15 Nov 2018 18:22:04 +0000 (18:22 +0000)]
Merge "Bump to odlparent 3.1.4 and yangtools 2.0.6.5" into stable/oxygen

5 years agoUse odl hello message capabilities 42/77842/1
Anna Puchyova [Tue, 13 Nov 2018 14:27:36 +0000 (15:27 +0100)]
Use odl hello message capabilities

Fill the parameter of odl hello message capabilities
into NetconfReconnectingClientConfiguration to be used,
when connecting to the device.

JIRA: NETCONF-580
Change-Id: I9a4b2b97f335c2db330f0c1c7e86b76c4e2cffae
Signed-off-by: Anna Puchyova <Anna.Puchyova@pantheon.tech>
5 years agoBump to odlparent 3.1.4 and yangtools 2.0.6.5 09/77109/8
Stephen Kitt [Fri, 19 Oct 2018 13:29:44 +0000 (15:29 +0200)]
Bump to odlparent 3.1.4 and yangtools 2.0.6.5

Change-Id: I0c10aecbc307696ad4f02de501d75ab1e925f58b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoAdd subscribeToStream to JSONRestConfService 09/77409/1
Josh [Sun, 28 Oct 2018 12:34:50 +0000 (14:34 +0200)]
Add subscribeToStream to JSONRestConfService

The idea here is to allow applications to
pre-register websocket listeners.

Change-Id: Ic7e55f19251e0b139256435ad215b44a596b84d9
Signed-off-by: Josh <jhershbe@redhat.com>
5 years agoRelease the buffer only after we are done with it 85/77085/1
Robert Varga [Thu, 18 Oct 2018 15:25:55 +0000 (17:25 +0200)]
Release the buffer only after we are done with it

We may end up touching the buffer after we have release()'d it,
which means it may have been recycled by the time we call
resetReaderIndex().

Move the release() call to after the check so we do not end up
releasing it prematurely.

Change-Id: I43156dbe2e6c53a552a322e7b5ea27f8da3873c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoUse a dedicated no-op listener class 50/76550/1
Robert Varga [Mon, 1 Oct 2018 16:50:17 +0000 (18:50 +0200)]
Use a dedicated no-op listener class

This saves a few bytes per session by not retaining anything
but the listener implementation.

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

5 years agoDo not retain the list of RPCs 49/76549/1
Robert Varga [Mon, 1 Oct 2018 16:45:43 +0000 (18:45 +0200)]
Do not retain the list of RPCs

These RPCs are only used when a listener registers, there is simply
no point to retain them in a transformed collection. We can always
re-create them as needed from the SchemaContext.

Change-Id: Ia47c3163bff5232d079f8768420bfa6360fe3b49
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 354472dc8d3afa557522c8ea18634b11b4bea20b)

5 years agoCleanup SimulatedCreateSubscription 33/76533/1
Robert Varga [Thu, 27 Sep 2018 12:04:11 +0000 (14:04 +0200)]
Cleanup SimulatedCreateSubscription

Using .get().get() twice is ugly, create a local variable.

Change-Id: I0c18c9138146c349c4c1c4003b5c53439893354e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Allow SshProxyServer to share AsynchronousChannelGroup" into stable/oxygen
Jakub Morvay [Wed, 26 Sep 2018 12:00:40 +0000 (12:00 +0000)]
Merge "Allow SshProxyServer to share AsynchronousChannelGroup" into stable/oxygen

5 years agoMerge "Fix config-only thinko" into stable/oxygen
Tom Pantelis [Wed, 26 Sep 2018 11:59:59 +0000 (11:59 +0000)]
Merge "Fix config-only thinko" into stable/oxygen

5 years agoHonor EXI flag in testtool 50/76450/2
Robert Varga [Wed, 26 Sep 2018 09:47:19 +0000 (11:47 +0200)]
Honor EXI flag in testtool

NETCONF test tool should honor the exi flag and translate it to
proper capabilities.

Change-Id: I50acf9188eb5fd2aea60d593dfd9713e54badda4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAllow SshProxyServer to share AsynchronousChannelGroup 47/76447/1
Robert Varga [Tue, 25 Sep 2018 17:51:33 +0000 (19:51 +0200)]
Allow SshProxyServer to share AsynchronousChannelGroup

For testing purposes it is good to have the ability to share a single
thread group, as ach of them implies a dedicated thread. This patch
exposes an alternative constructor and allows multiple SshProxyServers
to share that group -- lowering resources needed significantly, both
in terms of threads, memory and file descriptors used.

Change-Id: I237ab0790e9a70c26288a116c59f5a541f236a74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix config-only thinko 42/76442/1
Robert Varga [Tue, 25 Sep 2018 13:07:24 +0000 (15:07 +0200)]
Fix config-only thinko

This fixes JSON template thinko, so that the variable matches
XML.

Change-Id: Ief03b46dc61a0be733a4f139837d19c8c981da7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.0.6.3 17/76217/1
Robert Varga [Tue, 18 Sep 2018 12:37:35 +0000 (14:37 +0200)]
Bump yangtools to 2.0.6.3

This bumps yangtools to 2.0.6.3, picking up latest fixes.

Change-Id: Ia6c37979b50689b0cd0bc52b538a1453cd890639
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not instantiate NormalizedNodes for filter 27/75527/3
Robert Varga [Mon, 27 Aug 2018 10:43:27 +0000 (12:43 +0200)]
Do not instantiate NormalizedNodes for filter

Using ImmutableNodes.fromInstanceId() does not work for leaf nodes,
as we do not have a value, which violates LeafNode contract -- leading
to an IllegalStateException when a user attempts to read() a single
leaf via a transaction.

As it turns out, this is completely unnecessary, as all we are doing
is iterating through the temporary NormalizedNode and creating
NormalizedNodeStreamWriter events based on that.

This patch replicates ImmutableNodes.fromInstanceId() logic, but
simplifies it for this particular task, short-cutting NormalizedNode
creation and emitting events directly as we are iterating over
the YangInstanceIdentifier.

JIRA: NETCONF-563
Change-Id: I0781e81d812ee979deaafb9dfa811e143866f4af
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 1c545b9883f64305983a9c0ef73acdaa97866cc7)

5 years agoBump yangtools to 2.0.6.2 16/75616/1
Robert Varga [Fri, 31 Aug 2018 09:21:32 +0000 (11:21 +0200)]
Bump yangtools to 2.0.6.2

This brings in latest fixes.

Change-Id: I09b1924c3657c096d4e8da9692136cf4e9617712
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump exificient to 1.0.1 33/75133/1
Robert Varga [Fri, 3 Aug 2018 22:35:19 +0000 (00:35 +0200)]
Bump exificient to 1.0.1

https://github.com/EXIficient/exificient/compare/exificient-0.9.7...exificient-1.0.0
https://github.com/EXIficient/exificient/compare/exificient-1.0.0...exificient-1.0.1
https://github.com/EXIficient/exificient-core/compare/exificient-core-0.9.7...exificient-core-1.0.0
https://github.com/EXIficient/exificient-core/compare/exificient-core-1.0.0...exificient-core-1.0.1

Change-Id: Id811993f3232f6e96dd4c3c4da95c86db9038c24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 436407d0143232e48e759940d90d22e5dd2259fb)

5 years agoNETCONF-241: Switch to using Exificient 32/75132/1
Robert Varga [Wed, 17 Jan 2018 18:38:27 +0000 (19:38 +0100)]
NETCONF-241: Switch to using Exificient

Exificient has a bit nicer API, it is available from maven central and
has a friendly (MIT) license, plus the source code is on GitHub. Switch
to using it instead of OpenEXI.

Change-Id: I2cb7bf244361b021afb4cdc275e2442f5b778056
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
(cherry picked from commit 2cac343db119a395c80054e45999263a32a994c0)

5 years agoBump versions by x.y.(z+1) 46/75046/1
jenkins-releng [Thu, 9 Aug 2018 16:39:44 +0000 (16:39 +0000)]
Bump versions by x.y.(z+1)

Change-Id: Ic0088ab3dc54cafa7652b53b6d7d6411bce28e8b
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoBump yangtools to 2.0.6.1 79/74679/1
Stephen Kitt [Tue, 31 Jul 2018 09:17:13 +0000 (11:17 +0200)]
Bump yangtools to 2.0.6.1

Change-Id: I5a19cd00ced9ad2bb794ab87fdc7c54c739a2338
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoNETCONF-551 : Invalid CSS URI in apidocs explorer 91/74591/1
Richard Kosegi [Fri, 27 Jul 2018 16:02:27 +0000 (18:02 +0200)]
NETCONF-551 : Invalid CSS URI in apidocs explorer

Change-Id: Iaabea829d3fa03be019075045ee86bdd233ed066
Signed-off-by: Richard Kosegi <richard.kosegi@gmail.com>
(cherry picked from commit 4dec49724b4eac4d2cd6a612684e5d699f62fba9)

5 years agoBump to odlparent 3.1.3 30/74530/1
Stephen Kitt [Thu, 26 Jul 2018 14:07:13 +0000 (16:07 +0200)]
Bump to odlparent 3.1.3

Change-Id: I4b6497a589a50a176ccd9b6106378e625cd174f3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to odlparent 3.1.1 04/73104/1
Stephen Kitt [Mon, 18 Jun 2018 09:01:51 +0000 (11:01 +0200)]
Bump to odlparent 3.1.1

Change-Id: I539eb78185932289bca61b69216f7fc96489b0e4
JIRA: RELENG-129
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoMake RuntimeRpc revision aware 67/72967/1
Marek Gradzki [Wed, 13 Jun 2018 19:12:16 +0000 (21:12 +0200)]
Make RuntimeRpc revision aware

Do not use SchemaContext.findModule(URI),
which looks for a module instance with specified namespace
and no revision.
Such lookup fails for modules with revision defined.

Instead (as already done in AbstractEdit)
use SchemaContext.findModules and use the newest module
if more than one module with the same namespace is found.

Change-Id: I7b6bdcb9156669645e19a6395e1b74995328154d
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
5 years agoConvert ProxyDOMDataBroker tx creation to async 09/72709/2
Tom Pantelis [Mon, 21 May 2018 14:28:52 +0000 (10:28 -0400)]
Convert ProxyDOMDataBroker tx creation to async

ProxyReadWriteTransaction was modified to take the ActorRef
Future from the tx creation message and add a callback when
complete. Transaction operations prior to completion are
queued and replayed to a ProxyTransactionFacade instance
once the Future is complete. For successful completion, an
ActorProxyTransactionFacade is created that interfaces
with the master ActorRef. On failed Future, a
FailedProxyTransactionFacade is created that returns a
failed Future for read, exists and commit operations.

The ProxyReadAdapter and ProxyWriteAdapter were removed
in lieu of ProxyTransactionFacade which combines the
read/write operations for simplicity.

Some simple actor response messages,
eg NewWriteTransactionReply, were removed in lieu of
returning the payload or exception via
akka.actor.Status.Success or akka.actor.Status.Failure.
This simplifies caller response handling as akka
automatically unwraps Success and Failure in callbacks
and synchronous await.

UTs were added, modified and removed corresponding to
the changes.

Change-Id: I0bd2a931d91ded97ebba7ccc207d51bd6474a41c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoBump versions by x.y.(z+1) 36/72936/1
jenkins-releng [Wed, 13 Jun 2018 00:07:30 +0000 (00:07 +0000)]
Bump versions by x.y.(z+1)

Change-Id: Iedf557e52e34d1856ed1faac12ccb3bc39c7e9b8
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoAllow specification of ODL's HELLO message 69/72669/2
Ryan Goulding [Mon, 9 Apr 2018 22:47:29 +0000 (18:47 -0400)]
Allow specification of ODL's HELLO message

Some devices are very particular about what they will accept
for a HELLO message.  This change allows specification of a custom
message per device mount.  If one is not specified, then the
existing default is utilized.

Additionally, certain tests were using very out of date versions of
netconf-node-topology.  This is due to the fact that the test
yang files are located in src/test/resources, and were out of date
with the netconf-node-topology used in src/main/yang.  These were
updated to the most up-to-date version as of this patch.

JIRA: NETCONF-543
Change-Id: I4049a87a7781655d8d396bb35eb43aab2eca0223
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
5 years agoAdd slave/master end-to-end test 94/72594/3
Tom Pantelis [Mon, 21 May 2018 14:26:52 +0000 (10:26 -0400)]
Add slave/master end-to-end test

Added a MountPointEndToEndTest that tests master and slave
mount point operations end-to-end with as little mocking as
possible. Hooks were added in NetconfTopologyContext and MasterSalFacade
for the MountPointEndToEndTest to get a hold of the MasterSalFacade
to invoke it manually to simulate backend device connectivity and to
inject the backend DOMDataBroker.

Change-Id: I5cc59987570ba4e99980af4e2f4c5adf47b6a81e
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit 948fe9d5f58b0382a322003d74fa6496f45caab8)

5 years agoNETCONF-542: PUT request return 500 if operational data are used 89/71989/8
miroslav.kovac [Mon, 14 May 2018 08:34:11 +0000 (10:34 +0200)]
NETCONF-542: PUT request return 500 if operational data are used

Change-Id: I5e45b0276e39c3a6af647b6632b67b3f96751464
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
5 years agoMerge "Bump yangtools to 2.0.5" into stable/oxygen
JakubToth [Mon, 28 May 2018 09:29:14 +0000 (09:29 +0000)]
Merge "Bump yangtools to 2.0.5" into stable/oxygen

5 years agoMods/improvements to NetconfNodeActorTest et al 35/72335/1
Tom Pantelis [Sat, 12 May 2018 18:29:44 +0000 (14:29 -0400)]
Mods/improvements to NetconfNodeActorTest et al

Increased code coverage in NetconfNodeActor et al via new test
cases and mods to existing tests cases in NetconfNodeActorTest.

Also made other mods - see inline comments.

Change-Id: Id268d747110fe5c1b05a0c2959138661b966d0f6
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoNetconfTopologyManager and UT mods/improvements 34/72334/1
Tom Pantelis [Fri, 11 May 2018 01:57:44 +0000 (21:57 -0400)]
NetconfTopologyManager and UT mods/improvements

(cherry-picked from https://git.opendaylight.org/gerrit/#/c/71921/)

NetconfTopologyManagerTest:

 - separated the test cases for successful and failed CSS registration
   to make it easier to understand/follow.

 - added additional scenarios/coverage/verification for DTCL
   create/update/replace/delete notifications.

 - removed the manipulation and direct verification of the
   NetconfTopologyManager internal maps via reflection. These
   are internal implementation details that the UTs shouldn't
   have knowledge of. The maps are indirectly verified via
   verification of the stored mocks.

 - used the real DataBroker to verify the initilization of the
   Topology nodes. This is easier than mocking a write trannsaction
   correctly.

NetconfTopologyManager:

 - changed the Maps to ConcurrentHashMap as they are accessed by
   multiple threads and could even be accessed concurrently.

 - added a hook for the UTs to create mock NetconfTopologyContexts

 - if CSS registration fails, it should just close the NetconfTopologyContext
   and not itself.

 - other minor changes.

NetconfTopologyContext:

 - implement AutoCloseable and rename closeFinal to the standard close.

 - Renamed the AtomicBooleans for clarity.

Change-Id: Id095a4ff9395d68912a92b0b59d725e062ddd9fc
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoSlave mount point registration hardening/resiliency 33/72333/1
Tom Pantelis [Thu, 10 May 2018 01:38:01 +0000 (21:38 -0400)]
Slave mount point registration hardening/resiliency

(cherry-picked from https://git.opendaylight.org/gerrit/#/c/71898/)

- It's possible for a message to the master to timeout in which
case the slave mount point doesn't get registered so add retries
for the AskForMasterMountPoint message in NetconfNodeManager and
schema resolution in NetconfNodeActor. The AskForMasterMountPoint
and RegisterMountPoint messages were changed to pass the
slave/master ActorRefs in order to send a success/failure reply to
the original caller.

- In NetconfNodeActor, preserve actor safety by executing
ListenableFuture callbacks via the actor's dispatch queue
(using executeInSelf) if the callback accesses actor state.

- Hardened synchronization in NetconfNodeManager and NetconfNodeManager.

- Added UTs for NetconfNodeManager to cover the slave mount point
registration scenarios.

- Added more logging where appropriate

Change-Id: I084115e5c8945670f1d99243ea6de947a757a9b2
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoBump yangtools to 2.0.5 38/72238/1
Robert Varga [Thu, 24 May 2018 14:35:27 +0000 (16:35 +0200)]
Bump yangtools to 2.0.5

This includes latest fixes.

Change-Id: Ib91a42e74323a99ce378744114071c7268fec3a2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMerge "NETCONF-540: ignore namespace prefix when sending error rpc-reply" into stable...
Jakub Morvay [Fri, 27 Apr 2018 09:01:51 +0000 (09:01 +0000)]
Merge "NETCONF-540: ignore namespace prefix when sending error rpc-reply" into stable/oxygen

6 years agoMerge "NETCONF-526 : edit-config payload default-operation needs to be set to default...
Jakub Morvay [Thu, 26 Apr 2018 13:55:58 +0000 (13:55 +0000)]
Merge "NETCONF-526 : edit-config payload default-operation needs to be set to default-value" into stable/oxygen

6 years agoMerge "Specify necessary dependencies" into stable/oxygen
Jakub Morvay [Thu, 26 Apr 2018 13:37:38 +0000 (13:37 +0000)]
Merge "Specify necessary dependencies" into stable/oxygen

6 years agoNETCONF-539: use netconf namespace in base:1.1 capability check 96/71296/4
Marek Gradzki [Wed, 25 Apr 2018 07:32:57 +0000 (09:32 +0200)]
NETCONF-539: use netconf namespace in base:1.1 capability check

Use Document.getElementsByTagNameNSgetElementsByTagNameNS
with urn:ietf:params:xml:ns:netconf:base:1.0 namespace

instead of getElementsByTagName

to support clients using namespace prefixes in the hello message.

Change-Id: I333bb4522aca566b74db3e4411be1c90ec419aec
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoNETCONF-540: ignore namespace prefix when sending error rpc-reply 16/71416/1
Marek Gradzki [Fri, 20 Apr 2018 05:57:38 +0000 (07:57 +0200)]
NETCONF-540: ignore namespace prefix when sending error rpc-reply

Change-Id: I29bfa55e6ac043be6306b8da026ae5228ec9344e
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoBump versions by x.y.(z+1) 44/71344/1
jenkins-releng [Wed, 25 Apr 2018 18:24:26 +0000 (18:24 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I9096875d14b710d0873ba47d1ae7be39ecf86a34
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoNETCONF-526 : edit-config payload default-operation needs to be set to default-value 98/70998/1
Balaji Varadaraju [Wed, 14 Mar 2018 06:40:46 +0000 (01:40 -0500)]
NETCONF-526 : edit-config payload default-operation needs to be set to default-value

For the PUT/POST calls right now default-operation tag in the edit-config is set to
"none". As per RFC with this value devices can reject a config operation when
elements present in the request whose structure is not already present in the tree.
For example a nested parent-child structure where parent structure does not yet exist
yet in the tree may result in an error based on implementation.
We should  leave this field out ( which will default to merge) and let the device make
the right decision.

Change-Id: I8b85ef072785381897a19724dc94003b8f315bd4
Signed-off-by: Balaji Varadaraju <bvaradar@luminanetworks.com>
(cherry picked from commit 011fbb4e78b64748c4be16c43b3deb46a5c3b23c)

6 years agoSpecify necessary dependencies 09/70809/1
Ryan Goulding [Wed, 11 Apr 2018 16:47:49 +0000 (12:47 -0400)]
Specify necessary dependencies

odl-restconf-common relies on AAA bringing in Jersey 1.X dependencies.
Relying on transitive dependencies is not good practice, since it
binds the upstream to providing them continuously.  AAA is undergoing
cleanup related to Jersey implementation, part of which is an experiment
to switch on Jersey 2.  In order to do this, we remove the Jersey 1
"com.sun.jersey" dependencies.  This causes RESTCONF to have missing
runtime dependencies.  This patch fixes this issue properly.

Change-Id: Idb32f44573684770b9a57675dfadf010d8a16c9e
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoSpecify explicit javax.ws.rs version in yanglib 26/70726/4
Jakub Morvay [Tue, 10 Apr 2018 16:40:46 +0000 (18:40 +0200)]
Specify explicit javax.ws.rs version in yanglib

This is a follow-up patch to
https://git.opendaylight.org/gerrit/#/c/68894/. We should specify
explicit javax.ws.rs version also in netconf yanglib.

Change-Id: I4c255c5ba6ef3728226d264f755a62019e5e56ef
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
6 years agoFix yanglib SFT failure 68/70468/1
Tom Pantelis [Fri, 6 Apr 2018 22:35:29 +0000 (18:35 -0400)]
Fix yanglib SFT failure

For some reason the YangLibRestApp doesn't get created which causes
BP to timeout b/c it advertises an OSGi service referenced by the
BP xml. Instead of using a service I changed it to use a static
to bridge between BP and the web app, as is done elsewhere.

Change-Id: Ia606514258d2082bf041ac81ab890f53f999ee2c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBump to odlparent 3.1.0 and yangtools 2.0.3 79/69979/6
Stephen Kitt [Fri, 23 Mar 2018 13:11:08 +0000 (14:11 +0100)]
Bump to odlparent 3.1.0 and yangtools 2.0.3

Change-Id: I633b74816d98a98447aab385d58dda8a101ab983
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoNETCONF-530 - netconf-testtool failed on start with NullPointerException 10/69710/4
Jakub Tóth [Mon, 19 Mar 2018 11:05:05 +0000 (12:05 +0100)]
NETCONF-530 - netconf-testtool failed on start with NullPointerException

missing revisions in default names of YANG models

Change-Id: I52c09699989b38ab828f99070081634dac9853ce
Signed-off-by: Jakub Tóth <jakub.toth@pantheon.tech>
6 years agoRestconf 8040 should return 204 for delete and put 90/68990/3
Tom Pantelis [Wed, 28 Feb 2018 19:13:38 +0000 (14:13 -0500)]
Restconf 8040 should return 204 for delete and put

restconf was returning 200 Ok but according to RCF8040, for put,
"If an existing resource is modified, a "204 No Content"
status-line is returned."" and for delete, "If the DELETE request
succeeds, a "204 No Content" status-line is returned.".

Change-Id: I7133cdd747c1869d6b640c873bbcdccd437e8900
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoNETCONF-514: Use exists instead of read for PUT 34/68934/7
Tom Pantelis [Mon, 26 Feb 2018 19:19:01 +0000 (14:19 -0500)]
NETCONF-514: Use exists instead of read for PUT

The PUT operation needs to check if the path already exists
in order to return the proper response code according to the RFC
however calling exists instead of read is more efficient on the
back end.

Change-Id: Ibd7e99324c6a151aae91083e0c90bdf877161dee
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoFix odl-config-netconf-connector 69/69969/1
Robert Varga [Thu, 22 Mar 2018 17:59:06 +0000 (18:59 +0100)]
Fix odl-config-netconf-connector

It should not be pulling in notifications-impl, but rather pull
it in via a feature.

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

6 years agoAdd odl-restconf-common 68/69968/1
Robert Varga [Thu, 22 Mar 2018 15:57:12 +0000 (16:57 +0100)]
Add odl-restconf-common

Restconf features and up duplicating a lot of common infrastructure,
make sure we package it in a common feature.

Change-Id: Ia8f69fcf5668010e3f62a6204828bf819745ca87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 042fc8536a957c4b1accab6fbad101a38be7e458)

6 years agoBump versions by x.y.(z+1) 48/69848/1
jenkins-releng [Thu, 22 Mar 2018 16:57:43 +0000 (16:57 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I97656ef12dcb5bd468879129a35e96d3048869c6
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoNETCONF-521: Replace literal '\n' by newline 49/69249/2
Luis Gomez [Thu, 8 Mar 2018 04:21:20 +0000 (20:21 -0800)]
NETCONF-521: Replace literal '\n' by newline

This fixes the private key decoding error in NETCONF-521.

Change-Id: Iddcd29ea8ce513068e49071c0bdabbb788c11064
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
6 years agoSpecify explicit javax.ws.rs version in restconf 94/68894/4
Tom Pantelis [Wed, 14 Feb 2018 17:13:05 +0000 (12:13 -0500)]
Specify explicit javax.ws.rs version in restconf

This seems to fix the intermittent issue where restconf
fails to install due to 2 versions of javax.ws.rs and
javax.annotation.

Change-Id: I6b106d700b89df575ee975f45e047cedb8c03e02
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoMerge "NETCONF-512: Add cases for missing NormalizedNode types" into stable/oxygen
Thanh Ha [Wed, 28 Feb 2018 16:11:59 +0000 (16:11 +0000)]
Merge "NETCONF-512: Add cases for missing NormalizedNode types" into stable/oxygen

6 years agoConvert netconf-util, netconf-ssh, netconf-tcp to blueprint 35/68835/1
Ryan Goulding [Tue, 24 Oct 2017 21:23:10 +0000 (17:23 -0400)]
Convert netconf-util, netconf-ssh, netconf-tcp to blueprint

netconf-util, netconf-ssh, and netconf-tcp still used a BundleActivator
and accompanying ServiceTracker for service instantiation.  netconf-ssh
and netconf-tcp depend on netconf-util for NetconfConfiguration, so it
was decided to do the conversion of all three bundles in one patch.

netconf-util utilizes blueprint-cm to instantiate NetconfConfiguration
based on the ManagedService identified by the "netconf" PID.

Tests that were aimed at testing bespoke Activator logic were removed,
since the accompanying Activators were removed.  ServiceTrackers were
removed in favor of bean references.  Scaffolding used to locate the
NetconfConfiguration ManagedService was also removed since it is now
directly referenced using blueprint.

JIRA: NETCONF-510
Change-Id: I27452ea509bc50333ffc00c6d1d8de3133e8b850
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7072e63a98485bbbfa686a639d28002377972aa0)

6 years agoNETCONF-512: Add cases for missing NormalizedNode types 29/68829/1
Tom Pantelis [Sat, 24 Feb 2018 01:17:02 +0000 (20:17 -0500)]
NETCONF-512: Add cases for missing NormalizedNode types

ReadDataTransactionUtil.prepareData was missing cases for
LeafSetNode, OrderedLeafSetNode, OrderedMapNode and UnkeyedListNode.

Change-Id: Iaf44ce9b24044584e37d524835ec4a51843acd32
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit c7e371eb1e23ba3b86747a27172acca78a449706)

6 years agoUpdate .gitreview to stable/oxygen 07/68707/1
Anil Belur [Mon, 26 Feb 2018 06:59:45 +0000 (16:59 +1000)]
Update .gitreview to stable/oxygen

Change-Id: I68819e98b43d5653babd67fed6ec04cad83e73db
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoClosed nested JSON writers 69/67869/6
Stephen Kitt [Fri, 2 Feb 2018 15:57:30 +0000 (16:57 +0100)]
Closed nested JSON writers

With I9c597fe96937867cffdcbeeddd4b1507de20f2ee,
JSONNormalizedNodeStreamWriter.createNestedWriter() leaves it up to
the caller to close the provided JsonWriter. This patch ensures that
that is the case.

Change-Id: If20a596db06e40d1636de168dd11677372964364
Signed-off-by: Stephen Kitt <skitt@redhat.com>
(cherry picked from commit b6be299466349d775d860ab45d785028e6b899f7)

6 years agoModify NetconfKeystoreAdapter to expose private keys and certificates 00/68000/10
LiGuosheng [Wed, 7 Feb 2018 08:24:56 +0000 (16:24 +0800)]
Modify NetconfKeystoreAdapter to expose private keys and certificates

Supply a method of using private keys and trusted certificates to
create JDK KeyStore. Improve code and test cases.

Change-Id: I56dff8cec16eeb320b4765a5d8c5bd3ffe562556
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
6 years agoFix root data node QName equality check 22/68422/1
Igor Foltin [Tue, 20 Feb 2018 09:30:52 +0000 (10:30 +0100)]
Fix root data node QName equality check

This fixes the http error status 500 when trying to read
the whole mounted datastore using the new restconf
implementation based on RFC8040.

When serializing a NormalizedNode that represents
the data root we need to serialize only its children.

Change-Id: Ia87ea7d5244199680f528901ce85f9b78f9d5e3e
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
6 years agoClean up NetconfHelloMessage 04/68204/3
Robert Varga [Tue, 13 Feb 2018 18:23:20 +0000 (19:23 +0100)]
Clean up NetconfHelloMessage

- do not invoke toString() during message checking
- use UntrustedXML directly to instantiate documents
- use Optional.fromNullable()
- Invert equality calls, making sure we invoke them on constants
- eliminate the need to catch DocumentedException

Change-Id: I6bb2165cc7b0644c5236e4c5967b03915d978e3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix a NetconfDocumentedException warning 05/68205/3
Robert Varga [Tue, 13 Feb 2018 18:25:07 +0000 (19:25 +0100)]
Fix a NetconfDocumentedException warning

Exceptions are serializable, hence thei need a version.

Change-Id: I3fcc125fc5bbd0ce661ce5ec2c63ffd5c0094d7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoDepend on odl-config-util 09/68209/3
Robert Varga [Tue, 13 Feb 2018 19:30:32 +0000 (20:30 +0100)]
Depend on odl-config-util

Rather than packaging config-util in this project, rely on packaging
provided by controller.

JIRA: NETCONF-508
Change-Id: I156ca6948ac4db5bc1ac977b3cdfa98259c12c55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoNETCONF-509: no-input RPCs should use RestconfDocumentedException 71/68271/1
Evan Zeller [Wed, 14 Feb 2018 23:15:41 +0000 (15:15 -0800)]
NETCONF-509: no-input RPCs should use RestconfDocumentedException

When invoked with an "input" value currently the implementation throws
IllegalStateException up to the servlet container which results in the
ugly jetty default error page and reveals stack trace information.
Provide a clear message that the invoked RPC should not take any input values.

Change-Id: Id13499b80bed9a2ea7666a3aa6d775da341055ab
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
6 years agoDon't include stacktraces in REST responses 39/67439/6
Evan Zeller [Mon, 22 Jan 2018 20:12:38 +0000 (12:12 -0800)]
Don't include stacktraces in REST responses

OWASP best practices recommend user facing error messages should not
contain stack traces or line numbers. The full stack trace should still be available in karaf.log.

Change-Id: Ia8ffed91ecdbf8a1d299c90c33882bbc18d55b50
Signed-off-by: Evan Zeller <evanrzeller@gmail.com>
6 years agoFix odl-restconf-noauth packaging yangtools bundle 84/68184/1
Robert Varga [Tue, 13 Feb 2018 12:49:37 +0000 (13:49 +0100)]
Fix odl-restconf-noauth packaging yangtools bundle

Depend on the corresponding feature and cleanup versions.

Change-Id: Ic3086cab94515b6c508cacc472ddc7095a51436c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMerge "NETCONF-506: fix YII deserialization in FilterContentValidator"
JakubToth [Sat, 10 Feb 2018 00:10:54 +0000 (00:10 +0000)]
Merge "NETCONF-506: fix YII deserialization in FilterContentValidator"

6 years agoAdd test cases for NetconfSalKeystoreService 54/67954/4
LiGuosheng [Tue, 6 Feb 2018 11:39:59 +0000 (19:39 +0800)]
Add test cases for NetconfSalKeystoreService

Test cases for adding private keys and trusted certificates into
the keystore.

Change-Id: I493e3f88e636ee7c53363e1cbf54ba6c1714d156
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
6 years agoNETCONF-506: fix YII deserialization in FilterContentValidator 43/67743/4
Marek Gradzki [Tue, 30 Jan 2018 19:27:17 +0000 (20:27 +0100)]
NETCONF-506: fix YII deserialization in FilterContentValidator

Treat leafref keys in the same way as indentityref keys.
Follows https://git.opendaylight.org/gerrit/#/c/53996/

See also NETCONF-384.

Change-Id: I36a67b12e23c7da43f4e5c6002de8ae031d18e6a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agojira NETCONF-489 Add TLS support for connecting to a netconf device 11/67711/3
LiGuosheng [Tue, 30 Jan 2018 09:35:11 +0000 (17:35 +0800)]
jira NETCONF-489 Add TLS support for connecting to a netconf device

The X.509 certificate yang model definition and rpc implementation.

Change-Id: Ic125707f80a23f21e183fa732adfb0083f853bca
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
6 years agoNETCONF-505: fix decoding of URLs with external leafref 23/67723/1
Marek Gradzki [Tue, 30 Jan 2018 11:45:07 +0000 (12:45 +0100)]
NETCONF-505: fix decoding of URLs with external leafref

Use mount point schema rather than global.

Change-Id: Id386bc462961b42103cf0e3f2e984f4e034bba76
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 years agoNETCONF-502: Use GSON for swagger serdes 81/67581/3
Ryan Goulding [Thu, 25 Jan 2018 16:09:48 +0000 (11:09 -0500)]
NETCONF-502:  Use GSON for swagger serdes

This utilized the GsonProvider currently in AAA to do serdes
for odl-mdsal-apidocs.  This will not pass until the
subsequent AAA patches are merged.

Change-Id: Iba67d65b3f72f26f0507b62327a41e570fc3cea4
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoMerge "Add missing 'Path' annotations in jax-rs implementations for REST services"
JakubToth [Thu, 25 Jan 2018 23:14:06 +0000 (23:14 +0000)]
Merge "Add missing 'Path' annotations in jax-rs implementations for REST services"

6 years agoodl-restconf-nb-rfc8040-noauth depends on odl-yangtools-export 71/67571/1
Robert Varga [Thu, 25 Jan 2018 14:30:31 +0000 (15:30 +0100)]
odl-restconf-nb-rfc8040-noauth depends on odl-yangtools-export

Rather than pulling in dependency bundle, make sure we reference
the correct feature in which it is packaged.

Change-Id: I1b61b12655217cbee44ea82a8401b90523c63206
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoDrop references to object-cache 70/67570/1
Robert Varga [Thu, 25 Jan 2018 14:20:31 +0000 (15:20 +0100)]
Drop references to object-cache

object-cache artifacts are experimental and not used anymore,
drop them from netconf features.

Change-Id: Ife39dfd2fb7dc967745b810f52472d3fd94c2220
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoAdd missing 'Path' annotations in jax-rs implementations for REST services 68/67568/1
Igor Foltin [Thu, 25 Jan 2018 12:55:06 +0000 (13:55 +0100)]
Add missing 'Path' annotations in jax-rs implementations for REST services

Change-Id: I1d666b4ea2017f79adf079fe76dcf8827516f8b1
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
6 years agoNETCONF-501: Remove feature prerequisite 67/67367/4
Luis Gomez [Sat, 20 Jan 2018 00:06:04 +0000 (16:06 -0800)]
NETCONF-501: Remove feature prerequisite

Change-Id: I8e18996cb2fe1d05bc07d30de160912eef3ca970
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
6 years agoNETCONF-494: use RFC7951 JSON codecs 51/67351/1
Robert Varga [Fri, 19 Jan 2018 14:31:17 +0000 (15:31 +0100)]
NETCONF-494: use RFC7951 JSON codecs

RFC8040 requires us to use a different codec for encoding instance
identifiers. Update the RFC8040 northbound to select this codec.

Also update the bierman02 northbound to explicitly bind to
the legacy LHOTKA codec.

Change-Id: I436e17b7c7695aaf75a27e7967b1bcfaf4815686
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMinimize yangtools dependencies and bump to 2.0.1 60/67260/2
Robert Varga [Wed, 17 Jan 2018 22:54:03 +0000 (23:54 +0100)]
Minimize yangtools dependencies and bump to 2.0.1

Squash dependencies so that netconf features are pulling in
the bare minimum set of yangtools features directly and use
version ranges for them.

Properties should be avoided and inter-project dependencies should
be expressed via ${upstream}-artifacts dependencyManagement import.

yangtools-2.0.1 contains a fix to multi-revision modules, which are
badly broken in 2.0.0. It also introduces APIs we require to fix
compliance with RFC8040 (i.e. follow RFC7159).

Change-Id: I0e0e63841d511123243560f166db50c2fc9270fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMerge "Clean up netconf-parent root pom"
Jakub Morvay [Fri, 12 Jan 2018 14:00:54 +0000 (14:00 +0000)]
Merge "Clean up netconf-parent root pom"

6 years agoAdjust to yangtools-2.0.0/odlparent-3.0.0 changes 02/64202/42
Robert Varga [Thu, 12 Oct 2017 12:33:55 +0000 (14:33 +0200)]
Adjust to yangtools-2.0.0/odlparent-3.0.0 changes

This also bumps sshd-core to 1.6.0, as that is what karaf ships
by default.

Change-Id: I064b1621bfa729c58e3b3ef6646787a6112301aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBump yangtools to 2.0.0 01/64201/14
Robert Varga [Thu, 12 Oct 2017 11:40:28 +0000 (13:40 +0200)]
Bump yangtools to 2.0.0

This bumps odlparent to 3.0.2 and yangtools to 2.0.0. Feature
references are updated so the reactor is consistent, build failures
are addressed in a follow-up patch.

Change-Id: I186d0900d361a3e33e779629f7ce60329fd61143
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoClean up netconf-parent root pom 84/66984/1
Ryan Goulding [Tue, 9 Jan 2018 16:44:11 +0000 (11:44 -0500)]
Clean up netconf-parent root pom

The root pom had some long running xml fields and other small
formatting issues.  Additionally, it introduced a profile that
was unused ("integrationtests").  I also cleaned up the modules
so that they are listed in alphabetic order.

Change-Id: I1ca3e40d7520fb1fc0cd5aa277c802db8d052275
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoBUG: jira NETCONF-493 ReconnectPromise throws IllegalStateException continuously 75/66775/3
李国胜10121395 [Wed, 27 Dec 2017 11:50:04 +0000 (19:50 +0800)]
BUG: jira NETCONF-493 ReconnectPromise throws IllegalStateException continuously

ReconnectPromise will execute method setFailure() more than once
if reconnecting to a netconf device failed more than once, and the
setFailure() method will start throwing IllegalStateException at
the second time invocation, so there should add limitation to the
call of setFailure() to avoid IllegalStateException.

Change-Id: I2d6802e6ac643215192527319d565da36a16caf5
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
6 years agoBug jira NETCONF-492: netconf:list-devices throws a NullPointerException 61/66761/2
李国胜10121395 [Tue, 26 Dec 2017 03:06:27 +0000 (11:06 +0800)]
Bug jira NETCONF-492: netconf:list-devices throws a NullPointerException

When initiate a connection to a netconf device, the operational data store of this device
will be set to failure if the negotiation fails, but the write to the operational data
store just involve ConnectionStatus and ConnectedMessage, and this will cause
netconf:list-devices to throw a NullPointerException, and we can get nothing from this
command.

Change-Id: I64529d7408c315222b3ceabe4e2b2748038faa01
Signed-off-by: Li guosheng <li.guosheng6@zte.com.cn>
6 years agoAdded more configuration options for NetconfDeviceSimulator 74/66574/1
Juraj Veverka [Mon, 18 Dec 2017 20:48:33 +0000 (21:48 +0100)]
Added more configuration options for NetconfDeviceSimulator
- yang resourves loaded from classpath
- username / password AuthProvider
- public key authenticator
all changes are backwards compatible

Change-Id: Iba2c3106d456050ed84a2bbbaf1da2a227fa3566
Signed-off-by: Juraj Veverka <juraj.veverka@pantheon.tech>
6 years agoUsing writeAndFlush to response PingWebSocketFrame with PongWebSocketFrame, instead... 44/66044/2
HeYunBo [Wed, 29 Nov 2017 12:20:36 +0000 (20:20 +0800)]
Using writeAndFlush to response PingWebSocketFrame with PongWebSocketFrame, instead of write

Change-Id: Icc749f3a5255cf7385274dd546251160bcd0f8aa
Signed-off-by: HeYunBo <he.yunbo@zte.com.cn>
6 years agoBUG-9160: fix ReadDataTransactionUtil creating two adapters 22/63122/6
wusandi [Thu, 14 Sep 2017 06:58:56 +0000 (14:58 +0800)]
BUG-9160: fix ReadDataTransactionUtil creating two adapters

It should not directly add all of NotificationListenerAdapter objects
for XML stream to the list of NotificationListenerAdapter for JSON stream.
And to fix it, just to concat them together instead of putting one to
another.

Change-Id: I2c8eedc04281f10ea6742db854309d8182b1966b
Signed-off-by: wusandi <wusandi@163.com>
6 years agoMerge "Support for patch command"
Tomas Cere [Thu, 30 Nov 2017 14:59:46 +0000 (14:59 +0000)]
Merge "Support for patch command"

6 years agoSupport for patch command 90/65690/5
Balaji Varadaraju [Sat, 18 Nov 2017 02:50:10 +0000 (20:50 -0600)]
Support for patch command

The internal JSON libary did not have support for HTTP PATCH command.
This patch provides the support for the PATCH command. Support is
provided in both deprecated and new RESTCONF libraries.

Change-Id: I2bb81fe46bab5ec49fac3bff156e04f9a1b7c227
Signed-off-by: Balaji Varadaraju <bvaradar@brocade.com>
6 years agoRemove duplicated schema service in provider 76/65876/1
Jakub Toth [Thu, 23 Nov 2017 23:14:50 +0000 (00:14 +0100)]
Remove duplicated schema service in provider

Change-Id: I24bc553e2b0bcff8c598d86fe0956bd4ff4f8cb2
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
6 years agoFix harcoded port in location of streams 72/65872/2
Jakub Toth [Thu, 23 Nov 2017 14:46:06 +0000 (15:46 +0100)]
Fix harcoded port in location of streams

Change-Id: I449772b7233186f29df97a3968f65b19204f79ca
Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>