mdsal.git
9 years agoReduce SchemaContext updates on shutdown
Tom Pantelis [Mon, 18 May 2015 00:33:53 +0000 (20:33 -0400)]
Reduce SchemaContext updates on shutdown

The GlobalBundleScanningSchemaServiceImpl sends out a ton (hundreds) of
SchemaContext updates on shutdown. This because the removedBundle method
calls tryToUpdateSchemaContext even for bundles that weren't tracked, ie
bundles w/o yang URLs. So I added a check`for # URLs > 0.

Change-Id: I203047f04ba5761c1927102b3cb0f2e309b6bf77
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit bc312b3f54c8c089fdc2f2f2b8b8bb6903cca038)

9 years agoBug 2970: Fix GlobalBundleScanningSchemaServiceImpl to get RESOLVED bundles correctly
Tom Pantelis [Sun, 17 May 2015 14:49:00 +0000 (10:49 -0400)]
Bug 2970: Fix GlobalBundleScanningSchemaServiceImpl to get RESOLVED bundles correctly

The GlobalBundleScanningSchemaServiceImpl uses a BundleTracker to get
all RESOLVED bundles. When BundleTracker#open() is called
on start(), the BundleTracker will notify addingBundles of all current
bundles that pass the state mask. The OSGi container must resolve all
bundles before activating on startup. So after open() is called we
should have all the current bundles that have yang models and a complete
SchemaContext on startup based on the installed bundles from he last run.
However I was seeing some bundles notified during open() but others notified
later. This why CDS and other components may not see a complete
SchemaContext on startup.

The problem is that GlobalBundleScanningSchemaServiceImpl is passing the
wrong state mask constants. It's referencing constants defined in
BundleEvent but the BundleTracker checks bundle.getState() which
corresponds to constants defined in Bundle. The 2 have slightly
different constants and the values differ. When I change it to use
Bundle constants, it works as expected, ie all current bundles are
notified during open() and we have a complete SchemaContext after start().
I really don't see how this worked before at all using the wrong constants.

I also noticed that start() is being called twice, once in
GlobalBundleScanningSchemaServiceImpl#createInstance and then also in
the Activator after it calls createInstance. So 2 instances of
BundleTracker were being created resulting in double the notifications.
I removed the call to start() in the Activator.

Change-Id: I8c8330f75dd1a779af186688aae4cfaee89bd43b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit cd0eea4a97a6279b801074061dd64f6663e8b837)

9 years agoSet weak keys for binding mountpoint cache
Maros Marsalek [Fri, 15 May 2015 09:28:19 +0000 (11:28 +0200)]
Set weak keys for binding mountpoint cache

Change-Id: Ie3995beb7f2ffe51c882bde411048b2c59780184
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoCDS: Implement front-end support for local transactions
Robert Varga [Fri, 24 Apr 2015 11:33:24 +0000 (13:33 +0200)]
CDS: Implement front-end support for local transactions

Implemented support on the TransactionProxy front-end for optimizations
where the Shard is local to the controller instance. In this mode, the
Shard's DataTree obtained from the FindPrimaryShard message is used to
prepare the modifications completely on the front-end. On ready, the
DataTreeModification instance is passed to the Shard via
the ReadyLocalTransaction message. The Shard then does a direct commit,
eliding the 3PC from the front-end (it's a no-op as it is for remote
write-only txns).

TransactionContext instances are now obtained via an
AbstractTransactionContextFactory passed to TransactionProxy of which
there are 2 kinds: one for single, unchained txns and one for chained
tnxs. Each creates a different DOM transaction instance to handle
preperation of modifications. The DOM transacton is wrapped in a
LocalTransactionContext which the TransactionProxy interfaces with.

Change-Id: I0322b586f394e4b6c7793b8287ac804b41964378
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit 2f7c93174d7834a4c4aedacc9b88aa53a5a0422c)

9 years agoBug 2351 Speed-up Binding-to-Binding routed RPC Invocation.
Tony Tkacik [Mon, 27 Apr 2015 12:16:06 +0000 (14:16 +0200)]
Bug 2351 Speed-up Binding-to-Binding routed RPC Invocation.

Current RPC Broker uses LazySerializedContainerNodes
when going thru DOM RPC broker, so in case
RPC is returned it can by-pass deserialization and
use Binding DTO directly.

In case of routed RPCs full serialization to normalized
node was triggered when DOM RPC broker tried to
read RPC route.

This patchset introduces support for LazySerializedContainerNode
to precompute this value and do not use full serialization
when DOM Rpc Broker reads only routing context.

Change-Id: I6d949b5257d40a96ae9edce3bf15c4c3ff932c27
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 313b9c3cdff6c7fbf94583db4b8933aa394bccc0)

9 years agoBug 3135 - Fixed support for InterestListener
Tony Tkacik [Wed, 6 May 2015 10:42:28 +0000 (12:42 +0200)]
Bug 3135 - Fixed support for InterestListener

InterestListener was one of undocumented beta MD-SAL APIs
which was not intented for public support, but accidentally
was public since Hydrogen and as it turned out other Opendaylight
projects started to using it.

Added support to affected components in order to still support
this API even when using new Notification Broker.

Change-Id: I060474f68a6c37ed05b262a9b46923f668ca3c8b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit 96246098ccbe56af4f688d93dfffc9fdf62713ab)

9 years agoMerge "BUG-3095 Add EventTime attribute to DOMNotification from netconf"
Tony Tkacik [Thu, 7 May 2015 10:26:05 +0000 (10:26 +0000)]
Merge "BUG-3095 Add EventTime attribute to DOMNotification from netconf"

9 years agoBUG-3095 Add EventTime attribute to DOMNotification from netconf
Maros Marsalek [Tue, 5 May 2015 16:47:37 +0000 (18:47 +0200)]
BUG-3095 Add EventTime attribute to DOMNotification from netconf

Introduced new interface DOMEvent and DOMNotifications from
sal-netconf-connector implement this interaface. The eventTime is parsed from
the the notification xml.

Change-Id: I833d86d91f752be55fef3e641a6c8654d2f65a28
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFixed export package section of sal-binding-broker.
Tony Tkacik [Mon, 4 May 2015 12:55:23 +0000 (12:55 +0000)]
Fixed export package section of sal-binding-broker.

Change-Id: I09a0c50f8c6a96992ccca2648bec6759c85ff02a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
(cherry picked from commit ca7e8c9bbb5c58783153153dc0288cac67b0a17a)

9 years agoMerge "BUG-2288: deprecate old binding Notification API elements"
Tony Tkacik [Thu, 30 Apr 2015 14:53:02 +0000 (14:53 +0000)]
Merge "BUG-2288: deprecate old binding Notification API elements"

9 years agoBug 3063 - Notification brokers does not properly scans notification listeners for...
Martin Bobak [Sun, 26 Apr 2015 14:00:33 +0000 (16:00 +0200)]
Bug 3063 - Notification brokers does not properly scans notification listeners for implemented interfaces

Change-Id: Ie3b136bd40c443191d22bfbfd0ea532b65f717c2
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "Bumped controller version by minor for next release cycle."
Tony Tkacik [Fri, 24 Apr 2015 22:09:43 +0000 (22:09 +0000)]
Merge "Bumped controller version by minor for next release cycle."

9 years agoBumped controller version by minor for next release cycle.
Tony Tkacik [Thu, 23 Apr 2015 14:19:33 +0000 (14:19 +0000)]
Bumped controller version by minor for next release cycle.

Change-Id: I80ea0aecf42e5ee96dcebc68af1e872b1f10e7b5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge topic 'li/cleanup/javassist'
Tom Pantelis [Fri, 24 Apr 2015 13:43:21 +0000 (13:43 +0000)]
Merge topic 'li/cleanup/javassist'

* changes:
  Removed unused implementation code from Binding MD-SAL.
  Migrated Hydrogen Notification Broker to not use Javassist.

9 years agoRemoved unused implementation code from Binding MD-SAL.
Tony Tkacik [Wed, 8 Apr 2015 12:40:25 +0000 (14:40 +0200)]
Removed unused implementation code from Binding MD-SAL.

Change-Id: I9da77e3bb10b70dba1d97429f06cde31831d62d5
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMigrated Hydrogen Notification Broker to not use Javassist.
Tony Tkacik [Wed, 22 Apr 2015 11:30:54 +0000 (13:30 +0200)]
Migrated Hydrogen Notification Broker to not use Javassist.

Change-Id: Id85deca318041be5bbe97d18d484004daf5e290d
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Tests for DOMDataTreeListener"
Tom Pantelis [Fri, 24 Apr 2015 02:53:32 +0000 (02:53 +0000)]
Merge "Tests for DOMDataTreeListener"

9 years agoMerge "Moved legacy Notification implementation to compat package."
Tom Pantelis [Fri, 24 Apr 2015 02:52:17 +0000 (02:52 +0000)]
Merge "Moved legacy Notification implementation to compat package."

9 years agoMerge "Replaced Helium Notification Broker with new Notifcation Broker."
Tom Pantelis [Fri, 24 Apr 2015 02:51:38 +0000 (02:51 +0000)]
Merge "Replaced  Helium Notification Broker with new Notifcation Broker."

9 years agoMerge "IMDS: trim down commit overhead"
Tony Tkacik [Thu, 23 Apr 2015 18:01:05 +0000 (18:01 +0000)]
Merge "IMDS: trim down commit overhead"

9 years agoMerge "Publish SnapshotBacked transactions"
Tony Tkacik [Thu, 23 Apr 2015 18:00:30 +0000 (18:00 +0000)]
Merge "Publish SnapshotBacked transactions"

9 years agoIMDS: trim down commit overhead
Robert Varga [Wed, 22 Apr 2015 14:17:57 +0000 (16:17 +0200)]
IMDS: trim down commit overhead

After refactoring things out it is quite obvious that we can skip adding
a listener to the commit cohort when committing a chained transaction.

Extract the inner class from InMemoryDOMDataStore so it can be reused
and subclass it in ChainedTransactionCommitImpl. That makes it also
obvious our commit cannot fail.

Change-Id: I71d9fa60cf63d826ba066c381d8db91af7f8f31e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoPublish SnapshotBacked transactions
Robert Varga [Wed, 22 Apr 2015 12:36:13 +0000 (14:36 +0200)]
Publish SnapshotBacked transactions

IMDS-internal transaction implementations can be used by the CDS
frontend. Fix them up for publishing and make them available in SPI as a
Beta API.

Change-Id: Iaa4cd6792db0f262ce41281280f2ccfde6146532
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoTests for DOMDataTreeListener
Jan Hajnar [Wed, 1 Apr 2015 15:06:23 +0000 (17:06 +0200)]
Tests for DOMDataTreeListener

* added tests for DOMDataTreeListener registration on notifications
retrieval

Change-Id: I65135f77fcb09cb34579433718193873d84d3282
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoMoved legacy Notification implementation to compat package.
Tony Tkacik [Wed, 22 Apr 2015 11:04:39 +0000 (13:04 +0200)]
Moved legacy Notification implementation to compat package.

Change-Id: Iba88a62c1d0327c69a16004b123cb0e5749f8ea8
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoReplaced Helium Notification Broker with new Notifcation Broker.
Tony Tkacik [Wed, 8 Apr 2015 11:54:41 +0000 (13:54 +0200)]
Replaced  Helium Notification Broker with new Notifcation Broker.

Change-Id: I01b249b0e7d412d0075f7bb0727e146c2e109fc7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-3033: DataBroker should extend DataTreeChangeService"
Tony Tkacik [Tue, 21 Apr 2015 13:25:28 +0000 (13:25 +0000)]
Merge "BUG-3033: DataBroker should extend DataTreeChangeService"

9 years agoBUG-3033: DataBroker should extend DataTreeChangeService
Robert Varga [Tue, 21 Apr 2015 11:49:40 +0000 (13:49 +0200)]
BUG-3033: DataBroker should extend DataTreeChangeService

The implementation already implements it, but users are not awat of this
capability, as they need to use an explicit cast. Fix it by requiring
all DataBroker implementations to also provide DataTreeChangeService.

Change-Id: Idf61a665b303e03106c223f9bacd9a827b2d9046
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-3018: report DataTreeChangeListener initial state"
Tony Tkacik [Mon, 20 Apr 2015 15:12:52 +0000 (15:12 +0000)]
Merge "BUG-3018: report DataTreeChangeListener initial state"

9 years agoBUG-3018: report DataTreeChangeListener initial state
Robert Varga [Sat, 18 Apr 2015 19:26:27 +0000 (21:26 +0200)]
BUG-3018: report DataTreeChangeListener initial state

Once we have make callout to AbstractDOMStoreTreeChangePublisher, also
examine our current state to see if we should report an initial event.
Requires https://git.opendaylight.org/gerrit/18583 in yangtools.

Change-Id: If6ccdb32057d1cf54bfc83888bf1540142c3ec7f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoExpose ResolveDataChangeEventsTask
Robert Varga [Fri, 17 Apr 2015 10:27:50 +0000 (12:27 +0200)]
Expose ResolveDataChangeEventsTask

ListenerTree is already visible from implementation, this is a utility
class for taking advantage of this functionality.

Change-Id: Ia75d90f3729afb112da48264d5552fc3b0cb1d37
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2351: Introduced LazySerializedDOMNotification
Tony Tkacik [Wed, 8 Apr 2015 11:45:35 +0000 (13:45 +0200)]
Bug 2351: Introduced LazySerializedDOMNotification

Change-Id: I4a6c5c19b2d59050ddf01f92a76ef0d5add2bfb2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Notification Listener Adapter uses NotificationListenerInvoker"
Tom Pantelis [Fri, 17 Apr 2015 13:51:58 +0000 (13:51 +0000)]
Merge "Notification Listener Adapter uses NotificationListenerInvoker"

9 years agoMerge "Split out sal-akka-raft example"
Moiz Raja [Wed, 15 Apr 2015 18:29:20 +0000 (18:29 +0000)]
Merge "Split out sal-akka-raft example"

9 years agoNotification Listener Adapter uses NotificationListenerInvoker
Tony Tkacik [Tue, 7 Apr 2015 12:02:39 +0000 (14:02 +0200)]
Notification Listener Adapter uses NotificationListenerInvoker

Change-Id: I64bd1c031d979b087ad1dbc659020e1716213e42
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoSplit out sal-akka-raft example
Robert Varga [Mon, 13 Apr 2015 13:54:23 +0000 (15:54 +0200)]
Split out sal-akka-raft example

The example should not be included in production code, so split it out
into a separate component.

Change-Id: Iacf4d57d5e0ec85a975f8611dab1524b6556ce39
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Extracted NotificationInvokerImpl to separate class."
Tom Pantelis [Tue, 14 Apr 2015 12:12:07 +0000 (12:12 +0000)]
Merge "Extracted NotificationInvokerImpl to separate class."

9 years agoMerge "Unify sal-akka-raft version"
Tom Pantelis [Tue, 14 Apr 2015 12:03:23 +0000 (12:03 +0000)]
Merge "Unify sal-akka-raft version"

9 years agoUnify sal-akka-raft version
Robert Varga [Mon, 13 Apr 2015 13:53:34 +0000 (15:53 +0200)]
Unify sal-akka-raft version

Make sure the artifact is published, so we can reuse the same version.

Change-Id: I1dd1aac1d45e1ef2f27fe232cb59218651463618
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoExtracted NotificationInvokerImpl to separate class.
Tony Tkacik [Tue, 7 Apr 2015 11:41:29 +0000 (13:41 +0200)]
Extracted NotificationInvokerImpl to separate class.

Change-Id: Ie7494e872200581ce6cf5dcae2088ab2afda3671
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Remove deprecation suppression"
Moiz Raja [Fri, 10 Apr 2015 16:12:02 +0000 (16:12 +0000)]
Merge "Remove deprecation suppression"

9 years agoMerge "Fixes Bug 2935"
Moiz Raja [Fri, 10 Apr 2015 15:28:23 +0000 (15:28 +0000)]
Merge "Fixes Bug 2935"

9 years agoRemove deprecation suppression
Robert Varga [Fri, 21 Nov 2014 17:04:24 +0000 (18:04 +0100)]
Remove deprecation suppression

Suppressed deprecation leads to false sense of completeness. This patch
removes suppression in tests, so we see how muchh of the code relies on
deprecated APIs.

Change-Id: I01d56f3ef4fe385806a8fbebdbe96fd6af63828c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2967: Expose before-state from DataObjectModification
Robert Varga [Thu, 9 Apr 2015 09:32:48 +0000 (11:32 +0200)]
BUG-2967: Expose before-state from DataObjectModification

Not exposing the before-state requires users to track this state
themselves. The problem is most visible in the delete case, if
the user needs some attributes to reconstruct keys to other structures
in order to perform cleanup -- they would effectively have to retain
a InstanceIdentifier->data map to efficiently perform deletes.

Rather than forcing everyone to duplicate data, expose the before-state,
as best available. Note that applications still need to deal with the
fact that the before-state in delete can be null -- at least by issuing
a warning to the operator.

Change-Id: I72c886f384254a6808159eaee612b07083073492
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix DataTreeIdentifier losing type
Robert Varga [Thu, 9 Apr 2015 09:16:49 +0000 (11:16 +0200)]
Fix DataTreeIdentifier losing type

DataTreeIdentifier needs to retain the type of encapsulated
InstanceIdentifier, otherwise the users cannot really use it (or have to
suppress warnings/cast).

Change-Id: Icc7214923531f9ffeafe55b12a8ad6813d431573
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove non-existant features-flow from dependencies
Thanh Ha [Thu, 9 Apr 2015 01:38:03 +0000 (21:38 -0400)]
Remove non-existant features-flow from dependencies

Change-Id: I9018abd2e4c185cdfed92b5c7040360cf03cb394
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoMerge "BUG 2799: SPI for EventSources"
Tony Tkacik [Wed, 8 Apr 2015 19:04:09 +0000 (19:04 +0000)]
Merge "BUG 2799: SPI for EventSources"

9 years agoMerge "Add DOMDataTreeIdentifier.toString()"
Tony Tkacik [Wed, 8 Apr 2015 09:06:14 +0000 (09:06 +0000)]
Merge "Add DOMDataTreeIdentifier.toString()"

9 years agoMerge "Bug 2933: BidningDOMDataBrokerAdaper implements DataTreeChangeService"
Tom Pantelis [Tue, 7 Apr 2015 18:17:20 +0000 (18:17 +0000)]
Merge "Bug 2933: BidningDOMDataBrokerAdaper implements DataTreeChangeService"

9 years agoMerge "Bug 2933: Make DataTreeModification and Listeners type-safe"
Tom Pantelis [Tue, 7 Apr 2015 18:16:32 +0000 (18:16 +0000)]
Merge "Bug 2933: Make DataTreeModification and Listeners type-safe"

9 years agoMerge "Bug 2933: Implemented DataTreeChangeService"
Tom Pantelis [Tue, 7 Apr 2015 18:15:31 +0000 (18:15 +0000)]
Merge "Bug 2933: Implemented  DataTreeChangeService"

9 years agoBug 2933: BidningDOMDataBrokerAdaper implements DataTreeChangeService
Tony Tkacik [Wed, 1 Apr 2015 10:52:45 +0000 (12:52 +0200)]
Bug 2933: BidningDOMDataBrokerAdaper implements DataTreeChangeService

Change-Id: Ia28d8452a6c203c88c7d1e18208362cf779a7b20
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2933: Make DataTreeModification and Listeners type-safe
Tony Tkacik [Wed, 1 Apr 2015 10:50:57 +0000 (12:50 +0200)]
Bug 2933: Make DataTreeModification and Listeners type-safe

Introduced generic to DataTreeModification, DataTreeChangeListener
and DataTreeIdentifier which captures target type from InstanceIdentifier
so users does not have to deal with casts by themselves.

Added utility walker methods to DataObjectModification, which
are possible thanks to DataTreeModification capturing target type.

Change-Id: Ia3566ae3dbe98fb118b49cc8ac8e1925fc111d8b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2933: Implemented DataTreeChangeService
Tony Tkacik [Wed, 1 Apr 2015 10:37:52 +0000 (12:37 +0200)]
Bug 2933: Implemented  DataTreeChangeService

DataTreeChangeService implementation is based on DOM Data Tree
change service and serves only as an adapter, which lazily
translates events and data in events as they are accessed
by user code.

This is rather different behaviour from DataChangeListener
where API contract required semi-eager deserialization
of supplied instance identifier.

Change-Id: If4954e966acc21ffec36e8cc37f95717492a1675
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoAdd DOMDataTreeIdentifier.toString()
Robert Varga [Tue, 31 Mar 2015 14:10:33 +0000 (16:10 +0200)]
Add DOMDataTreeIdentifier.toString()

A proper toString() method is needed for debugging.

Change-Id: Iab13a38f6134aafa982fa5a9127fc5ccdd179416
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Remove SimpleDataTreeCandidate"
Tony Tkacik [Thu, 2 Apr 2015 20:46:28 +0000 (20:46 +0000)]
Merge "Remove SimpleDataTreeCandidate"

9 years agoFixes Bug 2935
Abhishek Kumar [Wed, 1 Apr 2015 19:01:08 +0000 (12:01 -0700)]
Fixes Bug 2935

Details for the issue is documented here:
https://bugs.opendaylight.org/show_bug.cgi?id=2935

This patch updates mapException implementation to
appropriately handle exceptions.

Change-Id: I104ea62453517e2c6a74955f6b3cce342274a9e5
Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>
9 years agoBUG 2799: SPI for EventSources
Marian Adamjak [Thu, 26 Mar 2015 11:07:33 +0000 (12:07 +0100)]
BUG 2799: SPI for EventSources

Introduced SPI for Event Sources

 - created separate messagebus-spi module
 - moved Netconf Event Source implementation
   to separate package

Change-Id: I13d55f803a80c655c71137414265041d99b11aa0
Signed-off-by: Marian Adamjak <madamjak@cisco.com>
9 years agoMerge "Add ForwardingDOMStoreThreePhaseCommitCohort"
Tom Pantelis [Thu, 2 Apr 2015 11:26:41 +0000 (11:26 +0000)]
Merge "Add ForwardingDOMStoreThreePhaseCommitCohort"

9 years agoAdd ForwardingDOMStoreThreePhaseCommitCohort
Robert Varga [Wed, 1 Apr 2015 10:16:27 +0000 (12:16 +0200)]
Add ForwardingDOMStoreThreePhaseCommitCohort

This class is useful for decorator pattern, so publish it as a beta SPI.

Change-Id: I69707067da4935d68ca41ed7ad1764d5ddf9812e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMove AbstractDOMStoreTransaction into SPI
Robert Varga [Wed, 1 Apr 2015 09:56:55 +0000 (11:56 +0200)]
Move AbstractDOMStoreTransaction into SPI

It is a useful base for DOMStoreTransaction implementations, with some
debugging capabilities. Publish it as a beta SPI.

Change-Id: Iea3551720b2a8df7c268ce003147fc3a734f3871
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove SimpleDataTreeCandidate
Robert Varga [Tue, 31 Mar 2015 09:12:53 +0000 (11:12 +0200)]
Remove SimpleDataTreeCandidate

yangtools already exposes a utility class which does the same thing, so
let's use DefaultDataTreeCandidate instead.

Change-Id: Id8a6d6c0a5b817e4c3f5cdbb3bfdadcd596c0030
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Tune NotificationRouter wait strategy"
Tony Tkacik [Tue, 31 Mar 2015 08:01:00 +0000 (08:01 +0000)]
Merge "Tune NotificationRouter wait strategy"

9 years agoMerge "Export BindingNormalizedNodeSerializer via Config Subsystem."
Ed Warnicke [Mon, 30 Mar 2015 17:39:42 +0000 (17:39 +0000)]
Merge "Export BindingNormalizedNodeSerializer via Config Subsystem."

9 years agoExport BindingNormalizedNodeSerializer via Config Subsystem.
Tony Tkacik [Mon, 30 Mar 2015 14:51:19 +0000 (16:51 +0200)]
Export BindingNormalizedNodeSerializer via Config Subsystem.

Change-Id: I2cabdc89b01739ef2ffdbedeff9b11038e0fa41f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoTune NotificationRouter wait strategy
Robert Varga [Mon, 30 Mar 2015 13:59:54 +0000 (15:59 +0200)]
Tune NotificationRouter wait strategy

CPU traces show we are seeing NotificationRouter spin for more work even
when there are no notifications being generated. Change the strategy so
we end up block the thread after a period of spinning/yielding. The
default spin period is set to 1ms, followed by 30ms of yielding,
followed by a block.

This should provide reasonable throughput on notification-heavy
workloads as well as not waste a lot of CPU when there are no
notifications.

Change-Id: Ia1de5ff2616392609a0868b9b8ba3bce15baa105
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2383: make DOMDataBrokers implement DOMDataTreeChangeService"
Tony Tkacik [Thu, 19 Mar 2015 22:06:47 +0000 (22:06 +0000)]
Merge "BUG-2383: make DOMDataBrokers implement DOMDataTreeChangeService"

9 years agoBUG-2383: make DOMDataBrokers implement DOMDataTreeChangeService
Robert Varga [Thu, 19 Mar 2015 13:16:48 +0000 (14:16 +0100)]
BUG-2383: make DOMDataBrokers implement DOMDataTreeChangeService

With the datastore support in place, we can now expose the optional
functionality. In order to do so compatibly, we introduce an
experimental API to get access to optional backend features.

Change-Id: I22bf68bd95d98d3c53ee7401442e4812d3615334
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Optimize ResolveDataChangeEventsTask object allocation"
Tony Tkacik [Thu, 19 Mar 2015 21:13:09 +0000 (21:13 +0000)]
Merge "Optimize ResolveDataChangeEventsTask object allocation"

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

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

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

Change-Id: Iaaf22bd8bc788f26814e06873b483bf0424ceaf2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs to Lithi...
Tony Tkacik [Thu, 19 Mar 2015 15:54:25 +0000 (15:54 +0000)]
Merge "BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs to Lithium API (copyrights corrected)"

9 years agoMerge "Renamed Binding DOM Adapters to share same naming convention."
Ed Warnicke [Thu, 19 Mar 2015 15:31:32 +0000 (15:31 +0000)]
Merge "Renamed Binding DOM Adapters to share same naming convention."

9 years agoMerge "Bug 868: Binding MD-SAL exports new codec factory."
Ed Warnicke [Thu, 19 Mar 2015 15:02:00 +0000 (15:02 +0000)]
Merge "Bug 868: Binding MD-SAL exports new codec factory."

9 years agoMerge "BUG-2673: deprecate ListenerNode,Tree and Walker"
Tony Tkacik [Thu, 19 Mar 2015 14:34:55 +0000 (14:34 +0000)]
Merge "BUG-2673: deprecate ListenerNode,Tree and Walker"

9 years agoOptimize ResolveDataChangeEventsTask object allocation
Robert Varga [Thu, 19 Mar 2015 11:58:48 +0000 (12:58 +0100)]
Optimize ResolveDataChangeEventsTask object allocation

ResolveDataChangeEventsTask queried before/afterData methods multiple
times. The default implementation in yangtools instantiates an object on
each call, which leads to sub-optimal performance. Cache the returned
object and use it locally, which actually makes the code more readable.

As a further change, perform the same caching with modification type, as
that may end up being computed on access.

Change-Id: I43aa4824c1a5788060035cd419400d86b0116de7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRenamed Binding DOM Adapters to share same naming convention.
Tony Tkacik [Wed, 18 Mar 2015 14:26:04 +0000 (15:26 +0100)]
Renamed Binding DOM Adapters to share same naming convention.

Renamed Forwarded* classes to BindingDOM*Adapter which
better describes what implementations are doing.

These are implementation classes and are not part of public
API contract outside of sal-binding-broker-impl, so this
should not affect any users.

Change-Id: I1c3b5f275daa38c82215ca3ba8b8170990e9ac43
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 868: Binding MD-SAL exports new codec factory.
Tony Tkacik [Wed, 18 Mar 2015 14:21:09 +0000 (15:21 +0100)]
Bug 868: Binding MD-SAL exports new codec factory.

Migrated MD-SAL to export BindingCodecTreeFactory,
which provides access to new codecs, which allows
us to migrate users without need to change initial
configuration.

Change-Id: Icb741dd73e3b22f64f5f538236d36a99e9c05b4e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBUG-2673: deprecate ListenerNode,Tree and Walker
Robert Varga [Mon, 16 Mar 2015 18:42:26 +0000 (19:42 +0100)]
BUG-2673: deprecate ListenerNode,Tree and Walker

All of these have been superseded by RegistrationTree and related
classes. Those should offer better performance due to not instantiating
intermediate Optional nodes when searching for nodes.

Change-Id: I1e16bcb045ca5c97ca7f245e44d94d133bbf4eac
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs
Igor Bartak [Wed, 18 Mar 2015 17:00:13 +0000 (18:00 +0100)]
BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs
to Lithium API (copyrights corrected)

Change-Id: I2206b4b532e4feead26c166b793966b077f0f26f
Signed-off-by: Igor Bartak <ibartak@cisco.com>
9 years agoBug 868: Introduced DOM ForwardingSession utility classes.
Tony Tkacik [Tue, 17 Mar 2015 14:58:37 +0000 (15:58 +0100)]
Bug 868: Introduced DOM ForwardingSession utility classes.

Introduced DOM ForwardingSession abstract classes,
in order to migrate AAA from CompositeNode interfaces,
since they were using it only to forward calls to backing
implementation.

Change-Id: If5ed1a5dadc02c0d7433fd9652a4af9b586a9be7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "BUG-2673: make IMDS implement DOMStoreTreeChangePublisher"
Tony Tkacik [Tue, 17 Mar 2015 11:30:27 +0000 (11:30 +0000)]
Merge "BUG-2673: make IMDS implement DOMStoreTreeChangePublisher"

9 years agoMerge "BUG-2673: Introduce AbstractDOMStoreTreeChangePublisher"
Tony Tkacik [Tue, 17 Mar 2015 11:28:27 +0000 (11:28 +0000)]
Merge "BUG-2673: Introduce AbstractDOMStoreTreeChangePublisher"

9 years agoMerge "BUG-2673: Create AbstractRegistrationTree and related classes"
Tony Tkacik [Tue, 17 Mar 2015 11:27:43 +0000 (11:27 +0000)]
Merge "BUG-2673: Create AbstractRegistrationTree and related classes"

9 years agoBUG-2673: make IMDS implement DOMStoreTreeChangePublisher
Robert Varga [Mon, 16 Mar 2015 17:54:39 +0000 (18:54 +0100)]
BUG-2673: make IMDS implement DOMStoreTreeChangePublisher

This patch makes use of the AbstractDOMStoreTreeChangePublisher to do all
the registration wrangling and forwards all notifications towards a
dedicated publisher. Notifications are offloaded to the background
executor, just as normal DataChangeNotifications are. This initial
implementation does not close the registration listener race also
present in the data change notifications, as the notification manager
lacks the APIs to do that.

Change-Id: I36220b52a7a67df1f340b2b8bf32918de025920b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2673: Introduce AbstractDOMStoreTreeChangePublisher
Robert Varga [Mon, 16 Mar 2015 12:21:24 +0000 (13:21 +0100)]
BUG-2673: Introduce AbstractDOMStoreTreeChangePublisher

This is a base class, reusable for various DOMStore implementations,
which want to implement the DOMStoreTreeChangePublisher interface.

Change-Id: I77f2488f3b99d9e9e34c97772df5a157c245f8c7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2673: Create AbstractRegistrationTree and related classes
Robert Varga [Mon, 16 Mar 2015 09:41:44 +0000 (10:41 +0100)]
BUG-2673: Create AbstractRegistrationTree and related classes

This is a generalization of ListenerTree, useful for reusing the
infrastructure for multiple types of registrations.

Change-Id: I715b876d932d0a14ab9a479b1f1d39509a67e30b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Quick fix nullable RPC input"
Tony Tkacik [Thu, 12 Mar 2015 11:04:09 +0000 (11:04 +0000)]
Merge "Quick fix nullable RPC input"

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

9 years agoQuick fix nullable RPC input
Vaclav Demcak [Wed, 11 Mar 2015 15:06:10 +0000 (16:06 +0100)]
Quick fix nullable RPC input

* DOMRpcService is declaring a method invokeRpc like
invokeRpc(@Nonnull SchemaPath type, @Nullable NormalizedNode<?, ?> input)

* add check to null for input in BindingRpcImplementationAdapter and
BindingDOMRpcImplementationAdapter because they are trying to deserialze
input automaticly withou any null check before. It produces next exception
for nopayload rpc:

at com.google.common.base.Preconditions.checkState(Preconditions.java:158)
at org.opendaylight.yangtools.binding.data.codec.impl.ContainerNodeCodecContext
.dataFromNormalizedNode(ContainerNodeCodecContext.java:23)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry
.fromNormalizedNodeRpcData(BindingNormalizedNodeCodecRegistry.java:197)
at org.opendaylight.controller.md.sal.binding.impl.BindingRpcImplementationAdapter
.deserilialize(BindingRpcImplementationAdapter.java:79)
at org.opendaylight.controller.md.sal.binding.impl.BindingRpcImplementationAdapter
.invokeRpc(BindingRpcImplementationAdapter.java:69)

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

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

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

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

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

9 years agoMerge "Bug 2364: Migrated Binding MD-SAL to not use composites nodes"
Tony Tkacik [Wed, 11 Mar 2015 06:12:48 +0000 (06:12 +0000)]
Merge "Bug 2364: Migrated Binding MD-SAL to not use composites nodes"

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 2364: Migrated Binding MD-SAL to not use composites nodes
Tony Tkacik [Sun, 8 Mar 2015 15:30:27 +0000 (16:30 +0100)]
Bug 2364: Migrated Binding MD-SAL to not use composites nodes

Bidning MD-SAL is fully migrated to be adapter on top
of NormalizedNode MD-SAL. This migration once all legacy
classes are removed will provide easier-to-read more
maintanable code of Binding MD-SAL.

Change-Id: I1df6cda4bd6035ac5e01e1285f8aab4201dcc86d
Signed-off-by: Tony Tkacik <ttkacik@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 2578 - Added Binding Adapters for new Notification Broker
Jan Hajnar [Tue, 17 Feb 2015 15:47:54 +0000 (16:47 +0100)]
Bug 2578 - Added Binding Adapters for new Notification Broker

Implement and integrate Binding to DOM Notification adapters

* implemented forwarded notification broker
* added simple test for forwarded notification broker
* added configuration of new modules and services to md-sal config

Change-Id: I259c971f0dc61bc1b00cbaad2956c3d8b37ff780
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
9 years agoMerge changes Ida315250,I90171a8b
Tony Tkacik [Wed, 4 Mar 2015 09:17:20 +0000 (09:17 +0000)]
Merge changes Ida315250,I90171a8b

* changes:
  BUG-2637: migration final - cleanup
  BUG-2637: migration consequence - fix unit test

9 years agoBUG-2637: migration consequence - fix unit test
Michal Rehak [Tue, 3 Mar 2015 13:08:01 +0000 (14:08 +0100)]
BUG-2637: migration consequence - fix unit test

 - fixed unit test in sal-binding-broker
 - temporary fix of toaster-it

Change-Id: I90171a8b1d15cde70946a95c8246f34f0e255f35
Signed-off-by: Michal Rehak <mirehak@cisco.com>