netconf.git
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 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 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>
9 years agoBUG 2412 - restconf @GET getModule(uri) method migration
Vaclav Demcak [Tue, 24 Feb 2015 16:34:02 +0000 (17:34 +0100)]
BUG 2412 - restconf @GET getModule(uri) method migration

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

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

Change-Id: I9327badeac38a82c9e50721dc47338fc7ae164a1
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2412 - Restconf migration - marking deprecated classes
Vaclav Demcak [Tue, 24 Feb 2015 13:33:44 +0000 (14:33 +0100)]
BUG 2412 - Restconf migration - marking deprecated classes

* mark basic deprecated classes and functionality which has to
be overwirte by this commit chain.

New faster Infrastructure API works with NormizedNodeContext
and it provides read/write REST msg body (JSON & XML) direct
to NormalizedNodeContext. So we have to replace all places
where we use StructuredData, CompositeNode, NodeWrapper and
all relevant REST codecs (e.g. XmlToCompositeNodeProvider...)

Change-Id: I33ff24e5a8de2876dfdb6ea263fc9cb659fc3db8
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBug 2365: YIN Schema download support for Restconf
Vaclav Demcak [Tue, 24 Feb 2015 12:27:55 +0000 (13:27 +0100)]
Bug 2365: YIN Schema download support for Restconf

Implementation of Restconf 03 Draft Schema download
functionality with additional support for downloading
runtime-generated YIN schema and mount points.

Introduced new endpoints which are:
  /restconf/modules/module/{module}/{revision}/schema

and
  /restconf/modules/module/{mount}/{module}/{revision}/schema

For downloading supplied YANG module in YIN format (default)
or YANG format if Accept header contains application/yang
mime-type.

depends on:
yangtools -  https://git.opendaylight.org/gerrit/#/c/15258/

patch set 3:
 * SchemaExportContentYniBodyWriter : fix reference YinUtils
to YinExportUtils
 * create RestconfValidationUtils + move validation from
SchemaRetrievalServiceImpl
 * pom.xml - add private package
                org.opendaylight.controller.md.sal.rest.common

Change-Id: Ibd2956472ad35d13cb65e305df377f98518b4738
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "Bug 2731: Discard changes only when transaction exist."
Tony Tkacik [Tue, 24 Feb 2015 09:39:34 +0000 (09:39 +0000)]
Merge "Bug 2731: Discard changes only when transaction exist."

9 years agoMerge "Fix race condition in get/get-config netconf rpcs for config subsystem"
Tony Tkacik [Tue, 24 Feb 2015 08:50:15 +0000 (08:50 +0000)]
Merge "Fix race condition in get/get-config netconf rpcs for config subsystem"

9 years agoMerge "Serialize capabilities for notification properly"
Tony Tkacik [Mon, 23 Feb 2015 11:18:23 +0000 (11:18 +0000)]
Merge "Serialize capabilities for notification properly"

9 years agoMerge "BUG-2635 Netconf monitoring for md-sal netconf northbound"
Tony Tkacik [Mon, 23 Feb 2015 11:17:50 +0000 (11:17 +0000)]
Merge "BUG-2635 Netconf monitoring for md-sal netconf northbound"

9 years agoSerialize capabilities for notification properly
Maros Marsalek [Fri, 20 Feb 2015 14:13:03 +0000 (15:13 +0100)]
Serialize capabilities for notification properly

Added and removed capabilities in capabilities change notification were serialized as QName.toString but should be na Uri

Change-Id: Id9783c060ecf45d3a7f506cf605051c779a6d21a
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2635 Netconf monitoring for md-sal netconf northbound
Maros Marsalek [Wed, 18 Feb 2015 16:31:39 +0000 (17:31 +0100)]
BUG-2635 Netconf monitoring for md-sal netconf northbound

Monitoring for mdsal's netconf stores all available monitoring data in the datastore and provides get-schema operation

Change-Id: I573c5d57e5cf25d7688f3355b602327c7af75c65
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix race condition in get/get-config netconf rpcs for config subsystem
Maros Marsalek [Fri, 20 Feb 2015 13:21:26 +0000 (14:21 +0100)]
Fix race condition in get/get-config netconf rpcs for config subsystem

The read and transformation of modules from config subsystem is performed in a couple of steps. Each step queried the config subsystem on its own so it was possible to cause inconsistencies among these steps if get/get-config was executed while another transaction was being committed. This race condition, if hit, caused the rpcs to fail with an exception of a missing MBean.

After recent introduction of "optional reconnect after capability changed" feature into sal-netconf-connector, this race condition caused get rpc invoked by the connector to fail.
Scenario:
odl-netconf-connector-all is installed,
after the loopback is connected any other feature with configuration is installed e.g. odl-restconf-all,
loopback connector reconnects and as it comes back executes get rpc (to query ietf-netconf-monitoring)
get rpc in config-netconf-connector fails to transform the modules into xml due to mentioned race condition as the initial config file for restconf has been pushed

Now the get/get-config read the data from a dedicated transaction started just for the read.
Note: get rpc reads the runtime beans that are part of no transaction, so there is still possibility for this race condition regarding runtime beans.

Change-Id: I0822bc48745f9f680b116095693052dff752dee3
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBug 2731: Discard changes only when transaction exist.
Marian Dubai [Thu, 19 Feb 2015 16:18:14 +0000 (17:18 +0100)]
Bug 2731: Discard changes only when transaction exist.

Change-Id: I2aef83475092e75cc87d3a5edcb37e985ef132f6
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoBUG-2635 Prepare netconf monitoring service for md-sal monitoring.
Maros Marsalek [Fri, 13 Feb 2015 12:32:17 +0000 (13:32 +0100)]
BUG-2635 Prepare netconf monitoring service for md-sal monitoring.

So that the monitoring service provides all the information in one place.

Also move get-schema rpc into netconf-monitoring from netconf-impl.

Change-Id: Ia7dc47ea4997df417795f079a7c045709dbaaf47
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoRemove required source element from Get operation for MDSAL
Maros Marsalek [Thu, 19 Feb 2015 12:53:38 +0000 (13:53 +0100)]
Remove required source element from Get operation for MDSAL

Change-Id: I2c1495dfac8ecad00605f4df98b310b3d99ac4ed
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "Prevent multiple config pushers"
Tony Tkacik [Mon, 23 Feb 2015 08:49:48 +0000 (08:49 +0000)]
Merge "Prevent multiple config pushers"

9 years agoPrevent multiple config pushers
Maros Marsalek [Thu, 19 Feb 2015 10:46:17 +0000 (11:46 +0100)]
Prevent multiple config pushers

Up to this point, it was possible to spawn multiple config pushers.
This was probably already happening with no observable effect other than relatively frequent Optimistic lock failed exceptions from config subsystem.

Change-Id: Idf994c1a184a070a32440c57c5ca55a0740c21d6
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "BUG-2634 Config binding for netconf server"
Tony Tkacik [Thu, 19 Feb 2015 08:09:00 +0000 (08:09 +0000)]
Merge "BUG-2634 Config binding for netconf server"

9 years agoMerge "BUG-2633 - Netconf northbound mapping."
Tony Tkacik [Thu, 19 Feb 2015 08:07:49 +0000 (08:07 +0000)]
Merge "BUG-2633 - Netconf northbound mapping."

9 years agoMerge "BUG-2633 - Added Operation Service Factory Filtering for Netconf."
Tony Tkacik [Thu, 19 Feb 2015 08:07:18 +0000 (08:07 +0000)]
Merge "BUG-2633 - Added Operation Service Factory Filtering for Netconf."

9 years agoBUG-2634 Config binding for netconf server
Maros Marsalek [Mon, 9 Feb 2015 14:44:01 +0000 (15:44 +0100)]
BUG-2634 Config binding for netconf server

MD-SAL based netconf northbound is activated using feature: odl-netconf-mdsal

Change-Id: I6b0ae0db30bb239fcd073883ffe76ff7c5fc0143
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2633 - Netconf northbound mapping.
Maros Marsalek [Mon, 16 Feb 2015 09:36:48 +0000 (10:36 +0100)]
BUG-2633 - Netconf northbound mapping.

Supported operations for now are:
get, get-config - candidate and running datastore, without filtering
edit-config - only on candidate datastore
discard-changes
lock, unlock - supported only for compatibility reasons since we don't support locking of running datastore, and each session has it's own candidate datastore.
commit

Change-Id: Idb0bad09dc1d8925674576290fecb47ccd1e5dbd
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2633 - Added Operation Service Factory Filtering for Netconf.
Maros Marsalek [Mon, 16 Feb 2015 09:36:38 +0000 (10:36 +0100)]
BUG-2633 - Added Operation Service Factory Filtering for Netconf.

Since getting services is done by class name, we needed to add additional filtering by
name to not get controller subsystem netconf operations mixed up with md-sal northbound.

Change-Id: I6aeb161ae0ace977f590d73e4fcb98c0898b1956
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix Guava 18 upgrade issue , Objects to MoreObjects
Kamal Rameshan [Mon, 16 Feb 2015 22:07:17 +0000 (14:07 -0800)]
Fix Guava 18 upgrade issue , Objects to MoreObjects

Change-Id: I0792fc09fa18614b84a7b24601b08b8b3c2c1abf
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
9 years agoBUG-1173: ensure compatibility with Guava 17+
Robert Varga [Mon, 9 Jun 2014 17:35:21 +0000 (19:35 +0200)]
BUG-1173: ensure compatibility with Guava 17+

This migrates the sole user to the Guava-15+ API, as the API is removed
in version 17.

Change-Id: I3bf52fb89116024e7305a142e6b1f6fec9985488
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1173: ensure compatibility with Guava 17+
Robert Varga [Mon, 9 Jun 2014 17:35:21 +0000 (19:35 +0200)]
BUG-1173: ensure compatibility with Guava 17+

This migrates the sole user to the Guava-15+ API, as the API is removed
in version 17.

Change-Id: Ia587465e0289f5d98ec3da83cc3fc6765f8a8b38
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug-2674 Notification support for netconf testtool"
Tony Tkacik [Fri, 13 Feb 2015 09:17:59 +0000 (09:17 +0000)]
Merge "Bug-2674 Notification support for netconf testtool"

9 years agoBug-2674 Notification support for netconf testtool
Maros Marsalek [Mon, 9 Feb 2015 10:40:57 +0000 (11:40 +0100)]
Bug-2674 Notification support for netconf testtool

Change-Id: Ib301e2cccf85d4eae75629ddf681d9157b0cb585
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "BUG-2632 Netconf connector (optionally) reconnects after a schema change is...
Tony Tkacik [Thu, 12 Feb 2015 15:54:19 +0000 (15:54 +0000)]
Merge "BUG-2632 Netconf connector (optionally) reconnects after a schema change is detected"

9 years agoMerge "BUG-2600 Dynamic schemas in netconf server"
Tony Tkacik [Thu, 12 Feb 2015 15:52:54 +0000 (15:52 +0000)]
Merge "BUG-2600 Dynamic schemas in netconf server"

9 years agoBUG-2632 Netconf connector (optionally) reconnects after a schema change is detected
Maros Marsalek [Thu, 5 Feb 2015 14:49:44 +0000 (15:49 +0100)]
BUG-2632 Netconf connector (optionally) reconnects after a schema change is detected

A notification listener is used for schema change detection

Change-Id: Ieab4eaf9e87b2b88dd2dc5429039494c8f9b5731
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2600 Dynamic schemas in netconf server
Maros Marsalek [Tue, 10 Feb 2015 08:15:15 +0000 (09:15 +0100)]
BUG-2600 Dynamic schemas in netconf server

Netconf server does not preserve snapshots of schema contexts for each netconf session anymore

Every netconf session is using current SchemaContext
+ Use notification manager to notify about capability changes

Change-Id: Ie47125e1eb6851b54b09d5e4afe38fee323850de
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier"
Tony Tkacik [Tue, 10 Feb 2015 21:13:46 +0000 (21:13 +0000)]
Merge "BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier"

9 years agoMerge "BUG-2310 - widen yang model for netconf-node."
Tony Tkacik [Tue, 10 Feb 2015 21:13:18 +0000 (21:13 +0000)]
Merge "BUG-2310 - widen yang model for netconf-node."

9 years agoMerge "BUG-2599 Netconf notification manager initial API and Impl"
Tony Tkacik [Tue, 10 Feb 2015 21:06:39 +0000 (21:06 +0000)]
Merge "BUG-2599 Netconf notification manager initial API and Impl"

9 years agoBUG-2599 Netconf notification manager initial API and Impl
Maros Marsalek [Thu, 5 Feb 2015 13:54:40 +0000 (14:54 +0100)]
BUG-2599 Netconf notification manager initial API and Impl

Change-Id: I71569f08aff3738ea7fa4d5f1853079b4a2b0fb5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2310 - widen yang model for netconf-node.
Tomas Cere [Tue, 20 Jan 2015 12:18:07 +0000 (13:18 +0100)]
BUG-2310 - widen yang model for netconf-node.

Netconf datastore is now in topology, added connection state,
resolved/unresolved schemas with failure reasons and host to netconf node.
Deprecated old netconf node in inventory.

Change-Id: Id34a17b82420eaf69d03d72b9a1523210cc87cc2
Signed-off-by: Tomas Cere <tcere@cisco.com>
9 years agoMerge "BUG-2599 Add netconf notifications yang models"
Tony Tkacik [Mon, 9 Feb 2015 10:14:01 +0000 (10:14 +0000)]
Merge "BUG-2599 Add netconf notifications yang models"

9 years agoBUG-2599 Add netconf notifications yang models
Maros Marsalek [Thu, 5 Feb 2015 13:52:34 +0000 (14:52 +0100)]
BUG-2599 Add netconf notifications yang models

Change-Id: Ie35cf3c6cdee89f0bd88ba79b974dff529897809
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoRemove unnecessary declaration of <prerequisites> in netconf
Thanh Ha [Mon, 19 Jan 2015 03:44:27 +0000 (22:44 -0500)]
Remove unnecessary declaration of <prerequisites> in netconf

Bug: 2605
Change-Id: Ibfe6c6329b836361248c6e008be8cd1566bbeec7
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoMerge "BUG-2599 Add base netconf ynag model: ietf-netconf"
Tony Tkacik [Fri, 6 Feb 2015 15:44:01 +0000 (15:44 +0000)]
Merge "BUG-2599 Add base netconf ynag model: ietf-netconf"

9 years agoMerge "Add (un)lock ops to netconf testtool"
Tony Tkacik [Fri, 6 Feb 2015 13:34:49 +0000 (13:34 +0000)]
Merge "Add (un)lock ops to netconf testtool"

9 years agoBUG-2599 Add base netconf ynag model: ietf-netconf
Maros Marsalek [Thu, 5 Feb 2015 13:52:04 +0000 (14:52 +0100)]
BUG-2599 Add base netconf ynag model: ietf-netconf

Change-Id: I6f9bcdb5517f0c0433a943f99cebde4bc5a273bc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoRemoving { } from NormalizedNodeJsonBodyWriter
Vaclav Demcak [Tue, 27 Jan 2015 09:34:01 +0000 (10:34 +0100)]
Removing { } from NormalizedNodeJsonBodyWriter

We'll not need additional starting|ending Json markers by parsing NormalizedNode to stream anymore.
JSON writer has changed to  GSON :
yangtools - https://git.opendaylight.org/gerrit/#/c/13574/11

Patch Set 2: fix imports

Change-Id: I746eaaafa146e6269f2ecc3b1eba6743e717899b
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier
Maros Marsalek [Thu, 5 Feb 2015 09:53:41 +0000 (10:53 +0100)]
BUG-2679 Workaround for wrong nagasena encode/decode with reused transmogrifier

Change-Id: I76b94b896e138e778f0a6abd6d42a481347f1a13
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoAdd (un)lock ops to netconf testtool
Maros Marsalek [Thu, 5 Feb 2015 12:48:17 +0000 (13:48 +0100)]
Add (un)lock ops to netconf testtool

Change-Id: I48ea8e8ce0edeb9428d87f5bcac5ba8d3a2ede22
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agobug 2616 - NPE in ControllerContext.toQName method
Vaclav Demcak [Wed, 21 Jan 2015 09:55:14 +0000 (10:55 +0100)]
bug 2616 - NPE in ControllerContext.toQName method

Method works with globalSchema property without validation and somtimes it could be null.

- add a missing check method call for toQName method
- add a missing check method call for collectPathArguments method (mountpoint - line 549)

Change-Id: I4a568bbeb54720592ef42990d7dcd430df170c12
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "Remove import-package instructions from netconf"
Tony Tkacik [Tue, 20 Jan 2015 16:16:43 +0000 (16:16 +0000)]
Merge "Remove import-package instructions from netconf"

9 years agoRemove import-package instructions from netconf
Maros Marsalek [Tue, 20 Jan 2015 13:32:54 +0000 (14:32 +0100)]
Remove import-package instructions from netconf

The instructuion set gets outdated, use default settings for import all to prevent startup failures.

Change-Id: I387dda9d823c6edc07bccde4f760acf0151093d4
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "findModule method refactoring"
Tom Pantelis [Sat, 17 Jan 2015 19:04:47 +0000 (19:04 +0000)]
Merge "findModule method refactoring"

9 years agoMerge "Fixed missing dependencies in netconf-netty-util."
Tony Tkacik [Fri, 16 Jan 2015 12:50:26 +0000 (12:50 +0000)]
Merge "Fixed missing dependencies in netconf-netty-util."

9 years agoMerge "Increase timeout in config pusher for conflicting version ex"
Tony Tkacik [Fri, 16 Jan 2015 12:49:55 +0000 (12:49 +0000)]
Merge "Increase timeout in config pusher for conflicting version ex"