netconf.git
7 years agoRemove unused imports in the whole NETCONF project 09/52009/1
Jakub Morvay [Fri, 17 Feb 2017 15:41:32 +0000 (16:41 +0100)]
Remove unused imports in the whole NETCONF project

Change-Id: I03f07fea22fa7c290acf6be8ac86e5aa00970143
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Bug 7295 - Incorrect handling of device transactions in clustered setting"
Tomas Cere [Fri, 17 Feb 2017 15:10:22 +0000 (15:10 +0000)]
Merge "Bug 7295 - Incorrect handling of device transactions in clustered setting"

7 years agoPull in feat-jetty instead of feat-war 59/51959/1
Robert Varga [Thu, 16 Feb 2017 13:19:44 +0000 (14:19 +0100)]
Pull in feat-jetty instead of feat-war

feat-war pulls in jetty 9.2, we need 8.1 for the transition.

Change-Id: I6cdd1354c80a5fe8b9e9c34100c4e68259122d2d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoFix error reporting for PUT/POST 92/51792/5
Tom Pantelis [Mon, 13 Feb 2017 15:13:17 +0000 (10:13 -0500)]
Fix error reporting for PUT/POST

If a datastore failure occurs for PUT or POST, restconf reports the
error message "Problem while PUT operations" which is neither useful
nor grammatically correct.

It used to report the underlying error info however this was broken by
https://git.opendaylight.org/gerrit/#/c/40235/ which changed the code to
use a Future callback with a CountDownLatch but doesn't propagate errors
from the Future. I don't understand why the code was changed in this manner
when it worked fine and was much simpler using checkedGet. I changed the
code back to use checkedGet, in several places.

Change-Id: I2e917d7eedc569702cdf3a54c4aa0321fe229ca1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
7 years agoMerge "BUG-7183: do not hard-code scala version"
Jakub Morvay [Thu, 16 Feb 2017 09:48:07 +0000 (09:48 +0000)]
Merge "BUG-7183: do not hard-code scala version"

7 years agoMerge "Compile-time dependencies matter"
Jakub Morvay [Thu, 16 Feb 2017 09:16:13 +0000 (09:16 +0000)]
Merge "Compile-time dependencies matter"

7 years agoBug 7295 - Incorrect handling of device transactions in clustered setting 75/51875/4
Jakub Morvay [Tue, 14 Feb 2017 16:57:34 +0000 (17:57 +0100)]
Bug 7295 - Incorrect handling of device transactions in clustered setting

Transactions on mounted device in clustered setting are delegated to
leader node and leader node actually configures the device.

Implementation, hovewer, depens only on one transaction at a time.
Delegated calls can interleave together, for example one node can submit
transaction of the other node.

Explicitly open a new tranasction before applying any operations to it.

Change-Id: I0c5715a9cd089dd809b071d411884e71e9793849
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Remove blocking get in read transaction"
Jakub Morvay [Thu, 16 Feb 2017 08:55:38 +0000 (08:55 +0000)]
Merge "Remove blocking get in read transaction"

7 years agoRemove blocking get in read transaction 75/51775/5
Andrej Mak [Mon, 13 Feb 2017 09:30:40 +0000 (10:30 +0100)]
Remove blocking get in read transaction

Change-Id: I6829aea0e2cd1f98c3d845db05b4d52dfad8f75e
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoCompile-time dependencies matter 24/51924/1
Vratko Polak [Wed, 15 Feb 2017 18:31:06 +0000 (19:31 +0100)]
Compile-time dependencies matter

This is an analogy of https://git.opendaylight.org/gerrit/#/c/51921/1

Change-Id: I54f242a462787f0a00bfe294f242791051cc1465
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
7 years agoBUG-7183: do not hard-code scala version 12/51912/3
Robert Varga [Wed, 15 Feb 2017 14:43:34 +0000 (15:43 +0100)]
BUG-7183: do not hard-code scala version

Akka artifacts should be coded against scala.version, not to a specific
version. Also drop scope=test, as it is not needed.

Change-Id: Ib7aeb1d9c78f75697e844e620483ac5fac21f92b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoRefactor netconf-util's configuration service 73/51873/5
Jakub Morvay [Tue, 14 Feb 2017 16:41:21 +0000 (17:41 +0100)]
Refactor netconf-util's configuration service

- log netconf configuration service lifecycle events
- NetconfConfigUtil's getNetconfConfigurationService method fails if
  netconf configuration service is not present
- make properties for netconf configuration service constant
- netconf configuration service does not have to be singleton

Change-Id: I0466a7b83803fc93589f40a138c12cbe369135fd
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoRefactor NetconfDocumentedExceptionTest class 24/48324/3
Jakub Morvay [Mon, 14 Nov 2016 15:27:03 +0000 (16:27 +0100)]
Refactor NetconfDocumentedExceptionTest class

Conform to API changes introduced in
https://git.opendaylight.org/gerrit/#/c/48322/.

Also move test to correct package.

Change-Id: I87beaa009d01b2e01912c4dd783881f1dac20b4f
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoMerge "Bug 5581: Merge empty map instead of exist check"
Jakub Morvay [Wed, 15 Feb 2017 13:53:15 +0000 (13:53 +0000)]
Merge "Bug 5581: Merge empty map instead of exist check"

7 years agoBug 5581: Merge empty map instead of exist check 66/51866/3
Andrej Mak [Tue, 14 Feb 2017 14:34:50 +0000 (15:34 +0100)]
Bug 5581: Merge empty map instead of exist check

Change-Id: Id48fe23e6e3f7c3f333c1b1bc6b88ffc888e197a
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 5581: Minor Exi decoder optimization 34/51834/3
Andrej Mak [Tue, 14 Feb 2017 08:01:40 +0000 (09:01 +0100)]
Bug 5581: Minor Exi decoder optimization

Initialize DomSource with new document. Otherwise new
document is created by SAX2DOM class, which is more
expensive as it includes creating new
DocumentBuilderFactory etc.

Change-Id: I8511f39c5ae099d55c07fe3844e4aae5b3bd9bbb
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoDeclare -util/-tcp/-ssh prerequisites 69/51869/3
Stephen Kitt [Tue, 14 Feb 2017 15:27:18 +0000 (16:27 +0100)]
Declare -util/-tcp/-ssh prerequisites

This is imperfect since we drop the relationships from the POMs, which
breaks -Psft (running SFT on the features individually). We need to
improve the plugin to handle this more generically.

Change-Id: Ic7ddc583450b3e207eb4a13f837e8994cb3d5ff0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-6875: adjust for yangtools requiring getYangVersion working 06/51806/1
Robert Varga [Mon, 13 Feb 2017 17:33:05 +0000 (18:33 +0100)]
BUG-6875: adjust for yangtools requiring getYangVersion working

ModuleDependencySort requires a correct YangVersion, fake version 1.

Change-Id: I2877ee1a5ee1e7d3b56e7bf47c9c422a782b59a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoPull in odl-karaf-feat-war 37/51637/1
Robert Varga [Thu, 9 Feb 2017 16:09:05 +0000 (17:09 +0100)]
Pull in odl-karaf-feat-war

This acts as a proxy feature for karaf's war, pull that in.

Change-Id: I870e56fff2615f10309b79f5c8e9d438d9db16b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Clean ControllerContext up"
Jakub Morvay [Thu, 9 Feb 2017 11:49:28 +0000 (11:49 +0000)]
Merge "Clean ControllerContext up"

7 years agoClean up Rfc8040 14/51614/1
Robert Varga [Thu, 9 Feb 2017 09:47:11 +0000 (10:47 +0100)]
Clean up Rfc8040

- use URI.create() as we know the format is correct
- use SimpleDateFormatUtil
- make sure constants are constant
- QName contants should be interned
- throw ExceptionInInitializerError on constant init failure

Change-Id: Ice3cb7fcff8617217a235d830fd7aa5dec1bd26d
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoClean ControllerContext up 11/51611/4
Robert Varga [Fri, 27 Jan 2017 23:54:02 +0000 (00:54 +0100)]
Clean ControllerContext up

ControllerContext is supposed to be an immutable context, which has always
a global instance, which is updated as needed.

Current code mutates the context in an uncoordinated fashion, which means
it can easily end up being inconsistent if a SchemaContext change occurs
while a request is being executed.

Add FIXME markers to issues to be solved in future and clean up various
aspects of the file:
- make sure the URI encoding charset is available
- use lambdas wherever possible
- fix keyword order to match JLS
- trim long lines

Change-Id: I210d5ee6bff7ea9d4853daa7f36411da77388c69
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-7529: provide Karaf 4 features 07/50307/12
Stephen Kitt [Wed, 11 Jan 2017 16:37:32 +0000 (17:37 +0100)]
BUG-7529: provide Karaf 4 features

Change-Id: I649dcae1d60155d5dd656eb3416183889a8f6a14
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 7735 - Update restconf models by RFC 8040 03/51403/3
Jakub Toth [Fri, 3 Feb 2017 14:20:45 +0000 (15:20 +0100)]
Bug 7735 - Update restconf models by RFC 8040

  * rename base class Draft18 -> Rfc8040

Change-Id: I60da9a81472fb86f8a4e2bb2df6d90c0e58ec9e4
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoRemove unused reference to DOMMountPointService 17/51317/1
Alexis de Talhouët [Thu, 2 Feb 2017 01:24:47 +0000 (20:24 -0500)]
Remove unused reference to DOMMountPointService

Change-Id: I4dbe67a6bfe601a88d4c97789dc83e47bd40e300
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
7 years agoMerge "Use yangtools ParserStreamUtils.findSchemaNodeByNameAndNamespace() method"
Tomas Cere [Fri, 27 Jan 2017 15:06:57 +0000 (15:06 +0000)]
Merge "Use yangtools ParserStreamUtils.findSchemaNodeByNameAndNamespace() method"

7 years agoReplace FindBugs :jsr305 by full :annotation (Bug 7663) 99/50899/3
Michael Vorburger [Mon, 23 Jan 2017 20:05:17 +0000 (21:05 +0100)]
Replace FindBugs :jsr305 by full :annotation (Bug 7663)

Change-Id: I17e6f6f75ca4972f433b19a1c518898941bab3e4
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix autorelease - stub channel and eventLoop 85/51085/2
Alexis de Talhouët [Thu, 26 Jan 2017 18:21:39 +0000 (13:21 -0500)]
Fix autorelease - stub channel and eventLoop

Since netty version has been bumped, change are required in the unit test.

Change-Id: I7ff42c9538f4fdfadf1c1677ced81b1afa767e31
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
7 years agoMerge "Prepare upgrade to Netty 4.1"
Tomas Cere [Tue, 24 Jan 2017 09:07:57 +0000 (09:07 +0000)]
Merge "Prepare upgrade to Netty 4.1"

7 years agoReplace mockito-all by mockito-core (see Bug 7662) 72/50872/1
Michael Vorburger [Mon, 23 Jan 2017 18:58:43 +0000 (19:58 +0100)]
Replace mockito-all by mockito-core (see Bug 7662)

Change-Id: Id0be6adaa1c9d07b6b99cd2cde60a02ebd09a3ad
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoPrepare upgrade to Netty 4.1 02/41002/2
Stephen Kitt [Wed, 29 Jun 2016 09:23:35 +0000 (11:23 +0200)]
Prepare upgrade to Netty 4.1

We need to widen the range of allowed versions for odl-netty.

Change-Id: I425f1464f9e97d15e69622701805376da53f6611
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoMerge "Bug 7491 - Ignore exceptions during invoking notification listeners"
Tomas Cere [Tue, 17 Jan 2017 09:18:07 +0000 (09:18 +0000)]
Merge "Bug 7491 - Ignore exceptions during invoking notification listeners"

7 years agoBug 7491 - Ignore exceptions during invoking notification listeners 47/49847/7
Xu Rong [Thu, 29 Dec 2016 08:56:55 +0000 (16:56 +0800)]
Bug 7491 - Ignore exceptions during invoking notification listeners

Change-Id: Ic008f9120ce45dfd2203dad91fd2dfb94fdb9015
Signed-off-by: Xu Rong <xu.rong4@zte.com.cn>
7 years agoClose missing resources when netconf-topolgy goes down 94/48094/4
Alexis de Talhouët [Mon, 7 Nov 2016 23:00:04 +0000 (18:00 -0500)]
Close missing resources when netconf-topolgy goes down

When the connection goes down, we are closing the NetconfDeviceCommunicator
instance but we aren't closing the RemoteDeviceHandler. I believe this is an
oversight, so implementing the Autocloseable interface in NetconfConnectorDTO
that will close both the resources. The consumer of this DTO can then call #close()
to release the resources.

Change-Id: I852a5aa29a73f8454aa1886990dfce9c7a019025
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoBug 5407 - Deprecate Netconf Loopback Mount Through Config Subsystem 06/47906/6
Alexis de Talhouët [Thu, 3 Nov 2016 20:32:57 +0000 (16:32 -0400)]
Bug 5407 - Deprecate Netconf Loopback Mount Through Config Subsystem

Change-Id: I4c413a918a98d82d1a081c297375e68b1105d1a7
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoMerge "Bug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf"
Jakub Morvay [Tue, 10 Jan 2017 13:15:30 +0000 (13:15 +0000)]
Merge "Bug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf"

7 years agoMerge "Bug 7432 - eliminate use of yang-parser-impl internals"
Tomas Cere [Tue, 10 Jan 2017 12:36:37 +0000 (12:36 +0000)]
Merge "Bug 7432 - eliminate use of yang-parser-impl internals"

7 years agoBug 7433 - Remove use of YangSchemaSourceImpl from restconf tests 24/50124/4
Jakub Toth [Mon, 9 Jan 2017 10:35:00 +0000 (11:35 +0100)]
Bug 7433 - Remove use of YangSchemaSourceImpl from restconf tests

Change-Id: I3a5901618cbe162eed07cf0301626e6228df4360
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf 48/49748/5
Jakub Toth [Thu, 22 Dec 2016 17:42:45 +0000 (18:42 +0100)]
Bug 7429 - Upgrade docgen in restconf to the latest draft of ietf-restconf

  *upgrade paths from 17 to 18

Change-Id: I885e59c0ddc3a6668514f531fc6025ba2effedb0
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBUG-4219: use upstream karaf.version 51/49651/2
Robert Varga [Tue, 20 Dec 2016 14:05:20 +0000 (15:05 +0100)]
BUG-4219: use upstream karaf.version

Rather than hard-coding a specific version, pick it up
from odlparent.

Change-Id: I27c16ba9963cc1fea4e482fc006067a191111662
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBUG-4219: use scope=provided for karaf dependencies 48/49648/3
Robert Varga [Tue, 20 Dec 2016 13:43:34 +0000 (14:43 +0100)]
BUG-4219: use scope=provided for karaf dependencies

We should not be pulling in the dependencies, but rather
require them to be provided.

Change-Id: I9f41c3f35d5b8d0b0a14b871816b66a13347781b
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoMerge "Bug 7206 - Chinese improper code problem."
Jakub Morvay [Thu, 5 Jan 2017 15:09:23 +0000 (15:09 +0000)]
Merge "Bug 7206 - Chinese improper code problem."

7 years agoBug 7432 - eliminate use of yang-parser-impl internals 63/50063/2
Jakub Morvay [Thu, 5 Jan 2017 09:51:10 +0000 (10:51 +0100)]
Bug 7432 - eliminate use of yang-parser-impl internals

Switch to using YangParserTestUtil in netconf-cli module instead.

Change-Id: I1db0986a6030f3277286d8980f022ebb1c9042ca
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 7206 - Chinese improper code problem. 77/48477/5
Geng Xingyuan [Fri, 18 Nov 2016 13:17:24 +0000 (21:17 +0800)]
Bug 7206 - Chinese improper code problem.

Change-Id: Iedad5f4cfce270216811788b217bced62ff88428
Signed-off-by: Geng Xingyuan <geng.xingyuan@zte.com.cn>
7 years agoBug 7432 - eliminate use of yang-parser-impl internals 51/50051/2
Jakub Morvay [Thu, 5 Jan 2017 09:51:10 +0000 (10:51 +0100)]
Bug 7432 - eliminate use of yang-parser-impl internals

Switch to using YangParserTestUtil in netconf tests instead.

Change-Id: Ia28ce980929638d7b940f86160289c74e2ec5640
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 5679 - implement new service RestconfService 41/49641/5
Jakub Toth [Tue, 20 Dec 2016 12:14:38 +0000 (13:14 +0100)]
Bug 5679 - implement new service RestconfService

  * update constants of RestconfModule in Draft18 by latest draft
    of ietf-restconf
  * implement servic for getting yang library version
    * path - /restconf/18/yang-library-version
  * test for new implementation
  * move tests from ../rest/services/impl to ../base/services/impl

Change-Id: I6caf4dce2ce3000ba8ac2b9f0f98d90e25f36d31
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - add new module ietf-restconf 55/49555/4
Jakub Toth [Mon, 19 Dec 2016 13:50:34 +0000 (14:50 +0100)]
Bug 5679 - add new module ietf-restconf

Change-Id: Ia9aa9a6c2ed349c9133e005fa901ff70aec757f7
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - implement ietf-restconf-monitoring - cleanup 87/49187/6
Jakub Toth [Fri, 9 Dec 2016 16:13:10 +0000 (17:13 +0100)]
Bug 5679 - implement ietf-restconf-monitoring - cleanup

  * cleanup of both listeners (data-change, yang)
    * create new common abstract classes with common methodes
    * fix broken tests
  * add support of listener to listen on stream with both output
    types (XML JSON)

Change-Id: I865a0547e57a1035921f207d9f96b5a4c57bc20c
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - implement ietf-restconf-monitoring - streams 03/49103/7
Jakub Toth [Wed, 7 Dec 2016 19:19:57 +0000 (20:19 +0100)]
Bug 5679 - implement ietf-restconf-monitoring - streams

  *removed service and tests for getting streams
  *implemented put/delete specific stream to operational DS
  *new mapping for data-change and yang notifications
  *new tests + fixed old

Change-Id: I6c48149ba0bde1e6ba574b514d0fd70a976f1bf4
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - implement ietf-restconf-monitoring - capabilities 26/49026/6
Jakub Toth [Tue, 6 Dec 2016 11:45:53 +0000 (12:45 +0100)]
Bug 5679 - implement ietf-restconf-monitoring - capabilities

  * make constants in QueryParams full (with BASE_URI path)
  * mapping capabilities
  * put mapped capabilities to operational DS in provider
  * added + fixed tests

Change-Id: Ibf1cdb2d07d3172fd21558095307962767ea32ff
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - prepare constants for ietf-yang-library model 19/49019/4
Jakub Toth [Tue, 6 Dec 2016 10:06:25 +0000 (11:06 +0100)]
Bug 5679 - prepare constants for ietf-yang-library model

Change-Id: I71b637991c25e31ce308310b5f978d6c204a5ffc
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - add new module ietf-restconf-monitoring to restconf 18/49018/4
Jakub Toth [Mon, 5 Dec 2016 15:22:56 +0000 (16:22 +0100)]
Bug 5679 - add new module ietf-restconf-monitoring to restconf

Change-Id: I93df11eb73292ccdc3df5bd7668df45dbf3c9a63
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - fix generating of schema by ietf-yang-library 17/49017/4
Jakub Toth [Mon, 5 Dec 2016 13:31:12 +0000 (14:31 +0100)]
Bug 5679 - fix generating of schema by ietf-yang-library
and path of RestconfSchemaService

Change-Id: I5e4449599408d9634d9b88db1ef498c63f5de60f
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - ietf-yang-library module implemetation 60/48860/4
Jakub Toth [Thu, 1 Dec 2016 09:02:06 +0000 (10:02 +0100)]
Bug 5679 - ietf-yang-library module implemetation

Make modules data as data in state DS
  * remove modules service
  * remove tests of modules service impl
  * remove mapping modules according to ietf-restconf
    model

  * implemetation of new mapping modules according to
    ietf-yang-library model
  * (SchemaContextHandler) mapping modules on every new
    schema context and update DS(state) with new data
  * added test for mapping
  * fix tests by new implemetation

Change-Id: I39822fcfddfce409b1a489aa8f64d88eeb23e2db
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - prepare constants for ietf-yang-library model 59/48859/4
Jakub Toth [Wed, 30 Nov 2016 15:49:11 +0000 (16:49 +0100)]
Bug 5679 - prepare constants for ietf-yang-library model

Change-Id: I5f4e2926a39e7f745eb0189c35004470a4e497a2
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - new module 'models' for new models in restconf 58/48858/4
Jakub Toth [Wed, 30 Nov 2016 15:35:35 +0000 (16:35 +0100)]
Bug 5679 - new module 'models' for new models in restconf

  * added new module to models - ietf-yang-library with
    model ietf-yang-library.yang
  * added dependencies to sal-rest-connector and features
    on ietf-yang-library

Change-Id: If372a629443cab496fd42b7a71d726c181c4000e
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 5679 - renamed package rest.services to base.services 57/48857/3
Jakub Toth [Wed, 30 Nov 2016 15:14:31 +0000 (16:14 +0100)]
Bug 5679 - renamed package rest.services to base.services

Change-Id: I8a8ca628d0667536ec7f6f2e217dd8cfb02d775f
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoDo not attempt to construct invalid QNames 26/49526/3
Robert Varga [Sun, 18 Dec 2016 13:13:12 +0000 (14:13 +0100)]
Do not attempt to construct invalid QNames

This fixes an attempt to instantiate a QName with a colon
in its local name. Two of the failing tests are straightforward
fixes.

The RestconfOperationsServiceImpl is more involved, as it requires
faking module imports to keep encoding working.

Change-Id: Iceed2310e94a16189d80fe57b58510fbfc45e17a
Signed-off-by: Robert Varga <rovarga@cisco.com>
7 years agoBug 6911 - RPC support in singleton 42/46742/16
Rudolf Brisuda [Mon, 10 Oct 2016 16:13:33 +0000 (18:13 +0200)]
Bug 6911 - RPC support in singleton

- master invoke RPC and send back to slave.

Change-Id: Ica407f800da3d902f722d835bf6d658163c01bb5
Signed-off-by: Rudolf Brisuda <rbrisuda@cisco.com>
7 years agoMerge "Bug 7172 - Correct error-info for missing-attribute errors"
Tomas Cere [Tue, 29 Nov 2016 13:08:31 +0000 (13:08 +0000)]
Merge "Bug 7172 - Correct error-info for missing-attribute errors"

7 years agoBug 7240 - Restconf returns Status.Ok if delete fails 83/48783/1
Jakub Toth [Fri, 25 Nov 2016 15:03:24 +0000 (16:03 +0100)]
Bug 7240 - Restconf returns Status.Ok if delete fails

  * add a private class for setting Throwable object
  * if operation failed, set Throwable object to object created from
    private class
  * throw RestconfDocumentedException in Restconf (doesn't in hijack
    thread) if Throwable object isn't null
  * add test

Change-Id: I413c5d3c969969903951da876277439ac2b67d66
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 6324 - Notifications stream output is not same as restconf data 72/48772/2
Jakub Toth [Thu, 20 Oct 2016 08:54:06 +0000 (10:54 +0200)]
Bug 6324 - Notifications stream output is not same as restconf data

  * serialization NormalizedNode to JSON with gson codec from yangtools
  * added test

Change-Id: I15245c48188151a1e7aaaf482997ae0d214491c0
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoRemove *Module and yang files for netconf-client 07/47907/7
Alexis de Talhouët [Thu, 3 Nov 2016 21:47:35 +0000 (17:47 -0400)]
Remove *Module and yang files for netconf-client

As netconf-client is migrated to blueprint, and no more config system's module
definition exist for this module, as last one was removed
https://git.opendaylight.org/gerrit/#/c/46512/ it is safe to remove those
backward compatible bits

Change-Id: I404ce974248ee97f72384cce6259d037555eb9ad
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoAdd blueprint to wire threadpools configuration 12/46512/15
Alexis de Talhouët [Tue, 4 Oct 2016 20:07:41 +0000 (16:07 -0400)]
Add blueprint to wire threadpools configuration

Also define odl:type for the various thread pools NETCONF is using,
so we ensure pulling the accurate instances.

Change-Id: Iffcdd076d0a75b5b0ed5f3311cd22ec05ca5e60e
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoAdd blueprint wiring for loopback controller-config 05/47905/13
Alexis de Talhouët [Thu, 3 Nov 2016 20:25:18 +0000 (16:25 -0400)]
Add blueprint wiring for loopback controller-config

Change-Id: I0bf0664e35f17ba449d71a6555359cc42b61da07
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoAdd blueprint wiring for netconf-topology 58/47858/15
Alexis de Talhouët [Wed, 2 Nov 2016 20:26:15 +0000 (16:26 -0400)]
Add blueprint wiring for netconf-topology

This patch also moves api interface under the api
package. So api and impl are seperated, package-wise

Change-Id: Id80290e108b30e524f985044c66a1bea057c24c5
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoAdd blueprint wiring for netconf-tcp 75/45775/19
Alexis de Talhouët [Thu, 6 Oct 2016 12:04:13 +0000 (08:04 -0400)]
Add blueprint wiring for netconf-tcp

The tcp endpoint is configured in the blueprint xml file,
but is commented-out, so by default it is not pick-up. If
someone wants to use it, it has to be uncommented.

Change-Id: Id2c4af8bc6a52c203a054a30d8748708f77591f4
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoBug 7231 - Upgrade ietf-restconf draft17 to draft18 67/48667/1
Jakub Toth [Thu, 24 Nov 2016 15:02:22 +0000 (16:02 +0100)]
Bug 7231 - Upgrade ietf-restconf draft17 to draft18

Change-Id: Ie964ab3654f7a28472b138012a7235e599940ed4
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoMerge "Bug 7207 - Bad parsing of identityref in typedef for last ietf-restconf draft"
Jakub Morvay [Wed, 23 Nov 2016 12:16:56 +0000 (12:16 +0000)]
Merge "Bug 7207 - Bad parsing of identityref in typedef for last ietf-restconf draft"

7 years agoFix NetconfServerSessionListenerTest 98/48598/2
Jakub Morvay [Tue, 22 Nov 2016 18:32:44 +0000 (19:32 +0100)]
Fix NetconfServerSessionListenerTest

NetconfServerSessionListenerTest's testOnMessageDocumentedFail test
expects uppercase error-severity and error-type values in rpc-error
reply.

Patch https://git.opendaylight.org/gerrit/#/c/48326/ introduced
lowercase eror-severity and error-type values in rpc-error.

This fixes testOnMessageDocumentedFail test to expect lowercase
error-severity and error-type values.

Change-Id: If8455e2caa290a712fc202903557c1cf94ca727e
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 7207 - Bad parsing of identityref in typedef for last ietf-restconf 79/48479/2
Jakub Toth [Fri, 18 Nov 2016 14:05:57 +0000 (15:05 +0100)]
Bug 7207 - Bad parsing of identityref in typedef for last ietf-restconf
draft

  * value for identityref in typedef has been added as moduleName+value
    * moduleName:modulName:localName
  * fixed by create value by moduleName + localName of value

Change-Id: Id45bd02d906ae467f83193587302d27488d5c57a
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 6951 - Implement Query parameters - with-defaults 07/48407/2
Jakub Toth [Wed, 16 Nov 2016 13:47:33 +0000 (14:47 +0100)]
Bug 6951 - Implement Query parameters - with-defaults

  * fixed tests

Change-Id: Idae6981b7fd0df3e690965b063b7bd3975d049c5
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoUse yangtools ParserStreamUtils.findSchemaNodeByNameAndNamespace() method 99/48399/2
Jakub Morvay [Tue, 15 Nov 2016 16:54:16 +0000 (17:54 +0100)]
Use yangtools ParserStreamUtils.findSchemaNodeByNameAndNamespace() method

Change-Id: I5e4775da00536b72a59d0fc9d5afdfaa8b3bd4b4
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 6947 / Bug 6948 - implement point and insert query params 69/48369/3
Jakub Toth [Tue, 15 Nov 2016 14:51:29 +0000 (15:51 +0100)]
Bug 6947 / Bug 6948 - implement point and insert query params

  *fixed test

Change-Id: I818f276f68fc87ef6264897b6bd58bfafb4ff67d
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 4883 - implement query parameter - filter 68/48268/6
Jakub Toth [Fri, 14 Oct 2016 08:43:36 +0000 (10:43 +0200)]
Bug 4883 - implement query parameter - filter

  * added test

Change-Id: I75ace69452c31b29460727f36c66cf397f44e26e
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 7172 - Correct error-info for missing-attribute errors 20/48320/1
Jakub Morvay [Mon, 14 Nov 2016 14:22:25 +0000 (15:22 +0100)]
Bug 7172 - Correct error-info for missing-attribute errors

Add bad-attribute and bad-element information to error-info when
constructing missing-attribute rpc-error.

Change-Id: I96652e3154c8ebdba53396360f5ddfe6a5ec0211
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 6949 / Bug 6950 - Implementation of start-time and stop-time 41/48141/6
Jakub Toth [Fri, 14 Oct 2016 08:43:36 +0000 (10:43 +0200)]
Bug 6949 / Bug 6950 - Implementation of start-time and stop-time
query parameters

  * added and fixed tests
  * added yang notifications to latest restconf draft impl

Change-Id: Ie860b568c45eab7325c4a3b6284a75541b5433db
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoImplement SchemaLocationBuilder for ietf-netconf-monitoring 06/37506/3
Tomas Cere [Tue, 12 Apr 2016 16:12:36 +0000 (18:12 +0200)]
Implement SchemaLocationBuilder for ietf-netconf-monitoring

Change-Id: I0442ec831126f3d4657f9cd3191c6d518dc7cc48
Signed-off-by: Tomas Cere <tcere@cisco.com>
7 years agoBug 6935 - RPC in latest draft doesn't work - problem of parsing 36/46936/16
Jakub Toth [Fri, 14 Oct 2016 08:43:36 +0000 (10:43 +0200)]
Bug 6935 - RPC in latest draft doesn't work - problem of parsing
to instance identifier

 *added parsing of rpc identifier
 *test for rpc

Change-Id: Icfb2108a9087e208f32a62702249662fe9865583
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 6995 - Change event notification subscription usability PART2 47/47747/11
Jakub Toth [Sat, 29 Oct 2016 01:38:39 +0000 (03:38 +0200)]
Bug 6995 - Change event notification subscription usability PART2

  * added new yang for leaf with location for subscribing on stream
  * changed return type of subscribing stream request from Response
    to NormalizedNodeContext
    * implemented leaf with location of stream
  * implemented support of adding new headers on data return
    * added new statement 'headers' to NormalizedNodeContext

Change-Id: I2da57c8b1e22368345ca2dac9ae1a8924f2ecea2
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoBug 6995 - Change event notification subscription usability PART1 31/47731/9
Jakub Toth [Fri, 28 Oct 2016 10:55:00 +0000 (12:55 +0200)]
Bug 6995 - Change event notification subscription usability PART1

  * added leaf of notification-output-type to grouping for use
    both augmentations of notifications:
      * data-change notifications
      * yang notifications
  * implemented support of output type for data-change
    notifications (in draft02 and in latest draft)
  * fixed tests to support output of notification

Change-Id: I0b8b9803d1bd2daa7f319e9332ecaf1e96da16ab
Signed-off-by: Jakub Toth <jatoth@cisco.com>
7 years agoMerge "Address comments from blueprint patches"
Jakub Morvay [Mon, 7 Nov 2016 15:59:05 +0000 (15:59 +0000)]
Merge "Address comments from blueprint patches"

7 years agoMerge "Bug 6903 - Implement Query parameters - fields"
Jakub Morvay [Mon, 7 Nov 2016 14:26:52 +0000 (14:26 +0000)]
Merge "Bug 6903 - Implement Query parameters - fields"

7 years agoMerge "Bug 6895 - Implement Query parameters - depth"
Jakub Morvay [Mon, 7 Nov 2016 14:26:30 +0000 (14:26 +0000)]
Merge "Bug 6895 - Implement Query parameters - depth"

7 years agoMerge "Remove netconf-config-dispatcher as moved to netconf-client"
Jakub Morvay [Mon, 7 Nov 2016 13:45:34 +0000 (13:45 +0000)]
Merge "Remove netconf-config-dispatcher as moved to netconf-client"

7 years agoAddress comments from blueprint patches 54/47854/5
Alexis de Talhouët [Wed, 2 Nov 2016 19:02:35 +0000 (15:02 -0400)]
Address comments from blueprint patches

This is a follow-up patch addressing the following comments:

- add missing destroy-method: https://git.opendaylight.org/gerrit/#/c/45750/
- refactor class name, remove useless param and got back to simple map/set
as there is no obvious need to have them concurrent: https://git.opendaylight.org/gerrit/#/c/45608/
- add TODO back: https://git.opendaylight.org/gerrit/#/c/45631/

Change-Id: Ie4648aa520717effbfe367de62a2fb7d6b1d3505
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoMerge "Specify type to NetconfClientDispatcher reference"
Tomas Cere [Mon, 7 Nov 2016 13:06:52 +0000 (13:06 +0000)]
Merge "Specify type to NetconfClientDispatcher reference"

7 years agoMerge changes from topic 'bug/6023'
Jakub Morvay [Mon, 7 Nov 2016 11:59:29 +0000 (11:59 +0000)]
Merge changes from topic 'bug/6023'

* changes:
  Add netconf-util tests for package org.opendaylight.netconf.util.osgi
  Bug 6023 - Adress for config subsystem netconf endpoint is not configurable

7 years agoMerge "Bug 6637 - Make Netconf test-tool simulate buggy behavior"
Jakub Morvay [Mon, 7 Nov 2016 11:39:18 +0000 (11:39 +0000)]
Merge "Bug 6637 - Make Netconf test-tool simulate buggy behavior"

7 years agoAdd netconf-util tests for package org.opendaylight.netconf.util.osgi 72/47772/5
Andrej Mak [Mon, 31 Oct 2016 09:56:59 +0000 (10:56 +0100)]
Add netconf-util tests for package org.opendaylight.netconf.util.osgi

Change-Id: I3a4d476a98c68c7a9fdf0043b09102c72b9fbb2d
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 6023 - Adress for config subsystem netconf endpoint is not configurable 45/47745/9
Alexis de Talhouët [Fri, 28 Oct 2016 19:31:12 +0000 (15:31 -0400)]
Bug 6023 - Adress for config subsystem netconf endpoint is not configurable

Follow-up patch to clean-up

Change-Id: I7bfb7ee0c5e07b00f8f55b37a327f3c4ced6b892
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoBug 6696: Add transaction chain support to netconf connector 75/45575/16
Andrej Mak [Wed, 14 Sep 2016 06:08:31 +0000 (08:08 +0200)]
Bug 6696: Add transaction chain support to netconf connector

Change-Id: I3d680be67589e7f005ef470f0b3896c3256fca4b
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoBug 6637 - Make Netconf test-tool simulate buggy behavior 46/46446/10
Andrej Mak [Fri, 30 Sep 2016 10:49:55 +0000 (12:49 +0200)]
Bug 6637 - Make Netconf test-tool simulate buggy behavior

Define new NetconfOperationServiceFactory which is used by testtool.
This implementation intercepts RPCs and checks if their behavior
is overriden by config. If it is, response defined in config file is
returned. If it is not overriden, handling is delegated to the normal
operation implementation.

Change-Id: I215b8bf52f8229ad54064226abdae0b7fea8f2ff
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
7 years agoBug 6903 - Implement Query parameters - fields 69/46669/44
Ivan Hrasko [Fri, 7 Oct 2016 11:55:38 +0000 (13:55 +0200)]
Bug 6903 - Implement Query parameters - fields

- parse and verify fields parameter from URI
- nodes written to output are limited in
ParameterAwareNormalizedNodeWriter according to
parsed fields parameter value
- ParameterAwareNormalizedNodeWriter is used as writer
even if no parameters are used
- fields parameter is used together with depth
parameter, when node is selected by fields parameter
then value of depth parameter has no effect on selected
node and its *ancestors*
- contains unit tests for fields parameter parser and
ParameterAwareNormalizedNodeWriter class
- fixed depth for map nodes in way that when map node is
target and depth is 1 no map entries children are written
to output
- added support to read data (GET) from restconf/data path

Change-Id: I3896dba6faa3fdbcb00e07fdfd7b3fdc02ba57d9
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoBug 6895 - Implement Query parameters - depth 01/46601/26
Ivan Hrasko [Thu, 6 Oct 2016 09:19:59 +0000 (11:19 +0200)]
Bug 6895 - Implement Query parameters - depth

- depth URI query parameter for new Restconf
- parse and verify all GET parameters in one method
- added tests for depth parameter writer
- added unit tests for content parameter

Change-Id: If9fece9c995dd52bb8ad00d29b6addb66fa4e32b
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
7 years agoMerge "Bug 6382 - add apidoc for latest restconf draft"
Jakub Morvay [Fri, 4 Nov 2016 08:47:06 +0000 (08:47 +0000)]
Merge "Bug 6382 - add apidoc for latest restconf draft"

7 years agoMerge "Bug 6731 - add valid example values"
Jakub Morvay [Fri, 4 Nov 2016 08:46:10 +0000 (08:46 +0000)]
Merge "Bug 6731 - add valid example values"

7 years agoSpecify type to NetconfClientDispatcher reference 02/47902/1
Jakub Morvay [Thu, 3 Nov 2016 16:07:02 +0000 (17:07 +0100)]
Specify type to NetconfClientDispatcher reference

Specify netconf-client-dispatcher type to NetconfClientDispatcher
reference in netconf-topology-singleton blueprint.

Change-Id: I357a10ae634787f1dcf1537c26cebdb9b14effce
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
7 years agoRemove netconf-config-dispatcher as moved to netconf-client 56/47856/1
Alexis de Talhouët [Wed, 2 Nov 2016 19:18:10 +0000 (15:18 -0400)]
Remove netconf-config-dispatcher as moved to netconf-client

Before merging this, USC project needs to merge
https://git.opendaylight.org/gerrit/#/c/46621/
as it is the only consumer of this artifact, it
has to be migrated to the new one.

See commit message of this patch for context:
https://git.opendaylight.org/gerrit/#/c/45735/

Change-Id: Iea4ea41137047fda11ee1276bb001790b772f114
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
7 years agoAdd blueprint wiring for messagebus-netconf 45/45645/8
Alexis de Talhouët [Thu, 15 Sep 2016 20:25:42 +0000 (16:25 -0400)]
Add blueprint wiring for messagebus-netconf

Change-Id: I3d6f7845a0ab898e5e4f7d3c45cbc3f6eba746c0
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>