netconf.git
9 years agoMerge "Fixed NPE when RuntimeRpc could not find module in schemaContext."
Tony Tkacik [Wed, 8 Apr 2015 09:10:09 +0000 (09:10 +0000)]
Merge "Fixed NPE when RuntimeRpc could not find module in schemaContext."

9 years agoMerge "BUG 2889 : migration of netconf-cli to NormalizedNode api's"
Tony Tkacik [Wed, 8 Apr 2015 09:09:47 +0000 (09:09 +0000)]
Merge "BUG 2889 : migration of netconf-cli to NormalizedNode api's"

9 years agoMerge "Bug 2942: odl-mdsal-apidocs feature is not protected through AAA"
Tom Pantelis [Tue, 7 Apr 2015 14:01:54 +0000 (14:01 +0000)]
Merge "Bug 2942: odl-mdsal-apidocs feature is not protected through AAA"

9 years agoFixed NPE when RuntimeRpc could not find module in schemaContext.
Tomas Cere [Tue, 7 Apr 2015 13:15:58 +0000 (15:15 +0200)]
Fixed NPE when RuntimeRpc could not find module in schemaContext.

Change-Id: I40c72d413f23753e95fd5f0bb42cc78046a6494f
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoBug 2942: odl-mdsal-apidocs feature is not protected through AAA
Ryan Goulding [Fri, 3 Apr 2015 14:44:59 +0000 (10:44 -0400)]
Bug 2942: odl-mdsal-apidocs feature is not protected through AAA

This change enforces AAA on the URL endpoints supported by odl-mdsal-apidocs.
The security model prohibits any access to the controller without
authentication.  This change mandates AAA for odl-mdsal-apidocs URLs.

Change-Id: I74226e702568077d769353d5fe49fe21cd187266
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
9 years agoMerge "BUG 2743 - Added support for runtime RPC's to netconf mdsal northbound."
Tony Tkacik [Mon, 30 Mar 2015 08:27:43 +0000 (08:27 +0000)]
Merge "BUG 2743 - Added support for runtime RPC's to netconf mdsal northbound."

9 years agoMerge "Increase default negotiation timeout for netconf server to 30s"
Tony Tkacik [Mon, 30 Mar 2015 08:25:17 +0000 (08:25 +0000)]
Merge "Increase default negotiation timeout for netconf server to 30s"

9 years agoMerge "BUG-1567 Expose sources for submodules in netconf"
Tony Tkacik [Mon, 30 Mar 2015 08:20:45 +0000 (08:20 +0000)]
Merge "BUG-1567 Expose sources for submodules in netconf"

9 years agoMerge "BUG-2877: Allow hello message with no namespace"
Tony Tkacik [Mon, 30 Mar 2015 08:19:46 +0000 (08:19 +0000)]
Merge "BUG-2877: Allow hello message with no namespace"

9 years agoBUG 2889 : migration of netconf-cli to NormalizedNode api's
Tomas Cere [Mon, 23 Mar 2015 16:13:47 +0000 (17:13 +0100)]
BUG 2889 : migration of netconf-cli to NormalizedNode api's

Change-Id: I5311a5c37ed5b5be214ab9aa4e7328df3470fde1
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoMerge "BUG-2424 Bump mina sshd-core version to 0.14"
Tony Tkacik [Fri, 27 Mar 2015 12:40:28 +0000 (12:40 +0000)]
Merge "BUG-2424 Bump mina sshd-core version to 0.14"

9 years agoBUG-1567 Expose sources for submodules in netconf
Maros Marsalek [Fri, 27 Mar 2015 10:24:54 +0000 (11:24 +0100)]
BUG-1567 Expose sources for submodules in netconf

Yang submodules were not exposed by netconf monitoring in netconf server (for
both config and mdsal servers).

Change-Id: I7adfa5ccf20199a8b8310286ef5194af8545b2e8
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2877: Allow hello message with no namespace
Maros Marsalek [Tue, 24 Mar 2015 09:38:41 +0000 (10:38 +0100)]
BUG-2877: Allow hello message with no namespace

Several network equipments (such as Cisco routers) do not set the namespace
attribute (xmlns) in their NETCONF messages. Whether this is valid or not is
unclear according to RFC 6241 (NETCONF). This patch improves interoperability
by relaxing the constraint for a namespace in NETCONF hello messages.

Change-Id: Ie3de4fe454adf0d7dfd3d11eaacacf5d03736502
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2424 Bump mina sshd-core version to 0.14
Maros Marsalek [Wed, 25 Mar 2015 10:10:19 +0000 (11:10 +0100)]
BUG-2424 Bump mina sshd-core version to 0.14

The 0.14 version includes fix for following issue:
https://issues.apache.org/jira/browse/SSHD-393

It caused the transfer over ssh to freeze completely when sending big messages
e.g. 8Mb

Tested using connection between ODL and netconf-testtool transfering yang schema
with size of 40Mb.

Change-Id: I8a2dc38f0feed30a0f6b6c4197e9a546df16491b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoIncrease default negotiation timeout for netconf server to 30s
Maros Marsalek [Tue, 24 Mar 2015 12:33:54 +0000 (13:33 +0100)]
Increase default negotiation timeout for netconf server to 30s

5s is a bit too short. especially when testing.

Change-Id: I47a1ccedab596c78e9d1ba314679d0b542722889
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG 2743 - Added support for runtime RPC's to netconf mdsal northbound.
Tomas Cere [Mon, 2 Mar 2015 09:50:47 +0000 (10:50 +0100)]
BUG 2743 - Added support for runtime RPC's to netconf mdsal northbound.

Change-Id: I7f978502926c47535efc074a0522f6cfc0a3c3a5
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoMerge "BUG-2878: Add the XML declaration to every outgoing NETCONF message."
Tony Tkacik [Mon, 23 Mar 2015 11:05:09 +0000 (11:05 +0000)]
Merge "BUG-2878: Add the XML declaration to every outgoing NETCONF message."

9 years agoMerge "BUG-2801: Added filtering for get and getConfig in netconf mdsal northbound."
Tony Tkacik [Mon, 23 Mar 2015 10:06:39 +0000 (10:06 +0000)]
Merge "BUG-2801: Added filtering for get and getConfig in netconf mdsal northbound."

9 years agoMerge "BUG-2837 Check netconf base 1.1 capability correctly"
Tony Tkacik [Mon, 23 Mar 2015 10:05:22 +0000 (10:05 +0000)]
Merge "BUG-2837 Check netconf base 1.1 capability correctly"

9 years agoBUG-2801: Added filtering for get and getConfig in netconf mdsal northbound.
Tomas Cere [Mon, 9 Mar 2015 15:26:39 +0000 (16:26 +0100)]
BUG-2801: Added filtering for get and getConfig in netconf mdsal northbound.

Change-Id: I37db2b21712c7b3d16c6b9dafa193a3fb9df4430
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoBUG-2837 Check netconf base 1.1 capability correctly
Maros Marsalek [Fri, 20 Mar 2015 14:19:06 +0000 (15:19 +0100)]
BUG-2837 Check netconf base 1.1 capability correctly

Check the entire URI for netconf base 1.1 presence in hello message

Change-Id: Ida5f9bf3445b24c2945c2ac583f53806f4c1e01f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2878: Add the XML declaration to every outgoing NETCONF message.
Gwenael Lambrouin [Fri, 20 Mar 2015 14:02:31 +0000 (15:02 +0100)]
BUG-2878: Add the XML declaration to every outgoing NETCONF message.

Cisco routers expect that NETCONF messages are prefixed by the XML declaration
<?xml version="1.0" encoding="UTF-8"?>. Else, they close the NETCONF/SSH
connection and log an error such as "NETCONF-ERROR: parse error before hello seen".

This patch adds the XML declaration to every outgoing NETCONF message so that
Cisco routers accept NETCONF messages coming from the OpenDaylight controller.

This is a workaround for the sake of interoperability: according to RFC 6241,
the XML declaration is optional so Cisco routers should accept NETCONF messages
without XML declaration. See RFC 6241 section 3 "XML Considerations":

   A NETCONF message MAY begin with an XML declaration (see Section 2.8
   of [W3C.REC-xml-20001006]).

Change-Id: I04a8b61a8fcef6738e8a4552f0560aa319add014
Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@b-com.com>
9 years agoMerge "Fix modules Restconf call for mounted devices"
Tony Tkacik [Thu, 19 Mar 2015 21:16:38 +0000 (21:16 +0000)]
Merge "Fix modules Restconf call for mounted devices"

9 years agoMerge "Increase IDLE timeout for ssh netconf server"
Tony Tkacik [Thu, 19 Mar 2015 21:04:28 +0000 (21:04 +0000)]
Merge "Increase IDLE timeout for ssh netconf server"

9 years agoBUG 2412 - Remove CompositeNode from sal-dom-*
Jan Hajnar [Mon, 16 Mar 2015 11:00:21 +0000 (12:00 +0100)]
BUG 2412 - Remove CompositeNode from sal-dom-*

* removed CompositeNodes from sal-dom-broker
* removed deprecated services from sal-dom-broker
* removed deprecated services from sal-dom-api
* removed deprecated api calls from sal-binding-broker tests and
sal-dom-spi

Change-Id: Iae44e5c0acd0ad602bf98b9961fcd808657ac07b
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBUG 2412 - remove CompositeNode from sal-binding-dom-it
Jan Hajnar [Wed, 18 Mar 2015 14:23:37 +0000 (15:23 +0100)]
BUG 2412 - remove CompositeNode from sal-binding-dom-it

* removed all CompositeNodes from tests which used it. Tests have to be
rewriten with NormalizedNodes ASAP.

Change-Id: Ib666f9fb9de9fc35e1be554cb630ea5f01f6617e
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBUG 2412 remove CompositeNode from RestconfImpl codeBase
Jan Hajnar [Wed, 18 Mar 2015 16:27:51 +0000 (17:27 +0100)]
BUG 2412 remove CompositeNode from RestconfImpl codeBase

* remove all references for CompositeNode from Restconf codeBase
* remove all depricated classes from Restconf
* remove all tests which have worked with CompositeNode
 * we would like to fix tests and move to correct place (in yangtools
and controller integration test for JerseyTest suite)

Note: The removed tests are still in git history. A fixes for Test
suite will be realized ASAP (expectation: in next couple of weeks).

Change-Id: I66b423c92e5ff5b34882b92aece54c5f641c070c
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoBug 868: Removed use of CompositeNode Binding Codecs.
Tony Tkacik [Thu, 19 Mar 2015 14:25:34 +0000 (15:25 +0100)]
Bug 868: Removed use of CompositeNode Binding Codecs.

Change-Id: Iaaf22bd8bc788f26814e06873b483bf0424ceaf2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoFix modules Restconf call for mounted devices
Maros Marsalek [Thu, 19 Mar 2015 14:58:39 +0000 (15:58 +0100)]
Fix modules Restconf call for mounted devices

Restconf was relying on the remote devices to contain restconf yang model. Now
Restconf relies on the controller's schema context when it serializes the
modules response.

Change-Id: Ib406d0082a5aafb7e894440ee5f75e5032ea35ba
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoIncrease IDLE timeout for ssh netconf server
Maros Marsalek [Thu, 19 Mar 2015 14:21:17 +0000 (15:21 +0100)]
Increase IDLE timeout for ssh netconf server

We might consider doing unlimitted idle, mina ssh library needs to be checked.

Change-Id: Ia36f61fd89d1d9690e5f6a438247fde0be209404
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Remove RuntimeGeneratedMappingService from config-manager"
Tony Tkacik [Thu, 19 Mar 2015 12:26:19 +0000 (12:26 +0000)]
Merge "Remove RuntimeGeneratedMappingService from config-manager"

9 years agoMerge "fixed restconf notification subscription parsing."
Tony Tkacik [Thu, 19 Mar 2015 08:16:32 +0000 (08:16 +0000)]
Merge "fixed restconf notification subscription parsing."

9 years agoMerge "Reenable netconf-notifications-impl xml tests"
Tony Tkacik [Thu, 19 Mar 2015 08:16:13 +0000 (08:16 +0000)]
Merge "Reenable netconf-notifications-impl xml tests"

9 years agoRemove RuntimeGeneratedMappingService from config-manager
Maros Marsalek [Wed, 18 Mar 2015 11:01:28 +0000 (12:01 +0100)]
Remove RuntimeGeneratedMappingService from config-manager

Replace with BindingRuntimeContext

Change-Id: I8e3ef881898f6ea7b9c3922a3bfaf3094667c644
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Bug 2841: Fixed missing output element in Restconf RPCs"
Ed Warnicke [Wed, 18 Mar 2015 16:08:55 +0000 (16:08 +0000)]
Merge "Bug 2841: Fixed missing output element in Restconf RPCs"

9 years agoBug 2841: Fixed missing output element in Restconf RPCs
Tony Tkacik [Tue, 17 Mar 2015 11:12:09 +0000 (12:12 +0100)]
Bug 2841: Fixed missing output element in Restconf RPCs

JAXRS Body Writers reused root data container writeout
for RPC outputs, which differed and writed "data"
container instead of rpc "output", refactored writeTo
method, to do this special handling.

Change-Id: Ia6acf671b760c9aa578a02ce803c99a389030260
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-2713 Extract capability implementations into util
Maros Marsalek [Mon, 16 Mar 2015 12:22:03 +0000 (13:22 +0100)]
BUG-2713 Extract capability implementations into util

Identical implementations all over the place are now in 2 classes in
netconf-util

Change-Id: Ibc2aa78edb581654da1ac890d109d2f32cf94738
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoReenable netconf-notifications-impl xml tests
Maros Marsalek [Mon, 16 Mar 2015 13:20:02 +0000 (14:20 +0100)]
Reenable netconf-notifications-impl xml tests

The tests were disabled due to improper configuration for XMLUtil.
The configuration is fine now.

Change-Id: I59fe1081ac927596fc55079e62088cceb5b52811
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2839: remove dependencies on commons-io
Robert Varga [Fri, 13 Mar 2015 12:11:50 +0000 (13:11 +0100)]
BUG-2839: remove dependencies on commons-io

Replaces uses of IOUtils methods with guava/JDK equivalents.

Change-Id: I16ece0feec2f4dc84c3be91ec675a0294cffcffb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2845: Temporarily ignore RestPutOperationTest
Tom Pantelis [Fri, 13 Mar 2015 03:49:03 +0000 (23:49 -0400)]
Bug 2845: Temporarily ignore RestPutOperationTest

RestPutOperationTest is frequently failing the verify builds so
setting to Ignore until the issue is fixed.

Change-Id: I134a6d73930cd104225a27880e87867026f35f03
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoBug 2834: Fix Restconf POST to wait for completion
Ryan Goulding [Fri, 13 Mar 2015 15:15:32 +0000 (11:15 -0400)]
Bug 2834: Fix Restconf POST to wait for completion

This changeset introduces a blocking mechanism for Restconf POST to ensure that
the transaction completes before a response is returned, as is consistent with
Restconf PUT behavior.  checkedGet() is utilized to ensure write transaction
completion.

Change-Id: I74f68b883f6037ec62644a468d3cbb9370d8d25f
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
9 years agoMerge "BUG-2596 Workaround for scheduled-threadpool module"
Tony Tkacik [Fri, 13 Mar 2015 12:28:31 +0000 (12:28 +0000)]
Merge "BUG-2596 Workaround for scheduled-threadpool module"

9 years agoBUG-2596 Workaround for scheduled-threadpool module
Maros Marsalek [Fri, 13 Mar 2015 10:39:28 +0000 (11:39 +0100)]
BUG-2596 Workaround for scheduled-threadpool module

Register the scheduled-threadpool as all available service types in initial
config.

Change-Id: If7929fbb9996f0ea8902d50e2c71875d343f229f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix bug 2821 - restconf RPC parsing returns http status 500
Vaclav Demcak [Wed, 11 Mar 2015 13:13:22 +0000 (14:13 +0100)]
Fix bug 2821 - restconf RPC parsing returns http status 500

Note: RpcDefinition is a direct child of SchemaNode and we are not able to
use it as DataSchemaNode or SchemaContext. In next RpcDefinition hasn't any
child except Input & Output ContainerNodes. So we are using RpcDefinition
for SchemaNode as a marker in InstanceIdentfierContext.

* json input read @Provider has to change RpcDefinition SchemaNode
to Input ContainerSchemaNode for a correct parsing RPC input data from stream

* no-payload Rpc - Rpc Call could be without payload, but jersey always does
to parse empty stream to NormalizedNode so we add check for stream.available
before start parsing input NormalizedNode from stream and return NNContext
with null data. All checks for data exist have to be implemented for every
method with NormalizedNodeContext.

* fix RpcOutput NormalzidNodeContext in RestconfImpl - we expect to have
RpcDefinition as reultNodeSchema and data are payloaded inside as Output obj.

* fix NormalizedNodeJsonBodyWriter and NormalizedNodeXmlBodyWriter for RpcDefinition
- RpcDefinition has no child elements so RpcDefinition.output has to be a root
DataSchemaNode for json parser

* add JsonBodyReader/Writer test suite
* add Xml rpc Writer parser test suite

Change-Id: I31273bee937f57fa1551a33fcc4d6c81b984afb6
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoAdd missing union type builder
Robert Varga [Thu, 12 Mar 2015 16:48:45 +0000 (17:48 +0100)]
Add missing union type builder

This type was missing and should not be generated over and over again.

Change-Id: Ife3e97c2c639e29ca2115429b53e6dec62440db7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agofixed restconf notification subscription parsing.
Jan Hajnar [Wed, 11 Mar 2015 10:56:37 +0000 (11:56 +0100)]
fixed restconf notification subscription parsing.

Change-Id: I7cf7f6fcbe4c45e5a462be6da61907712c4c7784
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoMerge "Fixed testool performance bottleneck due to testtool using NetconfMonitoring...
Tony Tkacik [Wed, 11 Mar 2015 19:28:01 +0000 (19:28 +0000)]
Merge "Fixed testool performance bottleneck due to testtool using NetconfMonitoring from ODL. Added a dummy NetconfMonitoring implementation for testtool."

9 years agoMerge "Remove duplicate dependency declarations"
Tony Tkacik [Wed, 11 Mar 2015 19:27:13 +0000 (19:27 +0000)]
Merge "Remove duplicate dependency declarations"

9 years agoMerge "Fixed failing tests due to different attribute handling in mdsal netconf north...
Tony Tkacik [Wed, 11 Mar 2015 19:27:07 +0000 (19:27 +0000)]
Merge "Fixed failing tests due to different attribute handling in mdsal netconf northbound."

9 years agoMerge "Make logger final"
Tony Tkacik [Wed, 11 Mar 2015 19:25:45 +0000 (19:25 +0000)]
Merge "Make logger final"

9 years agoMerge changes Ic1abe2f7,I9b4bc3ad,If347c979
Tony Tkacik [Wed, 11 Mar 2015 19:25:10 +0000 (19:25 +0000)]
Merge changes Ic1abe2f7,I9b4bc3ad,If347c979

* changes:
  Remove empty javadocs and make strings constant
  Remove unused logger
  Use an ImmutableMap

9 years agoMake logger final
Robert Varga [Wed, 11 Mar 2015 10:18:33 +0000 (11:18 +0100)]
Make logger final

The logger should be marked as final and also be called LOG, not
_logger.

Change-Id: I75f675eec1ee54d659d93aef3e39204a1f7cc920
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove empty javadocs and make strings constant
Robert Varga [Wed, 11 Mar 2015 10:17:50 +0000 (11:17 +0100)]
Remove empty javadocs and make strings constant

Cleans up malformed an empty javadocs and also make string constants
really constant.

Change-Id: Ic1abe2f7c2cb6e6327fde7095742fc0a96ca2e02
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused logger
Robert Varga [Wed, 11 Mar 2015 10:16:47 +0000 (11:16 +0100)]
Remove unused logger

Removes the logger, which is not used anyway. Fixes an eclipse warning.

Change-Id: I9b4bc3ad88107b2b2ba0cd999b89e3105b2b3b65
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse an ImmutableMap
Robert Varga [Wed, 11 Mar 2015 10:10:03 +0000 (11:10 +0100)]
Use an ImmutableMap

ImmutableMap has better lookup characteristics, so use that instead of
wrapping a regular hashmap.

Change-Id: If347c9790640f9802f438d5fa225978a56186805
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove duplicate dependency
Robert Varga [Wed, 11 Mar 2015 11:00:30 +0000 (12:00 +0100)]
Remove duplicate dependency

Fixes a maven warning about duplicate artifacts.

Change-Id: Iccd64ce946ddfbff5b158780d9b29fca7c142521
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDisable unstable netconf-notifications tests
Maros Marsalek [Wed, 11 Mar 2015 14:30:58 +0000 (15:30 +0100)]
Disable unstable netconf-notifications tests

Comment out unreliable lassertions for XML payload comparison.
Proper fix needs to be provided.

Change-Id: I6e32eefb0ccf95e616dd9c236338593f49ff0af3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-1513: migrate users to ChoiceSchemaNode
Robert Varga [Wed, 11 Mar 2015 09:59:11 +0000 (10:59 +0100)]
BUG-1513: migrate users to ChoiceSchemaNode

This migrates all users to the new interface name, cleaning them up as
the data.api and model.api name clash is resolved.

Change-Id: Ibdc317d5ff86c6a895cccdacf6dfea1fb005d9b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove duplicate dependency declarations
Robert Varga [Tue, 10 Mar 2015 08:52:48 +0000 (09:52 +0100)]
Remove duplicate dependency declarations

These are declared twice, producing a maven warning. Remove duplicities.

Change-Id: Ica73b9220c5815e45591cd1d4a7600b432adee5d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2412: Expose Mountpoints on proper path"
Tony Tkacik [Wed, 11 Mar 2015 06:13:38 +0000 (06:13 +0000)]
Merge "Bug 2412: Expose Mountpoints on proper path"

9 years agoMerge "BUG 2805 - Fixed Restconf RPC calls and POST to create data"
Tony Tkacik [Wed, 11 Mar 2015 06:13:12 +0000 (06:13 +0000)]
Merge "BUG 2805 - Fixed Restconf RPC calls and POST to create data"

9 years agoBug 2412: Expose Mountpoints on proper path
Maros Marsalek [Tue, 10 Mar 2015 16:14:08 +0000 (17:14 +0100)]
Bug 2412: Expose Mountpoints on proper path

Lists such as topology, node were not doubled
in the YANG Instance Identifier used as a key for mountpoints,
which prevented Binding compontents from accessing
them.

This patch fixes also bug in restconf, which was
also producing incorrect instance identifiers.

Change-Id: I3122163d00d4c23fcccc4bbffdf3d0113744c98d
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG 2805 - Fixed Restconf RPC calls and POST to create data
Maros Marsalek [Tue, 10 Mar 2015 10:19:33 +0000 (11:19 +0100)]
BUG 2805 - Fixed Restconf RPC calls and POST to create data

RPCs now works again with JSON and XML
POST works with data store.

AbstractIdentifierAwareJaxRsProvider and its derivates,
provides InstanceIdentifierContext as was parsed from
RESTCONF URI, along with parsed NormalizedNode.

If operation is create, then parsed NormalizedNode
is used along with InstanceIdentifier context to compute
full InstanceIdentifier for data to be created
and works with these data.

This actually simplified flow in codecs.

Change-Id: I5b12965f35d946087cc57f19a28425b27eb27755
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFixed failing tests due to different attribute handling in mdsal netconf northbound.
Tomas Cere [Tue, 10 Mar 2015 14:49:38 +0000 (15:49 +0100)]
Fixed failing tests due to different attribute handling in mdsal netconf northbound.

Change-Id: I4f3723b9094f953307982ee25019e3736c9d24de
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoMigrate users of AnyXml node to DOMSource
Maros Marsalek [Fri, 6 Mar 2015 13:37:57 +0000 (14:37 +0100)]
Migrate users of AnyXml node to DOMSource

AnyXml node used to wrap Node<?> but now wraps a DOMSource

Change-Id: If4f5845e5a0611d5fe38951dd6afe73d0a6f95bc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFixed testool performance bottleneck due to testtool using NetconfMonitoring from...
Tomas Cere [Mon, 9 Mar 2015 09:23:56 +0000 (10:23 +0100)]
Fixed testool performance bottleneck due to testtool using NetconfMonitoring from ODL.
Added a dummy NetconfMonitoring implementation for testtool.

Change-Id: I4d2eaf955ccac78de135749bd8c2bda3e3d6f35b
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoBug 2412: Fixed reading of JSON using new codecs.
Tony Tkacik [Mon, 9 Mar 2015 16:44:52 +0000 (17:44 +0100)]
Bug 2412: Fixed reading of JSON using new codecs.

Change-Id: I6676fc2f323d0d9152657dcc9b2cdb5f593110e5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoQuickfix: Remove deprecated providers from Restconf Application
Vaclav Demcak [Fri, 6 Mar 2015 13:36:50 +0000 (14:36 +0100)]
Quickfix: Remove deprecated providers from Restconf Application

Jersey 1.17 has problem with multiple Entity providers,
which consumes same content-type and produces different
Entity class. In wiring phase it does not report any problems,
but in runtime it may select incorrect one, which
will result in IllegalArgumentException, which is not
reported.

So in order to unblock most of functionality, legacy
providers are disabled.

This will fix data-store access, but without
subsequent patches RPCs are not usable.

Change-Id: I860e162232d887d13629504421076495a50a075b
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf @POST invokeRpc for notification subscription
Vaclav Demcak [Mon, 9 Mar 2015 13:32:32 +0000 (14:32 +0100)]
BUG 2412 - restconf @POST invokeRpc for notification subscription

* modified notification subscription to work on new api
* added conversion to normalized instance identifier in notification
subscription path
* removed mixin nodes from data change event path
* modified returned paths to skip augmentation identifiers in change
event path
* modified returned location header entry on get stream to use "ws"
protocol

Change-Id: If7f5e92eedbebe0daeb149a38d429a1dcb47c1c9
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf @POST invokeRpc with nopayload method
Vaclav Demcak [Mon, 2 Mar 2015 14:31:15 +0000 (15:31 +0100)]
BUG 2412 - restconf @POST invokeRpc with nopayload method

* migration to new faster Infrastructure API and Codecs for method
@POST invokeRpc(String,String,UriInfo) on @Path {/operations/identifier}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing rpc call method from RestconfService
to use NormalizedNodeContext

* add DOMRpcService -> DOMRpcRouter as rpcRoutingTable holder (it needs to change
in future commit, because we have SchemaContextListener in ControllerContext
and we can have own RpcRoutingTable management there

* fix tests (InvokeRpcMethodTest)
* ignore tests - which are not able to fix now
* remove old codecs from integration test suites to be sure of using corrct codecs

Change-Id: I44119bf0337a1f714991a0e003dabab2da482d23
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf @POST invokeRpc with payload method
Vaclav Demcak [Mon, 2 Mar 2015 14:30:33 +0000 (15:30 +0100)]
BUG 2412 - restconf @POST invokeRpc with payload method

* migration to new faster Infrastructure API and Codecs for method
@POST invokeRpc(String, NormalizedNodeContext,UriInfo)
on @Path {/operations/identifier}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing invokeRpc method from RestconfService
to use NormalizedNodeContext

* add DOMRpcService -> DOMRpcRouter as rpcRoutingTable holder (it
needs to change in future commit, because we have SchemaContextListener
in ControllerContext and we can have own RpcRoutingTable management there
Known issues:
We are ignoring Notification for invokeRpc method for yet.
It has to be fixed asap.

* fix tests (InvokeRpcMethodTest) - prepareDomPayload method create
serious rpc input obj.
* ignore tests - which are not able to fix now

Change-Id: I2e71f4d536a739a8e439ce6320b7e32569d1b0e0
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge changes I4ec69712,I8348002a,I7e6abbf1,Idc2294da
Tony Tkacik [Sun, 8 Mar 2015 22:17:16 +0000 (22:17 +0000)]
Merge changes I4ec69712,I8348002a,I7e6abbf1,Idc2294da

* changes:
  BUG 2412 - restconf @POST createConfigurationData(payload) method migration
  BUG 2412 - restconf @POST createConfigurationData method migration
  BUG 1269 - fill HTTP POST response location attribute
  BUG 2412 - restconf @PUT updateConfigurationData method migration

9 years agoBUG-2314 Migrate netconf-connector to NormalizedNode
Maros Marsalek [Tue, 24 Feb 2015 12:17:00 +0000 (13:17 +0100)]
BUG-2314 Migrate netconf-connector to NormalizedNode

CompositeNodes are wiped out from sal-netconf-connector.

The inital operations performed on a remote netconf device
(e.g. Schema download) is performed using a special schema
context that contains base netconf, netconf monitoring
and netconf notification schemas.

With this schema context, it is possible to also use
normalized nodes.

YangInstanceIdentifier -> NormalizedNode filter structure
is handled by a class named InstanceIdToFilter that was
extracted from deprecated DataNormalizer.

Change-Id: Ibcc399c3ef9413aa4f96dba5b4bb2611db7123a8
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG 2412 - restconf @POST createConfigurationData(payload) method migration
Vaclav Demcak [Mon, 16 Feb 2015 01:08:09 +0000 (02:08 +0100)]
BUG 2412 - restconf @POST createConfigurationData(payload) method migration

* migration to new faster Infrastructure API and Codecs for method
@POST createConfigurationData(NormalizedNodeContext) on @Path {/config}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing createConfigurationData(NormalizedNodeContext) from
RestconfService to use NormalizedNodeContext.

* add fix or comment tests - problem with RestconfDocumentedExceptionMapper
- it has to be fixed in future commit in this chain

Change-Id: I4ec69712535c322ba8bb8ba8be7943589c10d69b
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf @POST createConfigurationData method migration
Vaclav Demcak [Mon, 2 Mar 2015 14:18:03 +0000 (15:18 +0100)]
BUG 2412 - restconf @POST createConfigurationData method migration

* migration to new faster Infrastructure API and Codecs for method
@POST createConfigurationData(String,NormalizedNodeContext,UriInfo)
on @Path {/config/identifier}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing createConfigurationData method from RestconfService
to use NormalizedNodeContext.

* add additional functionality to find a correct child DataSchemaNode
for @POST input payload in XmlNormalizedNodeBodyReader

* add fix or comment tests - problem with RestconfDocumentedExceptionMapper
      - it has to be fixed in future commit in this chain

Change-Id: I8348002aaa817bc4816a0d132f5811fa84eda389
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 1269 - fill HTTP POST response location attribute
Vaclav Demcak [Mon, 2 Mar 2015 14:16:10 +0000 (15:16 +0100)]
BUG 1269 - fill HTTP POST response location attribute

HTTP POST response atribute LOCATION is now filled with URI to top level
data which were inserted via POST HTTP operation.

!!!!!
RestCodec call was added. Not all codecs have String as output of serialize method
(InstanceIdentifier, Identityref). Currently serialize output is
transformed to string via toString method.
!!!!!

Change-Id: I7e6abbf100b2458907a1afd3b0dd96a6c54d5652
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf @PUT updateConfigurationData method migration
Vaclav Demcak [Wed, 11 Feb 2015 14:41:59 +0000 (15:41 +0100)]
BUG 2412 - restconf @PUT updateConfigurationData method migration

* migration to new faster Infrastructure API and Codecs for method
@PUT updateConfigurationData(String, NormalizedNodeContext)
on @Path {/config/identifier}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing updateConfigurationData method from RestconfService
to use NormalizedNodeContext.

* add fix or comment tests - problem with RestconfDocumentedExceptionMapper
  - it has to be fixed in future commit in this chain

Change-Id: Idc2294daed170c9e7dd5a5a0464a961759b34992
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "BUG 2412 - restconf RestconfDocumentedExceptionMapper class migration"
Tony Tkacik [Sun, 8 Mar 2015 15:14:37 +0000 (15:14 +0000)]
Merge "BUG 2412 - restconf RestconfDocumentedExceptionMapper class migration"

9 years agoMerge changes If17aefba,I36d0f5ec
Tony Tkacik [Sun, 8 Mar 2015 15:13:27 +0000 (15:13 +0000)]
Merge changes If17aefba,I36d0f5ec

* changes:
  BUG 2412 - restconf getOperations method migration
  BUG 2412 - restconf mountpoint getOperations method migration

9 years agoMerge topic 'cleanup/composite-node'
Tony Tkacik [Sun, 8 Mar 2015 15:12:48 +0000 (15:12 +0000)]
Merge topic 'cleanup/composite-node'

* changes:
  BUG 2412 - restconf @GET getAvailableStreams(uri) method migration
  Add SchemaContext to NormalizedNode parser in RESTCONF

9 years agoBUG 2412 - restconf getOperations method migration
Vaclav Demcak [Wed, 25 Feb 2015 00:47:50 +0000 (01:47 +0100)]
BUG 2412 - restconf getOperations method migration

* migration to new faster Infrastructure API and Codecs for method
@GET getOperations(UriInfo) on @Path {/operations}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing first method getModule(URI) from RestconfService
to use NormalizedNodeContext.
BUT we are not able follow specification for migration in this case
because, we have to change restconf-netconf yang schema before.

Change-Id: If17aefbaa139ee7f1064b25a8592da76d71c4bc4
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "Fixed build-failure because of undeclared transtive dependency."
Tony Tkacik [Sun, 8 Mar 2015 14:15:02 +0000 (14:15 +0000)]
Merge "Fixed build-failure because of undeclared transtive dependency."

9 years agoBUG 2412 - restconf @GET getAvailableStreams(uri) method migration
Vaclav Demcak [Wed, 11 Feb 2015 12:04:49 +0000 (13:04 +0100)]
BUG 2412 - restconf @GET getAvailableStreams(uri) method migration

* migration to new faster Infrastructure API and Codecs for method
@GET getAvailableStreams(UriInfo) on @Path {/streams}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing getAvaliableStreams(UriInfo) method from RestconfService
to use NormalizedNodeContext.

* fix test suiteRestGetOperationTest

Change-Id: Ibe07c2afa72177a259ed7bb23a47e95369d0c145
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf mountpoint getOperations method migration
Vaclav Demcak [Wed, 25 Feb 2015 00:27:20 +0000 (01:27 +0100)]
BUG 2412 - restconf mountpoint getOperations method migration

* migration to new faster Infrastructure API and Codecs for method
@GET getOperations(String,UriInfo) on @Path {/operations/identifier}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing first method getModule(URI) from RestconfService
to use NormalizedNodeContext.
BUT we are not able follow specification for migration in this case
because, we have to change restconf-netconf yang schema before.

Change-Id: I36d0f5ec88af7c4a9d8b7a2d7ed84ccdbabd9c13
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoAdd SchemaContext to NormalizedNode parser in RESTCONF
Vaclav Demcak [Fri, 6 Mar 2015 13:35:45 +0000 (14:35 +0100)]
Add SchemaContext to NormalizedNode parser in RESTCONF

Correct parsing of identities, instance-identifiers
and others, requires access to full SchemaContext,
not only subset of it.

Migrated to parser factory, which provides that
access in order to correctly deserialize
context-sensitive types.

Change-Id: Ic92b9ce745080076a10d654acaba39e5c59f2b42
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoFixed build-failure because of undeclared transtive dependency.
Tony Tkacik [Sun, 8 Mar 2015 13:26:20 +0000 (14:26 +0100)]
Fixed build-failure because of undeclared transtive dependency.

Change-Id: I1b11a861180437a2f317ee81d8699deaf3a741ba
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Unit Test for md-sal netconf northbound mapping. Tests mapping of netconf...
Tony Tkacik [Thu, 5 Mar 2015 10:16:40 +0000 (10:16 +0000)]
Merge "Unit Test for md-sal netconf northbound mapping. Tests mapping of netconf operations and write/read into datastore."

9 years agoMerge "Fixed discard-changes for mdsal netconf, mapping code cleanup."
Tony Tkacik [Thu, 5 Mar 2015 09:15:26 +0000 (09:15 +0000)]
Merge "Fixed discard-changes for mdsal netconf, mapping code cleanup."

9 years agoExpose proper revision of yang-types model in testtool
Maros Marsalek [Wed, 25 Feb 2015 16:13:00 +0000 (17:13 +0100)]
Expose proper revision of yang-types model in testtool

Also provide the yang model based capabilities in hello message

Change-Id: I56e2dfb48c5e1714bb829f39c1b020159aba95de
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoUnit Test for md-sal netconf northbound mapping.
Tomas Cere [Thu, 12 Feb 2015 15:59:49 +0000 (16:59 +0100)]
Unit Test for md-sal netconf northbound mapping.
Tests mapping of netconf operations and write/read into datastore.

Change-Id: I08aa59d8dfddb94eeddf8e37c8c86290f4a44ef1
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoFixed discard-changes for mdsal netconf, mapping code cleanup.
Tomas Cere [Thu, 26 Feb 2015 12:51:42 +0000 (13:51 +0100)]
Fixed discard-changes for mdsal netconf, mapping code cleanup.

Change-Id: I44a872d8c03b49ed3b6082a97c78c6e94fd77257
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoBug 2763: Fixed JSON serialization of root of mount point
Tony Tkacik [Wed, 25 Feb 2015 13:13:20 +0000 (14:13 +0100)]
Bug 2763: Fixed JSON serialization of root of mount point

Upgrade of yang-data-codec-gson library to use GSON
for streaming and serialization of JSON broke
one special-case which was reading of mount point
root.

This patch migrates NormalizedNodeJsonCodec to
use proper APIs, which allows more explicit control
of how stream is processed.

Change-Id: I0f57e8ef99114a08b1bceb51c47efbcb0546af73
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG 2412 - restconf RestconfDocumentedExceptionMapper class migration
Vaclav Demcak [Fri, 27 Feb 2015 09:31:52 +0000 (10:31 +0100)]
BUG 2412 - restconf RestconfDocumentedExceptionMapper class migration

* RestconfDocumentedException represents all describled error responses
  for Restconf reports. So we have to migrate the ExceptionMapper @Provider
  to new faster Infrastructure API which works with NormozilzedNodeContext.

* ignore "error-info" test + FIXME for 2 ignore test for RPC when expect
  APPLICATION

Change-Id: Ia08772bd68bb406d31034376ecefa09ab291d615
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoFixed compilation breakage in Netconf CLI
Tony Tkacik [Thu, 26 Feb 2015 16:44:15 +0000 (17:44 +0100)]
Fixed compilation breakage in Netconf CLI

Change-Id: I59380b25f50304c18e724ca435a290cba1ddc3c0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG 2412 - restconf @GET getModule(identifier,uri) method migration"
Tony Tkacik [Wed, 25 Feb 2015 09:29:54 +0000 (09:29 +0000)]
Merge "BUG 2412 - restconf @GET getModule(identifier,uri) method migration"

9 years agoMerge "BUG 2412 - restconf @GET getModule(identifier,uri) method migration"
Tony Tkacik [Wed, 25 Feb 2015 09:29:26 +0000 (09:29 +0000)]
Merge "BUG 2412 - restconf @GET getModule(identifier,uri) method migration"

9 years agoMerge "BUG 2412 - restconf @GET getModule(uri) method migration"
Tony Tkacik [Wed, 25 Feb 2015 09:28:42 +0000 (09:28 +0000)]
Merge "BUG 2412 - restconf @GET getModule(uri) method migration"

9 years agoMerge "Removing { } from NormalizedNodeJsonBodyWriter"
Tony Tkacik [Wed, 25 Feb 2015 08:04:44 +0000 (08:04 +0000)]
Merge "Removing { } from NormalizedNodeJsonBodyWriter"

9 years agoBUG 2412 - restconf @GET getModule(identifier,uri) method migration
Vaclav Demcak [Fri, 6 Feb 2015 13:14:09 +0000 (14:14 +0100)]
BUG 2412 - restconf @GET getModule(identifier,uri) method migration

    * migration to new faster Infrastructure API and Codecs for method
    @GET getModules(String,UriInfo) on @Path {/modules/module/identifier}

    New faster Infrastructure API works with NormizedNodeContext and
    we are replacing first method getModule(URI) from RestconfService
    to use NormalizedNodeContext.

Change-Id: I7ae36a13ce4533598bbc3abf73d9090e1922abdb
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - restconf @GET getModule(identifier,uri) method migration
Vaclav Demcak [Fri, 6 Feb 2015 13:01:30 +0000 (14:01 +0100)]
BUG 2412 - restconf @GET getModule(identifier,uri) method migration

* migration to new faster Infrastructure API and Codecs for method
@GET getModules(String,UriInfo) on @Path {/modules/identifier}

New faster Infrastructure API works with NormizedNodeContext and
we are replacing first method getModule(URI) from RestconfService
to use NormalizedNodeContext.

* add yang models for fix tests (mountpoint tests - TestUtility
loads modules from local directory only)

Change-Id: I394d6d31f650e086ce302a0ba973f1e4a4599ef8
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>