netconf.git
10 years agoMerge "- remove TLS/SSL support from netconf server and client - refactoring related...
Ed Warnicke [Tue, 3 Dec 2013 13:31:44 +0000 (13:31 +0000)]
Merge "- remove TLS/SSL support from netconf server and client - refactoring related to AbstractSslChannelInitializer deletion - common code of initialize method moved to AbstractChannelInitializer - refactoring sal-netconf-connector's NetconfConnectorModule - integration tests reflects current changes - netconf server activator throws InvalidStateException if   initial tcp configuration is not found"

10 years agoMerge "Leafref and identityref types to Json"
Ed Warnicke [Tue, 3 Dec 2013 12:37:16 +0000 (12:37 +0000)]
Merge "Leafref and identityref types to Json"

10 years ago- remove TLS/SSL support from netconf server and client
Martin Bobak [Mon, 2 Dec 2013 09:30:56 +0000 (10:30 +0100)]
- remove TLS/SSL support from netconf server and client
- refactoring related to AbstractSslChannelInitializer deletion
- common code of initialize method moved to AbstractChannelInitializer
- refactoring sal-netconf-connector's NetconfConnectorModule
- integration tests reflects current changes
- netconf server activator throws InvalidStateException if
  initial tcp configuration is not found

Change-Id: I4fe793866cf9c1927f707943d922b36dae3c6665
Signed-off-by: Martin Bobak <mbobak@cisco.com>
10 years agoLeafref and identityref types to Json
Jozef Gloncak [Mon, 2 Dec 2013 11:36:12 +0000 (12:36 +0100)]
Leafref and identityref types to Json

If type of leaf or leaf-list is leafref then the referenced type
is found and its type is used to specify how will be single node value written to
output.
Path-predicate in leafref aren't supported yet.
Also reference to yang-model-util artifact was added.

Change-Id: I6af19bcda6841e07fc48469ebd556d88979f705b
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "RPC input is wrapped into RPC name element"
Ed Warnicke [Mon, 2 Dec 2013 23:05:24 +0000 (23:05 +0000)]
Merge "RPC input is wrapped into RPC name element"

10 years agoMerge "Added DELETE on cors.allowed.methods for a few missing nb bundles. Also added...
Ed Warnicke [Mon, 2 Dec 2013 22:43:50 +0000 (22:43 +0000)]
Merge "Added DELETE on cors.allowed.methods for a few missing nb bundles. Also added toString() method to a few Neutron backend classes."

10 years agoMerge "Add numberOfBackups=1 property to config.ini's netconf.config.persister.2...
Ed Warnicke [Mon, 2 Dec 2013 22:34:28 +0000 (22:34 +0000)]
Merge "Add numberOfBackups=1 property to config.ini's netconf.config.persister.2.properties"

10 years agoAdd numberOfBackups=1 property to config.ini's netconf.config.persister.2.properties
Tomas Olvecky [Mon, 2 Dec 2013 16:18:08 +0000 (17:18 +0100)]
Add numberOfBackups=1 property to config.ini's netconf.config.persister.2.properties

Change-Id: I36db930ee46592dc949f37b4b19c3d4de4e8fa73
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoAdded DELETE on cors.allowed.methods for a few missing nb bundles.
Madhu Venugopal [Mon, 2 Dec 2013 17:36:13 +0000 (09:36 -0800)]
Added DELETE on cors.allowed.methods for a few missing nb bundles.
Also added toString() method to a few Neutron backend classes.

Change-Id: I484b785384c802bc47463567f5f0d7670eb044c3
Signed-off-by: Madhu Venugopal <mavenugo@gmail.com>
10 years agoRPC input is wrapped into RPC name element
msunal [Mon, 2 Dec 2013 11:31:00 +0000 (12:31 +0100)]
RPC input is wrapped into RPC name element

- input RPC section is wrapped into CompositeNode with RPC name due to MD-SAL

Change-Id: I7a49f2c5c93e53e5985606230d5d2c5b2a884ce4
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoMerge "Fix static state in PersisterAggregatorTest causing test failures depending...
Ed Warnicke [Mon, 2 Dec 2013 12:34:42 +0000 (12:34 +0000)]
Merge "Fix static state in PersisterAggregatorTest causing test failures depending on order in which tests are run."

10 years agoFix static state in PersisterAggregatorTest causing test failures depending on order...
Tomas Olvecky [Mon, 2 Dec 2013 12:11:17 +0000 (13:11 +0100)]
Fix static state in PersisterAggregatorTest causing test failures depending on order in which tests are run.

Change-Id: I4e8d027a7260bf8d21c351ccf4627050b8072c4e
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMD-SAL Statistics Manager - Minor change in group/meter type/capabilities
Anil Vishnoi [Sun, 1 Dec 2013 09:33:30 +0000 (15:03 +0530)]
MD-SAL Statistics Manager - Minor change in group/meter type/capabilities
Group/Meter feature request is now moved to plugin. Plugin will send request
whenever switch will connect to the plugin.

Change-Id: I8821fcb6c1c3d0ebcf9df11611103e846e8c6ccf
Signed-off-by: Anil Vishnoi <avishnoi@in.ibm.com>
10 years agoMerge "Fixed PersisterAggregatorTest."
Ed Warnicke [Sat, 30 Nov 2013 16:33:07 +0000 (16:33 +0000)]
Merge "Fixed PersisterAggregatorTest."

10 years agoFix persister bug introduced in last commit.
Tomas Olvecky [Sat, 30 Nov 2013 15:54:15 +0000 (16:54 +0100)]
Fix persister bug introduced in last commit.

Registering to JMX failed due to previous bugfix.

Change-Id: I8be8751e299d7f10c7ed691b9bcefbd62308fcae
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Fix bug in persister causing to persist last configuration in a loop."
Ed Warnicke [Fri, 29 Nov 2013 15:23:13 +0000 (15:23 +0000)]
Merge "Fix bug in persister causing to persist last configuration in a loop."

10 years agoMerge "Finding data nodes in choices and cases."
Ed Warnicke [Fri, 29 Nov 2013 14:20:34 +0000 (14:20 +0000)]
Merge "Finding data nodes in choices and cases."

10 years agoFix bug in persister causing to persist last configuration in a loop.
Tomas Olvecky [Fri, 29 Nov 2013 14:16:25 +0000 (15:16 +0100)]
Fix bug in persister causing to persist last configuration in a loop.

Change-Id: Ie2c35d5bb4aba19783b4c37d250e575fae2c50cc
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoFixed PersisterAggregatorTest.
Milos Fabian [Fri, 29 Nov 2013 11:46:26 +0000 (12:46 +0100)]
Fixed PersisterAggregatorTest.

Change-Id: Iefc264ddc026df33f5a8124c17835f177627cd50
Signed-off-by: Milos Fabian <milfabia@cisco.com>
10 years agoMerge "Fix race conditions between config-manager and persister."
Ed Warnicke [Fri, 29 Nov 2013 12:25:31 +0000 (12:25 +0000)]
Merge "Fix race conditions between config-manager and persister."

10 years agoMerge "Resolved namespace from input data"
Ed Warnicke [Fri, 29 Nov 2013 12:18:33 +0000 (12:18 +0000)]
Merge "Resolved namespace from input data"

10 years agoFix race conditions between config-manager and persister.
Tomas Olvecky [Fri, 29 Nov 2013 11:17:06 +0000 (12:17 +0100)]
Fix race conditions between config-manager and persister.

Config-manager commits a blank transaction each time new ModuleFactory is discovered. At the same time
persister might try to push configuration. Add retries to both routines to overcome optimistic lock failure.

Change-Id: Ia45505d285b2eb6cc7fa949289a3fbeb4c62f9e7
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoFinding data nodes in choices and cases.
Jozef Gloncak [Fri, 29 Nov 2013 09:46:51 +0000 (10:46 +0100)]
Finding data nodes in choices and cases.

Feature was rewritten. It is no more taken into account if schemas for data
nodes at the same level are in the same case for concrete choice. This check should be done in system which takes Json as input

Change-Id: I12e9d2dd9bba21e5ec59a6864a41c4b82cb4f43f
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoResolved namespace from input data
msunal [Fri, 29 Nov 2013 11:34:23 +0000 (12:34 +0100)]
Resolved namespace from input data

Data of POST and PUT operations can contain namespace/module name:
- xml element can contain yang namespace
- json element can contain yang module name

Change-Id: I503c36de5cf76d6e7ca852d4b4e54e93d171920c
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoMerge "Add support for enums as configuration attributes in config and netconf subsys...
Ed Warnicke [Fri, 29 Nov 2013 11:18:20 +0000 (11:18 +0000)]
Merge "Add support for enums as configuration attributes in config and netconf subsystem."

10 years agoMerge changes Ia268965a,Iefa79f99
Ed Warnicke [Fri, 29 Nov 2013 11:17:38 +0000 (11:17 +0000)]
Merge changes Ia268965a,Iefa79f99

* changes:
  Add running configuration data to get netconf operation response
  Add support for configuration attributes based on yang leaves with custom types (typedef) to netconf.

10 years agoMerge "Choice and case resolving in JSON output"
Ed Warnicke [Fri, 29 Nov 2013 11:16:05 +0000 (11:16 +0000)]
Merge "Choice and case resolving in JSON output"

10 years agoMerge "Add config-persister-directory-adapter. This implementation reads initial...
Ed Warnicke [Fri, 29 Nov 2013 11:12:31 +0000 (11:12 +0000)]
Merge "Add config-persister-directory-adapter. This implementation reads initial configuration from a directory. It can combine multiple files into one snapshot to be sent to netconf. It does not support writing when configuration changes."

10 years agoMerge "Refactor persister to handle multiple storage engines. Allow persister to...
Ed Warnicke [Fri, 29 Nov 2013 11:12:16 +0000 (11:12 +0000)]
Merge "Refactor persister to handle multiple storage engines. Allow persister to load and save configuration snapshots from/to multiple storage instances. Loading works by iterating list of storages backwards and pushing first non-empty response to netconf. This allows having a default (initial) configuration for the controller that will never be overwrittern. Saving configuration will be propagated to all storage engines except those configured as read only."

10 years agoMerge "Refactor persister: require only capabilities referenced by the xml snapshot...
Ed Warnicke [Fri, 29 Nov 2013 11:11:59 +0000 (11:11 +0000)]
Merge "Refactor persister: require only capabilities referenced by the xml snapshot. Also repair logback bug preventing it from taking snapshot configuration."

10 years agoAdd config-persister-directory-adapter.
Tomas Olvecky [Wed, 27 Nov 2013 12:52:20 +0000 (13:52 +0100)]
Add config-persister-directory-adapter.
This implementation reads initial configuration from a directory. It can combine multiple files into one snapshot to be
sent to netconf. It does not support writing when configuration changes.

Change-Id: I6d92ce6a7221c424f64b2fe07b61fee30e9590f0
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoRefactor persister to handle multiple storage engines.
Tomas Olvecky [Wed, 27 Nov 2013 12:52:20 +0000 (13:52 +0100)]
Refactor persister to handle multiple storage engines.
Allow persister to load and save configuration snapshots from/to multiple storage instances.
Loading works by iterating list of storages backwards and pushing first non-empty response to netconf.
This allows having a default (initial) configuration for the controller that will never be overwrittern.
Saving configuration will be propagated to all storage engines except those configured as read only.

Change-Id: If4cdbb9e0c303d5ebb2a3d04a316c74ff76dfb91
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoAdd running configuration data to get netconf operation response
Maros Marsalek [Thu, 28 Nov 2013 09:09:24 +0000 (10:09 +0100)]
Add running configuration data to get netconf operation response

Change-Id: Ia268965a9ef64944138c3b6eb7313fd1ca606da4
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoChoice and case resolving in JSON output
Jozef Gloncak [Thu, 28 Nov 2013 14:00:45 +0000 (15:00 +0100)]
Choice and case resolving in JSON output

Searching via choices and cases which are defined in YANG when resolving
composite node to find elements with corresponding name.

Change-Id: I4b62b323676a2cdd8212f102bcd0dbbbaf9b6c10
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoRefactor persister: require only capabilities referenced by the xml snapshot.
Tomas Olvecky [Wed, 27 Nov 2013 17:04:40 +0000 (18:04 +0100)]
Refactor persister: require only capabilities referenced by the xml snapshot.
Also repair logback bug preventing it from taking snapshot configuration.

Change-Id: I48c0383441bfaee3c192159f5158f833e7e1d938
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Refactor persister. Remove obsolete TLS netconf configuration. Prefix all...
Ed Warnicke [Thu, 28 Nov 2013 20:37:31 +0000 (20:37 +0000)]
Merge "Refactor persister. Remove obsolete TLS netconf configuration. Prefix all ServiceAdaptor configurations with common namespace."

10 years agoRefactor persister.
Tomas Olvecky [Wed, 27 Nov 2013 12:52:20 +0000 (13:52 +0100)]
Refactor persister.
Remove obsolete TLS netconf configuration. Prefix all ServiceAdaptor configurations with common namespace.

Change-Id: Ief5fc0a9b62bd9857f77e934d8097543c2fc7a65
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoAdd support for enums as configuration attributes in config and netconf subsystem.
Maros Marsalek [Thu, 28 Nov 2013 12:54:50 +0000 (13:54 +0100)]
Add support for enums as configuration attributes in config and netconf subsystem.

Change-Id: Ieb6054e2136a2eaf834105f9c1cff6db8668d507
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoAdd support for configuration attributes based on yang leaves with custom types ...
Maros Marsalek [Wed, 27 Nov 2013 09:16:43 +0000 (10:16 +0100)]
Add support for configuration attributes based on yang leaves with custom types (typedef) to netconf.

Change-Id: Iefa79f99772eaa6a0974d6e7a106cd8c14dc648f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoMerge "Fixed handshake issues with SSH Netconf client"
Ed Warnicke [Thu, 28 Nov 2013 14:51:34 +0000 (14:51 +0000)]
Merge "Fixed handshake issues with SSH Netconf client"

10 years agoFixed handshake issues with SSH Netconf client
Tony Tkacik [Thu, 28 Nov 2013 14:23:25 +0000 (15:23 +0100)]
Fixed handshake issues with SSH Netconf client

Change-Id: I979d64e529337a3bf1cd84f82684c5ce822a5514
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "- netconf SSH bridge bundle - Implement bridge using socket - standard netconf...
Ed Warnicke [Thu, 28 Nov 2013 11:34:00 +0000 (11:34 +0000)]
Merge "- netconf SSH bridge bundle - Implement bridge using socket - standard netconf configuration added to netconf-ssh - NetconfClietnSession no longer needs to propagate channel - introducet IOThread class for stream copy - serversession closed when -1 received - NetconfSSHActivator throws Exception where no valid configuration   is found - ganymed bundle fixed to propagate whole package ch.ethz.ssh2.signature - netconf-ssh bundle added to distribution pom - netconf ssh server starting in separate thread in order to finis   activator's start method"

10 years agoMerge "- introduced netconf ssh wrapper bundle - incorporation of Tomas's notes ...
Ed Warnicke [Thu, 28 Nov 2013 11:33:47 +0000 (11:33 +0000)]
Merge "- introduced netconf ssh wrapper bundle - incorporation of Tomas's notes - CRLF removed - introduced KeyStoreHandler for providing server keys - netconf server connection is created when subsystem 'netconf' received - data forwarding to netconf server on requestShell - netconfClientSession exposes channel - removed star imports in SocketThread - integration tests for netconf SSH - introduced SSHChannelInboudnHandler which forwards data from pipeline to SSH serer session - resolved dependencies - tests changed due netconf client sending hello message on session create, added netconf-it to main pom.xml - added logging for integration tests"

10 years agoMerge changes I178e467a,Ia8720c2c
Ed Warnicke [Thu, 28 Nov 2013 10:28:01 +0000 (10:28 +0000)]
Merge changes I178e467a,Ia8720c2c

* changes:
  Mark deprecated methods in DataModification as such
  Remove executable permissions from pom.xml

10 years agoMerge "Removed POST, PUT for /restconf/operational"
Ed Warnicke [Thu, 28 Nov 2013 10:27:19 +0000 (10:27 +0000)]
Merge "Removed POST, PUT for /restconf/operational"

10 years ago- netconf SSH bridge bundle
Martin Bobak [Mon, 25 Nov 2013 17:54:16 +0000 (18:54 +0100)]
- netconf SSH bridge bundle
- Implement bridge using socket
- standard netconf configuration added to netconf-ssh
- NetconfClietnSession no longer needs to propagate channel
- introducet IOThread class for stream copy
- serversession closed when -1 received
- NetconfSSHActivator throws Exception where no valid configuration
  is found
- ganymed bundle fixed to propagate whole package ch.ethz.ssh2.signature
- netconf-ssh bundle added to distribution pom
- netconf ssh server starting in separate thread in order to finis
  activator's start method

Change-Id: I46eac8106a0f222e432d3d8e81c85239ed04ac42
Signed-off-by: Martin Bobak <mbobak@cisco.com>
10 years ago- introduced netconf ssh wrapper bundle
Martin Bobak [Wed, 20 Nov 2013 13:03:33 +0000 (14:03 +0100)]
- introduced netconf ssh wrapper bundle
- incorporation of Tomas's notes
- CRLF removed
- introduced KeyStoreHandler for providing server keys
- netconf server connection is created when subsystem 'netconf' received
- data forwarding to netconf server on requestShell
- netconfClientSession exposes channel
- removed star imports in SocketThread
- integration tests for netconf SSH
- introduced SSHChannelInboudnHandler which forwards data from pipeline to SSH serer session
- resolved dependencies
- tests changed due netconf client sending hello message on session create, added netconf-it to main pom.xml
- added logging for integration tests

Change-Id: I357a7118f2a34c445b0ce8cc9cbe4a7eff27a3a9
Signed-off-by: Martin Bobak <mbobak@cisco.com>
10 years agoRemoved POST, PUT for /restconf/operational
msunal [Thu, 28 Nov 2013 09:47:36 +0000 (10:47 +0100)]
Removed POST, PUT for /restconf/operational

- regarding to RFC the operations POST and PUT do not have to be allowed for client on /restconf/operational

Change-Id: Ie0e8cb07154e4a1a016090fef9645aa38b790b41
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoRemove executable permissions from pom.xml
Robert Varga [Tue, 26 Nov 2013 10:36:02 +0000 (11:36 +0100)]
Remove executable permissions from pom.xml

Change-Id: Ia8720c2c29e4cc1f2ac3c0d69827fe4010c5870a
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
10 years agoMerge changes I6ff6c55c,I92b7e285
Ed Warnicke [Wed, 27 Nov 2013 17:08:36 +0000 (17:08 +0000)]
Merge changes I6ff6c55c,I92b7e285

* changes:
  Bug 165 and changed operations
  Json with prefix for augmented elements

10 years agoBug 165 and changed operations
msunal [Wed, 27 Nov 2013 15:15:58 +0000 (16:15 +0100)]
Bug 165 and changed operations

Main changes according to corresponding RFC draft 01 and 02:
- corrected media types (used application/yang.data and application/vnd.yang.data)
- PUT operation was changed to POST
- POST operation was changed to PUT

There was also added media types due to Bug 165 :
- application/json
- application/xml
- text/xml

Change-Id: I6ff6c55c272cef0b63d5795d5b9842db83f1b627
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoJson with prefix for augmented elements
Jozef Gloncak [Tue, 26 Nov 2013 15:32:47 +0000 (16:32 +0100)]
Json with prefix for augmented elements

Json elements which are created via augmentation are written with
prefix which is equal to module name from where augmentation was defined.

Change-Id: I92b7e2854cea3abf052f9fadc2783d29f1e82391
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge changes I0f752636,Idd154499,Ic35fa3e8
Ed Warnicke [Tue, 26 Nov 2013 14:35:34 +0000 (14:35 +0000)]
Merge changes I0f752636,Idd154499,Ic35fa3e8

* changes:
  Updated xml generated by get netconf operation to conform to yang schema in config-api
  Add logback as a default config module.
  Fix logging of yang parsing problems in yang-parser-impl

10 years agoMerge "Better exception message in persister. Split information about missing capabil...
Ed Warnicke [Tue, 26 Nov 2013 14:23:32 +0000 (14:23 +0000)]
Merge "Better exception message in persister. Split information about missing capabilities into log message, and exception that only contains missing capabilities."

10 years agoMerge "Update context-instance xpath format according to latest changes in config...
Ed Warnicke [Tue, 26 Nov 2013 14:06:16 +0000 (14:06 +0000)]
Merge "Update context-instance xpath format according to latest changes in config-api yang."

10 years agoMerge "Null data from XML"
Ed Warnicke [Tue, 26 Nov 2013 14:04:46 +0000 (14:04 +0000)]
Merge "Null data from XML"

10 years agoMerge changes I50218f21,I6bc2631b
Ed Warnicke [Tue, 26 Nov 2013 14:03:22 +0000 (14:03 +0000)]
Merge changes I50218f21,I6bc2631b

* changes:
  Serialization to Json improvement
  Union type processing added to JsonMapper

10 years agoMerge "Bug 164"
Ed Warnicke [Tue, 26 Nov 2013 14:02:25 +0000 (14:02 +0000)]
Merge "Bug 164"

10 years agoBetter exception message in persister.
Tomas Olvecky [Tue, 26 Nov 2013 13:39:46 +0000 (14:39 +0100)]
Better exception message in persister.
Split information about missing capabilities into log message, and exception that only contains missing capabilities.

Change-Id: I5673542d14b3b8cd3ea4bcb6e0166566e9a105b8
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoSerialization to Json improvement
msunal [Tue, 26 Nov 2013 11:41:10 +0000 (12:41 +0100)]
Serialization to Json improvement

- During serialization of List and LeafList is not get parent from composite node
but he is added as a parameter

Change-Id: I50218f2132eb571c3faf103f7914e2f49f735bf6
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoUpdated xml generated by get netconf operation to conform to yang schema in config-api
Maros Marsalek [Tue, 26 Nov 2013 09:15:54 +0000 (10:15 +0100)]
Updated xml generated by get netconf operation to conform to yang schema in config-api

Change-Id: I0f7526369840eb83fdd83aba2459365ccbd9fd16
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoMerge changes I4ba7cf7d,Ia3e319ee
Ed Warnicke [Mon, 25 Nov 2013 17:48:58 +0000 (17:48 +0000)]
Merge changes I4ba7cf7d,Ia3e319ee

* changes:
  Allow multiple services provided from same namespace parsed from netconf message
  Fix no response from netconf server if no operation is available to handle message.

10 years agoUpdate context-instance xpath format according to latest changes in config-api yang.
Maros Marsalek [Mon, 25 Nov 2013 10:25:34 +0000 (11:25 +0100)]
Update context-instance xpath format according to latest changes in config-api yang.

Change-Id: I7b432ecf4703617899e5e945e900a54ec479d342
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoBug 164
msunal [Mon, 25 Nov 2013 12:14:57 +0000 (13:14 +0100)]
Bug 164

- if URI has bad format then error status 400 is returned
- corrected xtend conventions: triple equals for null

Change-Id: Idfa58e21942506b7483ca6ecf19aedfd1c1de827
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoNull data from XML
Jozef Gloncak [Mon, 25 Nov 2013 09:42:58 +0000 (10:42 +0100)]
Null data from XML

In case of reading data from XMl to Composite node following rule was
added:
- XML with opening and closing tag without data is mapped to single node
  with empty string
  (e. g. <foo></foo> -> single node with empty string)
- XML with only closing tag is mapped to single node with null value (e.
  g. <foo /> -> single node with null value)

Change-Id: I17ba4387949dd3cfe943999829dbcc63a29fbac8
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoUnion type processing added to JsonMapper
Jozef Gloncak [Fri, 22 Nov 2013 09:00:19 +0000 (10:00 +0100)]
Union type processing added to JsonMapper

if data type according to schema is union then data from single node are validated as follows:
- if simple node value is null -> [null] is written to JSON
- if simple node value is number and union yang contains one of number types ->
  number is written to JSON
- if simple node value si true or false and union yang contains BooleanType ->
  true or false is written to JSON
- other cases are written to JSON as string (inside "")

Change-Id: I6bc2631bc9b018e9497464fac4efbc5abc726882
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "Add prefixes to type attribute in generated xml from netconf Add support for...
Ed Warnicke [Mon, 25 Nov 2013 09:42:51 +0000 (09:42 +0000)]
Merge "Add prefixes to type attribute in generated xml from netconf Add support for parsing prefixed type attributes from incomming xml to netconf"

10 years agoMerge changes Ia09a1107,I2c30f3b6
Ed Warnicke [Mon, 25 Nov 2013 09:42:21 +0000 (09:42 +0000)]
Merge changes Ia09a1107,I2c30f3b6

* changes:
  Change type of service-ref grouping to service-type-ref from leafref.
  Fix config-netconf-connector needed for interacting with yuma's yangcli.

10 years agoAllow multiple services provided from same namespace parsed from netconf message
Maros Marsalek [Fri, 22 Nov 2013 13:42:38 +0000 (14:42 +0100)]
Allow multiple services provided from same namespace parsed from netconf message

Change-Id: I4ba7cf7d3e728be447066abc3a3c9f871faba954
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoFix no response from netconf server if no operation is available to handle message.
Maros Marsalek [Fri, 22 Nov 2013 13:08:30 +0000 (14:08 +0100)]
Fix no response from netconf server if no operation is available to handle message.

Change-Id: Ia3e319ee6b9d224a92def7652ed50f4ae7021b4a
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoAdd prefixes to type attribute in generated xml from netconf
Maros Marsalek [Thu, 21 Nov 2013 16:50:31 +0000 (17:50 +0100)]
Add prefixes to type attribute in generated xml from netconf
Add support for parsing prefixed type attributes from incomming xml to netconf

Prefixed type attribute conforms to config api defined in yang

Change-Id: I4516ddb97d3fcfaab50f3402edb4a6e1bd6505cf
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agoChange type of service-ref grouping to service-type-ref from leafref.
Tomas Olvecky [Thu, 21 Nov 2013 16:07:26 +0000 (17:07 +0100)]
Change type of service-ref grouping to service-type-ref from leafref.

Also fix bug in config-netconf-connector where edit strategy was in global scope.

Change-Id: Ia09a11078c87ffa4c6fa8de34f0b69b438b6c50e
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoFix config-netconf-connector needed for interacting with yuma's yangcli.
Tomas Olvecky [Thu, 21 Nov 2013 12:29:09 +0000 (13:29 +0100)]
Fix config-netconf-connector needed for interacting with yuma's yangcli.

Mitigate issue when yuma is sending services/service/type with a prefix that is not referenced anywhere - it will be ignored.
When issuing edit-config with merge strategy, populate services as they appear in get-config.

Change-Id: I2c30f3b626fc25cfd3b46225d5f1c24109d655b7
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoResponse for PUT and POST operations
msunal [Wed, 20 Nov 2013 16:49:08 +0000 (17:49 +0100)]
Response for PUT and POST operations

- added response as is written in http://tools.ietf.org/html/draft-bierman-netconf-restconf-02#page-37
- tests

Change-Id: Ice0a698f08b7512ea7ee29c1a534bff068e3b6bd
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoMerge "tests for empty leaf, namespace changing, multi simple node"
Ed Warnicke [Wed, 20 Nov 2013 16:07:25 +0000 (16:07 +0000)]
Merge "tests for empty leaf, namespace changing, multi simple node"

10 years agoMerge "Dispose HashedWheelTimer instances properly in netconf client and server"
Ed Warnicke [Wed, 20 Nov 2013 16:05:11 +0000 (16:05 +0000)]
Merge "Dispose HashedWheelTimer instances properly in netconf client and server"

10 years agoDispose HashedWheelTimer instances properly in netconf client and server
Maros Marsalek [Wed, 20 Nov 2013 09:46:49 +0000 (10:46 +0100)]
Dispose HashedWheelTimer instances properly in netconf client and server

Prevents resource leak exception from netty

Change-Id: I1c12806382ee5d5edf394c2ad5f81c5b0f282fdd
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
10 years agotests for empty leaf, namespace changing, multi simple node
Jozef Gloncak [Wed, 20 Nov 2013 12:26:53 +0000 (13:26 +0100)]
tests for empty leaf, namespace changing, multi simple node

following tests were added
- N elements in leaf list are red as N simple node instances
- Json [null] value is translated to simple node with null value
- for composite node for which were updated namespaces of its childs
  can't be namespaces changed again

Change-Id: Ibfb28b1b6fdaff49a7cf38531b058f8b0a79c524
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge changes Ibc19654a,I17a345ea,Id0377e20
Ed Warnicke [Tue, 19 Nov 2013 19:05:58 +0000 (19:05 +0000)]
Merge changes Ibc19654a,I17a345ea,Id0377e20

* changes:
  test of namespace suplement (from xml)
  test of namespace supplement
  Xml -> Composite node test

10 years agoMerge "Json to composite node test"
Ed Warnicke [Tue, 19 Nov 2013 18:02:53 +0000 (18:02 +0000)]
Merge "Json to composite node test"

10 years agotest of namespace suplement (from xml)
Jozef Gloncak [Tue, 19 Nov 2013 10:44:23 +0000 (11:44 +0100)]
test of namespace suplement (from xml)

Change-Id: Ibc19654ab3decb6d9eb6a093cf0a00304503690b
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agotest of namespace supplement
Jozef Gloncak [Tue, 19 Nov 2013 08:47:40 +0000 (09:47 +0100)]
test of namespace supplement

test suplement of namespace when data are red from json file. to obtain
correct namespace the corresponding yang file is loaded and to supplement
it to composite node the method createConfigurationData of RestconfImpl
class is used

Change-Id: I17a345eabe1d4b9e5fd86693a96b6bfdceda25f2
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoXml -> Composite node test
Jozef Gloncak [Mon, 18 Nov 2013 13:25:14 +0000 (14:25 +0100)]
Xml -> Composite node test

Test for empty xml elements (for leaf, leaf list), for container(list)
which contains as subnodes leaf, leaflist, container, list.

Change-Id: Id0377e20b77761ad7af15cacc641459483ecef8b
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoJson to composite node test
Jozef Gloncak [Mon, 18 Nov 2013 09:12:32 +0000 (10:12 +0100)]
Json to composite node test

contains tests for:
- elements leaf, leaf list, list, container under list or container
- json top level elements check
- check of read empty simple data like leaf, leaf list

Change-Id: I6826cb32415fc135eb7f966f7325c5d15e21ac1a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "fix of Bug 149"
Ed Warnicke [Tue, 19 Nov 2013 14:16:32 +0000 (14:16 +0000)]
Merge "fix of Bug 149"

10 years agoMerge "added own XML to Composite node translation"
Ed Warnicke [Tue, 19 Nov 2013 14:14:58 +0000 (14:14 +0000)]
Merge "added own XML to Composite node translation"

10 years agoMerge "fix of Bug 145"
Ed Warnicke [Tue, 19 Nov 2013 14:08:00 +0000 (14:08 +0000)]
Merge "fix of Bug 145"

10 years agofix of Bug 145
msunal [Mon, 18 Nov 2013 10:05:35 +0000 (11:05 +0100)]
fix of Bug 145

- https://bugs.opendaylight.org/show_bug.cgi?id=145
- Broker service is tracked by ServiceTracker

Change-Id: I32358e13fa5b356ed77b842c96127a51c29bc018
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agofix of Bug 149
msunal [Mon, 18 Nov 2013 16:05:40 +0000 (17:05 +0100)]
fix of Bug 149

- added missing providers

Change-Id: I2024ddc371b8e079e770c8e7700c9124ddb411b0
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoadded own XML to Composite node translation
msunal [Mon, 18 Nov 2013 13:55:07 +0000 (14:55 +0100)]
added own XML to Composite node translation

- JsonReader is used for translation of XML to CompositeNode.
It creates CompositeNode and its structure with CompositeNodeWrapper and SimpleNodeWrapper
implementations. It allows to add namespaces after translation.

Change-Id: Ib0d8fef54befe791f53901785688c2dc2bd5bb8a
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoMerge "Added parsing of namespace in Json"
Ed Warnicke [Sat, 16 Nov 2013 05:11:49 +0000 (05:11 +0000)]
Merge "Added parsing of namespace in Json"

10 years agoMerge "Config-netconf: Remove unnecessary capability advertistments from hello message"
Ed Warnicke [Sat, 16 Nov 2013 05:10:21 +0000 (05:10 +0000)]
Merge "Config-netconf: Remove unnecessary capability advertistments from hello message"

10 years agoAdded parsing of namespace in Json
msunal [Fri, 15 Nov 2013 15:16:11 +0000 (16:16 +0100)]
Added parsing of namespace in Json

- if Json element contains namespace ( namespace:elementName ) then it is added to Node
- added test for status 404 in XML part

Change-Id: I376e1d997bb0e74b64545c8099fab13ceb12d7d1
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoConfig-netconf: Remove unnecessary capability advertistments from hello message
Tomas Olvecky [Fri, 15 Nov 2013 14:33:05 +0000 (15:33 +0100)]
Config-netconf: Remove unnecessary capability advertistments from hello message

Change-Id: I207f6c7ae57b983f8fdca39512da0ef917d5dfe6
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
10 years agoMerge "Test composite node with empty conts and lists to Json"
Ed Warnicke [Fri, 15 Nov 2013 12:45:43 +0000 (12:45 +0000)]
Merge "Test composite node with empty conts and lists to Json"

10 years agoTest composite node with empty conts and lists to Json
Jozef Gloncak [Thu, 14 Nov 2013 07:24:19 +0000 (08:24 +0100)]
Test composite node with empty conts and lists to Json

Method for building composite node with empty elements (containers, lists)
was added.

Change-Id: I153fdba11b379d5cc7bd35907e530ff54c2d4a30
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "Added Json to CompositeNode translation"
Ed Warnicke [Thu, 14 Nov 2013 16:50:44 +0000 (16:50 +0000)]
Merge "Added Json to CompositeNode translation"

10 years agoAdded Json to CompositeNode translation
msunal [Thu, 14 Nov 2013 13:50:51 +0000 (14:50 +0100)]
Added Json to CompositeNode translation

- added JsonReader.java to provide translation from Json (InputStream) to CompositeNode
- Json has to be in one of these two formats:
  {"foo":{....}} for Container foo
  {"foo":[{....}]} for List foo
- added preconditions to translation from Node to Json:
  Data of Container and List has to be represented as CompositeNode
  Data of LeafList and Leaf has to be represented as SimpleNode
- request for unexisting data has response - not found 404

Change-Id: I9f2a07a0d333b09803606e0e4275bdf39d2cdce5
Signed-off-by: Martin Sunal <msunal@cisco.com>
10 years agoYang and XML conversion to Json test with equals
Jozef Gloncak [Mon, 11 Nov 2013 10:55:07 +0000 (11:55 +0100)]
Yang and XML conversion to Json test with equals

Remove of tests for Yang + XML to Json conversion.
- Test with uses equals method do compare and which read json
data to specific structures (test of list, leaves, leaflists, container)
- Test for testing conversion of yang data types (boolean, uint8...) to json

Change-Id: I672964ec8042d1ed5d7b0dfade76f5c7224d045c
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
10 years agoMerge "Write first CompositeNode into Json"
Ed Warnicke [Tue, 12 Nov 2013 16:46:08 +0000 (16:46 +0000)]
Merge "Write first CompositeNode into Json"