netconf.git
10 years agoEnabling notification from netconf client
Robert Gallas [Tue, 12 Nov 2013 11:07:18 +0000 (12:07 +0100)]
Enabling notification from netconf client

Extending NetconfClientSessionListener to enable notifications

Change-Id: I6190afef686cb51aea9961fbd5cb43ebf1669a0d
Signed-off-by: Robert Gallas <rgallas@cisco.com>
10 years agoMerge "Reduce logged messages during build and concentrate only on the ones needed...
Alessandro Boch [Mon, 11 Nov 2013 20:59:58 +0000 (20:59 +0000)]
Merge "Reduce logged messages during build and concentrate only on the ones needed for debugging build errors"

10 years agoReduce logged messages during build and concentrate only on the ones
Giovanni Meo [Mon, 11 Nov 2013 17:39:11 +0000 (18:39 +0100)]
Reduce logged messages during build and concentrate only on the ones
needed for debugging build errors

- Create a maven artifact that contains a default settings for
logback.xml so it can be reused as dependency to make sure some
plugins don't generate too much verbose output
- Use the artifact
org.opendaylight.controller:commons.logback_settings as UT dependency
so to make sure only in case of errors the follow UT spit messages:
  + netconf-impl
+ config-netconf-connector
- Remove duplicated logback.xml where not needed
- Remove logback.xml and space_and_tabs_checks.xml where no longer needed
- Added logback.xml as a file on the integration tests using pax-exam,
there a local file seems to be required (unfortunately). Make sure the
pax-exam uses it for the tests where not using it.
- Made sure the sanitytest in distribution only runs when
integrationstests profile is selected
- Fixed an issue in importing in eclipse zeromq module
- Excluded all tests from mdsal unless the integrationtests profile is
selected

Signed-off-by: Giovanni Meo <gmeo@cisco.com>
Change-Id: I9c12965bb3de5c8cba1039992cadbe27026bca2a

10 years agoMerge changes Ifdaf681e,Ifc13df7c
Ed Warnicke [Mon, 11 Nov 2013 14:09:05 +0000 (14:09 +0000)]
Merge changes Ifdaf681e,Ifc13df7c

* changes:
  Fixed merge of entries in mock data store
  Added paths and mediatypes from Restconf draft 02

10 years agoAdded paths and mediatypes from Restconf draft 02
Tony Tkacik [Mon, 11 Nov 2013 10:16:00 +0000 (11:16 +0100)]
Added paths and mediatypes from Restconf draft 02

Change-Id: Ifc13df7c2fd9881668dd8c7cc47a4783fac440f0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "Bump versions of config-subsystem and netconf-subsystem to 0.2.3-SNAPSHOT...
Ed Warnicke [Fri, 8 Nov 2013 21:02:48 +0000 (21:02 +0000)]
Merge "Bump versions of config-subsystem and netconf-subsystem to 0.2.3-SNAPSHOT. Remove ConfigProvider."

10 years agoMerge "Improved translation from XML to Json"
Ed Warnicke [Fri, 8 Nov 2013 15:28:52 +0000 (15:28 +0000)]
Merge "Improved translation from XML to Json"

10 years agoMerge "Fixed RESTCONF integration, added IT skeleton"
Ed Warnicke [Fri, 8 Nov 2013 15:26:19 +0000 (15:26 +0000)]
Merge "Fixed RESTCONF integration, added IT skeleton"

10 years agoImproved translation from XML to Json
msunal [Fri, 8 Nov 2013 14:37:41 +0000 (15:37 +0100)]
Improved translation from XML to Json

- Fixed bugs in translation

Change-Id: I68bfea382ab46f69e7c34b161ce7f972060b33e4
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoBump versions of config-subsystem and netconf-subsystem to 0.2.3-SNAPSHOT.
Maros Marsalek [Fri, 8 Nov 2013 12:15:23 +0000 (13:15 +0100)]
Bump versions of config-subsystem and netconf-subsystem to 0.2.3-SNAPSHOT.
Remove ConfigProvider.

Change-Id: I6d578f5c3b934456cf37a0893e816cfc8d6340f1
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoFixed RESTCONF integration, added IT skeleton
Tony Tkacik [Fri, 8 Nov 2013 00:37:56 +0000 (01:37 +0100)]
Fixed RESTCONF integration, added IT skeleton

Change-Id: I5fa91649afd6568362f5cc69dfbc142b0b95bd0c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "- Added exi capability utilities, handlers and necessary modifications - Exi...
Ed Warnicke [Fri, 8 Nov 2013 10:57:06 +0000 (10:57 +0000)]
Merge "- Added exi capability utilities, handlers and necessary modifications - Exi parameters decomposition - Introduced HandlerManipulator class in netconf-api to be used for   handlers management on channel pipeline - Exi encoding/decoding test added - exi returns NetconfMessage - added DOM attributes - exi encode decode test to expect NetconfMessage instead of Document - XmlElement.getName() returns localName first and tagName if localName not present, incorporated notes from Robert - NetconfSession implements all common methods - added copyright where needed - ProtocolMessageEncoder/Decoder stored in session and replaced with Exi   enc/dec - exi encoder/decoder interface become comaptible with   ProtocoleMessageEncoder/Decoder and no longer needs to be taken care of   this handlers - created thirdParty bundle for exi - incorporation of Maros's notes"

10 years agoMerge "Test of conversing of yang + xml files to json 2."
Ed Warnicke [Fri, 8 Nov 2013 10:47:40 +0000 (10:47 +0000)]
Merge "Test of conversing of yang + xml files to json 2."

10 years ago- Added exi capability utilities, handlers and necessary modifications
Martin Bobak [Wed, 30 Oct 2013 10:19:12 +0000 (11:19 +0100)]
- Added exi capability utilities, handlers and necessary modifications
- Exi parameters decomposition
- Introduced HandlerManipulator class in netconf-api to be used for
  handlers management on channel pipeline
- Exi encoding/decoding test added
- exi returns NetconfMessage
- added DOM attributes
- exi encode decode test to expect NetconfMessage instead of Document
- XmlElement.getName() returns localName first and tagName if localName not present, incorporated notes from Robert
- NetconfSession implements all common methods
- added copyright where needed
- ProtocolMessageEncoder/Decoder stored in session and replaced with Exi
  enc/dec
- exi encoder/decoder interface become comaptible with
  ProtocoleMessageEncoder/Decoder and no longer needs to be taken care of
  this handlers
- created thirdParty bundle for exi
- incorporation of Maros's notes

Author:    Martin Bobak <mbobak@cisco.com>
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Change-Id: If9f20cef34ec05495eb212f6a584dd65a401dc0a
Signed-off-by: Martin Bobak <mbobak@cisco.com>
10 years agoTest of conversing of yang + xml files to json 2.
Jozef Gloncak [Fri, 8 Nov 2013 09:21:29 +0000 (10:21 +0100)]
Test of conversing of yang + xml files to json 2.

Test was broken to two test. First one uses regular expression. Second one
uses JsonReader class.

Change-Id: Iaeae471c9e93b873b37236926197dec439ea3611
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "SSH netty handler"
Giovanni Meo [Thu, 7 Nov 2013 15:38:56 +0000 (15:38 +0000)]
Merge "SSH netty handler"

10 years agoSSH netty handler
Robert Gallas [Thu, 7 Nov 2013 14:04:53 +0000 (15:04 +0100)]
SSH netty handler

Added Netty SSH handler and
underlying virtual socket infrasctructure

Change-Id: I119494835e61820d23789125b70bb70c1299ae31
Signed-off-by: Robert Gallas <rgallas@cisco.com>
10 years agoTest of conversion of yang + xml file to json
Jozef Gloncak [Thu, 7 Nov 2013 08:14:49 +0000 (09:14 +0100)]
Test of conversion of yang + xml file to json

Change-Id: I24447e25ffc245d6557a8aedf9b32302a00ad385
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMake default strategy for edit-config netconf operation MERGE in config-persister...
Maros Marsalek [Wed, 6 Nov 2013 15:24:32 +0000 (16:24 +0100)]
Make default strategy for edit-config netconf operation MERGE in config-persister-impl

Replace strategy, deletes default modules

Change-Id: Ie6e09dbdeb12aa4201af09852d4a4c6eee4e29a2
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoCreate mvn profile for integrationtests
Alissa Bonas [Wed, 6 Nov 2013 11:49:52 +0000 (13:49 +0200)]
Create mvn profile for integrationtests

Change-Id: I119cb15f184523201cb190f2dfe8b0639995f704
Signed-off-by: Alissa Bonas <abonas@redhat.com>
10 years agoImproved exception handling thrown by client threads in ConcurrentClientsTest
Maros Marsalek [Mon, 4 Nov 2013 09:14:02 +0000 (10:14 +0100)]
Improved exception handling thrown by client threads in ConcurrentClientsTest

Change-Id: Iabb655c4bf6f03e80c7822cbbc19e79d8f1db30e
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoNetconfClientDispatcher moved to constructor arguments in NetconfClient
Maros Marsalek [Tue, 5 Nov 2013 09:19:58 +0000 (10:19 +0100)]
NetconfClientDispatcher moved to constructor arguments in NetconfClient
This way NioEventLoopGroup instance can be reused by multiple clients.

Dispatcher created in NetconfCLient's constructor spawned an instance of NioEventLoopGroup (in AbstractDispatcher in bgpcep repo).
Instance of NioEventLoopGroup spawns new threads and with multiple concurrent clients system could get out of resources e.g. Too many open files, Unable to create new native thread.

Change-Id: I7dffed243d62ea0be4786d067a16d4e58ab1530c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoAdded serializer/deserializer for JSON/XML
msunal [Tue, 5 Nov 2013 14:45:55 +0000 (15:45 +0100)]
Added serializer/deserializer for JSON/XML

- exceptions are translated to rest call response with state code 400 or 500
- imporoved singleton pattern
- tests
- added providers for serialization/deserialization of JSON/XML
- supported rest methods: readData, invokeRpc

Change-Id: I3a888fc1ad9c0ae2364d050e5c67875f9e075337
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoFix star import and enable checkstyle rule to prevent it.
Alissa Bonas [Thu, 31 Oct 2013 15:58:16 +0000 (17:58 +0200)]
Fix star import and enable checkstyle rule to prevent it.

Change-Id: I62a1b8e3e85c2575939c3710524a98c91227648d
Signed-off-by: Alissa Bonas <abonas@redhat.com>
10 years agoClean all unused and redundant imports in controller.
Alissa Bonas [Wed, 30 Oct 2013 13:43:08 +0000 (15:43 +0200)]
Clean all unused and redundant imports in controller.
Enable verification of unused and redundant imports via checkstyle.
Rename checkstyle configuration file because it no longer checks only
for tabs.

Change-Id: Id94a92fbc8a79aba01a4177aec3d80a2b3394508
Signed-off-by: Alissa Bonas <abonas@redhat.com>
10 years agoAdded case with Choice-case to instance identifier building
msunal [Tue, 29 Oct 2013 16:11:49 +0000 (17:11 +0100)]
Added case with Choice-case to instance identifier building

- Choice-case is resolved when instance identifier is builded
- added tests for creating instance identifier from uri

Change-Id: Ic61820d0d73cae43db50e0d1434e20b51ea54aa8
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoAdded support for list, leaf-list and container in output under rpc node in yang...
Maros Marsalek [Mon, 28 Oct 2013 10:37:25 +0000 (11:37 +0100)]
Added support for list, leaf-list and container in output under rpc node in yang definition.
Added support for leaf-list in state data definition.

Updated config subsystem as well as netconf mapping.

Change-Id: I4bdfbed352e29d6d3dc569f38c07022383d565c8
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoUse same maven-compiler-plugin version 2.5.1 in all poms.
Alissa Bonas [Tue, 29 Oct 2013 16:15:37 +0000 (18:15 +0200)]
Use same maven-compiler-plugin version 2.5.1 in all poms.
Also declare it in commons pom in pluginsManagement section.
Bump java version to 1.7 in release pom for maven-compiler-plugin

Change-Id: I8844a65029edf99db9eb97db594ef960fff68ba4
Signed-off-by: Alissa Bonas <abonas@redhat.com>
10 years agoSolved bugs and added tests in sal-rest-connector
msunal [Fri, 25 Oct 2013 09:18:30 +0000 (11:18 +0200)]
Solved bugs and added tests in sal-rest-connector

- solved bugs in ControllerContext
- added tests
- formatting

Change-Id: Ia552ec3aa6a8e4949aedfc01f8386dbc6875a73f
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoAdded unit test to demonstrate netconf-client
Maros Marsalek [Fri, 25 Oct 2013 12:48:59 +0000 (14:48 +0200)]
Added unit test to demonstrate netconf-client

Change-Id: Ia159a2ebbd30493611189e3ae932c754d0010627
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoadded implementation of Identifier and Identifiable from yangtools.concepts
Martin Bobak [Wed, 23 Oct 2013 13:14:46 +0000 (15:14 +0200)]
added implementation of Identifier and Identifiable from yangtools.concepts

Change-Id: I33a106e3c7b7db8ea74921409b931c3eea06a548
Signed-off-by: Martin Bobak <mbobak@cisco.com>
10 years agoNetconf message related constants moved to one place.
Milos Fabian [Wed, 23 Oct 2013 09:09:59 +0000 (11:09 +0200)]
Netconf message related constants moved to one place.

Change-Id: Idcbf63f51d152779804aa54432366874088db332
Signed-off-by: Milos Fabian <milfabia@cisco.com>
10 years agoAdd ModuleFactory#getDefaultModules method to config-api.
Tomas Olvecky [Mon, 21 Oct 2013 16:00:05 +0000 (18:00 +0200)]
Add ModuleFactory#getDefaultModules method to config-api.

Add method to populate pre-existing state. Modify code generator to generate
a blank implementation. Calling of the method is done by config-manager
every time new ModuleFactory is discovered in OSGi service registry, each time in a separate transaction.
Implement default module functionality in config-manager.
Add DependencyResolverFactory for default modules to be able to lookup dependencies.
Implement new service tracker tracking ModuleFactory instances in order to commit blank transactions
every time ModuleFactory service appears or disappears.
Clean up pom versions: merge config.yangstore.version into config.version.

Change-Id: I47229c9e403b817b24740c8f77ad43abcc720094
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoAdding resources for a testing
msunal [Wed, 23 Oct 2013 11:26:40 +0000 (13:26 +0200)]
Adding resources for a testing

- added xml, yang, json resources for a testing
- created JsonMapper class - there will be conversion to json based on yang schema

Change-Id: I71b13018f9e9e1ed20279f79a0a6e07a0ecef89a
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoAdd change notification functionality to yang-store.
Tomas Olvecky [Tue, 22 Oct 2013 12:11:09 +0000 (14:11 +0200)]
Add change notification functionality to yang-store.

Add ability to listen for change notifications to yang-store. Listeners get notified when
new yang files are found in bundles and also when bundle with yang files is stopped.

Change-Id: I7c665a57ba7face18bf128d6a7db17c1a23526ce
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoFix for $[netconf.version} issues.
Ed Warnicke [Wed, 23 Oct 2013 03:03:55 +0000 (22:03 -0500)]
Fix for $[netconf.version} issues.

Change-Id: I39bc581dbb09f5f145fd5d9b08c6872b58f29184
Signed-off-by: Ed Warnicke <eaw@cisco.com>
10 years agoBump version of netconf-subsystem to 0.2.2-SNAPSHOT.
Tomas Olvecky [Tue, 22 Oct 2013 18:13:10 +0000 (20:13 +0200)]
Bump version of netconf-subsystem to 0.2.2-SNAPSHOT.

Also clean up poms in netconf subsystem.

Change-Id: I419700edbdf4051ea4fed6cbffc1a558635a5548
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agobump netty to version 4.0.10.Final
Martin Bobak [Mon, 21 Oct 2013 14:18:41 +0000 (16:18 +0200)]
bump netty to version 4.0.10.Final

Change-Id: Ia3cd0b6a0443d252971cfd0beb59bd5ccc800116
Signed-off-by: Martin Bobak <mbobak@cisco.com>
10 years agoDeclare commons-io version
Alissa Bonas [Mon, 21 Oct 2013 12:47:36 +0000 (15:47 +0300)]
Declare commons-io version

Change-Id: I5493d8144199af7127b7fe5c8b94d2c4c59ef1ab
Signed-off-by: Alissa Bonas <abonas@redhat.com>
10 years agoReworked Netconf framing mechanism, added chunked framing mechanism.
Milos Fabian [Tue, 15 Oct 2013 07:35:43 +0000 (09:35 +0200)]
Reworked Netconf framing mechanism, added chunked framing mechanism.

Chunked framing mechanism http://tools.ietf.org/html/rfc6242#section-4.2

Change-Id: I00c44560836a8df66c33f6c90fa460984c4581fa
Signed-off-by: Milos Fabian <milfabia@cisco.com>
10 years agoMake netconf client throw checked Interrupted exception instead of unchecked
Maros Marsalek [Fri, 18 Oct 2013 08:18:37 +0000 (10:18 +0200)]
Make netconf client throw checked Interrupted exception instead of unchecked

Change-Id: Id49cc22fc463c754aca98fb03e53afe38b6c9ac4
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoFix warnings in poms - duplicate and incorrect dependencies
Alissa Bonas [Wed, 16 Oct 2013 14:12:51 +0000 (17:12 +0300)]
Fix warnings in poms - duplicate and incorrect dependencies

Change-Id: Ia8978555a51ae9be02782b8c70d8867fe2052c7a
Signed-off-by: Alissa Bonas <abonas@redhat.com>
10 years agoCandidate fix for "NoSuchAlgorithm SunX509 KeyManager" error.
Ed Warnicke [Mon, 14 Oct 2013 21:41:48 +0000 (16:41 -0500)]
Candidate fix for "NoSuchAlgorithm SunX509 KeyManager" error.

Used KeyManagerFactory.getDefaultAlgorithm() instead.

Change-Id: Ib1cff94c5f33cb82b004b995802878ed8a75e87c
Signed-off-by: Ed Warnicke <eaw@cisco.com>
10 years agoUpdated RESTCONF implementation
Tony Tkacik [Mon, 14 Oct 2013 12:43:05 +0000 (14:43 +0200)]
Updated RESTCONF implementation

  - Restconf implementation now implements new SAL readign contracts
    in form of <String,CompositeNode> where String is Restconf version
    of instance identifier.

    Translation of Restconf InstanceIdentifier into Binding-Independent
    Restconf Instance-Identifier is done by ControllerContext class
    which implements stateful translation of identifier based on schema
    context.

    After translation of instence-identifier most of actions maps
    directly to Binding-Independent APIs.

Change-Id: I248470e282826a3f04f6e99f54aae8fd14ea2eb3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoInitial code drop of netconf protocol implementation
Maros Marsalek [Tue, 8 Oct 2013 16:26:35 +0000 (18:26 +0200)]
Initial code drop of netconf protocol implementation

This implementation is based on infrastructure provided by the framework artifact
and contains server as well as client side code.

Netconf subsystem structure:
Netconf-api:
Api definition for client and server.

Netconf-impl:
Netconf server implementation. Server handles basic communication
and delegates handling of rpcs to an implementation of netconf-mapping-api.

Netconf-mapping-api:
Api definition for pluggable rpcs handler. Implementations of this api
are plugged dynamically into netconf-impl using OSGi apis.

Config-netconf-connector:
Implementation of netconf-mapping-api that handles netconf rpcs and delegates
requests to configuration subsystem

Netconf-util:
Utility classes used by client and server code.

Netconf-client:
Netconf client implementation.

Netconf-it:
Integration tests for netconf. These tests verify correct cooperation of netconf server,
config-netconf-connector, config subsystem and netconf client.

Config-persister-api:
Api definition for config persister. Config persister is a component that is responsible
for storing configuration snapshots after every change to the configuration via netconf rpcs.
(Pushed to config-subsystem)

Config-persister-impl:
Implementation of config persister that receives notifications from netconf-impl about changes
to the configuration and uses pluggable adapters to store received snapshots.

Config-persister-file-adapter:
Implementation of config persister adapter that stores and restores config snapshots from a file.
(Pushed to config-subsystem)

In order to run netconf in OSGi, some configuration issues had to be resolved
in config-subsystem bundles.

Change-Id: I8e0421c924b0714a4d49962c4bb5ca01ef68ac78
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoAdded sal-connector-* skeletons (REST connector, MB, Netconf).
Tony Tkacik [Wed, 25 Sep 2013 16:52:19 +0000 (18:52 +0200)]
Added sal-connector-* skeletons (REST connector, MB, Netconf).

FIxed version of YANG Tools to 0.5.8 release

Change-Id: Id20c9cd8798948f79c655b4d7f8ecad0d1dd392c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>