mdsal.git
9 years agoBug 2528 - Binding Generator: Generated notification implements ChildOf
Peter Kajsa [Thu, 8 Jan 2015 12:50:02 +0000 (13:50 +0100)]
Bug 2528 - Binding Generator: Generated notification implements ChildOf
interface

Generated Notification interface implements ChildOf<DataObject> interface
which is incorrect. Generated Notification should not implement ChildOf
interface since it is not part of data tree. This could lead to use of
Notification in wrong context and may confuse consumers of APIs.

Notice: The solution replaces "implements ChildOf<DataObject>" with
"implements DataObject" in generated Notification interface. Notification
has structured content, so I think the generated Notification interface should
implements at least DataObject interface in order to be able to construct
InstanceIdentifier for the notification (analogously as it is by RPC's input
and output).

Change-Id: I55c7a8cc4ce450fd712c63f8e77881d4a18674e6
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
9 years agoBUG-2453 Remove custom hashcode/equals from Enum type
Maros Marsalek [Thu, 7 May 2015 12:12:17 +0000 (14:12 +0200)]
BUG-2453 Remove custom hashcode/equals from Enum type

Custom hashcode and equals made it impossible to match Enum types based on
packageName and name.

Change-Id: Ib3eed1f0892234b44f8e3459e48f303732a86ffe
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBug 2988 - DTO equality appears to be broken by proxy
Martin Bobak [Mon, 25 May 2015 13:09:01 +0000 (15:09 +0200)]
Bug 2988 - DTO equality appears to be broken by proxy

Change-Id: Ib068be34371e8863ef6f2ef8d936d3d6918aba37
Signed-off-by: Martin Bobak <mbobak@cisco.com>
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 3067: Improved error reporting in Binding Data Codec
Tony Tkacik [Wed, 29 Apr 2015 13:35:08 +0000 (15:35 +0200)]
Bug 3067: Improved error reporting in Binding Data Codec

Error reporting in Binding Data Codec was reworked
to throw three additional subclasses of IllegalArgumentException
for specific case of failure:

MissingSchema and MissingSchemaForClass - exception thrown
when schema context associated with codec does not contain
models for supplied class or DOM argument.

IncorrectNesting is thrown when schema is available an user
constructed data with invalid nesting (bypassed generic
compile-time checks).

The checks to determine type of exception are done only
if error condition is detected, so non-error fast path
should not be affected by advanced checks.

Added test which tests these types of exceptions.

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

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 agoBug 3151: Fix Not a Proxy Instance Exception
Thomas Bachman [Thu, 7 May 2015 14:55:03 +0000 (10:55 -0400)]
Bug 3151: Fix Not a Proxy Instance Exception

This fixes a bug where a "Not a Proxy Instance"
exception (also IllegalArgumentException) is thrown
when hashCode is invoked in a yangtools generated
builder.

Change-Id: Iddc7ca6e4785e5ce11e41900a438dbb49baeaf6d
Signed-off-by: Thomas Bachman <tbachman@yahoo.com>
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 2333 - Java code generation error, when yang model contains Choice node
pkajsa [Thu, 13 Nov 2014 13:51:20 +0000 (14:51 +0100)]
Bug 2333 - Java code generation error, when yang model contains Choice node
in module body at top level

BindingGeneratorImpl fails (NoSuchElementException) during java source code
generation from yang model which contains Choice node directly in module body
at top level. The parent path of Choice node is empty (because the parent
is the module) and therefore iterator.next() on the path fails. For more
information see Bug 2333.

Change-Id: I6e617eca91bb5d8d2b91ad058a4df5c2793ec81d
Signed-off-by: pkajsa <pkajsa@cisco.com>
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 agoMerge "Add hooking into NormalizedNodeParsers."
Tony Tkacik [Thu, 30 Apr 2015 13:37:48 +0000 (13:37 +0000)]
Merge "Add hooking into NormalizedNodeParsers."

9 years agoAdd hooking into NormalizedNodeParsers.
Tomas Cere [Tue, 28 Apr 2015 12:35:13 +0000 (14:35 +0200)]
Add hooking into NormalizedNodeParsers.

Makes it possible to add a ParsingStrategy into the parsers,
to allow for callbacks/custom processing while parsing.
DefaultParsingStrategy has the same behaviour as the already present parsers.

Change-Id: I5998af4befaf31d3af3f4cf5e2f46ddc32b1e05b
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
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 agoMerge "Bug 3051: Fixed pattern checks in generated DTOs"
Robert Varga [Fri, 24 Apr 2015 11:03:54 +0000 (11:03 +0000)]
Merge "Bug 3051: Fixed pattern checks in generated DTOs"

9 years agoBumped model versions to .8-SNAPSHOT
Tony Tkacik [Fri, 24 Apr 2015 08:37:21 +0000 (10:37 +0200)]
Bumped model versions to .8-SNAPSHOT

Change-Id: I1b1c6c3fcd875795f2b8cab1d4146b25c87ee7e7
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 agoBumped Yangtools by minor version.
Tony Tkacik [Thu, 23 Apr 2015 10:03:12 +0000 (10:03 +0000)]
Bumped Yangtools by minor version.

Change-Id: I0c357c757ed78607982abfbf788433e16c88835c
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
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 agoBug 3051: Fixed pattern checks in generated DTOs
Tony Tkacik [Thu, 23 Apr 2015 15:13:36 +0000 (17:13 +0200)]
Bug 3051: Fixed pattern checks in generated DTOs

Pattern checks in generated DTOs were generated as
OR checks in case model type specified multiple
patterns, but correct behaviour is to do AND.

So in order string needs to verified against
all patterns and match all of them.

Change-Id: If82e282312c82dd71de79534c7fa599fcdcefab4
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
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 "change to interface"
Tony Tkacik [Tue, 21 Apr 2015 08:05:53 +0000 (08:05 +0000)]
Merge "change to interface"

9 years agochange to interface
Debalina Ghosh [Fri, 17 Apr 2015 17:47:06 +0000 (10:47 -0700)]
change to interface

Change-Id: Id16a68b5486e334c01341a646a9e83bb0407272c
Signed-off-by: Debalina Ghosh <debalina.ghosh@hp.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 agoworkaround for BUG: 2974
Vishal Thapar [Tue, 14 Apr 2015 12:40:19 +0000 (18:10 +0530)]
workaround for BUG: 2974

Suggested workaround for bug2974 is to add
yang-types revision to ietf-interfaces.yang
This change imports latest revision as well as
changes the dependency to ietf-yang-type-20130715

Change-Id: If0ad60b435ae311db656d1a7e49402bc3ef6bb2f
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
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 "BUG-1485: deprecate length/range methods"
Tony Tkacik [Mon, 13 Apr 2015 09:27:14 +0000 (09:27 +0000)]
Merge "BUG-1485: deprecate length/range methods"

9 years agoMerge "Bug 1260: Implemented Binding Caching Codec"
Robert Varga [Mon, 13 Apr 2015 09:18:48 +0000 (09:18 +0000)]
Merge "Bug 1260: Implemented Binding Caching Codec"

9 years agoMerge "Bug 2374 - YANG Binding: Added support for AugmentationHolder interface"
Robert Varga [Mon, 13 Apr 2015 08:40:23 +0000 (08:40 +0000)]
Merge "Bug 2374 - YANG Binding: Added support for AugmentationHolder interface"

9 years agoBUG-1485: deprecate length/range methods
Robert Varga [Wed, 18 Mar 2015 17:20:15 +0000 (18:20 +0100)]
BUG-1485: deprecate length/range methods

These methods leak the internals of how constraints are enforced. No
outside parties should rely on them, so lets mark them deprecated. If we
do not get reports of use, we should be removing them in a future
release.

Change-Id: I128c5abe5c894a4808ff30dcebd6af42d8f682cb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 1260: Implemented Binding Caching Codec
Tony Tkacik [Wed, 8 Apr 2015 17:41:05 +0000 (19:41 +0200)]
Bug 1260: Implemented Binding Caching Codec

Implemented Bidning Caching Codec which maintains
API-user configured cache of serialized data
from Bidning to NormalizedNode.

These cached data are used in subsequent serializations
in order to not allocate new NormalizedNodes for
logically equivalent data.

Change-Id: Iafaed957453569c3e8ecfbb2aed333f3a1fd418f
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoDo not declare RuntimeExceptions as thrown
Robert Varga [Sat, 11 Apr 2015 20:40:02 +0000 (22:40 +0200)]
Do not declare RuntimeExceptions as thrown

Fix a bunch of sonar warnings around declaring runtime exceptions.

Change-Id: I6e8267e29ef6c0d3f2d220531ca656ff564331ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix constant names
Robert Varga [Sat, 11 Apr 2015 15:03:58 +0000 (17:03 +0200)]
Fix constant names

Constants should have capitalized names. Fixes a few sonar warnings.

Change-Id: I600b482a817055784874e91f9cb8c5b06b948302
Signed-off-by: Robert Varga <rovarga@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 agoMerge "Make sure LOOKUP is a proper constant"
Tony Tkacik [Thu, 9 Apr 2015 12:33:42 +0000 (12:33 +0000)]
Merge "Make sure LOOKUP is a proper constant"

9 years agoMerge "Fix modifier ordering"
Tony Tkacik [Thu, 9 Apr 2015 12:32:56 +0000 (12:32 +0000)]
Merge "Fix modifier ordering"

9 years agoMake sure LOOKUP is a proper constant
Robert Varga [Thu, 9 Apr 2015 11:23:22 +0000 (13:23 +0200)]
Make sure LOOKUP is a proper constant

Change-Id: I684ead0df12bdc5c012f8a20e04f4508c5bbb429
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix modifier ordering
Robert Varga [Thu, 9 Apr 2015 11:11:05 +0000 (13:11 +0200)]
Fix modifier ordering

JLS specifies annotations need to to come before other modifiers, of
which visbility should be first.

Change-Id: I754ef08c13256647d024c121e75fd3617ef6d064
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 "Fixed incorrect signature in NotificationListenerInvoker"
Robert Varga [Wed, 8 Apr 2015 22:55:45 +0000 (22:55 +0000)]
Merge "Fixed incorrect signature in NotificationListenerInvoker"

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 agoFixed incorrect signature in NotificationListenerInvoker
Tony Tkacik [Wed, 8 Apr 2015 17:42:29 +0000 (19:42 +0200)]
Fixed incorrect signature in NotificationListenerInvoker

Change-Id: I01e54f6193e54b1488a506ae47d24ba8c808281a
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
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 "Fixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)"
Robert Varga [Thu, 2 Apr 2015 14:21:46 +0000 (14:21 +0000)]
Merge "Fixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)"

9 years agoFixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)
Tony Tkacik [Thu, 2 Apr 2015 13:35:03 +0000 (15:35 +0200)]
Fixed NPE in BindingCodecTree#getSubtreeCodec(YangInstanceIdentifier)

Change-Id: If77807004779ce6ade106f1bacc9918f98f996ee
Signed-off-by: Tony Tkacik <ttkacik@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 agoBUG-869: kill more sonar warnings
Robert Varga [Tue, 31 Mar 2015 21:11:08 +0000 (23:11 +0200)]
BUG-869: kill more sonar warnings

Empty statement, mis-ordered annotations and keywords, unneeded
keywords.

Change-Id: I88a7ba62b5fe22cda96a1b5243a2ae4968c31ab3
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-869: remove public modifier
Robert Varga [Tue, 31 Mar 2015 20:55:31 +0000 (22:55 +0200)]
BUG-869: remove public modifier

Public is implied for all methods in an interface, do not specify it
explicitly.

Change-Id: Ic673b60111f9ecf62a6242d3bedf8607036a3403
Signed-off-by: Robert Varga <rovarga@cisco.com>
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 agoBug 2374 - YANG Binding: Added support for AugmentationHolder interface
Tony Tkacik [Tue, 31 Mar 2015 12:57:44 +0000 (14:57 +0200)]
Bug 2374 - YANG Binding: Added support for AugmentationHolder interface

Binding specification v1 was originally designed and implemented
in only one implementation of interfaces in mind, which were generated one,
but during Helium additional implementation was introduced, but
specification and generated copy builder constructor did not accounted for
that change. Added additional interface which is implemented by LazyDataObject
that allow copy of augmenations.

Updated code generator to allow for that change and implementation of
LazyDataObject to support new interface contract.

Change-Id: I15aec38259f7f5e95301368d0264dfcf0571e2ba
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 2924: DataCodecTree expose (de)serialization methods for path arguments."
Robert Varga [Tue, 31 Mar 2015 11:19:49 +0000 (11:19 +0000)]
Merge "Bug 2924: DataCodecTree expose (de)serialization methods for path arguments."

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 agoBug 2924: DataCodecTree expose (de)serialization methods for path arguments.
Tony Tkacik [Tue, 31 Mar 2015 08:39:37 +0000 (10:39 +0200)]
Bug 2924: DataCodecTree expose (de)serialization methods for path arguments.

Change-Id: I21129df70829a6b9a35af8350352907d46d27de2
Signed-off-by: Tony Tkacik <ttkacik@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"