mdsal.git
9 years agoPartial fix for Bug 1256
Colin Dixon [Sun, 29 Jun 2014 20:19:44 +0000 (15:19 -0500)]
Partial fix for Bug 1256

Patch 0e12a849d33ae3ca3d1a8e2e281e6eac2cc13373 introduced a test for data normalization
that contained comparators for two kinds of nodes (LegacyNodeData) and (Node<?>) that
provided only a partial ordering of nodes and also failed to obey the semantics of
comparators when it comes to equality.

The result is that several tests were not fully specified and while the appear to run
correctly on Windows and Linux, on recent MacOS versions the ambiguity caused the tests
to fail.

This patch fixes the problem as long as only SimpleNodes and CompositeNodes are used.

Change-Id: If5175025fb97e7b8ddb799b27ad7ae9b5026172d
Signed-off-by: Colin Dixon <colin@colindixon.com>
9 years agoMerge "Bug 1245: Dropped Binding prefix from Binding Data APIs."
Devin Avery [Fri, 27 Jun 2014 16:06:05 +0000 (16:06 +0000)]
Merge "Bug 1245: Dropped Binding prefix from Binding Data APIs."

9 years agoMerge "Bug 1227: Removed #close() from Write Transactions."
Devin Avery [Fri, 27 Jun 2014 15:52:38 +0000 (15:52 +0000)]
Merge "Bug 1227: Removed #close() from Write Transactions."

9 years agoBug 1227: Removed #close() from Write Transactions.
Tony Tkacik [Mon, 23 Jun 2014 14:17:08 +0000 (16:17 +0200)]
Bug 1227: Removed #close() from Write Transactions.

Termination of write transactions was unclear due
to several terminal methods such as commit, cancel
and close.

Close was removed from write transactions and is only
available for read-only transactions.

Termination methods for write transactions are close
 and commit.

Introduced new interfaces for ReadOnly transactions
to clearly distinguish between read capability
of transaction and read-only semantic (which has
close method).

Change-Id: I74b3fd2066a55160da3b674156fc0dc54ba14a67
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Fixed concurrency bug in DOMTransactionChainTest"
Ed Warnicke [Wed, 25 Jun 2014 16:08:24 +0000 (16:08 +0000)]
Merge "Fixed concurrency bug in DOMTransactionChainTest"

9 years agoMerge "Having InMemoryDOMDatastore in its own bundle.To make it configurable using...
Tony Tkacik [Wed, 25 Jun 2014 13:06:39 +0000 (13:06 +0000)]
Merge "Having InMemoryDOMDatastore in its own bundle.To make it configurable using the config subystem. patch 5 changes: md-sal/pom.xml correction"

9 years agoHaving InMemoryDOMDatastore in its own bundle.To make it configurable
Basheeruddin Ahmed [Fri, 20 Jun 2014 06:34:15 +0000 (23:34 -0700)]
Having InMemoryDOMDatastore in its own bundle.To make it configurable
using the config subystem.
patch 5 changes:
md-sal/pom.xml correction

patch 4 changes:
Moved data tree api and impl to yang-tools based on earlier comment

Patch 3 changes:
1. Included sal-inmemory-datastore dependency in TestHelper.java for PaxExam
integration test cases [Weird that it was working earlier and my local controller full build were passing]

Patch 2 changes:
1. Keeping schema service as part of opendaylight-dom-broker-impl for backward comptability scenario
2. Initializing InMemoryDOMDataStore by default if config-dom-datastore and
operation-dom-datastore are not found
3. Updated 01-md-sal.xml based on 1.
4. Regarding the comment of moving data tree in yangtools. It shall be done in
separate patch.

This is done to replace InMemoryDOMDatastore with distributed-datastore

The changes done are:
1. Created a new sal-inmemory-datastore bundle and moved the
store/impl source files from sal-dom-broker and the corresponding
InMemoryDOMDatastore test cases.

2. Created two yang config models in sal-dom-spi that represent
the configurable config-dom-datastore and operational-dom-datastore, that
are of service type DOMStore

3. In opendaylight-dom-broker-impl.yang of sal-dom-broker, in the augment of dom-inmemory-data-broker added two container config-data-store and operational-data-store that refer the service implementations of service defined in sal-dom-spi

4.In sal-inmemory-datastore bundle, created a yang model opendaylight-inmemory-datastore that provide the implementation of the sal-dom-spi service definitions mentioned in 2 -- The implementaions are augmented to have schema-service container required by InMemoryDOMDatastore for registering itself for scheam changes

5. Updated the 01-md-sal.xml with the above changes

6. Update the distribution pom.xml to include sal-inmemory-datastore.

Change-Id: Ib2f0f0556869981e7e60b3eeae9b1e5e6cc96a0f
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
9 years agoMerge "Helium: improve contract with ListenerRegistration"
Tony Tkacik [Wed, 25 Jun 2014 07:04:50 +0000 (07:04 +0000)]
Merge "Helium: improve contract with ListenerRegistration"

9 years agoMerge "BUG 484 Anyxml normalized node"
Tony Tkacik [Tue, 24 Jun 2014 15:27:52 +0000 (15:27 +0000)]
Merge "BUG 484 Anyxml normalized node"

9 years agoBUG 484 Anyxml normalized node
Jozef Gloncak [Mon, 16 Jun 2014 12:22:41 +0000 (14:22 +0200)]
BUG 484 Anyxml normalized node

- DataNormalizationOperation: added AnyXmlNormalization for
  AnyXmlSchemaNode

- Moved DataNormalizerTest to sal-common-impl where the source code
  resides and added more tests including coverage for anyxml.

Originally commited under patch set 9
https://git.opendaylight.org/gerrit/#/c/7337/9 by Tom Pantelis

This commit depends (therefore is commited as draft) on commits:
- Add Anyxml normalized node to yang-data-api -
https://git.opendaylight.org/gerrit/#/c/7771/1
- Implementation of Anyxml builder -
  https://git.opendaylight.org/gerrit/#/c/8061/

Change-Id: I8f6febd1738cde3139cc32d8199d1a87c464ba34
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoFixed concurrency bug in DOMTransactionChainTest
Tony Tkacik [Tue, 24 Jun 2014 07:31:00 +0000 (09:31 +0200)]
Fixed concurrency bug in DOMTransactionChainTest

Delete transaction was commited before read was verified
since transaction commit was done in other thread
there was race-condition between allocating transactions
to verify datastore state.

Change-Id: I1717efbe160e59f42c3baca2f5a5f053d703350e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBut 1129: Removing hard coded versions from MD-SAL
Vaishali Mithbaokar [Thu, 19 Jun 2014 21:48:44 +0000 (14:48 -0700)]
But 1129: Removing hard coded versions from MD-SAL

Change-Id: Ic4ea06f1fd644808946dd5111d38152d19b9bf35
Signed-off-by: Vaishali Mithbaokar <vmithbao@cisco.com>
9 years agoMerge "API Clarity: Documented Async Data Broker APIs."
Devin Avery [Mon, 23 Jun 2014 16:12:43 +0000 (16:12 +0000)]
Merge "API Clarity: Documented Async Data Broker APIs."

9 years agoMerge "Bug 1144: Fixed mising DataChangeEvents for leaf listeners."
Ed Warnicke [Mon, 23 Jun 2014 11:37:23 +0000 (11:37 +0000)]
Merge "Bug 1144: Fixed mising DataChangeEvents for leaf listeners."

9 years agoMerge "Initial implementation of ShardTransactionChain"
Ed Warnicke [Mon, 23 Jun 2014 11:20:24 +0000 (11:20 +0000)]
Merge "Initial implementation of ShardTransactionChain"

9 years agoAPI Clarity: Documented Async Data Broker APIs.
Devin Avery [Mon, 16 Jun 2014 16:52:14 +0000 (18:52 +0200)]
API Clarity: Documented Async Data Broker APIs.

Documented AsyncDataBroker APIs, which are
base abstract APIs from which Binding and DOM
data broker APIs are derived.

Introduced code-examples illustrating
transaction isollation and conflict detection.

Change-Id: I3c881b1fceb0b68c0cc28a1caa7780b9b6c2af3f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Devin Avery <devin.avery@brocade.com>
9 years agoHelium: improve contract with ListenerRegistration
Robert Varga [Fri, 11 Apr 2014 08:04:02 +0000 (10:04 +0200)]
Helium: improve contract with ListenerRegistration

Change-Id: Ief4a6a5072824ada4cead4f465961e5a08053f8b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1245: Dropped Binding prefix from Binding Data APIs.
Tony Tkacik [Wed, 25 Jun 2014 15:46:42 +0000 (17:46 +0200)]
Bug 1245: Dropped Binding prefix from Binding Data APIs.

Dropped Prefix Binding from Data API of Binding-Aware part,
to make it easier for incomming users to find them as entry
point to the system (eg. DataBroker).

Change-Id: I2636cc0b35369a5403e7e6094d1eafa03f1bf919
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 629: Make BindingDataBroker to be visible."
Ed Warnicke [Fri, 20 Jun 2014 12:48:14 +0000 (12:48 +0000)]
Merge "Bug 629: Make BindingDataBroker to be visible."

9 years agoMerge "Bug 629: Make SchemaService required for Data Brokers"
Ed Warnicke [Fri, 20 Jun 2014 12:48:01 +0000 (12:48 +0000)]
Merge "Bug 629: Make SchemaService required for Data Brokers"

9 years agoBug 629: Make BindingDataBroker to be visible.
Tony Tkacik [Thu, 19 Jun 2014 14:38:21 +0000 (16:38 +0200)]
Bug 629: Make BindingDataBroker to be visible.

Inroduced support for injecting and retrieving
new BindingDataBroker via config-subsystem,
OSGI.

Note: This patch does not provide access to
BindingDataBroker is still not available via
Consumer/Provider context.

Change-Id: Iaa7e65aeeb873c38fded2fecb45e2f0dca1e7714
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 629: Make SchemaService required for Data Brokers
Tony Tkacik [Thu, 19 Jun 2014 14:35:47 +0000 (16:35 +0200)]
Bug 629: Make SchemaService required for Data Brokers

Binding Aware versions of Data Brokers did not
required SchemaService when constructed.
Refactored their constructor to make it
obvious that Schema Service is required.

Change-Id: I6c7c69df15aa0130a92015b2c52ba1a9e4cab7b1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1144: Fixed mising DataChangeEvents for leaf listeners.
Tony Tkacik [Thu, 19 Jun 2014 10:12:02 +0000 (12:12 +0200)]
Bug 1144: Fixed mising DataChangeEvents for leaf listeners.

Change-Id: I632e803e0bf7c7ec63bfbde636880feb2650a733
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoInitial implementation of ShardTransactionChain
Moiz Raja [Tue, 17 Jun 2014 22:27:44 +0000 (15:27 -0700)]
Initial implementation of ShardTransactionChain

Change-Id: Ia7fea4502f5e35837d43c404dc14e3a17480051d
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "Bug 629: Introduction of Configuration Commit Handler"
Ed Warnicke [Tue, 17 Jun 2014 11:49:19 +0000 (11:49 +0000)]
Merge "Bug 629: Introduction of Configuration Commit Handler"

9 years agoBUG-272: Fixed last checkstyle offenders & activate checkstyle enforcement
Robert Varga [Tue, 10 Jun 2014 08:53:49 +0000 (10:53 +0200)]
BUG-272: Fixed last checkstyle offenders & activate checkstyle enforcement

This patch adds xtend-gen to excluded directories and finally removes
the enforcer plugin override -- thus making md-sal components subject to
controller-wide checkstyle rules.

Change-Id: I3ccad778f90e450843122bc904a30a0cd4ca79f3
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 629: Introduction of Configuration Commit Handler
Tony Tkacik [Mon, 16 Jun 2014 16:33:40 +0000 (18:33 +0200)]
Bug 629: Introduction of Configuration Commit Handler

One piece of functionality which was not-well defined
in original APIs and was missing in new APIs is
user-submitted commit handlers.

Contract of Commit Handlers was updated to reflect
more existing concept of three-phase commit and
to allow commit handlers only for configuration
subtree.

Access to proposed data is done via read-only
transaction instead of data change event,
since commit handlers may want to cross-reference
data with other and we need to capture this reads
as preconditions for later commit phases.

Change-Id: Id2049c05384dd74792f3cfbbb9f77bf684223be2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge changes Ia119c9ae,Ic2290d7f
Ed Warnicke [Fri, 13 Jun 2014 12:20:54 +0000 (12:20 +0000)]
Merge changes Ia119c9ae,Ic2290d7f

* changes:
  Bug 1106: Introduced OptimisticLockFailedException
  Bug 1073: Added support to DOMBrokerImpl for Transaction Chaining

9 years agoBug 1106: Introduced OptimisticLockFailedException
Tony Tkacik [Thu, 5 Jun 2014 17:07:31 +0000 (19:07 +0200)]
Bug 1106: Introduced OptimisticLockFailedException

Introduced two new Exceptions to InMemoryDOMDataStore:
 - IncorrectDataStructureException
 - ConflictingModificationAppliedException.

Introduced OptimisticLockFailedException to DataBroker
API which is thrown when transaction fails because
of ConflictingModificationAppliedException,
which is raised when other modification already
applied to data tree prevents commit on submitted
modification.

OptimisticLockFailedException is propagated to
the clients also via returned Future and may be
present as causeof ExecutionException when
get() is invoked on Future.

Change-Id: Ia119c9ae4c4ffa9774b45b1d6d54cade7a5b8c32
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1073: Added support to DOMBrokerImpl for Transaction Chaining
Tony Tkacik [Mon, 26 May 2014 10:04:45 +0000 (12:04 +0200)]
Bug 1073: Added support to DOMBrokerImpl for Transaction Chaining

Splitted functionality of DOMBrokerImpl to separate classes
which allows easier code reuse with transaction chaining:

New internal APIs:
DOMDataCommitExecutor - Commit executor which invokes
   three-phase commit coordination
DOMDataCommitErrorListener - Error listener for commit executor
and one execution

AbstractDOMForwardedTransactionFactory - Factory which creates
   composite transactions on top of DOMStore transactions
DOMDataCommitCoordinatorImpl - Commit Executor implementation
DOMBrokerTransactionChainImpl - Implementation of DOMTransactionChain.

Added 2 JUnit tests for Transaction Chains:
  - Test positive scenario (chain of write, read, delete transactions)
  - Test IllegalStateException when previous transaction
    was not commited.

Change-Id: Ic2290d7fb3d4ea52a44bea02b493c1e537e929a6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge changes I52e0dd0d,I6dbf3316,Iafae27bc,Ibbb1250b,Icdb56d14,I7ede1482,Ib335fd1d...
Tony Tkacik [Tue, 10 Jun 2014 19:33:30 +0000 (19:33 +0000)]
Merge changes I52e0dd0d,I6dbf3316,Iafae27bc,Ibbb1250b,Icdb56d14,I7ede1482,Ib335fd1d,I6ce09820,I621fa3a4

* changes:
  BUG-272: fix issues in sal-rest-docgen
  BUG-272: fix sal-binding-api
  BUG-272: fix sal-compatibility
  BUG-272: fix sal-dom-spi
  BUG-272: fix sal-dom-broker
  BUG-272: fix sal-remoterpc-connector
  BUG-272: fix remoterpc-routingtable
  BUG-272: fix sal-dom-api
  BUG-272: fix sal-binding-broker

9 years agoMerge changes I63383291,I1c9f10e9,I9cac529f,I269d373b,I7ede3ba5,I4afc1e15
Tony Tkacik [Tue, 10 Jun 2014 17:32:19 +0000 (17:32 +0000)]
Merge changes I63383291,I1c9f10e9,I9cac529f,I269d373b,I7ede3ba5,I4afc1e15

* changes:
  BUG-272: fix sal-common-api
  BUG-272: fix sal-netconf-connector
  BUG-272: fix toaster-consumer
  BUG-272: cleanup sal-rest-connector
  BUG-272: use L for long suffix
  BUG-272: remove empty statements

9 years agoMerge "Bug 1106: Introduced TransactionCommitFailedException."
Ed Warnicke [Tue, 10 Jun 2014 14:06:58 +0000 (14:06 +0000)]
Merge "Bug 1106: Introduced TransactionCommitFailedException."

9 years agoBUG-272: fix sal-binding-api
Robert Varga [Tue, 10 Jun 2014 12:34:16 +0000 (14:34 +0200)]
BUG-272: fix sal-binding-api

Fixes various small issues in sal-binding-api

Change-Id: I6dbf33169e693cb8f449c42062dfedbf6a3e105e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: fix sal-dom-spi
Robert Varga [Tue, 10 Jun 2014 12:32:31 +0000 (14:32 +0200)]
BUG-272: fix sal-dom-spi

Fixes minor offences in sal-dop-spi

Change-Id: Ibbb1250bc930c2b5b74b919a184d413279a51f74
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: fix sal-dom-broker
Robert Varga [Tue, 10 Jun 2014 12:32:02 +0000 (14:32 +0200)]
BUG-272: fix sal-dom-broker

Fixes minor offences in sal-dom-broker

Change-Id: Icdb56d14f57626e59b39296af9e9e8946e8fb4b6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: fix sal-dom-api
Robert Varga [Tue, 10 Jun 2014 11:55:28 +0000 (13:55 +0200)]
BUG-272: fix sal-dom-api

Removes imports used only by documentation.

Change-Id: I6ce098201e1a80244c650931192d746eec1cb848
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: fix sal-binding-broker
Robert Varga [Tue, 10 Jun 2014 11:35:46 +0000 (13:35 +0200)]
BUG-272: fix sal-binding-broker

Fixes various small offenses in sal-binding-broker

Change-Id: I621fa3a430e869ecaade06fb2bf189d692d90e85
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: fix sal-common-api
Robert Varga [Tue, 10 Jun 2014 09:32:23 +0000 (11:32 +0200)]
BUG-272: fix sal-common-api

Removes a single unused import.

Change-Id: I633832911c6a0459c4b4428cd17cca63c8287e56
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: remove empty statements
Robert Varga [Tue, 10 Jun 2014 09:05:54 +0000 (11:05 +0200)]
BUG-272: remove empty statements

Preparatory patch: removes reported empty statements.

Change-Id: I4afc1e15efe6edd5d48ea8f40e189ee1e1774d4e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-614: Remove YangtoolsMappingHelper in favor of BindingReflections"
Tony Tkacik [Tue, 10 Jun 2014 11:30:42 +0000 (11:30 +0000)]
Merge "BUG-614: Remove YangtoolsMappingHelper in favor of BindingReflections"

9 years agoMerge "BUG-614: introduce AbstractRuntimeCodeGenerator"
Tony Tkacik [Tue, 10 Jun 2014 11:30:21 +0000 (11:30 +0000)]
Merge "BUG-614: introduce AbstractRuntimeCodeGenerator"

9 years agoMerge "BUG-614: migrate RuntimeGeneratedInvoker"
Tony Tkacik [Tue, 10 Jun 2014 11:30:06 +0000 (11:30 +0000)]
Merge "BUG-614: migrate RuntimeGeneratedInvoker"

9 years agoMerge "BUG-614: migrate RpcMetadata"
Tony Tkacik [Tue, 10 Jun 2014 11:29:34 +0000 (11:29 +0000)]
Merge "BUG-614: migrate RpcMetadata"

9 years agoMerge "BUG-868: use a single version of ClassLoaderUtils"
Tony Tkacik [Tue, 10 Jun 2014 11:29:16 +0000 (11:29 +0000)]
Merge "BUG-868: use a single version of ClassLoaderUtils"

9 years agoMerge "BUG-272: remove tabs from Java files"
Tony Tkacik [Tue, 10 Jun 2014 11:02:28 +0000 (11:02 +0000)]
Merge "BUG-272: remove tabs from Java files"

9 years agoMerge "BUG-272: remove trailing whitespace from Java files"
Tony Tkacik [Tue, 10 Jun 2014 10:47:22 +0000 (10:47 +0000)]
Merge "BUG-272: remove trailing whitespace from Java files"

9 years agoBUG-272: remove tabs from Java files
Robert Varga [Tue, 10 Jun 2014 09:02:29 +0000 (11:02 +0200)]
BUG-272: remove tabs from Java files

Preparatory patch: bulk-convert tabs to 4 spaces.

Change-Id: I4c24c763faf41cb4fcfd0277f8b3c7511269e9b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-272: remove trailing whitespace from Java files
Robert Varga [Tue, 10 Jun 2014 08:58:26 +0000 (10:58 +0200)]
BUG-272: remove trailing whitespace from Java files

Preparatory patch, bulk-removes all trailing whitespace from Java files.

Change-Id: I1fbef5746df7277b3865429d4faa82fc8ba8cbb5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: Remove YangtoolsMappingHelper in favor of BindingReflections
Robert Varga [Thu, 5 Jun 2014 15:15:11 +0000 (17:15 +0200)]
BUG-614: Remove YangtoolsMappingHelper in favor of BindingReflections

As it turns out YangtoolsMappingHelper is an old duplicate of
BindingReflections, with a single isNotification() method. That method
is buggy, as it does not perform all the checks required. Remove it and
use the unified method exposed from BindingReflections.

Change-Id: Ifc2ef9746c2556feac05466439ed910208289413
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: introduce AbstractRuntimeCodeGenerator
Robert Varga [Thu, 5 Jun 2014 12:15:44 +0000 (14:15 +0200)]
BUG-614: introduce AbstractRuntimeCodeGenerator

Introduce AbstractRuntimeCodeGenerator, which is the base service class
for interactions with the rest of the world. It implements the public
contracts and as much of the logic as possible in pure Java and defines
a clear interface subclasses need to provide. RuntimeCodeGenerator.xtend
then adds an implementation of it.

Change-Id: Ic04f3e840825ae1f59583c0a9a2f6fbfc7bb66f6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: migrate RuntimeGeneratedInvoker
Robert Varga [Thu, 5 Jun 2014 11:54:08 +0000 (13:54 +0200)]
BUG-614: migrate RuntimeGeneratedInvoker

RuntimeGeneratedInvoker is another DTO, so let's migrate it to
java-land.

Change-Id: If8e654c38de1be5f8e263f81eb7550d745913906
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: migrate RpcMetadata
Robert Varga [Thu, 5 Jun 2014 11:27:09 +0000 (13:27 +0200)]
BUG-614: migrate RpcMetadata

RpcMetadata is just another DTO. Just migrate it to Java.

Change-Id: I9bff2616a1cd14fc7a5d73f7be2607d46b67b23e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: use a single version of ClassLoaderUtils
Robert Varga [Thu, 5 Jun 2014 11:24:31 +0000 (13:24 +0200)]
BUG-868: use a single version of ClassLoaderUtils

This removes the static import, which hid the fact we are using two
different ClassLoaderUtils (both deprecated).

Change-Id: If37786d591a4c9975d2d10539c70f888dd7d6c5c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1106: Introduced TransactionCommitFailedException.
Tony Tkacik [Thu, 5 Jun 2014 15:43:36 +0000 (17:43 +0200)]
Bug 1106: Introduced TransactionCommitFailedException.

Change-Id: Icc4392a74aee24e3d2ae69387caa76bbeccb15ca
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-614: split out RpcServiceMetadata"
Tony Tkacik [Fri, 6 Jun 2014 13:02:40 +0000 (13:02 +0000)]
Merge "BUG-614: split out RpcServiceMetadata"

9 years agoMerge "BUG-614: migrate RuntimeGeneratedInvokerPrototype"
Tony Tkacik [Fri, 6 Jun 2014 12:38:24 +0000 (12:38 +0000)]
Merge "BUG-614: migrate RuntimeGeneratedInvokerPrototype"

9 years agoMerge "BUG-614: sal-common-impl does not use xtend"
Tony Tkacik [Fri, 6 Jun 2014 12:37:46 +0000 (12:37 +0000)]
Merge "BUG-614: sal-common-impl does not use xtend"

9 years agoMerge "Bug 1073: Added Transaction Chain support to InMemoryDataTreeModification."
Ed Warnicke [Fri, 6 Jun 2014 12:21:03 +0000 (12:21 +0000)]
Merge "Bug 1073: Added Transaction Chain support to InMemoryDataTreeModification."

9 years agoBUG-614: split out RpcServiceMetadata
Robert Varga [Thu, 5 Jun 2014 11:21:54 +0000 (13:21 +0200)]
BUG-614: split out RpcServiceMetadata

RpcServiceMetadata is just another holder, no reason to define it in
xtend.

Change-Id: Ic069a9698e47a347e634289c7a96fac20c2a3d3f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: migrate RuntimeGeneratedInvokerPrototype
Robert Varga [Thu, 5 Jun 2014 11:09:41 +0000 (13:09 +0200)]
BUG-614: migrate RuntimeGeneratedInvokerPrototype

Splits off RuntimeGeneratedInvokerPrototype DTO into java. There is no
reason it should be in xtend.

Change-Id: I625d44d398cfe72be21ac33d29986c736412970e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: sal-common-impl does not use xtend
Robert Varga [Wed, 4 Jun 2014 21:20:37 +0000 (23:20 +0200)]
BUG-614: sal-common-impl does not use xtend

This is a cleanup of sal-common-impl component -- it no longer uses
xtend, so there is no reason to depend on the maven plugin nor the
support library.

Change-Id: Ifa5d9934997f8f4d6a9d4f1b9db5f251b421713c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: remove dependecy on xtend
Robert Varga [Wed, 4 Jun 2014 17:05:20 +0000 (19:05 +0200)]
BUG-614: remove dependecy on xtend

There was an unused import of xtends' Exceptions helpers -- just remove
it and reformat the class to comply.

Change-Id: Ifb8f4993414d5abbb5c9b5030de1674ed78c5409
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1120: improve notification queue"
Tony Tkacik [Thu, 5 Jun 2014 13:46:06 +0000 (13:46 +0000)]
Merge "BUG-1120: improve notification queue"

9 years agoMerge "Bug 1073: Implemented Transaction chain on InMemoryDOMDataStore level."
Ed Warnicke [Thu, 5 Jun 2014 13:19:27 +0000 (13:19 +0000)]
Merge "Bug 1073: Implemented Transaction chain on InMemoryDOMDataStore level."

9 years agoBUG-1120: improve notification queue
Robert Varga [Mon, 2 Jun 2014 21:57:06 +0000 (23:57 +0200)]
BUG-1120: improve notification queue

This is a slight improvement in that it uses a ForwardingBlockingQueue
instead of subclassing -- allowing for easy replacement (for an
ArrayBlockingQueue for example).

Another improvement is the use of RejectedExecutionException instead of
IllegalStateException -- allowing clients to cleanly recover from thread
interruption.

Change-Id: I80040846bb34a12da1eb1e0df62a538b0551239e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-1120: optimize notification delivery fast path"
Tony Tkacik [Tue, 3 Jun 2014 07:58:50 +0000 (07:58 +0000)]
Merge "BUG-1120: optimize notification delivery fast path"

9 years agoMerge "BUG-1120: fold GenerationalListenerMap back"
Tony Tkacik [Tue, 3 Jun 2014 07:58:31 +0000 (07:58 +0000)]
Merge "BUG-1120: fold GenerationalListenerMap back"

9 years agoMerge "BUG-1120: introduce generations to ListenerMap"
Tony Tkacik [Tue, 3 Jun 2014 07:58:22 +0000 (07:58 +0000)]
Merge "BUG-1120: introduce generations to ListenerMap"

9 years agoBug 1073: Added Transaction Chain support to InMemoryDataTreeModification.
Tony Tkacik [Mon, 26 May 2014 21:29:53 +0000 (23:29 +0200)]
Bug 1073: Added Transaction Chain support to InMemoryDataTreeModification.

Added support for chaining transactions to underlying implementation.

Added test case testTransactionChain, which is documented
and illustrates basic behaviour of transaction chain -
local virtual memory, which allows to allocate new transactions
which provides view as-if previous transaction already happened.

Change-Id: I23f5622f9a6498356b3c54d53e0111f3fba33bf5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1073: Implemented Transaction chain on InMemoryDOMDataStore level.
Tony Tkacik [Mon, 26 May 2014 20:38:26 +0000 (22:38 +0200)]
Bug 1073: Implemented Transaction chain on InMemoryDOMDataStore level.

- Extracted Transactions implementations from InMemoryDOMDataStore
to separate classes
- implemented initial DOMStoreTransactionChain inside InMemoryDOMDataStore

Change-Id: I3033f26d2a4c141a32aaac6bc3a20e8c7ba1c28c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-1120: optimize notification delivery fast path
Robert Varga [Mon, 2 Jun 2014 14:11:20 +0000 (16:11 +0200)]
BUG-1120: optimize notification delivery fast path

Now that the interface contract is completely separated, our fast path
is as good as it gets, except it still allocates a few objects in the
lookup path. These are expected to be generally small, but we do now
they are constant while a particular generation is in place.

This means we can stategically place a LoadingCache, which will
eliminate the need to allocate the objects for notifications which are
often used -- thus the fast path really becomes a lookup by class into a
prepared iterable of listeners. For initial implementation we will place
an upper bound of 1000 entries and see where it leads us.

Change-Id: I2cf39f0d4681aa60afb9d517fb7beef99838bbab
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1120: fold GenerationalListenerMap back
Robert Varga [Mon, 2 Jun 2014 13:46:28 +0000 (15:46 +0200)]
BUG-1120: fold GenerationalListenerMap back

This moves needless indirection code form GenerationalListenerMap back
to NotificaitonBrokerImpl. Now the contract is directly between
NotificationBrokerImpl and ListenerMapGeneration

Change-Id: I0b401fa4b10e06afbc7206323d1c1f4afb19d422
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1120: introduce generations to ListenerMap
Robert Varga [Mon, 2 Jun 2014 11:58:22 +0000 (13:58 +0200)]
BUG-1120: introduce generations to ListenerMap

This removes the synchronized block in the fast path, biasing the
implementation heavily towards fast readers.

The readers need only to take a volatile reference (AtomicReference),
at which point they have an isolated read-only view of the map.

Writers on the other hand, though, are fully synchronized and are
required to perform a full copy operation, then do the modifications and
finally reinstate the read-only view through setting the atomic
reference.

Change-Id: I5d118177c1508199b66b9e26499c9fc628d3f65e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1120: Rename to GenerationalListenerMap
Robert Varga [Mon, 2 Jun 2014 12:01:12 +0000 (14:01 +0200)]
BUG-1120: Rename to GenerationalListenerMap

This name better captures the overall intent, so before we make changes
just do a rename, so it's easily reviewable.

Change-Id: I578edc26bcdc5dacbe3575dbb3ed3fe83694a9dd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1120: promote synchronization to all entrypoints
Robert Varga [Mon, 2 Jun 2014 11:35:29 +0000 (13:35 +0200)]
BUG-1120: promote synchronization to all entrypoints

This is a temporary regression in performance: get rid of the
synchronized map at the cost of explicit synchronized methods.
Subsequent patches will remove the synchronization from the fast paths.

Change-Id: Ibe90e4e7ff99655a69b77c942ad50baec9df1ba2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1120: introduce NotificationListenerMap
Robert Varga [Mon, 2 Jun 2014 11:26:47 +0000 (13:26 +0200)]
BUG-1120: introduce NotificationListenerMap

Introduces encapsulation of the set of listeners, such that
modifications and lookup are isolated fromt the rest of the
implementation -- thus clearly defining the entry points.

Also fixes a possible iteration failure if concurrent modification
happens while a interest listener is being added.

Change-Id: I96e0260d372425d261b352b229ae293e638c287c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: disallow instantiation without executor
Robert Varga [Mon, 2 Jun 2014 11:33:10 +0000 (13:33 +0200)]
BUG-868: disallow instantiation without executor

This clarifies the deprecated API. As it turns out, instantiation
without an executor should be removed, not the other way around.

Change-Id: I3a2738a4da18ef92d3e8c38d0c12f6df653bd74c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-1120: fix race window in unregistration
Robert Varga [Sun, 1 Jun 2014 14:33:52 +0000 (16:33 +0200)]
BUG-1120: fix race window in unregistration

This has the nice benefit of unifying the registration/unregistration
paths, too. This requires a supporting ehnancement in yangtools, which
has been submitted at https://git.opendaylight.org/gerrit/#/c/7568/

Change-Id: Ifd489d6eaf5b7feb4a6efaa09bd468d5818c24cc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-832 Refactor netconf connector"
Tony Tkacik [Mon, 2 Jun 2014 08:50:39 +0000 (08:50 +0000)]
Merge "BUG-832 Refactor netconf connector"

9 years agoBUG-832 Refactor netconf connector
Maros Marsalek [Tue, 29 Apr 2014 12:23:52 +0000 (14:23 +0200)]
BUG-832 Refactor netconf connector

- Extract general API for remote connectors
- Split NetconfDevice into more classes
- Make data operations over netconf device in inventory binding aware (fixes 969)
- Add dependency on binding-broker
- Make connector crash if schema is not present for device
- Improve logging

Change-Id: Idf4fa4994b3ac067bd69e9cd629b6d8c225d7b77
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-614: degrade NotifyTask to Runnable
Robert Varga [Sun, 1 Jun 2014 09:00:48 +0000 (11:00 +0200)]
BUG-614: degrade NotifyTask to Runnable

The call() method always returned null anyway, so we might as well make it
Runnable.

Change-Id: I6be36490aba33ba1bf4b205ba4d9b0aa8160dbdf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: do not use xtend's library
Robert Varga [Sun, 1 Jun 2014 08:01:47 +0000 (10:01 +0200)]
BUG-614: do not use xtend's library

Convert from using xtendlib to using guava directly.

Change-Id: Ic72af54e0b1480658fb4067821969419bbab2e8e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: No need to build a future list
Robert Varga [Sun, 1 Jun 2014 07:52:44 +0000 (09:52 +0200)]
BUG-614: No need to build a future list

It is obvious that the constructed list of futures is never going to be
used, so let's not construct it at all.

Change-Id: I506e33da52c53b5e63088a5c8ae0bb206eb6a720
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: Remove xtendisms
Robert Varga [Sun, 1 Jun 2014 06:09:06 +0000 (08:09 +0200)]
BUG-614: Remove xtendisms

Generated xtend code is quite verbose and sometimes the logic gets quite
obfuscated. This patch brings the code more in-line to what a programmer
might write.

Change-Id: I9a04012a2ba106082e9b1eef25bd9cb6958736cd
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: explicitly use old constructor
Robert Varga [Sun, 1 Jun 2014 11:43:54 +0000 (13:43 +0200)]
BUG-614: explicitly use old constructor

This makes use of the legacy constructor until a concrete migration path
is selected.

Change-Id: I375504303c7e134f03bf649b360327e9076d2d08
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: Hide the executor and improve logging
Robert Varga [Sun, 1 Jun 2014 06:01:21 +0000 (08:01 +0200)]
BUG-614: Hide the executor and improve logging

As part of the xtend->Java rewrite, we get rid of unnecessary
getExecutor() and improve logging a bit.

Change-Id: I9c7052472289f701a289f4ba76312fb28af18a3f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-614: convert NotificationBrokerImpl
Robert Varga [Sat, 31 May 2014 07:34:09 +0000 (09:34 +0200)]
BUG-614: convert NotificationBrokerImpl

This does a straight xtend->java conversion by moving xtend-generated
java files into the repository instead of xtend. This is the first step
in optimizing NotificationBrokerImpl.

Change-Id: Ie8dc1dfb6c5b9e80a8d79a5de31410100b35c7fc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 1003: Restconf - remove whitespace on input"
Tony Tkacik [Fri, 30 May 2014 12:33:04 +0000 (12:33 +0000)]
Merge "Bug 1003: Restconf - remove whitespace on input"

9 years agoMerge "Bug 1073: Introduced Transaction Chain to DOMStore APIs."
Ed Warnicke [Fri, 30 May 2014 12:25:16 +0000 (12:25 +0000)]
Merge "Bug 1073: Introduced Transaction Chain to DOMStore APIs."

9 years agoBUG-509: cleanup datastore interafaces
Robert Varga [Thu, 29 May 2014 13:04:30 +0000 (15:04 +0200)]
BUG-509: cleanup datastore interafaces

This removes unused methods and adds interface contract documentation.

Change-Id: I7bc57d034da1d0503d76afa6f4c09ce6a6bfe669
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-509: remove unnecessary Version objects
Robert Varga [Wed, 28 May 2014 22:02:17 +0000 (00:02 +0200)]
BUG-509: remove unnecessary Version objects

Testing has revealed the datastore instantiates effectively a version
per tree node. This turns out to be not needed, as we really just need a
single version per commit -- which can be shared between nodes, as the
(node,version) tuple remains unique.

So let's just instantiate a single version when we start the
transaction, which we need to do anyway, and use it for all
nodes/subtrees added or modified. This places an upper bound on Version
objects retained to the number of transactions committed (not counting
no-ops).

Change-Id: I40d095ec230eee8b5af2409c1e8ee61a1860a9d3
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-509: use concurrent hash-trie Map
Robert Varga [Fri, 23 May 2014 11:11:39 +0000 (13:11 +0200)]
BUG-509: use concurrent hash-trie Map

This patch switches to using concurrent hash-trie map for metadata
tracking. It has the nice feature of having O(1) concurrent snapshots,
which should give us better performance when dealing with large children
bases.

This is a trade-off, please refer to yangtools.util.MapAdaptor for
system properties which tune its behavior.

Change-Id: I2ddb81a1296cc17528a605eeaeda1f303560fb55
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-648: include yangtools.util package"
Tony Tkacik [Thu, 29 May 2014 10:37:59 +0000 (10:37 +0000)]
Merge "BUG-648: include yangtools.util package"

10 years agoBUG-648: include yangtools.util package
Robert Varga [Wed, 28 May 2014 17:02:01 +0000 (19:02 +0200)]
BUG-648: include yangtools.util package

This include yangtools.util, which will hold various utility classes.
First of which is MapAdaptor, needed to solve the 'copying hashmaps'
problem.

Change-Id: Ifdb7709e1b83d07d1e96832954987072f82274ae
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoMerge "BUG-614: convert RuntimeCodeSpecification"
Tony Tkacik [Wed, 28 May 2014 08:29:56 +0000 (08:29 +0000)]
Merge "BUG-614: convert RuntimeCodeSpecification"

10 years agoBUG-614: convert RuntimeCodeSpecification
Robert Varga [Wed, 28 May 2014 07:14:33 +0000 (09:14 +0200)]
BUG-614: convert RuntimeCodeSpecification

This migrates RuntimeCodeSpecification from xtend to Java, increasing
its efficiency.

Change-Id: I00b3ab7f3a47e0d3fc71e55b4bec99364bfa8e5f
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBUG-620: replace xtend version of classes with Java versions
Robert Varga [Tue, 20 May 2014 23:08:23 +0000 (16:08 -0700)]
BUG-620: replace xtend version of classes with Java versions

replace xtend versions of classes with java versions where the java was
generated by hand based on the source of the xtend file as well as leveraging
the code generated from the xtend source

Change-Id: I36a3a61608710543f66c36f7d5179cf976257953
Signed-off-by: David K. Bainbridge <dbainbri.ciena@gmail.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years agoBug 1073: Introduced Transaction Chain to DOMStore APIs.
Tony Tkacik [Mon, 26 May 2014 10:03:23 +0000 (12:03 +0200)]
Bug 1073: Introduced Transaction Chain to DOMStore APIs.

Introduced concept of TransactionChain to DOMStore APIs.
Decomposed DOMStore to DOMStoreTransactionFactory
to allow factory methods reuse between DOMStoreTransactionChain
and DOMStore itself.

Change-Id: I186242e40e8ada098deb431b09db67707371af58
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge changes I7c36c88e,I7c5d97c7
Tony Tkacik [Mon, 26 May 2014 19:30:58 +0000 (19:30 +0000)]
Merge changes I7c36c88e,I7c5d97c7

* changes:
  BUG-1070: make BundleContext required
  BUG-1070: allow for URL registration failing