mdsal.git
8 years agoBug 4035: Fixed some sonar warnings in md.sal.binding.impl
Tony Tkacik [Tue, 28 Apr 2015 13:41:05 +0000 (15:41 +0200)]
Bug 4035: Fixed some sonar warnings in md.sal.binding.impl

Change-Id: I7b850b65a7bfc40ef757115ae37a031fa88bebeb
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Remove unused implementations from sal-common-impl
Tony Tkacik [Thu, 23 Jul 2015 12:23:26 +0000 (14:23 +0200)]
Bug 4035: Remove unused implementations from sal-common-impl

Removed  left-overs from Hydrogen and Helium which are
not used anymore in Lithium codebase and will be unnecessary
in Beryllium codebase.

Removed classes were never part of public API contracts
outside of MD-SAL.

Change-Id: I2d19373b270e539598fe31b7e493db494b017100
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Removed sal-common which is unused since Helium.
Tony Tkacik [Thu, 23 Jul 2015 11:26:08 +0000 (13:26 +0200)]
Bug 4035: Removed sal-common which is unused since Helium.

Change-Id: Ia6e15cc1e94fcf5794a56fbf61d260644dcb457b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Fixed some sonar / findbugs issues in DOM MD-SAL.
Tony Tkacik [Thu, 23 Jul 2015 11:11:08 +0000 (13:11 +0200)]
Bug 4035: Fixed some sonar / findbugs issues in DOM MD-SAL.

Change-Id: Id0ab9f65e4f1663f9e6cd85a6235a0a5fdee6f88
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Remove references to not present artefacts.
Tony Tkacik [Thu, 23 Jul 2015 09:13:27 +0000 (11:13 +0200)]
Bug 4035: Remove references to not present artefacts.

Change-Id: Id0308a4b544572df16bf01b1742eed60246dde54
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoBug 4035: Extract dom-config from core-api and broker-impl
Tony Tkacik [Wed, 22 Jul 2015 12:59:20 +0000 (14:59 +0200)]
Bug 4035: Extract dom-config from core-api and broker-impl

This patch introduces two new artefacts sal-dom-config
and sal-dom-broker-config which hosts all config subsystem
related MD-SAL DOM Broker implementation.

This patch is required for MD-SAL split in order to
not have cyclic dependency between controller and md-sal
project.

Change-Id: Ic93c583c07ae3e088dcf0e74cbdaaf627a8e79f6
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoEnabling Data Change Notifications for all nodes in cluster.
Harman Singh [Fri, 24 Jul 2015 01:32:46 +0000 (18:32 -0700)]
Enabling Data Change Notifications for all nodes in cluster.

Two new interfaces are introduced ClusteredDataChangeListener and ClusteredDOMDataChangeListener and external applications will have to implement any of that interface,
if those applications want to listen to remote data change notifications.

Datastore registers listeners, which are instance of that interface, even on followers.

Change-Id: I0e29cdf2a08a2051de5fc8ce73b9ec8ac408e45b
Signed-off-by: Harman Singh <harmasin@cisco.com>
8 years agoDecouple message bus from netconf connector
Tomas Cere [Thu, 13 Aug 2015 09:06:22 +0000 (11:06 +0200)]
Decouple message bus from netconf connector

Change-Id: I6a143e868adc1e5c7a9b114798e7009bb6ef8675
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Tomas Cere <tcere@cisco.com>
8 years agoDecouple config and netconf subsystems.
Tomas Cere [Thu, 13 Aug 2015 09:06:54 +0000 (11:06 +0200)]
Decouple config and netconf subsystems.

Extract a common mapping for config pusher and config subsystem netconf
Add a ConfigPersisterFacade for XML that allows reads/writes from/to config
subsystem using XML format
Push notifications from YangStoreService to NetconfNotificationManager instead
of using custom listeners
Migrate netconf features from controller features, untangle features

Change-Id: I71e4ca6e0258e0b1f0d6c19119f93eb9d68b7bca
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
8 years agoFix license header violations in sal-binding-broker
Thanh Ha [Sat, 8 Aug 2015 06:00:33 +0000 (02:00 -0400)]
Fix license header violations in sal-binding-broker

Change-Id: If6b75f466f97149ce4f0290135a754ca6cba1034
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-dom-broker
Thanh Ha [Sat, 8 Aug 2015 05:53:27 +0000 (01:53 -0400)]
Fix license header violations in sal-dom-broker

Change-Id: I78a5b836b7ea5053ede25a31e8a40319d365fe60
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-inmemory-datastore
Thanh Ha [Sat, 8 Aug 2015 05:45:08 +0000 (01:45 -0400)]
Fix license header violations in sal-inmemory-datastore

Change-Id: I160d107a813c28ac75f1e5e21121068de9ccc7b8
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-binding-api
Thanh Ha [Sat, 8 Aug 2015 05:43:04 +0000 (01:43 -0400)]
Fix license header violations in sal-binding-api

Change-Id: I877608c114bf4479c760f5b5dafed5d100d12cf5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-dom-spi
Thanh Ha [Sat, 8 Aug 2015 05:41:23 +0000 (01:41 -0400)]
Fix license header violations in sal-dom-spi

Change-Id: I82f4796c933a6cec89950d4c474a0053637b2646
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-dom-api
Thanh Ha [Sat, 8 Aug 2015 05:39:55 +0000 (01:39 -0400)]
Fix license header violations in sal-dom-api

Change-Id: I08a3d973bb56d6ee267576b691a32bfe27db6820
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-common-impl
Thanh Ha [Sat, 8 Aug 2015 05:19:29 +0000 (01:19 -0400)]
Fix license header violations in sal-common-impl

Change-Id: I0702d7954d59f92ab62f6887a780db8a80f42ffa
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix license header violations in sal-common-api
Thanh Ha [Sat, 8 Aug 2015 05:17:07 +0000 (01:17 -0400)]
Fix license header violations in sal-common-api

Change-Id: I58fdef120495514ef94f2e9681790786ba4e0841
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 4035: Invert dependency binding-impl -> binding-config
Tony Tkacik [Wed, 22 Jul 2015 09:24:03 +0000 (11:24 +0200)]
Bug 4035: Invert dependency binding-impl -> binding-config

Dependency between sal-binding-broker-impl and sal-binding-config
was inverted in order to ease split-off and to provide config
wiring outside of implementation.

This is required for separation of MD-SAL Binding implementation
into MD-SAL Project.

Change-Id: Id18567b2c51045461ed12500fe5cb2f324f55b0c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoFixed wrong format in ShardedDOMDataTree
Tony Tkacik [Thu, 23 Apr 2015 14:09:28 +0000 (16:09 +0200)]
Fixed wrong format in ShardedDOMDataTree

Change-Id: Ie32ff9ad72e4bbae9a5ef1290ff63d5780c92313
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoFix features-netconf-connector not being included
Robert Varga [Mon, 22 Jun 2015 15:27:31 +0000 (17:27 +0200)]
Fix features-netconf-connector not being included

mdsal-artifacts should be listing the features it needs, so users can
pick up their versions. This was not true for
features-netconf-connector.

Change-Id: I4d53d8cf3d6ff1bce57e9de223126fea5269419d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years ago[RFC][Fix] Fix for connection in pom.xml.
Jan-Simon Möller [Wed, 3 Jun 2015 13:41:22 +0000 (15:41 +0200)]
[RFC][Fix] Fix for connection in pom.xml.

The connection value was wrong.
Apply values proposed by zxiiro.

Also fix sal-dom-xsql (wrong developerConnection).

This allows me to run  mvn site
w/o failing due to the wrong entry.

Change-Id: I15d953647a40dde4b37246a78bae120552efb15b
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
9 years agoMigrate to MoreObjects
Robert Varga [Sat, 6 Jun 2015 19:45:12 +0000 (21:45 +0200)]
Migrate to MoreObjects

Objects is overloaded with JDK7, use the MoreObjects class.

Change-Id: I73f9ba24e990df8160b45b6fb0763a1b2ac231d6
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoImprove BindingDOMRpcImplementationAdapter performance
Robert Varga [Thu, 28 May 2015 11:20:30 +0000 (13:20 +0200)]
Improve BindingDOMRpcImplementationAdapter performance

BindingReflections return a non-shared QNameModule instance, which means
that we may end up using suboptimal lookups when comparing QNames.
Furthermore it is not the QNameModule which we need in the fastpath, but
rather QName of the input statement, hence create a cached reference of
that -- leading to minimal object allocation in the fast path.

Change-Id: I97ceb43d80c50d53d21cc66a31bfaae6ff0193e9
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit c4ee9b293370b81b76cc0e06accf3cde31ac1722)

9 years agoInstantiate faster RpcServiceInvokers
Robert Varga [Wed, 27 May 2015 15:00:07 +0000 (17:00 +0200)]
Instantiate faster RpcServiceInvokers

Now that we have the SchemaPath->Method mapping available and
RpcServiceInvoker can instantiate efficient invokers based on the
QName->Method mapping, switch over to them by creating an intermediate
map.

Change-Id: If5e17924d9deb494045965578cfcec6d321d04d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 0aedb207da64e63900e2dbc85ba2a030ea7800e4)

9 years agoRework BindingDOMRpcImplementationAdapter instantiation
Robert Varga [Wed, 27 May 2015 11:45:07 +0000 (13:45 +0200)]
Rework BindingDOMRpcImplementationAdapter instantiation

Move the SchemaPath/Method map closer to where we instantiate invokers.
This has the benefit of speeding up registration code very slightly,
but more importantly it allows instantiating more efficient invokers, as
we have the SchemaPath->Method map readily available.

Change-Id: Iefc0faadcfd7df6c40240ce1f78c7b734f06c618
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 99783448ed6bbcad04b66379db638241c58e3ec8)

9 years agoBUG 3067: Added support for blocking if schema is not available.
Tony Tkacik [Tue, 5 May 2015 11:57:57 +0000 (13:57 +0200)]
BUG 3067: Added support for blocking if schema is not available.

Codecs are able to send specific exception, which describes
reason of failure for codec failing. If the reason is
missing schema (not yet loaded) we catch it and retry
serialization after schema context is upgraded.

User thread will be blocked maximally for 5 seconds
after that it will be unblocked.

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

9 years agoTake advantage of YangInstanceIdentifier methods
Robert Varga [Fri, 22 May 2015 16:14:47 +0000 (18:14 +0200)]
Take advantage of YangInstanceIdentifier methods

YangInstanceIdentifier provides new, fast methods to acquire parent,
check if it empty and size of path arguments. Take advantage of them.

Change-Id: I527ff8cefb2799cb188ffe294c69e3b81a0d6909
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit ad7a6537b709a72e763835cae683b8cc12401ce1)

9 years agoBUG 3566 : Get remote-rpc working again
Moiz Raja [Thu, 4 Jun 2015 17:18:30 +0000 (10:18 -0700)]
BUG 3566 : Get remote-rpc working again

Some changes to moving from CompositeNode to NormalizedNode had broken
remote rpc. This patch attempts to get it working again.

Verified everything works in a 3 node cluster with the clustering-test-app

Change-Id: I2ec714f1d21d95812bd5b486260be3575df252a2
Signed-off-by: Moiz Raja <moraja@cisco.com>
(cherry picked from commit 40217346551e20a809df37cd92955cd63c61944f)

9 years agoFix newly-broken javadocs
Robert Varga [Tue, 12 May 2015 23:54:07 +0000 (01:54 +0200)]
Fix newly-broken javadocs

Self-closing elements are not allowed.

Change-Id: I9d9c655d04c420b575e6ace51aaf2b0af931ecef
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 484a0983ea48160af9a8c79acbed57ee984f5103)

9 years agoBug -3221 : Adding a new DataStoreUnavailableException for external applications.
Harman Singh [Mon, 18 May 2015 21:51:46 +0000 (14:51 -0700)]
Bug -3221 : Adding a new DataStoreUnavailableException for external applications.
If cluster member, which is a leader of one or multiple shards becomes unavailable,
Shard re-election happens after certain time period and anyone tries to access datastore,
receives akka.timeout exception. No application can act upon such exception.

DataStoreUnavailableException will help external applications to retry if they see this exception.

Change-Id: Iceb10580bbe73ae91dc8abb4bc6a183cb4fad6f8
Signed-off-by: Harman Singh <harmasin@cisco.com>
9 years agoIntroduce DOMNotificationRejectedException
Robert Varga [Tue, 12 May 2015 23:54:29 +0000 (01:54 +0200)]
Introduce DOMNotificationRejectedException

DOMNotificationPublishService.REJECTED wraps a throwable, which may
cause problems with code which attempts to unwind it, as frameworks tend
to propagate Throwables rather than wrapping them.

Change-Id: I77d7ceeef8213425636dab92f6994fcd3f1443e9
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 12bf820406245feb0285317a88e5c7b3c9829ce6)

9 years agoBug 3234: Do not notify empty Rpc implementation change.
Tony Tkacik [Tue, 19 May 2015 09:48:49 +0000 (11:48 +0200)]
Bug 3234: Do not notify empty Rpc implementation change.

DOMRpcBroker was sending notifications with empty
set of RPC added or removed.

This is possible if registration for RPC already exists
and another one was registered.

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

9 years agoMigrade junit.frawork.Assert
Robert Varga [Mon, 25 May 2015 15:33:31 +0000 (17:33 +0200)]
Migrade junit.frawork.Assert

The new place s org.junit.Assert, migrate imports to squash eclipse
warnings.

Change-Id: I6900b400b32c7b3fd840497fec99159d6ec779db
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 392a8e3b69781c91cc52174dcb0c8132682c13c3)

9 years agoIntroduced Lazy DOM Rpc Result future.
Tony Tkacik [Thu, 21 May 2015 15:08:47 +0000 (17:08 +0200)]
Introduced Lazy DOM Rpc Result future.

Introduced LazyDOMRpcResultFuture which is used
when Binding Aware app invokes Binding Aware Rpc implementation.

  - This future encapsulates original future which
    is deencapsulated without any processing once returned
    back to Binding RPC implementation.

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

9 years agoBUG-3183: Extend notification publisher API
Michal Rehak [Tue, 12 May 2015 08:36:26 +0000 (10:36 +0200)]
BUG-3183: Extend notification publisher API

 - offer methods of notificationPublishService now return ListenableFuture
 - added exception for notification rejected outcome

Change-Id: Iff17e1edd754d49e6c53f97e357c34f5eac6a8ef
Signed-off-by: Michal Rehak <mirehak@cisco.com>
(cherry picked from commit 38c80b0fc0c559aabd0a8dce59dd99deab1c3418)

9 years agoBug 3148 - Fixed binding.api.NotificationListener support
Tony Tkacik [Thu, 7 May 2015 17:24:15 +0000 (19:24 +0200)]
Bug 3148 - Fixed binding.api.NotificationListener support

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

9 years agoAllow DOMNotificationRouter to be tuneable
Robert Varga [Wed, 20 May 2015 15:53:21 +0000 (17:53 +0200)]
Allow DOMNotificationRouter to be tuneable

The details of how deep is the queue and how the backoff strategy is
applied should be tuneable. Model them and provide the hooks.

Change-Id: I6eda6bebc2cf506d627e09d3949a73e97ed866e4
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 1ef2ed07ea9d7d42963b8b2ce5e99004f6c33274)

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"