mdsal.git
9 years agoAPI Usability: Introduced type capture for Transaction Factory
Tony Tkacik [Wed, 16 Jul 2014 12:22:52 +0000 (14:22 +0200)]
API Usability: Introduced type capture for Transaction Factory

Change-Id: If74733ce5464e294522abf79f9433849466a1f56
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1369: Use separate single threadpool for data operations on binding mountpoint.
Tony Tkacik [Wed, 16 Jul 2014 11:12:31 +0000 (13:12 +0200)]
Bug 1369: Use separate single threadpool for data operations on binding mountpoint.

Change-Id: I195188c1353df4696e8b16de699e5379b7bdc511
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1225: Fixed bug in registration of default RPC implementation.
Tony Tkacik [Tue, 15 Jul 2014 16:17:38 +0000 (18:17 +0200)]
Bug 1225: Fixed bug in registration of default RPC implementation.

Change-Id: I302bd0c9aa75e844864d0b7dd692c1d331a563ed
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoFixed class-cast when Netconf registered RPC implementations.
Tony Tkacik [Tue, 15 Jul 2014 16:43:02 +0000 (18:43 +0200)]
Fixed class-cast when Netconf registered RPC implementations.

Change-Id: I0803f7ec0d23bcf195c2fbac49e916c4f30110e1
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1303: BindingIndependentConnector splitted."
Tony Tkacik [Tue, 15 Jul 2014 10:35:27 +0000 (10:35 +0000)]
Merge "Bug 1303: BindingIndependentConnector splitted."

9 years agoMerge "Bug 1125: Added regression test"
Tony Tkacik [Tue, 15 Jul 2014 08:56:21 +0000 (08:56 +0000)]
Merge "Bug 1125: Added regression test"

9 years agoBug 1280: Added option to automaticly create parents
Tony Tkacik [Wed, 23 Jul 2014 10:11:06 +0000 (12:11 +0200)]
Bug 1280: Added option to automaticly create parents

Introduced additional variation of put and merge
which allows user to specify if parents nodes
are to be created. Default behaviour is to not
create parent nodes, but users still have
explicit API for creating them if necessary.

Updated documentation accordingly and added note
that auto-create of parents may potentially
create garbage in data store.

Change-Id: Id4a88b015e05b4717e9c393ddf821c7f93e7e541
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 279, 1390: Used Guava Cache r for lazy-loading of RPC Routers
Tony Tkacik [Tue, 22 Jul 2014 08:39:09 +0000 (10:39 +0200)]
Bug 279, 1390: Used Guava Cache r for lazy-loading of RPC Routers

Used Guava Cache for lazy-loading of RPC Routers, which
is thread safe. Guava Loading Cache was not suitable
since we needed to know when RPC was created outside
of Guava load() callback.

Introduced new internal exception type RpcIsNotRoutedException
which is thrown when service type is not routed.

Change-Id: I96b6ff68e300596aa837e21690f8cb92da12112c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1125: Added regression test
Tony Tkacik [Mon, 14 Jul 2014 11:40:13 +0000 (13:40 +0200)]
Bug 1125: Added regression test

Change-Id: I455134dc95b8af4f4f0c79b11e55fd01b58731e4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1362: New AsyncWriteTransaction#submit method
tpantelis [Fri, 11 Jul 2014 06:21:25 +0000 (02:21 -0400)]
Bug 1362: New AsyncWriteTransaction#submit method

- Added new AsyncWriteTransaction#submit and deprecated AsyncWriteTransaction#commit.

- Modified unit tests and current code (in the toaster) in the
  controller using commit.

Change-Id: I92317d01427bf442def8e7217ccb13313a0fd229
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoChanged read to be type-safe in ReadTransaction
Tony Tkacik [Mon, 7 Jul 2014 12:39:49 +0000 (14:39 +0200)]
Changed read to be type-safe in ReadTransaction

Removed declaration of read method from common
superinterface, which is now only marker interface
for read capabilities.

Defined read method in specialization of interface
for Binding and DOM interfaces, which makes
use of specific features of format.

This change is source-code compatible
and users of read method needs to update
their code appropriatelly as shown in
Toaster example.

Change-Id: I8c783fc5f276722a5a762eea7c769c3f54a31855
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoDeprecated Rpcs and RpcErrors helper classes
tpantelis [Thu, 10 Jul 2014 06:49:07 +0000 (02:49 -0400)]
Deprecated Rpcs and RpcErrors helper classes

With the new RpcResultBuilder class, we can deprecate the Rpcs and
RpcErrors classes.

Also migrate all uses of the deprecated classes to RpcResultBuilder in
the controller code.

Change-Id: I86408bba0ce19e70c7d7a41555e94052e54e93f8
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBug 1303: BindingIndependentConnector splitted.
Lukas Sedlak [Thu, 10 Jul 2014 08:16:46 +0000 (10:16 +0200)]
Bug 1303: BindingIndependentConnector splitted.

Inner private classes in BindingIndependentConnector extracted into standalone package protected classes.
Fixed bug in BindingToDomTransaction class - domOpenedTransactions management.

Change-Id: I69173db2bf4e6746eac4fa67c57f65095f45c603
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoBug 1225: Added DataBroker and DataChangeListener test suite.
Tony Tkacik [Thu, 10 Jul 2014 15:24:07 +0000 (17:24 +0200)]
Bug 1225: Added DataBroker and DataChangeListener test suite.

Change-Id: I53a06845024936253f576e5095b3d00c15a47e99
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1284: Fixed serialization of Augment Instance Identifier
Tony Tkacik [Wed, 9 Jul 2014 15:42:59 +0000 (17:42 +0200)]
Bug 1284: Fixed serialization of Augment Instance Identifier

Instance Identifier pointing to Augmentation, which pointed
to augmentation with leafs only, was not properly
serialized to DOM Instance Identifier and this caused
subscription for parent node.

Instance Identifier Codec was updated to detect
this case and use different algorithm to serialize
last argument.

Change-Id: Ie47ec7a5ebc86e10a7e1b3ddbc8921bf089466b2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1223: Cleaned up BindingTestContext from unsupported components."
Ed Warnicke [Fri, 11 Jul 2014 09:35:26 +0000 (09:35 +0000)]
Merge "Bug 1223: Cleaned up BindingTestContext from unsupported components."

9 years agoMerge "Clarified the AsyncDataChangeEvent message - stated you must not block the...
Tony Tkacik [Fri, 11 Jul 2014 07:38:16 +0000 (07:38 +0000)]
Merge "Clarified the AsyncDataChangeEvent message - stated you must not block the thread."

9 years agoClarified the AsyncDataChangeEvent message - stated you must not block the thread.
Devin Avery [Thu, 10 Jul 2014 18:05:43 +0000 (14:05 -0400)]
Clarified the AsyncDataChangeEvent message - stated you must not block the thread.

Change-Id: I311b7c37f5848beb351d59fc830798d10302a3bb
Signed-off-by: Devin Avery <devin.avery@brocade.com>
9 years agoBug 1223: Cleaned up BindingTestContext from unsupported components.
Tony Tkacik [Wed, 9 Jul 2014 10:47:28 +0000 (12:47 +0200)]
Bug 1223: Cleaned up BindingTestContext from unsupported components.

Change-Id: I26123a2a9d56c85dcc329fda0727e7e3e664c829
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Improve documentation of BindingAware{Provider,Consumer}"
Tony Tkacik [Wed, 9 Jul 2014 15:09:54 +0000 (15:09 +0000)]
Merge "Improve documentation of BindingAware{Provider,Consumer}"

9 years agoBug 1339: Added doublecheck for RPC registration
Lukas Sedlak [Wed, 9 Jul 2014 07:21:35 +0000 (09:21 +0200)]
Bug 1339: Added doublecheck for RPC registration

Change-Id: I786934b6cc690817688e60fd3d422293f37056be
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMerge "Bug 1224, Bug 1221: Added Test case scenarios for Data Change Events."
Ed Warnicke [Tue, 8 Jul 2014 18:45:45 +0000 (18:45 +0000)]
Merge "Bug 1224, Bug 1221: Added Test case scenarios for Data Change Events."

9 years agoMerge "Bug 1328: Improved argument checks in generated RPC Router"
Ed Warnicke [Tue, 8 Jul 2014 16:51:05 +0000 (16:51 +0000)]
Merge "Bug 1328: Improved argument checks in generated RPC Router"

9 years agoBug 1328: Improved argument checks in generated RPC Router
Tony Tkacik [Tue, 8 Jul 2014 07:43:24 +0000 (09:43 +0200)]
Bug 1328: Improved argument checks in generated RPC Router

Change-Id: I5e4bd55a4a31b4b671b44163286c6b3ebe7707bf
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1224, Bug 1221: Added Test case scenarios for Data Change Events.
Tony Tkacik [Tue, 8 Jul 2014 15:29:26 +0000 (17:29 +0200)]
Bug 1224, Bug 1221: Added Test case scenarios for Data Change Events.

Added suite of test-cases which tests Data Change Events
and their contents for various combination of
  - initial state of data store
  - performed operation (e.g. write sibling, child, delete child)
  - various level of data change listener
    eg. (/top or /top/top-level-list/top-level-list[*])
  - various data change scope (BASE, ONE, SUBTREE)

Change-Id: Ic43ba3863e2954574ddec946f33512021839acfd
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoImprove documentation of BindingAware{Provider,Consumer}
Ed Warnicke [Tue, 24 Jun 2014 15:13:45 +0000 (10:13 -0500)]
Improve documentation of BindingAware{Provider,Consumer}

Change-Id: I39899f68f91a5c54099a404f00b944fa9cf3cec3
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge changes I6e8805e1,I4df698a0,I41e0e30d
Devin Avery [Tue, 8 Jul 2014 12:50:20 +0000 (12:50 +0000)]
Merge changes I6e8805e1,I4df698a0,I41e0e30d

* changes:
  Minor cleanup of test suites in MD-SAL
  Moved data test model to sal-test-model
  Bug 1280: Ensure list parent if written item is list item

9 years agoMerge "Bug 1283: Made return types of AsyncDataChangeEvent consistent"
Devin Avery [Tue, 8 Jul 2014 12:36:06 +0000 (12:36 +0000)]
Merge "Bug 1283: Made return types of AsyncDataChangeEvent consistent"

9 years agoMerge "Bug 1235: Documented Notification services of MD-SAL"
Tom Pantelis [Mon, 7 Jul 2014 17:42:47 +0000 (17:42 +0000)]
Merge "Bug 1235: Documented Notification services of MD-SAL"

9 years agoMinor cleanup of test suites in MD-SAL
Tony Tkacik [Mon, 7 Jul 2014 14:19:00 +0000 (16:19 +0200)]
Minor cleanup of test suites in MD-SAL

- Added SuppressWarning("deprecation") to test suites
  which test backwards compatibility with Hydrogen APIs
- Marked test which needs to be rewritten for new DataBroker API
- Removed superflous version for test dependencies

Change-Id: I6e8805e1895bc2171aa5c653d8d87fd8b5c9055b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 1316: Fixed loop in global RPC forwarding."
Tony Tkacik [Mon, 7 Jul 2014 15:02:18 +0000 (15:02 +0000)]
Merge "Bug 1316: Fixed loop in global RPC forwarding."

9 years agoBug 1316: Fixed loop in global RPC forwarding.
Lukas Sedlak [Mon, 7 Jul 2014 14:36:52 +0000 (16:36 +0200)]
Bug 1316: Fixed loop in global RPC forwarding.

Change-Id: Ic133471d4883e367230901c8596ccd46f2e9dc08
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoMoved data test model to sal-test-model
Tony Tkacik [Mon, 7 Jul 2014 09:47:56 +0000 (11:47 +0200)]
Moved data test model to sal-test-model

Change-Id: I4df698a07919178e130cb5d390d80f9fe032f09c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Cleanup: Removed unused code"
Ed Warnicke [Mon, 7 Jul 2014 10:45:37 +0000 (10:45 +0000)]
Merge "Cleanup: Removed unused code"

9 years agoBug 1280: Ensure list parent if written item is list item
Tony Tkacik [Thu, 3 Jul 2014 11:49:38 +0000 (13:49 +0200)]
Bug 1280: Ensure list parent if written item is list item

One of properties of Java Binding is that it is imposible
to represent list as a whole and thus it was possible
to create put operation, which was correct by Binding Spec
but failed.

This fixes behaviour, if user is writing list item (MapEntryNode),
and whole list (MapNode) does not exists, list is automatically
added.

Change-Id: I41e0e30d349720f50697a6f555bab5850ec7d30c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 1283: Made return types of AsyncDataChangeEvent consistent
Tony Tkacik [Thu, 3 Jul 2014 07:54:52 +0000 (09:54 +0200)]
Bug 1283: Made return types of AsyncDataChangeEvent consistent

Change-Id: I3ba1209809cc4b374fbb561537e2684682495774
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 560: Fixed Mount Point RPC registration service"
Tony Tkacik [Mon, 7 Jul 2014 09:44:06 +0000 (09:44 +0000)]
Merge "Bug 560: Fixed Mount Point RPC registration service"

9 years agoBug 560: Fixed Mount Point RPC registration service
Lukas Sedlak [Fri, 4 Jul 2014 07:25:13 +0000 (09:25 +0200)]
Bug 560: Fixed Mount Point RPC registration service

The RPC Services can now be correctly registered for Mount Points. The RPCs are able to
correctly propagate between Binding Independent Broker and Binding Aware Broker.

This commit is dependant on commit: https://git.opendaylight.org/gerrit/#/c/8654/

Change-Id: I6c3c3e1f648d1faa8b4d43a24eacaf014123b880
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
9 years agoBug 1235: Documented Notification services of MD-SAL
Tony Tkacik [Wed, 25 Jun 2014 08:26:15 +0000 (10:26 +0200)]
Bug 1235: Documented Notification services of MD-SAL

Change-Id: I56c7b41b56eef8c92854e986a5f9f7af21ae1d09
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Add GlobalBundleScanningSchemaServiceImpl.destroyInstance for cleanup in tests"
Tony Tkacik [Thu, 3 Jul 2014 10:27:02 +0000 (10:27 +0000)]
Merge "Add GlobalBundleScanningSchemaServiceImpl.destroyInstance for cleanup in tests"

9 years agoAdd GlobalBundleScanningSchemaServiceImpl.destroyInstance for cleanup in tests
Tomas Olvecky [Thu, 3 Jul 2014 09:25:04 +0000 (11:25 +0200)]
Add GlobalBundleScanningSchemaServiceImpl.destroyInstance for cleanup in tests

Change-Id: Id0f6f65f5a0a00bfb8271cd68700545d1c05e5f6
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
9 years agoMerge "BUG-868: remove InstanceIdentifier.getPath() users"
Tony Tkacik [Wed, 2 Jul 2014 14:13:27 +0000 (14:13 +0000)]
Merge "BUG-868: remove InstanceIdentifier.getPath() users"

9 years agoMerge changes I38344133,Ib209ceed,I3f643034,I2f4ed366
Tony Tkacik [Wed, 2 Jul 2014 14:13:14 +0000 (14:13 +0000)]
Merge changes I38344133,Ib209ceed,I3f643034,I2f4ed366

* changes:
  BUG-868: getChildren() has been superseded by getValue()
  BUG-868: mark inherited methods as deprecated
  BUG-868: remove deprecated use of QName constructors
  BUG-868: do not use deprecated InstanceIdentifier methods

9 years agoCleanup: Removed unused code
Tony Tkacik [Wed, 2 Jul 2014 13:45:09 +0000 (15:45 +0200)]
Cleanup: Removed unused code

Change-Id: I853bb724356a5f2dd9ac83e70c56a2871c4786ad
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-868: remove InstanceIdentifier.getPath() users
Robert Varga [Tue, 1 Jul 2014 16:18:44 +0000 (18:18 +0200)]
BUG-868: remove InstanceIdentifier.getPath() users

getPath() has been deprecated. Remove the easily call sites to
getPathArguments().

Change-Id: I2058627301404e28b58851c27d8d8117f48a7b9d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: getChildren() has been superseded by getValue()
Robert Varga [Tue, 1 Jul 2014 15:42:13 +0000 (17:42 +0200)]
BUG-868: getChildren() has been superseded by getValue()

Silences two eclipse warnings.

Change-Id: I383441335d9301d73dac5627223caaffcfd30461
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-868: do not use deprecated InstanceIdentifier methods
Robert Varga [Tue, 1 Jul 2014 15:21:37 +0000 (17:21 +0200)]
BUG-868: do not use deprecated InstanceIdentifier methods

This removes the use of the deprecated constructor and some of the
getPath() call sites in favor of getPathArguments() and
InstanceIdentifier.create()/.node() methods.

Change-Id: I2f4ed36645408c6f780031d848af829cbe2a40d6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge changes I8598d0bd,I560c2072
Devin Avery [Wed, 2 Jul 2014 11:30:34 +0000 (11:30 +0000)]
Merge changes I8598d0bd,I560c2072

* changes:
  Bug 488: Removed BundleContext usage for registering to DOM Components.
  Bug 488: Removed BundleContext from InMemoryDataBroker.

9 years agoMerge "Bug 488: Removed requirement for DOM providers to supply BundleContext."
Devin Avery [Wed, 2 Jul 2014 11:30:05 +0000 (11:30 +0000)]
Merge "Bug 488: Removed requirement for DOM providers to supply BundleContext."

10 years agoMerge "Bug 1081 - Deprecate non-asynchronous Data Broker API"
Devin Avery [Tue, 1 Jul 2014 15:21:14 +0000 (15:21 +0000)]
Merge "Bug 1081 - Deprecate non-asynchronous Data Broker API"

10 years agoBug 1081 - Deprecate non-asynchronous Data Broker API
Tony Tkacik [Wed, 25 Jun 2014 09:32:09 +0000 (11:32 +0200)]
Bug 1081 - Deprecate non-asynchronous Data Broker API

Change-Id: I8fbe63326a0e396e128b46d96142c7db86b2b83a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "Bug 1236 - Documented Binding-aware RPC services of MD-SAL"
Devin Avery [Tue, 1 Jul 2014 13:02:59 +0000 (13:02 +0000)]
Merge "Bug 1236 - Documented Binding-aware RPC services of MD-SAL"

10 years agoBug 488: Removed BundleContext usage for registering to DOM Components.
Tony Tkacik [Mon, 30 Jun 2014 18:03:32 +0000 (20:03 +0200)]
Bug 488: Removed BundleContext usage for registering to DOM Components.

Change-Id: I8598d0bd8cd3396ea666c9e3d39ead6b155d1af4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBug 488: Removed requirement for DOM providers to supply BundleContext.
Tony Tkacik [Mon, 30 Jun 2014 17:57:35 +0000 (19:57 +0200)]
Bug 488: Removed requirement for DOM providers to supply BundleContext.

Change-Id: I7a3a852dbe1dc9a48398943fc89b542e663531bc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBug 488: Removed BundleContext from InMemoryDataBroker.
Tony Tkacik [Mon, 30 Jun 2014 13:41:54 +0000 (15:41 +0200)]
Bug 488: Removed BundleContext from InMemoryDataBroker.

Change-Id: I560c2072b67aa1752ecb4237689fb813440f4e2c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "Bug 1073: Added Transaction Chain support to Binding transactions."
Ed Warnicke [Tue, 1 Jul 2014 12:13:28 +0000 (12:13 +0000)]
Merge "Bug 1073: Added Transaction Chain support to Binding transactions."

10 years agoMerge "Bug 1073: Extracted Implementation of Binding Transaction"
Ed Warnicke [Tue, 1 Jul 2014 12:13:17 +0000 (12:13 +0000)]
Merge "Bug 1073: Extracted Implementation of Binding Transaction"

10 years agoMerge "Bug 1027: Sort map of instance-identifiers and data by length."
Ed Warnicke [Tue, 1 Jul 2014 12:12:33 +0000 (12:12 +0000)]
Merge "Bug 1027: Sort map of instance-identifiers and data by length."

10 years agoBug 1073: Added Transaction Chain support to Binding transactions.
Tony Tkacik [Mon, 23 Jun 2014 07:29:50 +0000 (09:29 +0200)]
Bug 1073: Added Transaction Chain support to Binding transactions.

Added Binding Aware version of Transaction Chain
which only forwards all calls to DOM Transction Chain
and uses BindingForwarded transactions as wrappers
on top of real DOM Forwarded transactions.

Change-Id: Icf10cb8525a3229c0f41c6141bf198111fa4b240
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBug 1073: Extracted Implementation of Binding Transaction
Tony Tkacik [Mon, 23 Jun 2014 07:28:51 +0000 (09:28 +0200)]
Bug 1073: Extracted Implementation of Binding Transaction

Extracted implementation of Binding Transactions to
package private classes, so they could be used by
alternative implementation of Broker or TransactionChain.

Change-Id: I66825fef8217f2d55f4e987fc8e170d3c447a008
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoMerge "Partial fix for Bug 1256"
Ed Warnicke [Mon, 30 Jun 2014 15:54:08 +0000 (15:54 +0000)]
Merge "Partial fix for Bug 1256"

10 years agoBug 1236 - Documented Binding-aware RPC services of MD-SAL
Tony Tkacik [Wed, 25 Jun 2014 08:47:02 +0000 (10:47 +0200)]
Bug 1236 - Documented Binding-aware RPC services of MD-SAL

Documented Binding-aware RPC API contracts

Added simple example / tutorial for routed RPCs.

Change-Id: I0f3a08a392e148732dc218a8ac67bc6f90ea7b0e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 years agoBug 1027: Sort map of instance-identifiers and data by length.
Tony Tkacik [Mon, 30 Jun 2014 12:53:27 +0000 (14:53 +0200)]
Bug 1027: Sort map of instance-identifiers and data by length.

In order to have more reliable deserialization of Maps
of Bidning-Independented data to Binding-Aware
entries should be sorted by their length, with shorter
ones beforehand, since codecs for them have higher
probability to be known.

Parent codecs also contains references to child-classes
which may be never used in new context so this
makes deserialization more predicable and easier to debug.

Change-Id: Iad1490f893e946a2a019c88570325dcfb11c244d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
10 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>
10 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."

10 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."

10 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>
10 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"

10 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"

10 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>
10 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"

10 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"

10 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>
10 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>
10 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>
10 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."

10 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."

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

10 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>
10 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>
10 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>
10 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."

10 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"

10 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>
10 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>
10 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>
10 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>
10 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"

10 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>
10 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>
10 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

10 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>
10 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>
10 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

10 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

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

10 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>
10 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>
10 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>
10 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>