8 years agoBug 4327 - Fixed DataTreeChangeListener registration in PingPongDataBroker 96/27296/3
Michal Polkorab [Tue, 22 Sep 2015 14:34:06 +0000 (16:34 +0200)]
Bug 4327 - Fixed DataTreeChangeListener registration in PingPongDataBroker

 - delegate broker was incorrectly queried for DOMDataTreeChangeService
 - it must ask for supported extensions instead of instanceof
 - this is lithium branch fix,
   beryllium change:

Change-Id: Ie1757c762018e7188d76a7728f2f8ea52293d73f
Signed-off-by: Michal Polkorab <>
8 years agoRemove expensive uses of Calendar.getInstance() 81/25981/3
Stephen Kitt [Tue, 25 Aug 2015 16:07:50 +0000 (18:07 +0200)]
Remove expensive uses of Calendar.getInstance()

nanoTime() is used instead of currentTimeMillis() to avoid issues with
leap seconds.

Change-Id: Idbfcd994424c91a384c47fe0ad12bc6a7ea33972
Signed-off-by: Stephen Kitt <>
8 years agoRemove obsolete artifacts from commons.opendaylight 89/27189/2
Stephen Kitt [Fri, 18 Sep 2015 14:39:47 +0000 (16:39 +0200)]
Remove obsolete artifacts from commons.opendaylight

commons.opendaylight includes a few obsolete artifacts in its
dependency management: features-base, features-adsal, and
features-nsf. This patch removes them.

Change-Id: Ief98dce25d66439fea23e231470583b971f27756
Signed-off-by: Stephen Kitt <>
8 years agoBug 4202: Migrate also toaster to use mdsal project 69/27369/1
Vratko Polak [Wed, 23 Sep 2015 17:33:28 +0000 (19:33 +0200)]
Bug 4202: Migrate also toaster to use mdsal project

This only changes dependency feature omitted from Change 26079,
perhaps Java edits are also needed to keep toaster working.

Also, git has somehow enforced change of line endings everywhere.

Change-Id: I810fba0ae7a55e123dd6f78ba23a7e77a7118b57
Signed-off-by: Vratko Polak <>
8 years agoBug 4202 - Migrate archetypes to use MD-SAL Project 50/27250/1
adetalhouet [Tue, 22 Sep 2015 01:41:31 +0000 (21:41 -0400)]
Bug 4202 - Migrate archetypes to use MD-SAL Project

Change-Id: Ic5fa0913c3332a20cbe97bc4c6ea64edc7549a1d
Signed-off-by: adetalhouet <>
8 years agoBUG-865: remove YangInstanceIdentifier.toInstance() 63/27163/1
Robert Varga [Fri, 18 Sep 2015 13:59:48 +0000 (15:59 +0200)]
BUG-865: remove YangInstanceIdentifier.toInstance()

This removes the use of a deprecated method.

Change-Id: I46f9a3e3a8c9741fa603aa04e2673a13c6fb5c92
Signed-off-by: Robert Varga <>
8 years agoAdd test scope to karaf-empty artifact in akka feature test pom 49/27149/3
Tomas Cere [Fri, 18 Sep 2015 09:11:09 +0000 (11:11 +0200)]
Add test scope to karaf-empty artifact in akka feature test pom

Change-Id: Ida85537eac861814bf4d137718d4a168036dcc1f
Signed-off-by: Tomas Cere <>
8 years agoAdd "documentation" flags for WriteTransaction 98/25398/6
Stephen Kitt [Tue, 18 Aug 2015 08:37:53 +0000 (10:37 +0200)]
Add "documentation" flags for WriteTransaction

In WriteTransaction, the createMissingParents argument to put() and
merge() is a boolean, which results in code like

    ...put(store, path, data, true);

which isn't immediately readable to neophytes. This patch adds two
client code can be written as

    ...put(store, path, data, CREATE_MISSING_PARENTS);

instead (but without introducing an enum).

The FAIL_ON_MISSING_PARENTS constant also documents the behaviour in
the other path; I named it based on the pre-condition check in
AbstractWriteTransaction (which results in an IllegalArgumentException
if a parent is missing).

Change-Id: Ic95b5e4f3d8574f0014cdf6a00a77013b94b00cc
Signed-off-by: Stephen Kitt <>
8 years agoYang code generator cleanup 70/25570/5
Stephen Kitt [Fri, 21 Aug 2015 11:26:10 +0000 (13:26 +0200)]
Yang code generator cleanup

Two axes:
* make the generated code slightly better
* make the generator code slightly better

Fixes in generator code:
* fields which can be local variables
* map overwrite detection using put()'s return value
* logging with exceptions
* using File's parent/child handling instead of concatenating strings
* if (condition) { return true; } else { return false; }
* if (... == false) -> if (!...)
* interface method declarations are public by default
* Collections.singletonList() instead of Arrays.asList() for
  single-item collections
* StringBuilder instead of StringBuffer
* String concatenation instead of straight-forward StringBuilder
  (i.e. non-conditional append() calls)
* typos: hierarchchical -> hierarchical, intends -> indents
* drop unused parameter from
* when processing only values in a map, use .values() rather than
* split StringBuilder::append(a + b) into two ::append() calls
* clean up the method parameter construction in MethodSerializer (to
  avoid deleting the ", " at the end)

Fixes in generated code:
* use { } as requested the Checkstyle rules
* handle empty service interface sets explicitly

It would be nice to use the <> operator without specifying the type
where possible, but the Eclipse AST parser used in the unit tests is
too old for this (so the generated code is correct and works
elsewhere, but fails the unit tests).

Change-Id: I725ce8d98f9ee389d394772733663ecacaccf8fa
Signed-off-by: Stephen Kitt <>
8 years agoBug 4317: Added the version of yang-maven-plugin. 13/27013/2
Hideyuki Tai [Tue, 15 Sep 2015 18:45:35 +0000 (11:45 -0700)]
Bug 4317: Added the version of yang-maven-plugin.

In the pom.xml of config-parent, the version of yang-maven-plugin was
missing. In the result, Maven downloaded the latest release version
(0.7.1-Lithium-SR1) of yang-maven-plugin, although the latest SNAPSHOT
version (0.8.0-SNAPSHOT) was expected here.
This patch added the version of yang-maven-plugin, and specified the
latest SNAPSHOT version for it.

Change-Id: I9a30aa4fc3c80d81c9342664135be484a219493d
Signed-off-by: Hideyuki Tai <>
8 years agoSplit {copyright} into {copyright-year} and {copyright} 41/26941/5
Flavio Fernandes [Mon, 14 Sep 2015 21:53:17 +0000 (17:53 -0400)]
Split {copyright} into {copyright-year} and {copyright}

With this change, archetype will explicitly use year for copyright to
ensure check style does not fail.

Patch set 3: replace (c) with © symbol
Patch set 4: add default values for copyright-year and version

Change-Id: I5b4bdfc273d578afafd7555a96e5a1fe732677bb
Signed-off-by: Flavio Fernandes <>
8 years agoBUG-2399: take into account new ModificationTypes 10/27110/5
Robert Varga [Thu, 17 Sep 2015 03:42:46 +0000 (05:42 +0200)]
BUG-2399: take into account new ModificationTypes

When structural containers come and go we can see APPEARED/DISAPPEARED

Patch set 5: fix build

Change-Id: Ic3da43398163a01e21adc013586949026075e3c0
Signed-off-by: Robert Varga <>
8 years agoFixed properties not expanded in features.xml 35/27135/3
Tony Tkacik [Thu, 17 Sep 2015 18:40:58 +0000 (20:40 +0200)]
Fixed properties not expanded in features.xml

Change-Id: I8bf4c30be1e6c427cfd9aff8afe5f465a666dc22
Signed-off-by: Tony Tkacik <>
8 years agoBug-4214 - Add support for configurable snapshot chunk size. 13/26413/3
Shaleen Saxena [Mon, 31 Aug 2015 02:25:19 +0000 (22:25 -0400)]
Bug-4214 - Add support for configurable snapshot chunk size.

Added a new variable in the distributed-datastore-provider.yang. This
will be used to configure the snapshot chunk size. Added various
setters/getters to the DatastoreContext. The support for this variable
was added to JMX as well, so that the value can be seen via JConsole.
Moreover, added tests in DatastoreContextTest.

Also fixed a recurring typo in sal-akka-raft. Snapshot was spelled as
snaphot (missing s in shot).

This code was unit tested with different entries in datastore.cfg. Also
tested the case where no special value was provided in datastore.cfg,
and the default value was shown in jconsole.

Change-Id: Ie754075cc25f9eadf01cc65aee726735144c1794
Signed-off-by: Shaleen Saxena <>
(cherry picked from commit f3c38988cc31e07bab473cace946aebf5152c61f)

8 years agoBug 4202: Migration to use mdsal project 79/26079/14
Tony Tkacik [Mon, 7 Sep 2015 10:30:22 +0000 (12:30 +0200)]
Bug 4202: Migration to use mdsal project

Migrated controller to use MD-SAL provided
Java Binding instead of YANG-Tools provided JAVA

This migration deals only with compile time and
in runtime.

Updated following features
  - features-config
  - features-config-netty
  - features-config-persister
  - features-mdsal
  - features-extras
  - features-protocol-framework

to use
  - Java Binding hosted in MD-SAL project
  - features-parent from odlparent

Change-Id: Iba40d74d118e212c9a57fa28711bbbe339fe1bbd
Signed-off-by: Tony Tkacik <>
8 years agoBUG-865: remove the use of ModificationType.MERGE 07/27107/2
Robert Varga [Thu, 17 Sep 2015 03:34:55 +0000 (05:34 +0200)]
BUG-865: remove the use of ModificationType.MERGE

This event is deprecated and is not produced, remove references to it.

Change-Id: I181168a923929a53806164b5ffd530db2c18c299
Signed-off-by: Robert Varga <>
8 years agoBUG 2298: Ask Git to normalize line endings 66/12466/4
Jozef Behran [Mon, 3 Nov 2014 15:08:07 +0000 (16:08 +0100)]
BUG 2298: Ask Git to normalize line endings

Added file attributes configuration file to make GIT aware
of which files are textual and which are binary and allow
it to normalize the line endings in the textual files
without the developers needing to do any special setup on
their Git installation.

Change-Id: I2d4e9fb4eeeab2893209741781e13c7cdfe1b01d
Signed-off-by: Jozef Behran <>
8 years agoRemove sonar.branch property 77/26277/3
Thanh Ha [Tue, 1 Sep 2015 16:48:23 +0000 (12:48 -0400)]
Remove sonar.branch property

This property isn't being used and actually causes build failure in
Sonar 5.x.

Change-Id: Ie3e25b0ed17d699305bc860fdd8a7f12c03d50d8
Signed-off-by: Thanh Ha <>
8 years agoUpgrade archetype-packaging plugin to 2.4 56/26956/2
Stephen Kitt [Tue, 15 Sep 2015 07:01:18 +0000 (09:01 +0200)]
Upgrade archetype-packaging plugin to 2.4

Change-Id: I97ffeb769cbba79389859405e8898c9dd88a1527
Signed-off-by: Stephen Kitt <>
8 years agoFuture-proof the dummy JAR construction 59/26859/3
Stephen Kitt [Fri, 11 Sep 2015 15:48:08 +0000 (17:48 +0200)]
Future-proof the dummy JAR construction

The shade plugin needs a JAR, and the contents of the project
contribute to a standard JAR rather than a test JAR. Add a JAR goal to
the maven-jar-plugin so the shade plugin can find its artifact
(otherwise the build breaks with forthcoming version upgrades).

Change-Id: If4853eb81208134d536040de8e6e934b38ef762f
Signed-off-by: Stephen Kitt <>
8 years agoBUG-865: remove use of DefaultDataTreeCandidate 51/27051/1
Robert Varga [Wed, 16 Sep 2015 12:52:03 +0000 (14:52 +0200)]
BUG-865: remove use of DefaultDataTreeCandidate

The functionality is available via utility method in DataTreeCandidates,
so use that instead.

Change-Id: I44bab58e39ad226c198f3ada1140152be1e4b4aa
Signed-off-by: Robert Varga <>
8 years agoBUG-865; do not use DurationStatsTracker 46/27046/1
Robert Varga [Wed, 16 Sep 2015 12:40:22 +0000 (14:40 +0200)]
BUG-865; do not use DurationStatsTracker

The class has been deprecated, use the alternative.

Change-Id: I29bd049450c0d5e6b3c2a8801538213c58f37c62
Signed-off-by: Robert Varga <>
8 years agoBug 4105: Remove EntityOwnershipCandidate 50/26950/2
Tom Pantelis [Fri, 11 Sep 2015 20:13:24 +0000 (16:13 -0400)]
Bug 4105: Remove EntityOwnershipCandidate

It was decided that we really don't need to pass an
EntityOwnershipCandidate listener when registering a candidate. Since
apps would most likely create a singleton EntityOwnershipCandidate for
all registerCandidate calls, they might as well register the singleton
listener once via registerListener. This simplifies the interface and
also simplifies OF clustering b/c they need an EntityOwnershipListener
anyway for device node cleanup.

Change-Id: I9fb7d68c1ffbf932c9d0e18efef604c1b05fdf96
Signed-off-by: Tom Pantelis <>
(cherry picked from commit 6b0f9975b09044b7c3c8877ae2d2d06f0a29894a)

8 years agoBug 4094: Fix DCNs on initial registration 49/26949/2
Tom Pantelis [Wed, 19 Aug 2015 02:07:52 +0000 (22:07 -0400)]
Bug 4094: Fix DCNs on initial registration

For DataChangeListener, I modified the code to use a
ResolveDataChangeEventsTask to resolve the initial changed event. It
was noted in Bug 4094 to read the registration path up to the first
wildcard. However this did not work. ResolveDataChangeEventsTask
expects the candidate root path and "after" data to be the tree root
to match the structure of the ListenerTree. When a transaction is
committed, the resulting DataTreeCandidate always points to the root.
So I had to read the root path in ShardDataTree. I could've optimized
for non-wildcarded path registrations but I think wildcarded path
registrations will be the norm anyway.

I added a new method, notifyOfInitialData, in ShardDataTree. Because I
had to create a new ListenerTree with the single registration, I
needed to know the path and scope of the original registration so I
changed several method signatures from the general ListenerRegistration
to the specific DataChangeListenerRegistration which provides access to
the path and scope. However we also have an actor class by that name so
to avoid confusion I renamed the actor class to

DataTreeChangeListener was implemented similarly.

Change-Id: I0ab88d0991761c058b6af81d6d26402ff370b78e
Signed-off-by: Tom Pantelis <>
(cherry picked from commit 0a7e13a8c7fed697800c792698cfef32b2ef0d11)

8 years agoRemove sal-rest-connector artifacts 18/26818/4
Thanh Ha [Fri, 11 Sep 2015 05:41:08 +0000 (01:41 -0400)]
Remove sal-rest-connector artifacts

Bug: 4292
Change-Id: I1601e55765c0a5664c1b0cb3e0ef261a0d522f59
Signed-off-by: Thanh Ha <>
8 years agoFixed relativePaths. 97/26597/5
Tony Tkacik [Mon, 7 Sep 2015 10:30:22 +0000 (12:30 +0200)]
Fixed relativePaths.

Change-Id: I12ba628df83fc0fb7d472039bc3c3002e9708f87
Signed-off-by: Tony Tkacik <>
8 years agoBug 4105: Add hasOwner param to EntityOwnershipListener#ownershipChanged 98/26898/2
Tom Pantelis [Fri, 11 Sep 2015 04:13:51 +0000 (00:13 -0400)]
Bug 4105: Add hasOwner param to EntityOwnershipListener#ownershipChanged

OF clustering needs to know when the last candidate is removed for an
entity so it can clean up inventory. We decided to add a new param,
hasOwner, passed to EntityOwnershipListener#ownershipChanged to indicate if
there is at least one remaining candidate and current owner when a
controller node loses ownership. So if
wasOwner=true && isOwner=false && hasOwner=false, the OF code can
remove the device node from inventory.

To simplify the EntityOwnershipListener#ownershipChanged interface and
to allow for possible future parameters w/o breaking the interface, the
parameters are now encapsulated in an EntityOwnershipChanged DTO. There
already was the same EntityOwnershipChanged class in
sal-distributed-datastore - this class was removed.

Change-Id: I07375f154ac55d34062380ad6d0b30d970bd28e7
Signed-off-by: Tom Pantelis <>
(cherry picked from commit 061d4edabfb421ec79d1dc7afe4163aa52828450)

8 years agoDo not override dependency plugin version 40/26240/3
Robert Varga [Mon, 31 Aug 2015 15:16:50 +0000 (17:16 +0200)]
Do not override dependency plugin version

Version 2.6 is ancient and does not work at least here. Remove the
explicit override and inherit the version from odlparent.

Change-Id: Iabd3a603ae9d2faf0fe2a4c7d8ce43b0cc9428ae
Signed-off-by: Robert Varga <>
8 years agoBUG 4291 : odl-clustering-test-app feature must depend on odl-mdsal-broker 31/26831/1
Moiz Raja [Fri, 11 Sep 2015 01:33:38 +0000 (18:33 -0700)]
BUG 4291 : odl-clustering-test-app feature must depend on odl-mdsal-broker

When odl-clustering-test-app feature depends on odl-mdsal-broker-local the
distributed-entity-ownership service does not get resolved.

Change-Id: I0240ea6b210ec5966f680f786a706365b4f6502c
Signed-off-by: Moiz Raja <>
(cherry picked from commit b079e20e9a9f3ac133f4b5871d6c9158d016ab6a)

8 years agoBug 4105: Fixed feature test failure due to missing dependency. 22/26822/1
Shigeru Yasuda [Fri, 11 Sep 2015 08:06:51 +0000 (17:06 +0900)]
Bug 4105: Fixed feature test failure due to missing dependency.

features-mdsal was missing dependency on sal-clustering-config
(type=xml, classifier=entityownershipconfig).

Change-Id: Ifa1380a1071ae3c7b730e79c4e1c8ff09dbe15e2
Signed-off-by: Shigeru Yasuda <>
8 years agoBug 4105: Remove candidates on PeerDown 08/26808/1
Tom Pantelis [Tue, 18 Aug 2015 06:59:47 +0000 (02:59 -0400)]
Bug 4105: Remove candidates on PeerDown

Currently on PeerDown, the EntityOwnershipShard selects a new owner for
the entities owned by the down node and leaves the down node as a
candidate. If the down node is the only candidate, the owner is cleared.
On PeerUp, it selects a new owner for those entities whose owner is clear.
This was done to handle network partition so a node's candidates remain
registered and are re-assigned when the partition is healed.

Howver this has potential issues when a node is actually
stopped/restarted. It's possible, on restart, that the node doesn't
register a candidate for an entity that it had previously registered for.
So it may get ownership of an entity for which it has no registered

To alleviate this, I changed it to remove all the down node's candidates
on PeerDown. If the node was stopped/restarted, then it will
re-register candidates based on local client requests. This case will be
the norm. To handle network partition, when healed, the follower node
will get the replicated commits for its candidate removals from the
leader. So on Candidate removed, it re-adds its removed candidate if it
has a registered EntityOwnershipCandidate.

I realized that one can register a DOMDataTreeChangeListener for a leaf
node. So I simplified EntityOwnerChangeListener to listen for the owner
leaf instead of the entity path. This avoids the extra notifications
when candidayes are added/removed. I actually did this originally b/c I
thought there was a bug when listening at the entity level which turned
out there wasn't but I left it in as an improvement.

I also added the shard's logId to the listener and support classes for
better debugging of unit tests.

Change-Id: I75d2567ce54b9129eee052ba521c8a71777289b6
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Implement EntityOwnershipListener registration/notification 07/26807/1
Tom Pantelis [Mon, 17 Aug 2015 09:57:53 +0000 (05:57 -0400)]
Bug 4105: Implement EntityOwnershipListener registration/notification

Change-Id: I49ee7f4b5f48ddde4779d37ba34c88dd776dd47b
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Pass ModuleShardConfiguration with CreateShard 06/26806/1
Tom Pantelis [Mon, 17 Aug 2015 00:46:24 +0000 (20:46 -0400)]
Bug 4105: Pass ModuleShardConfiguration with CreateShard

The DistributedEntityOwnershipService first adds the
ModuleShardConfiguration to the Configuration prior to sending the
CreateShard message. However if the ModuleShardConfiguration gets
added before the ShardManager actor is created, the entity-ownership
shard is created via ShardManager.createLocalShards. This results in
the entity-ownership instantiated as Shard instead of
EntityOwnershipShard. I've seen this happen in unit tests - it's not
likely to occur in the production system b/c we wait until the
data store is ready prior to creating the
DistributedEntityOwnershipService. But we should prevent it so I
changed the DistributedEntityOwnershipService to pass the
ModuleShardConfiguration with the CreateShard message. The
ShardManager now adds the ModuleShardConfiguration to the

Change-Id: I9f64a27cdd8c24d31e7eb1389210b57ac7a1f604
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add entity ownership integration test 05/26805/1
Tom Pantelis [Sun, 16 Aug 2015 23:02:41 +0000 (19:02 -0400)]
Bug 4105: Add entity ownership integration test

Change-Id: I9578a37f86db44a90aa208d6d89374ba4d3cfb89
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Change ownership on member down/up 04/26804/1
Tom Pantelis [Sat, 15 Aug 2015 21:23:50 +0000 (17:23 -0400)]
Bug 4105: Change ownership on member down/up

Added 2 new messages, PeerUp and PeerDown, that the ShardManager sends
in response to cluster member events.

For PeerDown, the EntityOwnershipShard finds the entities owned by the
down member and selects a new owner based on the remaining candidates.
If there's no other candidates, the owner is cleared (set to "") so new
candidates can become owner. The down members are also tracked via a
downPeerMemberNames set.

For PeerUp, if the up member is in the downPeerMemberNames, the
EntityOwnershipShard finds entities that previously had their owner
cleared and attempts to select a new owner. This handles the case where
a previously down member was the only candidate for an entity so, when
that member comes back up, the entity's owner will be re-assigned to
that member.

Reassigning of owners via PeerDown and PeerUp is only done on the
leader. However that may not handle the case where the leader goes down.
When a new leader is elected we need it to select new owners for
entities owned by the down leader. There are 2 cases here. If the old
leader has not yet been detected as down then eventually we expect to
get PeerDown to handle it. The second case is if PeerDown was already
received prior to the leader change (probably the norm), in which case
PeerDown would not have been processed. To handle this case I overrode
onLeaderChanged to select new owners for entities owned by the old leader
that is passed in. The RaftActor sends the old leader's peerId so I
added a peerIdToMemberNames map to translate - this is populated via
PeerUp. Also I changed the RaftActor to track and pass the actual last valid
leader id, previously it passed the leader id from the previous behavior
which would normally be Candidate which always has a null leaderId.

The newOwner method was changed to ignore candidates in the
downPeerMemberNames set as there's no point in assigning the owner to a
candidate known to be down.

Change-Id: I8f0b78460a1a3e2a6418431f8a8a770a789e8f8d
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add Cars RPC to test entity ownership 03/26803/1
Tom Pantelis [Wed, 12 Aug 2015 04:59:46 +0000 (00:59 -0400)]
Bug 4105: Add Cars RPC to test entity ownership

Change-Id: I8e23698b64ef408ae157ca0d2e94ed1f272128c7
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add general-entities yang model 02/26802/1
Tom Pantelis [Wed, 12 Aug 2015 04:57:45 +0000 (00:57 -0400)]
Bug 4105: Add general-entities yang model

Added a general-entities yang model tha can be used to represent an
entity ID when no existing yang schema exists.

Change-Id: Iec815966fe21ec15cb78ff47c68cda0aa7ae8504
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add dynamic module/shard config for entity-owners shard 01/26801/1
Tom Pantelis [Tue, 11 Aug 2015 00:08:03 +0000 (20:08 -0400)]
Bug 4105: Add dynamic module/shard config for entity-owners shard

Added a new method addModuleShardConfiguration to Configuration.

I simplified the internals of ConfigurationImpl to make it easier to
add a new module/shard config. I combined serveral of the maps into one
moduleConfigMap and reduced the total # of fields to 3. For
synchronization, I kept the maps/sets immutable and used copy-on-write
semantics to update them as they will seldom change. I also made the
fields volatile.

I also removed the singleton nature of ShardStrategyFactory since each
datastore's Configuration will now be different, ie only the operational
datastore's Configuration will have the entity-owners module. The
datastore's ShardStrategyFactory instance is not instantiated and owned
by the ActorContext.

To make things easier for unit tests, I abstracted the file-reading code
in ConfigurationImpl to a new ModuleShardConfigProvider interface and
FileModuleShardConfigProvider implementation in the config package.
I also moved the inner classes to the config package.

While I was at it I also moved Configuration and ConfigurationImpl to the
config package for consistency.

Change-Id: I1d6858d3ae68869ca6f61d4f5a5f0d319d93c485
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Implement UnregisterCandidateLocal in EntityOwnershipShard 00/26800/1
Tom Pantelis [Fri, 14 Aug 2015 12:42:02 +0000 (08:42 -0400)]
Bug 4105: Implement UnregisterCandidateLocal in EntityOwnershipShard

Also added a testOwnershipChanges case to EntityOwnershipShardTest to
run thru various ownership change scenarios with local and remote candidates
and local unregistration. As a result I found a couple bugs that I

Change-Id: I4343754fbbc8f471975e6c723ffc0beaedee2860
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Integrate EntityOwnerChangeListener with EntityOwnershipShard 99/26799/1
Tom Pantelis [Fri, 14 Aug 2015 10:13:54 +0000 (06:13 -0400)]
Bug 4105: Integrate EntityOwnerChangeListener with EntityOwnershipShard

Change-Id: Ia302d503f9ff65aa48faf7d69f1405ebf5267166
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Choose Owner for an Entity based on first come first served basis 98/26798/1
Moiz Raja [Wed, 19 Aug 2015 23:53:10 +0000 (16:53 -0700)]
Bug 4105: Choose Owner for an Entity based on first come first served basis

Change-Id: If40e19cf40e832c9317611bde2950502f7f4897c
Signed-off-by: Moiz Raja <>
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Change commit retry mechanism in EntityOwnershipShard 97/26797/1
Tom Pantelis [Fri, 14 Aug 2015 03:21:56 +0000 (23:21 -0400)]
Bug 4105: Change commit retry mechanism in EntityOwnershipShard

Change-Id: Iba640eab1c21672ffe6357531c6d236e65c1cd73
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add EntityOwnerDataChangeListener 96/26796/1
Tom Pantelis [Wed, 12 Aug 2015 19:51:54 +0000 (15:51 -0400)]
Bug 4105: Add EntityOwnerDataChangeListener

Added EntityOwnerDataChangeListener that responds to changes to the
entity owner leaf and notifies the EntityOwnershipListenerSupport

I also added an EntityOwnersModel class that defines various entity-owners
yang model constants (moved from EntityOwnershipShard) and has utilities
for creating NormalizedNodes and paths.

Change-Id: Iaa567b5cba6cf0f5cfca0dce39f0f43c38fee4bc
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add EntityOwnershipListenerActor and support 95/26795/1
Tom Pantelis [Tue, 11 Aug 2015 04:05:38 +0000 (00:05 -0400)]
Bug 4105: Add EntityOwnershipListenerActor and support

Change-Id: Idbeef3e23ab45a11afe5fce56a55fe5d6945729a
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Move Configuration classes to config package 94/26794/1
Tom Pantelis [Fri, 14 Aug 2015 02:16:06 +0000 (22:16 -0400)]
Bug 4105: Move Configuration classes to config package

Change-Id: I863600727f5171eb0db3591a541848aa877a68de
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Implement RegisterCandidate in EntityOwnershipShard 93/26793/1
Tom Pantelis [Sun, 9 Aug 2015 04:22:02 +0000 (00:22 -0400)]
Bug 4105: Implement RegisterCandidate in EntityOwnershipShard

Change-Id: Idab615399d81a8451e22bfabd30aed9a98e4b037
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Implement candidate registration close 92/26792/1
Tom Pantelis [Sat, 8 Aug 2015 10:57:03 +0000 (06:57 -0400)]
Bug 4105: Implement candidate registration close

Added an UnregisterCandidateLocal message which is sent when
a DistributedEntityOwnershipCandidateRegistration is closed.

Change-Id: I6336e1b83a7764bfb4abc2fc37e196175c008dc3
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Implement DistributedEntityOwnershipService#registerCandidate 91/26791/1
Tom Pantelis [Sat, 8 Aug 2015 08:20:11 +0000 (04:20 -0400)]
Bug 4105: Implement DistributedEntityOwnershipService#registerCandidate

Added a RegisterCandidateLocal message and implemented registerCandidate
to send the message to the local EntityOwnershipShard.

Change-Id: If941401d00912ce34f74e54188af0430a5ec6fcc
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add entity-owners yang module 90/26790/1
Moiz Raja [Tue, 4 Aug 2015 20:00:52 +0000 (13:00 -0700)]
Bug 4105: Add entity-owners yang module

This module describes the data structure used for storing entity
ownership information by the clustered implementation of

Change-Id: Ib7f8fad74e00b480236b1a2bddb060b093e90ad4
Signed-off-by: Moiz Raja <>
8 years agoBug 4105: Add EntityOwnershipShard 89/26789/1
Tom Pantelis [Fri, 7 Aug 2015 20:20:48 +0000 (16:20 -0400)]
Bug 4105: Add EntityOwnershipShard

Added the EntityOwnershipShard and modified
DistributedEntityOwnershipService to create it.

Change-Id: Id173b148797e90ff5d38d7f7cde177d303943181
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Added DistributedEntityOwnershipService and wiring 86/26786/2
Tom Pantelis [Fri, 7 Aug 2015 16:55:48 +0000 (12:55 -0400)]
Bug 4105: Added DistributedEntityOwnershipService and wiring

Added a skeleton DistributedEntityOwnershipService impl class and config
system wiring.

I initially tried to instantiate it in the operational store module but
it needs to be its own service and AFAIK you can only provide one
service per module as createInstance returns a single AutoCloseable.

So I created a new config yang and xml for distributed-entity-ownership-service.
We also need a separate config yang service identity to allow for
multiple impls - I put this in sal-common-api where the
EntityOwnershipService is defined.

Change-Id: I4883af2e749bca5c9dfdac69cf943017294435a3
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add public EntityOwnershipService interface 85/26785/2
Moiz Raja [Fri, 31 Jul 2015 22:40:17 +0000 (15:40 -0700)]
Bug 4105: Add public EntityOwnershipService interface

Change-Id: If65f6ef8116b0a8481a3af1aee88e444771d9e3f
Signed-off-by: Moiz Raja <>
8 years agoCDS: Fix intermittent DistributedDataStoreRemotingIntegrationTest failure 84/26784/2
Tom Pantelis [Thu, 10 Sep 2015 17:24:01 +0000 (13:24 -0400)]
CDS: Fix intermittent DistributedDataStoreRemotingIntegrationTest failure

I've seen the testReadyLocalTransactionForwardedToLeader test fail
several times both locally and in jenkins:

assertion failed: expected class
org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages$CommitTransactionReply, found class$Failure

It's a timing issue where the follower may not yet have the leader.
After this patch the test ran 100 times w/o failure.

Change-Id: I542a7e87516e8d1f846cda6e2abc4d473e3de961
Signed-off-by: Tom Pantelis <>
8 years agoBug 4105: Add CreateShard message in ShardManager 27/26727/3
Tom Pantelis [Thu, 6 Aug 2015 20:13:03 +0000 (16:13 -0400)]
Bug 4105: Add CreateShard message in ShardManager

Added a new CreateShard message that is processed by the
ShardManager. A new interface, ShardPropsCreator, was added
allowing the caller to instantiate a sub-class of Shard if need be
via the CreateShard message. The DefaultShardPropsCreator creates
Props for the Shard class.

Change-Id: Ieb2c895c85709d963445dc7e15ae9dec9cb3a810
Signed-off-by: Tom Pantelis <>
(cherry picked from commit 76e5d5ef4b8fc83e2c480c8fac81a05b65c14799)

8 years agoBug 4105: Add method to get all unique member names 26/26726/3
Tom Pantelis [Wed, 5 Aug 2015 22:15:42 +0000 (18:15 -0400)]
Bug 4105: Add method to get all unique member names

Added a method to Configuration to get all unique members names
configured for all shards.

Change-Id: I09993541ad7e5963e9eef9cb58b4376daa8f09e8
Signed-off-by: Tom Pantelis <>
(cherry picked from commit c3ba770fd6e9ba6e6227717bdba11ccc9f468f05)

8 years agoBUG 2185: Expand the scope of sync status to cover a slow follower 26/26426/2
Moiz Raja [Sat, 22 Aug 2015 02:13:05 +0000 (19:13 -0700)]
BUG 2185: Expand the scope of sync status to cover a slow follower

Previously sync status was used only in the startup scenario
to make the controller appear to the external world as not
synced up unless it had received atleast data till the commitIndex
which the leader reported when it sent the follower it's first

Now we also track when a new update is sent from the Leader to the
Follower and if the Follower is behind the Leader by a threshold
(hardcoded for now) then we consider the Follower as out-of-sync

Also I added the member name in the ShardManager bean so that is another
place from which we can figure out on which node we are running.

Change-Id: I1ba02575a0a1ac5d601af559f41971f2f5736f9d
Signed-off-by: Moiz Raja <>
(cherry picked from commit 47890ea59104fe349c5637d51a44d76f3571ce78)

8 years agoBug-4234 - Add count field to cars stress-test RPC. 19/26419/2
Shaleen Saxena [Wed, 2 Sep 2015 17:19:51 +0000 (13:19 -0400)]
Bug-4234 - Add count field to cars stress-test RPC.

Added a 'count' field to cars stress-test RPC. The test will stop
after the 'count' cars have been created. If count is zero, then
stress-test will continue till stop-stress-test rpc is given.

Also added some null checks for missing input fields. If rate is
zero, then an error is returned.

Change-Id: Id313f9094e8ca887993e4e8911d0a86b64db7303
Signed-off-by: Shaleen Saxena <>
(cherry picked from commit 3abc8b4d3379109bd12aadbc01c0b134cbd268c5)

8 years agoBUG 2185 : Follower should request forceInstallSnapshot in out-of-sync scenario 11/26411/2
Moiz Raja [Tue, 4 Aug 2015 00:05:14 +0000 (17:05 -0700)]
BUG 2185 : Follower should request forceInstallSnapshot in out-of-sync scenario

When the Follower detects that it has more entries in it's log than the Leader
it might be an indication that the Follower was previously a Leader and therefore
it has additional entries in it's log which are missing in the Leader. When the
RaftPolicy is set to allow commits before consensus this could also mean that the
state now has more data than should be present in there. In this scenario Follower
requests the Leader to InstallSnapshot.

Change-Id: I517af148c3933f798ceb87ff88c77c396590881f
Signed-off-by: Moiz Raja <>
(cherry picked from commit 8c3896a99a221d3411f88f3a53c7d9fe6b89734e)

8 years agoMigrate archetypes restconf dependencies 03/26603/1
Tomas Cere [Mon, 7 Sep 2015 11:41:13 +0000 (13:41 +0200)]
Migrate archetypes restconf dependencies

Change-Id: I4fd783f77c12616add7aace1d5c4e8e71d6bebed
Signed-off-by: Tomas Cere <>
8 years agoDelete restconf 00/26600/1
Tomas Cere [Mon, 7 Sep 2015 10:44:42 +0000 (12:44 +0200)]
Delete restconf

Change-Id: I0cc4ea8375ec22b67ee93e1a02a9131f56f044c2
Signed-off-by: Tomas Cere <>
8 years agoDelete netconf 18/26318/3
Tomas Cere [Wed, 26 Aug 2015 14:13:02 +0000 (16:13 +0200)]
Delete netconf

Change-Id: I69f0c921df155606d296f448b11297c7382795c8
Signed-off-by: Tomas Cere <>
8 years agoRemove netconf from commons/opendaylight pom 30/24630/5
Maros Marsalek [Thu, 30 Jul 2015 14:05:28 +0000 (16:05 +0200)]
Remove netconf from commons/opendaylight pom

Change-Id: Id558bf0ac35c661be028eb9cea436b6728b414de
Signed-off-by: Maros Marsalek <>
8 years agoBUG 2185 : Add JMX API to change the state of a Shard 31/26331/1
Moiz Raja [Fri, 24 Jul 2015 02:19:16 +0000 (19:19 -0700)]
BUG 2185 : Add JMX API to change the state of a Shard

Added two APIs to the ShardManager MBeans
- switchAllLocalShardsState
- switchShardState

Change-Id: I896e421f322f487b4f8eb321708e01cc93bbd48f
Signed-off-by: Moiz Raja <>
(cherry picked from commit 3a59e9f47466fbf150b6b14a44f4d6c775f79ee9)

8 years agoBUG 2185 : Disable all internal switching of behavior 90/26290/1
Moiz Raja [Mon, 3 Aug 2015 23:20:31 +0000 (16:20 -0700)]
BUG 2185 : Disable all internal switching of behavior

Since we do not depend on Raft for changing behavior when elections
are disabled we need to disable all internal switching of behaviors.

Added specific Leader tests to check the following,
1. Do not switch to Follower when you receive an AppendEntriesReply
   from a Follower with a higher term
2. Do not switch to IsolatedLeader even when no Follower is sending

Change-Id: Ic2b4f76813f35db190e108306a62af5397d31658
Signed-off-by: Moiz Raja <>
(cherry picked from commit 9baf6a2a5e494f70af407f04631980857a26daf9)

8 years agoBug 3708 - APIdoc explorer URLs contain extra 'node' in REST calls 31/25531/2
Jan Hajnar [Thu, 25 Jun 2015 12:06:33 +0000 (14:06 +0200)]
Bug 3708 - APIdoc explorer URLs contain extra 'node' in REST calls

* fixed mount point path builder that added each list qname twice

Change-Id: I96d541ea8b40ab5003f82a9e5981e11e1f0fd0d2
Signed-off-by: Jan Hajnar <>
(cherry picked from commit 523e75af81fa6537117ceae53c7cdb2b1881aa10)

8 years agoBug 3822: Improve error reporting for restconf PUT 37/25337/2
Tom Pantelis [Sat, 20 Jun 2015 08:09:47 +0000 (04:09 -0400)]
Bug 3822: Improve error reporting for restconf PUT

A runtime exception can be emitted by the netconf mount point which
should be reported to the user, otherwise you get a 500 response with
no error info which isn't very helpful.

Also the fucntionality to output the error-info field was ommitted with
the conversion from CompositeNode to NormalizedNode so I re-implemeneted
it. It was originally ommitted with a TODO b/c the
NormalizedNodeStreamWriters validate against the schema and error-info
is defined as an empty container in the restconf yang. So there's no way
to create a ContainerNode to represent the error-info data that conforms
to the schema. To work around this, I created a leaf node and special-cased
error-info in the stream writer to elide schema validation.

I also added a regression unit test for the case where the URL contains
an identityref.

Change-Id: I93b4aea25c829af1232d539180f02dd61e252d50
Signed-off-by: Tom Pantelis <>
8 years agoBUG 2185 : Introduce the SwitchBehavior message 64/25164/2
Moiz Raja [Thu, 23 Jul 2015 03:34:30 +0000 (20:34 -0700)]
BUG 2185 : Introduce the SwitchBehavior message

RaftActor processes the SwitchBehavior message to change the behavior
Candidate and IsolatedLeader behaviors are not allowed.

Change-Id: Id8d758c6574a5c58927927b83bc5985081b19c50
Signed-off-by: Moiz Raja <>
(cherry picked from commit 26c4b15f6b55f012e7e7cf6e94d335386615af5c)

8 years agoBUG 2185 : Make the Custom Raft Policy externally configurable 10/24810/4
Moiz Raja [Wed, 22 Jul 2015 02:11:10 +0000 (19:11 -0700)]
BUG 2185 : Make the Custom Raft Policy externally configurable

A class which implements RaftPolicy needs to be set
to customize the behavior. I am hoping that this will be a barrier
to people unintentionally breaking the default raft policy as
they would need to know the internals of clustering in order to
supply a valid class.

I added two configurable raft policy classes for the two known
use cases,

- org.opendaylight.controller.cluster.datastore.policy.TestOnlyRaftPolicy
- org.opendaylight.controller.cluster.datastore.policy.TwoNodeClusterRaftPolicy.

Change-Id: Ic3cc2f27754c37e85c3be8a863764fc88ec84399
Signed-off-by: Moiz Raja <>
(cherry picked from commit 1ef2f7321202ef77b5cfd0ca430e6a58cb07331e)

8 years agofeatures-config is missing scope=test 45/26245/1
Robert Varga [Mon, 31 Aug 2015 16:41:29 +0000 (18:41 +0200)]
features-config is missing scope=test

opendaylight-karaf-empty is used only in tests, hence the dependency
should have a proper scope.

Change-Id: I54b7c84c4c732d63c49b251b960c511711470bbc
Signed-off-by: Robert Varga <>
8 years agoBug 2461 : Adding capture snapshot JMX operation. 32/26132/2
Harman Singh [Fri, 28 Aug 2015 01:28:23 +0000 (18:28 -0700)]
Bug 2461 : Adding capture snapshot JMX operation.

Also, updated Snapshot manager code, which may throw null pointer exception, if last log entry is null

Change-Id: I4363a3da38af99a4193b8ad2b1c0a5cbaf714a32
Signed-off-by: Harman Singh <>
8 years agoBUG 4212 : Follower should not reschedule election timeout in certain cases. 11/26111/5
Moiz Raja [Thu, 27 Aug 2015 17:34:36 +0000 (10:34 -0700)]
BUG 4212 : Follower should not reschedule election timeout in certain cases.

Follower rescheduled election whenever it received any message

Followe reschedules election only if
    - The message received is a RaftRPC message
    - If the RaftRPC message is a RequestVote then only reschedule
      if vote is granted

Change-Id: Ia59c65e4896d72dfc49e86e59b6a9e9331a945ca
Signed-off-by: Moiz Raja <>
(cherry picked from commit bf63fbc347b7cf055e22c3711f22af9d286c6281)

8 years agoBUG 4213 : Candidate should switch to Follower when it receives AppendEntries from... 07/26107/1
Moiz Raja [Thu, 27 Aug 2015 18:07:08 +0000 (11:07 -0700)]
BUG 4213 : Candidate should switch to Follower when it receives AppendEntries from new Leader

Multiple peers might become candidates in a single election term. If one peer happened
to become a Leader it will send AppendEntries to all it's peers. When a Candidate receives
an AppendEntries and finds its term to be the same as the AppendEntries term then it should
switch to Follower.

Change-Id: Ia4ce41d4f3eefed50297b90107ad7429bb950ad8
Signed-off-by: Moiz Raja <>
(cherry picked from commit 6b66fc7266ea909427b612da16a587936890b77b)

8 years agoMoved non MD-SAL models outside of MD-SAL folder 75/25475/4
Tony Tkacik [Wed, 19 Aug 2015 12:35:34 +0000 (14:35 +0200)]
Moved non MD-SAL models outside of MD-SAL folder

This is just simple file movement without changing
group-ids and packages to better reflect their use.

This models are general purpose and are not part of MD-SAL,
but rather used on top of MD-SAL.

Change-Id: I4ed842ae878e5470ac16348a4f7e92231ae67f8e
Signed-off-by: Tony Tkacik <>
8 years agoSwitched model-parent to use binding-parent. 74/25474/4
Tony Tkacik [Wed, 19 Aug 2015 12:29:33 +0000 (14:29 +0200)]
Switched model-parent to use binding-parent.

model-parent originaly used sal-parent which did not contained
sections necessary for model-only packages.

Switched to binding-parent, which actually simplifies pom

Change-Id: I2efea28799dfbd541b2b12468a6aec3472dbb240
Signed-off-by: Tony Tkacik <>
8 years agoAdd missing odl-config-netty feature into odl-netconf-mdsal 32/25532/3
Tomas Cere [Thu, 20 Aug 2015 12:07:05 +0000 (14:07 +0200)]
Add missing odl-config-netty feature into odl-netconf-mdsal

Change-Id: I6a37e285f9fd74b24123830634a33dbcdfad3414
Signed-off-by: Tomas Cere <>
8 years agoFix license header violations in controller 81/25881/2
Thanh Ha [Mon, 24 Aug 2015 14:12:28 +0000 (10:12 -0400)]
Fix license header violations in controller

Change-Id: I78161e69d30773bb4d8e7943316cd988e1a7b81b
Signed-off-by: Thanh Ha <>
8 years agoAdd missing messagebus-netconf dependency 83/25483/2
Tomas Cere [Wed, 19 Aug 2015 14:13:22 +0000 (16:13 +0200)]
Add missing messagebus-netconf dependency

features-netconf-connector was missing messagebus-netconf dependency
and breaking downstream projects.

Change-Id: Ife784fde73e590add08fcdec9027cc1784327beb
Signed-off-by: Tomas Cere <>
8 years agoBug 4035: MD-SAL: Remove unused dependencies & declarations 63/24463/6
Tony Tkacik [Thu, 23 Jul 2015 09:09:25 +0000 (11:09 +0200)]
Bug 4035: MD-SAL: Remove unused dependencies & declarations

After config-related code movement some of the dependencies
& declarations are unnecesary anymore, which actually
simplifies pom files for affected components.

Removed unused import of binding config in restconf.

Change-Id: I83dd04c5ac161f45d246abbbe896ddb66b066fef
Signed-off-by: Tony Tkacik <>
8 years agoRemove unused MD-SAL utilities and interfaces. 77/24477/5
Tony Tkacik [Thu, 23 Jul 2015 13:48:06 +0000 (15:48 +0200)]
Remove unused MD-SAL utilities and interfaces.

This utilities & interfaces were deprecated before
Lithium or were describing internal contracts
of MD-SAL prior to Lithium, thus they are unneeded
in Beryllium.

None of removed classes is used in public Lithium
Opendaylight codebase.

Change-Id: Ie5f51cf3dc15f0f70efe3e51e0fe0d0c2b8da713
Signed-off-by: Tony Tkacik <>
8 years agoBug 4035: Remove deprecated Hydrogen interfaces 76/24476/5
Tony Tkacik [Thu, 23 Jul 2015 13:07:38 +0000 (15:07 +0200)]
Bug 4035: Remove deprecated Hydrogen interfaces

This remove set of interfaces which
is safe to remove without breaking projects which did not
yet migrated from Hydrogen interfaces to Helium / Lithium one.

Also removes some related methods in such interfaces which
are unused in current public Beryllium codebase in
projects using MD-SAL.

Change-Id: I2ac67ead4ea4d9d97d0198d62910e667318dc03a
Signed-off-by: Tony Tkacik <>
8 years agoBug 4035: Fixed some sonar warnings in md.sal.binding.impl 13/19213/11
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 <>
8 years agoBug 4035: Remove unused implementations from sal-common-impl 70/24470/5
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 <>
8 years agoBug 4035: Removed sal-common which is unused since Helium. 67/24467/8
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 <>
8 years agoBug 4035: Fixed some sonar / findbugs issues in DOM MD-SAL. 65/24465/9
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 <>
8 years agoBug 4035: Remove references to not present artefacts. 64/24464/7
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 <>
8 years agoBug 4035: Extract dom-config from core-api and broker-impl 92/24392/9
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

Change-Id: Ic93c583c07ae3e088dcf0e74cbdaaf627a8e79f6
Signed-off-by: Tony Tkacik <>
8 years agoEnabling Data Change Notifications for all nodes in cluster. 96/24496/6
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 <>
8 years agoRemoving missing features-base 68/25168/2
Thanh Ha [Tue, 11 Aug 2015 17:53:54 +0000 (13:53 -0400)]
Removing missing features-base

Change-Id: I2b841e5ba388c5c676e9d4da0b11b65c426cb5c7
Signed-off-by: Thanh Ha <>
8 years agoRemoving the redundant configuration reader in the distributed datastore. 39/25139/3
kalaiselvik [Tue, 11 Aug 2015 06:46:16 +0000 (12:16 +0530)]
Removing the redundant configuration reader in the distributed datastore.
Having a common configuration reader in the clustering common for use
by both distributed datastore and remote rpc.

Change-Id: Id40295301d76dad40189fb45ffc2917260ba2925
Signed-off-by: kalaiselvik <>
8 years agoCDS: Include CAN_COMMIT phase in rate limiter time period 59/25259/1
Tom Pantelis [Thu, 2 Jul 2015 02:53:56 +0000 (22:53 -0400)]
CDS: Include CAN_COMMIT phase in rate limiter time period

I was testing with simulated latency in the followers. With a high enough
latency and tx thru-put, the pending commit queue in the
ShardCommitCoordinator got increasingly behind until latencies built up
enough to cause AskTimeoutExeption's on the front-end.

The rate limiter was throttling but not enough. I realized that the rate
limiter times the commit phase but not the canCommit phase. The latter is
what times out with pending tx's sitting in the queue waiting for canCommit.
So I changed ThreePhaseCommitCohortProxy to also time the canCommit
phase. This alleviated the timeouts - even with a really high max latency of
500 ms and 100 tx / sec client thru-put. The rate limiter thru-put
reduced it to about 3 / sec.

Change-Id: I6dc73d1d657519b9410ad034c69d26f19a0cb263
Signed-off-by: Tom Pantelis <>
(cherry picked from commit 1783b656d3b1712c73c6596f3ae15e54e801d5e5)

8 years agoDecouple message bus from netconf connector 12/24612/10
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 <>
Signed-off-by: Tomas Cere <>
8 years agoDecouple config and netconf subsystems. 13/23413/26
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 <>
Signed-off-by: Maros Marsalek <>
Signed-off-by: Ed Warnicke <>
8 years agoCDS: Add stress test RPC to the cars model 45/25145/1
Tom Pantelis [Tue, 7 Jul 2015 20:07:38 +0000 (16:07 -0400)]
CDS: Add stress test RPC to the cars model

For stress testing the CDS, I've been using an RPC that continuously
creates cars at a specified per second rate. I thought it might be
useful to submit it.

Change-Id: I33b9c2e304884b9541774a12ee248082de60f72e
Signed-off-by: Tom Pantelis <>
(cherry picked from commit b6a63eea6eb164a0c925716ae398bf64b06958c3)

8 years agoFix license header violations in liblldp 93/24993/1
Thanh Ha [Sun, 9 Aug 2015 05:44:50 +0000 (01:44 -0400)]
Fix license header violations in liblldp

Change-Id: Id95bd1cef35d256e79a3303c6559405364ae4ced
Signed-off-by: Thanh Ha <>
8 years agoFix license header violations in concepts 92/24992/1
Thanh Ha [Sun, 9 Aug 2015 05:39:31 +0000 (01:39 -0400)]
Fix license header violations in concepts

Change-Id: Ia575c2e64b4ce50990e0fadada34f257189c3370
Signed-off-by: Thanh Ha <>
8 years agoFix license header violations in mdsal-it-base 91/24991/1
Thanh Ha [Sun, 9 Aug 2015 05:36:42 +0000 (01:36 -0400)]
Fix license header violations in mdsal-it-base

Change-Id: I87d699dbf60cccc3445664fc23650c155d5cb229
Signed-off-by: Thanh Ha <>
8 years agoFix license header violations in sal-binding-dom-it 90/24990/1
Thanh Ha [Sun, 9 Aug 2015 05:35:30 +0000 (01:35 -0400)]
Fix license header violations in sal-binding-dom-it

Change-Id: I542ab52fd8bdbedfee3e469c8672a7981340d153
Signed-off-by: Thanh Ha <>
8 years agoFix license header violations in messagebus 89/24989/1
Thanh Ha [Sun, 9 Aug 2015 05:34:42 +0000 (01:34 -0400)]
Fix license header violations in messagebus

Change-Id: I3b5f5b3e96716552562498590988097c5d3c1308
Signed-off-by: Thanh Ha <>
8 years agoFix license header violations in sal-remoterpc-connector 88/24988/1
Thanh Ha [Sun, 9 Aug 2015 05:32:53 +0000 (01:32 -0400)]
Fix license header violations in sal-remoterpc-connector

Change-Id: I25d95f37c1ddd238bb79d15e2bf3e2d07069f319
Signed-off-by: Thanh Ha <>
8 years agoFix license header violations in sal-karaf-xsql 87/24987/1
Thanh Ha [Sun, 9 Aug 2015 05:30:11 +0000 (01:30 -0400)]
Fix license header violations in sal-karaf-xsql

Change-Id: I756176da2ef6f617298ef1474a08ab3707b8c0d2
Signed-off-by: Thanh Ha <>