netconf.git
6 years agoBug 5824: Migrate netconf to the new XML parser 50/60250/4
Igor Foltin [Wed, 12 Jul 2017 15:13:19 +0000 (17:13 +0200)]
Bug 5824: Migrate netconf to the new XML parser

Migrate netconf components to the new XML parser from YANG tools.

Change-Id: I42899d4d07cb2f917c50fa862cd6453bb0a8764d
Signed-off-by: Igor Foltin <igor.foltin@pantheon.tech>
6 years agoBug 8824 - NETCONF request hangs when rpc-rply has invalid xml 34/60334/2
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 agoBug 8832 - rpc-error in keepalive rpc-reply shouldn't bounce the session 29/60329/1
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 agoDo not pull in yang-maven-plugin 96/60296/1
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>
6 years agoRemove JSON restconf-service config yang and Module classes 33/59633/2
Tom Pantelis [Wed, 28 Jun 2017 16:48:43 +0000 (12:48 -0400)]
Remove JSON restconf-service config yang and Module classes

The module provides a service but it isn't widely used and most
likely any consumers have been converted to blueprint. Otherwise
a consumer still using CSS would need to be converted to
blueprint which is the future direction anyway.

Change-Id: I7e821df7e7a3efb48e75cea9d6ead3d45929c9b7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoMerge "Remove rest-connector config yang and Module classes"
Tomas Cere [Tue, 11 Jul 2017 11:22:24 +0000 (11:22 +0000)]
Merge "Remove rest-connector config yang and Module classes"

6 years agoMerge "Add JSONRestconfService impl for the restconf Draft18 impl"
Tomas Cere [Tue, 11 Jul 2017 10:43:11 +0000 (10:43 +0000)]
Merge "Add JSONRestconfService impl for the restconf Draft18 impl"

6 years agoMerge "Remove <Embed-Dependency> in netconf-config pom"
Tomas Cere [Tue, 11 Jul 2017 08:16:18 +0000 (08:16 +0000)]
Merge "Remove <Embed-Dependency> in netconf-config pom"

6 years agoRemove rest-connector config yang and Module classes 32/59632/3
Tom Pantelis [Wed, 28 Jun 2017 16:38:42 +0000 (12:38 -0400)]
Remove rest-connector config yang and Module classes

The rest-connector has been converted to blueprint so the config
yang is no longer needed.

Change-Id: I1fb107c7eec3699b53eb2109afb6d13573c14b88
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove <Embed-Dependency> in netconf-config pom 46/60146/1
Tom Pantelis [Mon, 10 Jul 2017 16:12:32 +0000 (12:12 -0400)]
Remove <Embed-Dependency> in netconf-config pom

The pom embeds the threadpool-config-impl dependency. Not sure exactly
why this was done but I suspect as a work around for the java imports from
the blueprint XML not being included in <Import-Package>. We should not
embed the dependency. The maven-bundle-plugin can scan blueprint XML files
but there is an issue with using it so we can instead add the necessary
packages to <Import-Package>.

Change-Id: Ice33dd0e7b7f75f9d277d83ab05e6c8303867ed4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoUpgrade to odlparent 2.0.2 92/60092/3
Stephen Kitt [Fri, 7 Jul 2017 15:50:31 +0000 (17:50 +0200)]
Upgrade to odlparent 2.0.2

Change-Id: I9660748964bf09f3db84481c62e7cce7843ef7bd
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoSimplify RC4 removal 39/60139/2
Tomas Cere [Mon, 10 Jul 2017 14:12:07 +0000 (16:12 +0200)]
Simplify RC4 removal

Change-Id: Ib26c8c7a7bad5e156f33c444593db0c161af0b59
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoUse RSA for ssh server 38/60138/2
Tomas Cere [Mon, 10 Jul 2017 14:02:19 +0000 (16:02 +0200)]
Use RSA for ssh server

The bouncy-castle bump increased the default size of DSA to 2048 which
some clients can choke on. We shouldn't use DSA anyhow so switch it up
to 4096 RSA everywhere.

Change-Id: I936eb240a534367fff550d25dcedc3de069c6654
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoMerge "Bug 8725: Remove netconf device mounting via the config system"
Tomas Cere [Fri, 7 Jul 2017 10:08:02 +0000 (10:08 +0000)]
Merge "Bug 8725: Remove netconf device mounting via the config system"

6 years agoMerge "Skip SFT in features-netconf-connector"
Tomas Cere [Fri, 7 Jul 2017 08:53:00 +0000 (08:53 +0000)]
Merge "Skip SFT in features-netconf-connector"

6 years agoAdd JSONRestconfService impl for the restconf Draft18 impl 17/59217/9
Tom Pantelis [Wed, 28 Jun 2017 17:15:40 +0000 (13:15 -0400)]
Add JSONRestconfService impl for the restconf Draft18 impl

Added a JSONRestconfServiceDraft18 implementation class that uses the
restconf Draft18 impl and the blueprint wiring to instantiate and advertise
it. The original Draft02 JSONRestconfServiceImpl remains.

Change-Id: Ieab9c606ff40659bfe9d1a62ced7bf80891aa01a
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBug 8725: Remove netconf device mounting via the config system 69/59669/3
Tom Pantelis [Thu, 29 Jun 2017 11:48:52 +0000 (07:48 -0400)]
Bug 8725: Remove netconf device mounting via the config system

Change-Id: Ida7a236f0bd75978e07a64b38497ccf8aa75fea8
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG-8752: apidoc explorer show/hide and list operations no longer works 04/59804/1
Yrineu Rodrigues [Fri, 30 Jun 2017 19:13:48 +0000 (16:13 -0300)]
BUG-8752: apidoc explorer show/hide and list operations no longer works

This patch fixes the APIdoc explorer after change from
org.json to jackson

Change-Id: I9168c5aa08b820df38ac9a2413abba08a567cccf
Signed-off-by: Yrineu Rodrigues <yrineu.rodrigues@serro.com>
6 years agoSkip SFT in features-netconf-connector 95/59795/2
Tom Pantelis [Fri, 30 Jun 2017 13:51:09 +0000 (09:51 -0400)]
Skip SFT in features-netconf-connector

odl-netconf-clustered-topology and odl-netconf-topology are mutually
exclusive so running SFT may fail intermittently due to timing. This
will be addressed in a future release of odlparent to disable SFT
for feature-repo-parent by default and we can revert this later
although it doesn't hurt to disable locally.

Change-Id: Id91e36ea857179beba0e4a862ca9ab1821735025
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoMerge "Use final field as lock in AsyncSshHandlerWriter"
Tomas Cere [Thu, 29 Jun 2017 13:33:06 +0000 (13:33 +0000)]
Merge "Use final field as lock in AsyncSshHandlerWriter"

6 years agoMerge "Bug 8071 - Do not fail on modules with invalid revision during ...
Tomas Cere [Thu, 29 Jun 2017 12:55:42 +0000 (12:55 +0000)]
Merge "Bug 8071 - Do not fail on modules with invalid revision during            resolution of ietf-netconf-yang-library/modules-state node"

6 years agoUse final field as lock in AsyncSshHandlerWriter 09/47009/2
Andrej Mak [Mon, 17 Oct 2016 11:12:02 +0000 (13:12 +0200)]
Use final field as lock in AsyncSshHandlerWriter

Change-Id: I355e626b90e5cd27dfb5da96ef76c13a36f77dde
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
6 years agoBug 8124 - get-schema rpc fails to send error message 70/54170/9
miroslav.kovac [Fri, 31 Mar 2017 09:36:51 +0000 (11:36 +0200)]
Bug 8124 - get-schema rpc fails to send error message

Change-Id: If2d87beec2dd8c1b3579d10ddcb008d35effa289
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
6 years agoMerge "Remove the need for synthetic methods"
Tomas Cere [Wed, 28 Jun 2017 11:40:52 +0000 (11:40 +0000)]
Merge "Remove the need for synthetic methods"

6 years agoMerge "Make netconf utilize encrypted passwords only"
Tomas Cere [Wed, 28 Jun 2017 08:58:38 +0000 (08:58 +0000)]
Merge "Make netconf utilize encrypted passwords only"

6 years agoMerge "Convert yanglib project to blueprint"
Jakub Morvay [Tue, 27 Jun 2017 18:34:20 +0000 (18:34 +0000)]
Merge "Convert yanglib project to blueprint"

6 years agoMake netconf utilize encrypted passwords only 28/52528/28
Colin Dixon [Tue, 27 Jun 2017 14:09:28 +0000 (10:09 -0400)]
Make netconf utilize encrypted passwords only

Change-Id: I5c178c4e3865e374f39e326ceb9c4e24be269590
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Signed-off-by: Atul Gosain <agosain@brocade.com>
Signed-off-by: Colin Dixon <colin@colindixon.com>
6 years agoMerge "Use lambdas to remove references to Function"
Tomas Cere [Tue, 27 Jun 2017 13:40:00 +0000 (13:40 +0000)]
Merge "Use lambdas to remove references to Function"

6 years agoUse lambdas to remove references to Function 21/57821/8
Robert Varga [Thu, 25 May 2017 10:41:45 +0000 (12:41 +0200)]
Use lambdas to remove references to Function

Change-Id: I8e45aca6ce8c3af4845502784ade1d859b375f09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMerge "Add blueprint wiring for restconf connector"
Jakub Morvay [Tue, 27 Jun 2017 11:37:31 +0000 (11:37 +0000)]
Merge "Add blueprint wiring for restconf connector"

6 years agoMerge "Don't loose cause when reporting parsing errors."
Tomas Cere [Tue, 27 Jun 2017 10:28:26 +0000 (10:28 +0000)]
Merge "Don't loose cause when reporting parsing errors."

6 years agoBUG-8697: select correct transformer for schemaless netconf mounts 14/59514/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>
(cherry picked from commit 32621d57701de889651097ce5c1bfc3bb5f43ce9)

6 years agoConvert yanglib project to blueprint 30/59530/3
Tom Pantelis [Mon, 26 Jun 2017 14:39:03 +0000 (10:39 -0400)]
Convert yanglib project to blueprint

Added blueprint XML to instatiate the YangLibProvider. The yanglib
yang module was converted to a container that is stored in the DS and
provided via the clustered-app-config element. The CSS YangLibModule
was removed.

Change-Id: Ie45fb8261665fea38a4153c01484986d8a0272c4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoDon't loose cause when reporting parsing errors. 49/57049/5
Tomas Cere [Mon, 15 May 2017 10:38:20 +0000 (12:38 +0200)]
Don't loose cause when reporting parsing errors.

Change-Id: I5e5a07c00f29784a6289aa1ed24187ed6f42e833
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoAdd blueprint wiring for restconf connector 68/57368/31
Tom Pantelis [Thu, 1 Jun 2017 19:07:43 +0000 (15:07 -0400)]
Add blueprint wiring for restconf connector

Added the blueprint XML wiring and deprecated the CSS config yang
and modules. The CSS Module classes are essentially no-ops but
remain for backwards compatibility until CSS is completely
removed.

Change-Id: I6f5e7f369958ead9ce00a7fc6c8afe551738f195
Signed-off-by: matthieu <mcauffiez@inocybe.com>
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBuild features-... instead of features4-... 14/59414/1
Stephen Kitt [Thu, 22 Jun 2017 16:08:24 +0000 (18:08 +0200)]
Build features-... instead of features4-...

The directories were renamed, but not the artifacts.

Change-Id: I4abe486b54c6ff2220ee83ee3a6c274914932e43
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBump odlparent dependency to 2.0.0 84/59284/5
Jakub Morvay [Wed, 21 Jun 2017 11:41:46 +0000 (13:41 +0200)]
Bump odlparent dependency to 2.0.0

This updates odlparent dependency to 2.0.0 version. Furthermore, karaf 3
features are eliminated.

Change-Id: I8e18e032ea9cfb36f3913dcbfa7c3d1d6cd9ee59
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMerge changes I0d93e3c4,I34aca892,I74162d9a,Icd48e366
Jakub Morvay [Wed, 21 Jun 2017 14:41:58 +0000 (14:41 +0000)]
Merge changes I0d93e3c4,I34aca892,I74162d9a,Icd48e366

* changes:
  Remove netconf-auth service-type config yang
  Remove netconf-mapping-api service-type config yang
  Remove netconf-notifications-api service-type config yang
  Remove netconf-api service-type config yang

6 years agoMerge "Switch from config-parent in pom files"
Jakub Morvay [Wed, 21 Jun 2017 07:52:43 +0000 (07:52 +0000)]
Merge "Switch from config-parent in pom files"

6 years agoMerge "Remove import-package declaration"
Tomas Cere [Tue, 20 Jun 2017 14:40:07 +0000 (14:40 +0000)]
Merge "Remove import-package declaration"

6 years agoMerge "Get rid of stale prerequisite for maven"
Tomas Cere [Tue, 20 Jun 2017 14:40:00 +0000 (14:40 +0000)]
Merge "Get rid of stale prerequisite for maven"

6 years agoMerge "Migrate XML output to yang-data-codec-xml"
Tomas Cere [Tue, 20 Jun 2017 13:39:59 +0000 (13:39 +0000)]
Merge "Migrate XML output to yang-data-codec-xml"

6 years agoMerge "Run NormalizedNode parsing inline if possible"
Tomas Cere [Tue, 20 Jun 2017 13:39:20 +0000 (13:39 +0000)]
Merge "Run NormalizedNode parsing inline if possible"

6 years agoGet rid of stale prerequisite for maven 96/59196/2
Ryan Goulding [Tue, 20 Jun 2017 00:22:03 +0000 (20:22 -0400)]
Get rid of stale prerequisite for maven

It is commonly accepted that ODL requires maven 3.3.9+ now.  This
change removes a stale prerequisite for maven so that it is more
consistent with project guidelines.

Change-Id: Idd3bbe1c7ecbbc9b790fe50b7b29d8a263d98bd5
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoMerge "Bug 5995: remove org.json"
Tomas Cere [Tue, 20 Jun 2017 12:26:09 +0000 (12:26 +0000)]
Merge "Bug 5995: remove org.json"

6 years agoMerge "Bug 8622: convert sal-rest-docgen to Jackson"
Tomas Cere [Tue, 20 Jun 2017 12:25:37 +0000 (12:25 +0000)]
Merge "Bug 8622: convert sal-rest-docgen to Jackson"

6 years agoRemove import-package declaration 35/58835/4
Robert Varga [Tue, 13 Jun 2017 16:21:08 +0000 (18:21 +0200)]
Remove import-package declaration

Maven exclusions should not be necessary.

Change-Id: I32c843efcd965624797a61ceff1b1ed4ce80d2e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoRemove the need for synthetic methods 38/58838/2
Robert Varga [Tue, 13 Jun 2017 16:40:52 +0000 (18:40 +0200)]
Remove the need for synthetic methods

Using private methods from anonymous classes forces javac to create
synthetics. Lower isolation to package-private to call them directly.

Change-Id: I52a5d641f275d5a2e9924e60910641ccdce42281
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMerge "Use SimpleSchemaContext instead of EffectiveSchemaContext"
Tomas Cere [Tue, 20 Jun 2017 09:44:01 +0000 (09:44 +0000)]
Merge "Use SimpleSchemaContext instead of EffectiveSchemaContext"

6 years agoRemove netconf-auth service-type config yang 24/59124/1
Tom Pantelis [Sat, 17 Jun 2017 12:46:07 +0000 (08:46 -0400)]
Remove netconf-auth service-type config yang

The service-type identities aren't used so remove them.

Change-Id: I0d93e3c46e93db31d4515c55296c937f4f7a4d19
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove netconf-mapping-api service-type config yang 23/59123/1
Tom Pantelis [Sat, 17 Jun 2017 12:43:43 +0000 (08:43 -0400)]
Remove netconf-mapping-api service-type config yang

The service-type identities aren't used so remove them.

Change-Id: I34aca892bdd88f6ffa50c63a933a6cd6266cd75c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove netconf-notifications-api service-type config yang 22/59122/1
Tom Pantelis [Sat, 17 Jun 2017 12:41:18 +0000 (08:41 -0400)]
Remove netconf-notifications-api service-type config yang

The service-type identities aren't used so remove them.

Change-Id: I74162d9a055c9d2757a3781b19de5d9dc4054f85
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove netconf-api service-type config yang 21/59121/1
Tom Pantelis [Sat, 17 Jun 2017 12:35:42 +0000 (08:35 -0400)]
Remove netconf-api service-type config yang

The service-type identities aren't used so remove them.

Change-Id: Icd48e3666773ca65a3f08a65b2377c0eaf830992
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoSwitch from config-parent in pom files 16/59116/1
Tom Pantelis [Sat, 17 Jun 2017 02:41:40 +0000 (22:41 -0400)]
Switch from config-parent in pom files

Most netconf bundles don't or no longer use the CSS so they
don't need to use config-parent.

Change-Id: I59757e8e81709f4904615b0e3829bc5ef569000b
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove UriInfo from JSONRestconfService API methods 74/58974/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 agoBug 5995: remove org.json 45/58945/2
Stephen Kitt [Wed, 14 Jun 2017 12:14:24 +0000 (14:14 +0200)]
Bug 5995: remove org.json

This switches sal-rest-connector to Jackson and Gson and cleans up the
features.

Change-Id: I587ab4638374fccb344e9a769ee2793e16863fef
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBug 8622: convert sal-rest-docgen to Jackson 39/58839/3
Stephen Kitt [Tue, 13 Jun 2017 16:25:59 +0000 (18:25 +0200)]
Bug 8622: convert sal-rest-docgen to Jackson

This removes the requirement for org.json in sal-rest-docgen, which
causes bundle wiring issues in Karaf 4 (sal-rest-docgen ends up
exporting org.json, which Jackson’s compatibility layer consumes,
creating a dependency loop which causes refreshes anytime anything
touches the sal-rest-docgen).

Change-Id: I877f3e567fdeba3258a19a40f1f9e31bb19df24d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoUse SimpleSchemaContext instead of EffectiveSchemaContext 54/58754/2
Robert Varga [Mon, 12 Jun 2017 16:56:37 +0000 (18:56 +0200)]
Use SimpleSchemaContext instead of EffectiveSchemaContext

EffectiveSchemaContext is an implementation detail of the parser,
SimpleSchemeContext is a beta-level API from yang-model-util.

Change-Id: I524f9e91562b5fa8d6d942f40bf957ec97e40e88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMigrate to odlparent 1.9.0 46/58846/1
Thanh Ha [Tue, 13 Jun 2017 18:41:35 +0000 (14:41 -0400)]
Migrate to odlparent 1.9.0

Change-Id: Ib0dfd4ded0c67e04ae7e4f4d4cc537cf2c632486
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMigrate XML output to yang-data-codec-xml 80/57580/11
Robert Varga [Sat, 20 May 2017 09:57:22 +0000 (11:57 +0200)]
Migrate XML output to yang-data-codec-xml

The codecs provided yang-data-impl are superseded by those in
codec-xml. This patch provides the first part of migration.

Change-Id: If777defcc6218faf5597289956b800d68dcb5e5a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoRun NormalizedNode parsing inline if possible 94/57594/8
Robert Varga [Sun, 21 May 2017 16:31:48 +0000 (18:31 +0200)]
Run NormalizedNode parsing inline if possible

While JSON does not guarantee object ordering, we do not have to
fall back to building internal string if we have the target node
set.

If the target has been set, we call directly to parser with our
current parser, which will be moved forward -- which is more
efficient.

Change-Id: I311cc3525944fd2327183c200b3ed9dbee9e915a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoAdjust to EffectiveSchemaContext movement 36/58736/1
Robert Varga [Mon, 12 Jun 2017 13:12:52 +0000 (15:12 +0200)]
Adjust to EffectiveSchemaContext movement

This code depends directly on parser internals. Adjust the import,
but really this should be fixed by subclassing AbstractSchemaContext
from yang-model-util.

Change-Id: I57c84ec7e721bf0bd1e6a6eef1d8ccd0562f8b74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix checkstyle problems not detected by the current version 97/58197/3
David Suarez [Sat, 3 Jun 2017 16:06:08 +0000 (18:06 +0200)]
Fix checkstyle problems not detected by the current version

This change is required for overall move to new Checkstyle version, see
https://git.opendaylight.org/gerrit/#/q/topic:bumpCheckstyle

Change-Id: I4fac148d693e5de5c96485243a5469a22f1a8237
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
6 years agoBUG-8085: create missing parent augmentation node 13/58313/2
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 agoMigrate to odlparent 1.8.0-Carbon 96/58296/1
Thanh Ha [Tue, 6 Jun 2017 02:18:22 +0000 (22:18 -0400)]
Migrate to odlparent 1.8.0-Carbon

Per request of odlparent project we are downgrading all Nitrogen
projects to use the released odlparent 1.8.0-Carbon to allow for the
odlparent project to start performing semver style releases.

Jira: RELENG-159
RT: 41406
Change-Id: Ib81afe4e0e7eb5587044bade9d50d00bc98906e1
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoMerge "Un-deprecate JSONRestconfService(Impl)"
Tomas Cere [Mon, 5 Jun 2017 13:39:45 +0000 (13:39 +0000)]
Merge "Un-deprecate JSONRestconfService(Impl)"

6 years agoBUG 8566 direct writes to ordered list fail 08/58108/2
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 agoUn-deprecate JSONRestconfService(Impl) 61/58161/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 agoMerge "Test RestconfWrapperProviders"
Tomas Cere [Mon, 29 May 2017 10:44:20 +0000 (10:44 +0000)]
Merge "Test RestconfWrapperProviders"

6 years agoMerge changes Ieb46b050,I6bff6467
Tomas Cere [Mon, 29 May 2017 10:43:11 +0000 (10:43 +0000)]
Merge changes Ieb46b050,I6bff6467

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

6 years agoTest RestconfWrapperProviders 66/54966/13
Jakub Toth [Thu, 13 Apr 2017 09:50:44 +0000 (11:50 +0200)]
Test RestconfWrapperProviders

Change-Id: Id95c607bba19c56c6924938ba5ef107f8937a76b
Signed-off-by: Jakub Toth <jatoth@cisco.com>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8533: Not possible to invoke RPC on mount points with new Restconf 59/57659/7
Ivan Hrasko [Tue, 23 May 2017 07:27:43 +0000 (09: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 agoMerge "Bug 7933: NPE when posting using XML"
Tomas Cere [Tue, 23 May 2017 10:43:13 +0000 (10:43 +0000)]
Merge "Bug 7933: NPE when posting using XML"

6 years agoBug 7933: NPE when posting using XML 62/57362/7
matus.kubica [Thu, 18 May 2017 14:32:26 +0000 (16:32 +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 agoIntroduce abstract body readers 93/57593/5
Robert Varga [Sun, 21 May 2017 15:28:36 +0000 (17:28 +0200)]
Introduce abstract body readers

{Json,Xml}{NormalizedNode,ToPatch}BodyReader classes share some
common code. Factor it out into abstract classes to reduce code
duplication.

Change-Id: I7358151f617f5327fc514ac2066b2aee883b2fba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoUse URI.create() 91/57591/3
Robert Varga [Sun, 21 May 2017 14:13:33 +0000 (16:13 +0200)]
Use URI.create()

We wrap 'new URI(String)' in a try-catch block, which is not really
necessary -- use URI.create(String) to get pretty much the same
behavior (except for the exception thrown).

Change-Id: Id9baa17dddb564b2be6d2258a1d73947a67c15f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoPre-instantiate operations 90/57590/3
Robert Varga [Sun, 21 May 2017 14:12:48 +0000 (16:12 +0200)]
Pre-instantiate operations

There is no point in creating the operations over and over again.
Instantiate them immediately and keep them in an ImmutableSet.

Change-Id: I952bcf026b9d0de99252530e8fc44863408adb3e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBug 7933: NPE when posting using XML 25/57425/3
Ivan Hrasko [Fri, 19 May 2017 12:39:16 +0000 (14:39 +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 agoFix PatchEditOperation 84/57584/2
Robert Varga [Sat, 20 May 2017 12:05:46 +0000 (14:05 +0200)]
Fix PatchEditOperation

Enums support methods, so instead of a switch dispatch use normal
property. Also simplify users so they do not pass strings around.

Change-Id: I3818f3d6a4020cee2f2e43fb8ec110e0bc872ba6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoOptimize JsonToPatchBodyReader 83/57583/2
Robert Varga [Sat, 20 May 2017 11:46:12 +0000 (13:46 +0200)]
Optimize JsonToPatchBodyReader

Use a StringBuilder instead of a StringBuffer, use switch statements
and du not use string concat when using StringBuilder.append().

Change-Id: Icaf68a7a92dae6aece4e9382ba4a03bac429d4ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix various warnings 81/57581/3
Robert Varga [Sat, 20 May 2017 10:19:08 +0000 (12:19 +0200)]
Fix various warnings

The code is full of eclipse warnings around static methods, raw types
and similar. Fix that up.

Change-Id: I8aa84b8c0fbde5c32ab855dfc215205501ce2777
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBug 8153: enforce check-style rules for netconf 42/57142/15
Ivan Hrasko [Tue, 16 May 2017 12:14:27 +0000 (14:14 +0200)]
Bug 8153: enforce check-style rules for netconf

- enforce checkstyle in all modules + cleanup

Change-Id: I64b003c8f8f554445423e54642ef46bb95bc90b1
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8153: enforce check-style rules for netconf 67/57067/21
Ivan Hrasko [Mon, 15 May 2017 13:50:39 +0000 (15:50 +0200)]
Bug 8153: enforce check-style rules for netconf

- call-home

Change-Id: I1b5e2db2d6b0a4d3591e56d773cfcd4ffc13ae67
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8153: enforce check-style rules for netconf 50/57050/18
Ivan Hrasko [Mon, 15 May 2017 08:52:02 +0000 (10:52 +0200)]
Bug 8153: enforce check-style rules for netconf

- netconf-testool

Change-Id: Ic7e772768596d7e9e66e74896029f72caadeff9e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8351: enforce check-style rules for restconf 60/57260/9
Ivan Hrasko [Wed, 17 May 2017 10:54:57 +0000 (12:54 +0200)]
Bug 8351: enforce check-style rules for restconf

- enforce checkstyle in all modules + cleanup

Change-Id: I9d8dc0d8461a11582029debcba8512ef6f0ed96a
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8351: enforce check-style rules for restconf 69/57069/15
Ivan Hrasko [Mon, 15 May 2017 14:27:34 +0000 (16:27 +0200)]
Bug 8351: enforce check-style rules for restconf

- sal-rest-docgen

Change-Id: I848691f539b189dffcd9ff10fadf5d3c708a9792
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8351: Enforce check-style rules for restconf - sal-rest-connector 91/56391/15
matus.kubica [Tue, 2 May 2017 14:17:30 +0000 (16:17 +0200)]
Bug 8351: Enforce check-style rules for restconf - sal-rest-connector

    Organize Imports for Checkstyle compliance.
    Checkstyle compliance: line length.
    Checkstyle compliance: various types of small changes.
    Checkstyle compliant Exception handling.
    Checkstyle final clean up & enforcement.
    Add the fail on violation flag into the pom.xml .

Change-Id: I81b704c5ed79dead57e5e37c925b4aaa8579444a
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
6 years agoBug 8455: Yang Patch response is not having the error details 24/57124/2
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>
7 years agoBug 8153: enforce check-style rules for netconf 41/57041/3
Ivan Hrasko [Mon, 15 May 2017 07:27:53 +0000 (09:27 +0200)]
Bug 8153: enforce check-style rules for netconf

- netconf-cli module

Change-Id: Ifb0be378ff9f3ddc697bb34d139c5fc76b824907
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 8153: Enforce check-style rules for netconf - mdsal-netconf-connector 01/55201/17
matus.kubica [Wed, 19 Apr 2017 09:29:42 +0000 (11:29 +0200)]
Bug 8153: Enforce check-style rules for netconf - mdsal-netconf-connector

    Organize Imports for Checkstyle compliance.
    Checkstyle compliance: line length.
    Checkstyle compliance: various types of small changes.
    Checkstyle compliant Exception handling.
    Checkstyle final clean up & enforcement.
    Add the fail on violation flag into the pom.xml .

Change-Id: Ib50c1754c97932714d4eb19b7e34a818af8a1a77
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 8071 - Do not fail on modules with invalid revision during 11/54411/9
miroslav.kovac [Thu, 6 Apr 2017 08:47:59 +0000 (10:47 +0200)]
Bug 8071 - Do not fail on modules with invalid revision during
           resolution of ietf-netconf-yang-library/modules-state node

After parsing xml with invalid revision string it failed instead
of returning only modules with correct revision.

It reads an xml, creates a new xml string using only modules with
correct revision and logs the ones that has wrong revision. New xml
string will be parsed to normalized node.

Change-Id: Ie51163864f3547560840cb7d52ea8762437a6b1e
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
7 years agoMerge "Bug 8351: Enforce check-style rules for restconf - sal-rest-docgen"
Tomas Cere [Thu, 11 May 2017 10:22:17 +0000 (10:22 +0000)]
Merge "Bug 8351: Enforce check-style rules for restconf - sal-rest-docgen"

7 years agoMerge "Bug 8153: Enforce check-style rules for netconf - yanglib"
Tomas Cere [Thu, 11 May 2017 10:20:50 +0000 (10:20 +0000)]
Merge "Bug 8153: Enforce check-style rules for netconf - yanglib"

7 years agoBug 8074 - actor name [test-device] is not unique! 69/54269/24
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>
7 years agoMerge "Resolve exception from registerClusterSingletonService"
Jakub Morvay [Wed, 10 May 2017 13:18:29 +0000 (13:18 +0000)]
Merge "Resolve exception from registerClusterSingletonService"

7 years agoBug 8405: Add close check to NetconfDevice 62/56762/2
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 agoResolve exception from registerClusterSingletonService 76/56776/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>
7 years agoBug 8153: Enforce check-style rules for netconf - yanglib 51/56351/4
matus.kubica [Tue, 2 May 2017 07:54:31 +0000 (09:54 +0200)]
Bug 8153: Enforce check-style rules for netconf - yanglib

    Organize Imports for Checkstyle compliance.
    Checkstyle compliance: line length.
    Checkstyle compliance: various types of small changes.
    Checkstyle compliant Exception handling.
    Checkstyle final clean up & enforcement.
    Add the fail on violation flag into the pom.xml .

Change-Id: I841ed5ba3ba57f91e18a82015c7582195cec5562
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
7 years agoMerge "Bug 7891: Add ssh feature to netconf-netty-util"
Jakub Morvay [Sat, 6 May 2017 11:55:03 +0000 (11:55 +0000)]
Merge "Bug 7891: Add ssh feature to netconf-netty-util"

7 years agoMerge "Bug 8364: Set bundle context when module reloads"
Jakub Morvay [Sat, 6 May 2017 11:53:10 +0000 (11:53 +0000)]
Merge "Bug 8364: Set bundle context when module reloads"