controller.git
9 years agoBUG-2627: JMX interfaces need to be public 92/15192/1
Robert Varga [Thu, 12 Feb 2015 10:18:32 +0000 (11:18 +0100)]
BUG-2627: JMX interfaces need to be public

Java 8 enforces the specification's required for MXBean interfaces to be
public. The mock interfaces were not public, hence were failing the test
automatically.

Change-Id: I4a358ff750da6c91571847b650ef0746e9da3621
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "BUG-2599 Netconf notification manager initial API and Impl"
Tony Tkacik [Tue, 10 Feb 2015 21:06:39 +0000 (21:06 +0000)]
Merge "BUG-2599 Netconf notification manager initial API and Impl"

9 years agoMerge "Fix missing log argument"
Tony Tkacik [Tue, 10 Feb 2015 21:06:08 +0000 (21:06 +0000)]
Merge "Fix missing log argument"

9 years agoMerge "Standardize on pax-exam 4.4.0"
Tony Tkacik [Tue, 10 Feb 2015 21:01:48 +0000 (21:01 +0000)]
Merge "Standardize on pax-exam 4.4.0"

9 years agoMerge "BUG-2288: implement DOMNotificationRouter"
Tony Tkacik [Tue, 10 Feb 2015 21:01:02 +0000 (21:01 +0000)]
Merge "BUG-2288: implement DOMNotificationRouter"

9 years agoMerge "BUG-2627: Fix ambiguous lookup in test case"
Tony Tkacik [Tue, 10 Feb 2015 21:00:19 +0000 (21:00 +0000)]
Merge "BUG-2627: Fix ambiguous lookup in test case"

9 years agoMerge "Bug-2692:Avoid fake snapshot during initiate snapshot"
Tom Pantelis [Tue, 10 Feb 2015 18:22:52 +0000 (18:22 +0000)]
Merge "Bug-2692:Avoid fake snapshot during initiate snapshot"

9 years agoBUG-2627: Fix ambiguous lookup in test case 03/15103/4
Robert Varga [Tue, 10 Feb 2015 09:11:23 +0000 (10:11 +0100)]
BUG-2627: Fix ambiguous lookup in test case

Looking up by java name "stream" matches two potential beans, which
means that the returned value depends on underlying collections. This
breaks when upgrading to Java 8, for example.

Fix by performing an explicit prefix name, which returns the right bean
everytime.

Change-Id: I4c7f7f26bc00cc1b03b9ea99ef84004da46c3caa
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Optimize install snapshot, by making a call at end of installsnapshotreply"
Tom Pantelis [Tue, 10 Feb 2015 06:27:41 +0000 (06:27 +0000)]
Merge "Optimize install snapshot, by making a call at end of installsnapshotreply"

9 years agoMerge "Add Distributed DataStore as a dependency of the Simulator"
Tom Pantelis [Tue, 10 Feb 2015 04:44:04 +0000 (04:44 +0000)]
Merge "Add Distributed DataStore as a dependency of the Simulator"

9 years agoMerge "Optimized AppendEntries sending to follower by adding AppendEntry call at...
Tom Pantelis [Tue, 10 Feb 2015 04:43:21 +0000 (04:43 +0000)]
Merge "Optimized AppendEntries sending to follower by adding AppendEntry call at end of reply, if needed."

9 years agoMerge "Add signature marker and version to NormalizedNode streaming"
Moiz Raja [Tue, 10 Feb 2015 01:43:11 +0000 (01:43 +0000)]
Merge "Add signature marker and version to NormalizedNode streaming"

9 years agoOptimize install snapshot, by making a call at end of installsnapshotreply 10/15010/3
Harman Singh [Fri, 6 Feb 2015 19:38:14 +0000 (11:38 -0800)]
Optimize install snapshot, by making a call at end of installsnapshotreply

Change-Id: I956a6b8653b3a9d27cdaf6a8c8b12287caeffb22
Signed-off-by: Harman Singh <harmasin@cisco.com>
9 years agoOptimized AppendEntries sending to follower by adding AppendEntry call at end of... 68/14868/7
Harman Singh [Thu, 5 Feb 2015 01:43:48 +0000 (17:43 -0800)]
Optimized AppendEntries sending to follower by adding AppendEntry call at end of reply, if needed.

This will help to reduce the lag of a follower and leader does not have to wait for heartbeat time to
send a message to follower. This way, we can tune heartbeat interval in better manner.

Change-Id: I0259ea3691a3ac1245e36afe15b06ed44f377466
Signed-off-by: Harman Singh <harmasin@cisco.com>
9 years agoBug-2692:Avoid fake snapshot during initiate snapshot 91/15091/2
Kamal Rameshan [Mon, 9 Feb 2015 22:56:30 +0000 (14:56 -0800)]
Bug-2692:Avoid fake snapshot during initiate snapshot

When an initiate snapshot is received , we should be setting the snapshot captured flag, in order to avoid a fake snapshot at the same time.

Also a check should be made to avoid another initiate snapshot to occur, in case the capture snapshot takes time.

Change-Id: I6e29c97b8cc71c101504cb3588897a896e107e93
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
9 years ago(Fix: Bug 2529) 03/15003/2
mark.mozolewski [Fri, 6 Feb 2015 23:01:29 +0000 (15:01 -0800)]
(Fix: Bug 2529)
- Now ShardTransaction does NOT return CloseTransactionReply for Read-Only transactions.

- Separated ShardTransactionTest cases for RW/WO/RO Shard Transactions to test expected CloseTransactionReply behavior for each.
- Updated ShardTransaction Javadoc since ShardTranactionCreater#create method and ShardTransaction subclasses imply javadoc comment was wrong about applicability to other transaction types.

Change-Id: I46aa6025b0a975c4592344bbee2d917574f2c750
Signed-off-by: mark.mozolewski <mark.mozolewski@hp.com>
9 years agoMerge "Bug 2410: Use generated serialVersionUID for messages"
Moiz Raja [Mon, 9 Feb 2015 18:11:26 +0000 (18:11 +0000)]
Merge "Bug 2410: Use generated serialVersionUID for messages"

9 years agoMerge "Fix NPE in AbstractLeader#handleInstallSnapshotReply"
Moiz Raja [Mon, 9 Feb 2015 18:10:11 +0000 (18:10 +0000)]
Merge "Fix NPE in AbstractLeader#handleInstallSnapshotReply"

9 years agoAdd Distributed DataStore as a dependency of the Simulator 80/15080/1
Moiz Raja [Mon, 9 Feb 2015 17:37:36 +0000 (09:37 -0800)]
Add Distributed DataStore as a dependency of the Simulator

This is because AppendEntries delivers the ModificationPayload from
DDS and without adding a dependency on DDS we get a ClassNotFoundException

Change-Id: Ie4a938ad859db916a0fdbb33d8ce888ae4abf80b
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoBUG-2599 Netconf notification manager initial API and Impl 21/14921/5
Maros Marsalek [Thu, 5 Feb 2015 13:54:40 +0000 (14:54 +0100)]
BUG-2599 Netconf notification manager initial API and Impl

Change-Id: I71569f08aff3738ea7fa4d5f1853079b4a2b0fb5
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoMerge "BUG-2599 Add netconf notifications yang models"
Tony Tkacik [Mon, 9 Feb 2015 10:14:01 +0000 (10:14 +0000)]
Merge "BUG-2599 Add netconf notifications yang models"

9 years agoBUG-2288: implement DOMNotificationRouter 78/13478/15
Robert Varga [Tue, 9 Dec 2014 14:09:59 +0000 (15:09 +0100)]
BUG-2288: implement DOMNotificationRouter

Implements DOMNotification(Publish)Service using LMAX Disruptor. The
disruptor is used internallly to transfer requests from publishers to
two-stage notification dispatch, where the frist stage takes care of
delivering events to subscribers and the second stage notifies the
futures.

Change-Id: I654d9d044e80b2a2ff6fd5b05ddceed4e79a4ebc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2599 Add netconf notifications yang models 20/14920/3
Maros Marsalek [Thu, 5 Feb 2015 13:52:34 +0000 (14:52 +0100)]
BUG-2599 Add netconf notifications yang models

Change-Id: Ie35cf3c6cdee89f0bd88ba79b974dff529897809
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix missing log argument 30/15030/1
Robert Varga [Sat, 7 Feb 2015 20:17:06 +0000 (21:17 +0100)]
Fix missing log argument

Logging format indicates an argument, but it is missing in the method
arguments.

Change-Id: I961088d5534370227e741ee0b1ff9651fbcd3335
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix NPE in AbstractLeader#handleInstallSnapshotReply 44/14744/7
tpantelis [Sun, 1 Feb 2015 06:53:48 +0000 (01:53 -0500)]
Fix NPE in AbstractLeader#handleInstallSnapshotReply

The "if" statement checks "followerToSnapshot != null" but the else clause doesn't
causing an NPE. Changed it to check "followerToSnapshot == null"
earlier and return.

Also added some more debug logging and optimized sendAppendEntries and
sendSnapshotChunk to call mapFollowerToSnapshot.get(...) once to elimnate
redundant lookups.

Change-Id: I014cd6ecb47edebb17041433f229eb809ec8689d
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoRemove unnecessary declaration of <prerequisites> in logback 35/14235/5
Thanh Ha [Mon, 19 Jan 2015 03:50:07 +0000 (22:50 -0500)]
Remove unnecessary declaration of <prerequisites> in logback

Bug: 2605
Change-Id: I4c9fbd672bc2b6a9b52163d989fed155695ba3ee
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in netty 34/14234/5
Thanh Ha [Mon, 19 Jan 2015 03:49:38 +0000 (22:49 -0500)]
Remove unnecessary declaration of <prerequisites> in netty

Bug: 2605
Change-Id: I3a62789b56a0d5f91e51fa2bc5bcc15e1220f1f4
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in threadpool 33/14233/5
Thanh Ha [Mon, 19 Jan 2015 03:48:52 +0000 (22:48 -0500)]
Remove unnecessary declaration of <prerequisites> in threadpool

Bug: 2605
Change-Id: I228eab8e1e90ff7867ac4b850dee7294679aab1b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in yang 32/14232/5
Thanh Ha [Mon, 19 Jan 2015 03:47:56 +0000 (22:47 -0500)]
Remove unnecessary declaration of <prerequisites> in yang

Bug: 2605
Change-Id: I08d737f0c123e3f4aa64261c2ec518e1a8a71d80
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in config-subsystem 31/14231/5
Thanh Ha [Mon, 19 Jan 2015 03:47:19 +0000 (22:47 -0500)]
Remove unnecessary declaration of <prerequisites> in config-subsystem

Bug: 2605
Change-Id: I99ffc16c036324c846383083c5d81822012613f2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in netconf 30/14230/5
Thanh Ha [Mon, 19 Jan 2015 03:44:27 +0000 (22:44 -0500)]
Remove unnecessary declaration of <prerequisites> in netconf

Bug: 2605
Change-Id: Ibfe6c6329b836361248c6e008be8cd1566bbeec7
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in karaf 29/14229/5
Thanh Ha [Mon, 19 Jan 2015 03:43:20 +0000 (22:43 -0500)]
Remove unnecessary declaration of <prerequisites> in karaf

Bug: 2605
Change-Id: I135ee73839564659b17ab9a902aa2c1993bc2008
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoUse Maven Enforcer plugin to require Maven version 28/14228/5
Thanh Ha [Mon, 19 Jan 2015 03:42:26 +0000 (22:42 -0500)]
Use Maven Enforcer plugin to require Maven version

Using the <prerequisites> configuration in pom files is deprecated and
it is recommended to use the maven-enforcer-plugin to enforce these
rules instead.

See:
http://jira.codehaus.org/browse/MNG-5297
http://jira.codehaus.org/browse/MNG-4840

Bug: 2605
Change-Id: Ie7bac4fc00ba41e1bcdbcbe483e29ca22d40bd1f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in root-pom 27/14227/5
Thanh Ha [Mon, 19 Jan 2015 03:36:53 +0000 (22:36 -0500)]
Remove unnecessary declaration of <prerequisites> in root-pom

Bug: 2605
Change-Id: Ia836f2e59b1edc295f8bc4bfe55388e839f18b7c
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoRemove unnecessary declaration of <prerequisites> in config-plugin-parent 26/14226/5
Thanh Ha [Mon, 19 Jan 2015 03:35:39 +0000 (22:35 -0500)]
Remove unnecessary declaration of <prerequisites> in config-plugin-parent

Bug: 2605
Change-Id: I095edd9cd818542eafb89cb8a3ca9345c0a9095b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoMerge "Bug-2590: Clustering : Minimize usage of in-memory journal"
Moiz Raja [Fri, 6 Feb 2015 23:06:10 +0000 (23:06 +0000)]
Merge "Bug-2590: Clustering : Minimize usage of in-memory journal"

9 years agoMerge "Fix potential issue with transaction timeouts"
Moiz Raja [Fri, 6 Feb 2015 22:46:58 +0000 (22:46 +0000)]
Merge "Fix potential issue with transaction timeouts"

9 years agoMerge "Added requuired-capabilities to the impl/.../config/default-config.xml and...
Ed Warnicke [Fri, 6 Feb 2015 19:58:35 +0000 (19:58 +0000)]
Merge "Added requuired-capabilities to the impl/.../config/default-config.xml and added relativePath statement to avoid maven warnings"

9 years agoBug-2590: Clustering : Minimize usage of in-memory journal 15/14615/10
Kamal Rameshan [Thu, 29 Jan 2015 19:44:30 +0000 (11:44 -0800)]
Bug-2590: Clustering : Minimize usage of in-memory journal

In order to minimize the memory usage of the in-memory journal, we can remove the entries from the Leader's journal
once it has been successfully replicated to ALL its followers.
This does not intefere with snapshots, as we capture snapshots on demand.

The followers follow the leader in cleaning the in-memory journal, there by ensuring that all the journals have more or less same entries.
This is done by the leader passing its replicatedToAllIndex as part of the AppendEntries.

Change-Id: I579a1f90d3c4e5d6be4ce699072688788b07bd48
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
9 years agoMerge "BUG-2599 Add base netconf ynag model: ietf-netconf"
Tony Tkacik [Fri, 6 Feb 2015 15:44:01 +0000 (15:44 +0000)]
Merge "BUG-2599 Add base netconf ynag model: ietf-netconf"

9 years agoMerge "Add (un)lock ops to netconf testtool"
Tony Tkacik [Fri, 6 Feb 2015 13:34:49 +0000 (13:34 +0000)]
Merge "Add (un)lock ops to netconf testtool"

9 years agoBUG-2599 Add base netconf ynag model: ietf-netconf 19/14919/2
Maros Marsalek [Thu, 5 Feb 2015 13:52:04 +0000 (14:52 +0100)]
BUG-2599 Add base netconf ynag model: ietf-netconf

Change-Id: I6f9bcdb5517f0c0433a943f99cebde4bc5a273bc
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoBUG-2681: switch sal-binding-it to sal test models 28/14928/5
Michal Rehak [Thu, 5 Feb 2015 11:31:15 +0000 (12:31 +0100)]
BUG-2681: switch sal-binding-it to sal test models

 - switched to test models:
    - DataServiceTest
    - RoutedServiceTest (unregister path verification failing)
    - Notification Test

Change-Id: I381fd9ad9682f9527bdf8276fae6eb508f0807f7
Signed-off-by: Michal Rehak <mirehak@cisco.com>
9 years agoSilence an NPE in the DataChangeListenerRegistrationProxyTest 71/14871/2
Moiz Raja [Thu, 5 Feb 2015 02:41:13 +0000 (18:41 -0800)]
Silence an NPE in the DataChangeListenerRegistrationProxyTest

This NPE was happening because the actorContext mock was not setup
to return a DataStoreContext

Change-Id: I433414bc444d7b1fe3c7886cea7ddef2e4b1ccb8
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "Improve Shard logging output"
Moiz Raja [Thu, 5 Feb 2015 23:47:57 +0000 (23:47 +0000)]
Merge "Improve Shard logging output"

9 years agoAdded requuired-capabilities to the impl/.../config/default-config.xml and added... 53/14853/4
John Burns [Wed, 4 Feb 2015 20:58:26 +0000 (12:58 -0800)]
Added requuired-capabilities to the impl/.../config/default-config.xml and added relativePath statement to avoid maven warnings

Change-Id: I2a0d7cd2700b4060cb172b898b6d80b227f0a06c
Signed-off-by: John Burns <johnburn@cisco.com>
9 years agoSkip install and deploy of aggregator artifact. 61/14861/2
Nathan Harmon [Wed, 4 Feb 2015 21:55:17 +0000 (13:55 -0800)]
Skip install and deploy of aggregator artifact.

Change-Id: I12ef594c27c6376b543eb9bc85843d4eb0b7a3dc
Signed-off-by: Nathan Harmon <nathan.harmon@hp.com>
9 years agoAdd (un)lock ops to netconf testtool 17/14917/2
Maros Marsalek [Thu, 5 Feb 2015 12:48:17 +0000 (13:48 +0100)]
Add (un)lock ops to netconf testtool

Change-Id: I48ea8e8ce0edeb9428d87f5bcac5ba8d3a2ede22
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoStandardize on pax-exam 4.4.0 16/14916/1
Robert Varga [Thu, 5 Feb 2015 13:11:56 +0000 (14:11 +0100)]
Standardize on pax-exam 4.4.0

The version is implied from odlparent, make sure we use the same
property and not override it.

Change-Id: I6a997f636e862a991f2d5baa73738d6f6fb65b7c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBump pax exam version 15/14915/2
Marian Dubai [Thu, 5 Feb 2015 12:56:43 +0000 (13:56 +0100)]
Bump pax exam version

Change-Id: I7126f464aa1d55307ca2d9ba0060d3abf600b5f0
Signed-off-by: Marian Dubai <mdubai@cisco.com>
9 years agoMerge "BUG-2288: remove DOMNotificationListenerRegistration"
Tony Tkacik [Thu, 5 Feb 2015 09:57:50 +0000 (09:57 +0000)]
Merge "BUG-2288: remove DOMNotificationListenerRegistration"

9 years agoMerge "Improve JavaAttribute performance"
Tony Tkacik [Thu, 5 Feb 2015 09:55:03 +0000 (09:55 +0000)]
Merge "Improve JavaAttribute performance"

9 years agoMerge "Make sure write transaction cancellation is propagated"
Tony Tkacik [Thu, 5 Feb 2015 09:54:45 +0000 (09:54 +0000)]
Merge "Make sure write transaction cancellation is propagated"

9 years agoMerge "Dummy Distributed Data Store for testing replication"
Tom Pantelis [Thu, 5 Feb 2015 03:54:52 +0000 (03:54 +0000)]
Merge "Dummy Distributed Data Store for testing replication"

9 years agoMerge "neutron now works with jetty"
Moiz Raja [Wed, 4 Feb 2015 22:31:43 +0000 (22:31 +0000)]
Merge "neutron now works with jetty"

9 years agoDummy Distributed Data Store for testing replication 05/14805/3
Moiz Raja [Sat, 24 Jan 2015 13:58:35 +0000 (05:58 -0800)]
Dummy Distributed Data Store for testing replication

To use this run a real instance of the controller on your laptop.
Modify the module-shards.conf to replicate modules to member-2 or
member-2 and member-3 as neccessary.

Then run the dummy datastore.

For example,

   java -jar ./target/sal-dummy-distributed-datastore-1.2.0-SNAPSHOT-allinone.jar -member-name member-2 -cause-trouble -drop-replies -max-delay-millis 500

Runs the dummy datastore as member-2. Will cause failures including dropped replies and when it does reply may cause a random delay of upto
500 millis

This will start of the dummy datastore which will then spawn dummy shard actors which will listen to the RequestVote
and AppendEntries messages. For RequestVote messages it will always respond with a positive vote and for AppendEntries
it will put a sleep for a randomized interval upto the max delay.

Change-Id: Ib618365f12bcc714fcf45e29051f8796f798a361
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoMerge "BUG 2667 : Handle null value type"
Tom Pantelis [Wed, 4 Feb 2015 16:11:01 +0000 (16:11 +0000)]
Merge "BUG 2667 : Handle null value type"

9 years agoBUG-2288: remove DOMNotificationListenerRegistration 27/14827/1
Robert Varga [Wed, 4 Feb 2015 14:18:37 +0000 (15:18 +0100)]
BUG-2288: remove DOMNotificationListenerRegistration

This type is just a capture, and it fails to forward the type of the
listener properly for users. Remove it and be more consistent with the
design of other classes.

Change-Id: Ib8c3db54fc599d6ca194d1667e1a48a98e455180
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug2268: Deprecate legacy Payload classes"
Moiz Raja [Wed, 4 Feb 2015 05:14:31 +0000 (05:14 +0000)]
Merge "Bug2268: Deprecate legacy Payload classes"

9 years agoMerge "Bug 2264: Use streaming for snapshots"
Moiz Raja [Wed, 4 Feb 2015 05:13:48 +0000 (05:13 +0000)]
Merge "Bug 2264: Use streaming for snapshots"

9 years agoMerge "Refactor TransactionProxy"
Moiz Raja [Wed, 4 Feb 2015 03:01:40 +0000 (03:01 +0000)]
Merge "Refactor TransactionProxy"

9 years agoAdd features-restconf to mdsal-artifacts 91/14791/1
Ed Warnicke [Tue, 3 Feb 2015 22:18:21 +0000 (15:18 -0700)]
Add features-restconf to mdsal-artifacts

Change-Id: I1919153b372d2b7323fb1179ad04f9d3a491b29f
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBUG 2667 : Handle null value type 89/14789/1
Moiz Raja [Tue, 3 Feb 2015 21:13:59 +0000 (13:13 -0800)]
BUG 2667 : Handle null value type

Modified the code to handle null types in leaf and leafset entries since
they are allowed. This should help avoid atleast some of the issues seen
by GBP.

Change-Id: Id24e03738e9b5490c8221fbf31ec0734c58655bb
Signed-off-by: Moiz Raja <moraja@cisco.com>
9 years agoneutron now works with jetty 46/13546/7
Ed Warnicke [Wed, 10 Dec 2014 16:55:24 +0000 (10:55 -0600)]
neutron now works with jetty

This patch makes the feature neutron-northbound work with
jetty.

It also moves the adsal to port 8282, and the stock
karaf jetty to port 8080 (in additional to 8181).

GET, POST, and PUT for neutron network has been
tested:

GET:

curl -u admin:admin http://127.0.0.1:8080/controller/nb/v2/neutron/networks

POST:

curl -u admin:admin -H "Content-Type: application/json" -d @network.post http://127.0.0.1:8080/controller/nb/v2/neutron/networks

PUT:

curl -u admin:admin -H "Content-Type: application/json" -d @network2.post -X PUT  http://127.0.0.1:8080/controller/nb/v2/neutron/networks/d6220bbb-35f3-48ab-8eae-69c60aef3544

where:

cat network.post
{"network": {"status": "ACTIVE", "subnets": [], "name": "net-dedicated", "provider:physical_network": null, "admin_state_up": true, "tenant_id": "aa902936679e4ea29bfe1158e3450a13", "provider:network_type": "gre", "router:external": false, "shared": false, "id": "d6220bbb-35f3-48ab-8eae-69c60aef3544", "provider:segmentation_id": 1}}

cat network2.post
{"network": {"subnets": [], "name": "net-dedicated", "provider:physical_network": null, "admin_state_up": true, "provider:network_type": "gre", "router:external": true, "shared": false, "provider:segmentation_id": 1}}

This patch should not be merged before 2/1/2015 to allow time for discussion.

Change-Id: I6a003c2868adc5b060f05d228a56a744c092e963
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge "Bug 2268: Serialize ApppendEntries"
Moiz Raja [Tue, 3 Feb 2015 18:50:27 +0000 (18:50 +0000)]
Merge "Bug 2268: Serialize ApppendEntries"

9 years agoMerge "Mark AD-SAL interfaces as deprecated"
Moiz Raja [Tue, 3 Feb 2015 18:35:54 +0000 (18:35 +0000)]
Merge "Mark AD-SAL interfaces as deprecated"

9 years agoFix potential issue with transaction timeouts 62/14662/4
tpantelis [Sat, 31 Jan 2015 04:52:15 +0000 (23:52 -0500)]
Fix potential issue with transaction timeouts

If CanCommit is sent for a transaction but there is already a current
transaction being committed, the second transaction is queued and
processed when the current transaction completes. However when the
second transaction is de-queued and CanComitted, the last access time
is not updated. There is a periodic timer task that checks if the current
transaction has not been accessed after a relatively long period of time
(eg if CanCommit was sent but Commit isn't sent possibly due to network
failure). In this case the current transaction is aborted. So if a
transaction was queued for a long enough period of time, when it becomes
the current transaction, the timer task could run and abort it before
the front-end has a chance to send the Commit. To prevent this, the
de-queued transaction's access time is updated when it it made the
current transaction.

I also changed the commit() and preCommit() calls to the InMemoryDataStore
to catch Exception as the InMemoryDataStore can throw unchecked
exceptions. If uncaught, the exception is propagated to akka and no
response is sent.

Change-Id: I516bde86f45272f2d40fab76acbc27180e2ad402
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoFix opendaylight-startup-archetype to use ${project.groupId} instead of ${groupId}. 03/14703/1
Nathan Harmon [Mon, 2 Feb 2015 23:40:11 +0000 (15:40 -0800)]
Fix opendaylight-startup-archetype to use ${project.groupId} instead of ${groupId}.

Change-Id: I3ce96492d149c466b93539e9254f93074e1f036c
Signed-off-by: Nathan Harmon <nathan.harmon@hp.com>
9 years agoMerge "Improve cluster test app logging"
Moiz Raja [Mon, 2 Feb 2015 23:37:36 +0000 (23:37 +0000)]
Merge "Improve cluster test app logging"

9 years agoAdd signature marker and version to NormalizedNode streaming 62/14862/2
tpantelis [Mon, 2 Feb 2015 08:42:37 +0000 (03:42 -0500)]
Add signature marker and version to NormalizedNode streaming

For backwards compatibility, in some message classes, when
de-serializing, we first try the new NormalizedNode streaming and if
that fails we try the pre-Lithium protobuff de-serialization. However,
we're relying on an IOException from the NormalizedNode streaming or it
returning null which may not be reliable. In addition if protobuff fails
as well we can't tell if it's a bad protobuff or streamed message and we
squash the streaming exception. We don't want to masking streaming failures
as that's what will be used going forward.

To alleviate this, NormalizedNodeOutputStreamReader now writes an initial byte
as a signature marker to identify it as a valid stream.
NormalizedNodeInputStreamReader reads it, and if invalid, throws an
exception. This is caught by SerializationUtils as an indication to try
the legacy protobuff de-serialization.

Also, I added a version number to the output stream so we can handle
future changes for backwards compatibility.

Change-Id: I19779aa83c33eadc6bf83adfe6aae0b9a27cdfae
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBug 2410: Use generated serialVersionUID for messages 36/14836/2
tpantelis [Mon, 2 Feb 2015 03:10:19 +0000 (22:10 -0500)]
Bug 2410: Use generated serialVersionUID for messages

Changed the remaining message classes whose serialVersionUID had
previously been set to 1 to the generated value to maintain
backwards compatibility with Helium.

It turns out CommitEntry, PersistEntry, and SaveSnapShot are no longer
used so I removed them.

Change-Id: Ib3c251b7eaf8b8ce5aa4edf693aca23bf67d0402
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoRefactor TransactionProxy 18/14618/3
Gary Wu [Thu, 29 Jan 2015 22:24:18 +0000 (14:24 -0800)]
Refactor TransactionProxy

Consolidated three transaction operation interfaces
into one.  Eliminated creation of redundant future/promise
objects for queued read operations.

Change-Id: I12a91cac5298f2722e30ed52ee91e35fdf1104d6
Signed-off-by: Gary Wu <Gary.Wu1@huawei.com>
9 years agoImprove Shard logging output 60/14660/6
tpantelis [Fri, 30 Jan 2015 23:29:15 +0000 (18:29 -0500)]
Improve Shard logging output

When debugging it's useful to see the shard name in the log output.

Also changed ShardIdentifier to cache the toString() output as the
class is immutable so we don't incur the overhead of building the
String for every log message.

Change-Id: Ic7ea9878eeab04ea9b43a25b7d4b2b190f79e607
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoMark AD-SAL interfaces as deprecated 92/14392/4
Ed Warnicke [Thu, 22 Jan 2015 17:31:04 +0000 (10:31 -0700)]
Mark AD-SAL interfaces as deprecated

In keeping with TSC discussion on marking AD-SAL
deprecated during Lithium.

Change-Id: If0f7736dfe92833b51a1e223b705712d9b9f0271
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoBug2268: Deprecate legacy Payload classes 97/14497/2
tpantelis [Wed, 21 Jan 2015 21:18:17 +0000 (16:18 -0500)]
Bug2268: Deprecate legacy Payload classes

Mark CompositeModificationByteStringPayload and
CompositeModificationPayload as deprecated.

Change-Id: I788baab09770d305c9fde9b4988fad9e58663ded
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBug 2264: Use streaming for snapshots 20/14620/3
tpantelis [Thu, 29 Jan 2015 13:35:59 +0000 (08:35 -0500)]
Bug 2264: Use streaming for snapshots

The NormalizedNode snapshot payload is now streamed.

On the Shard side, added a new message CreateSnapsot to the
ShardReadTransaction to read the data tree root, serialize it, and
return a CaptureSnapshotReply message. On createSnapshot, the Shard
now sends the CreateSnapsot message to the read-only tx actor instead
of a ReadData message. This moves the serialization out of the Shard.

On the RaftActor side, the Snapshot class remained the same as it stores
a byte[] and is already Serializable. The CaptureSnapshotReply now
stores a byte[] instead of ByteString. The internal RaftActor code for
capture and apply snapshot was changed to use/pass byte[] to eliminate
the overhead of converting to/from ByteString.

Change-Id: Id12677441dce54bebbb5b71c68cf457d7c915ba1
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBug 2268: Use streaming for Modification payload 95/14495/6
tpantelis [Wed, 21 Jan 2015 19:45:42 +0000 (14:45 -0500)]
Bug 2268: Use streaming for Modification payload

Changed the *Modification classes to Externalizable and to use the
NormalizedNode streaming classes.

Added a new Payload implementation, ModificationPayload, that serializes the
Modification to a byte[].

Added ThreadLocals to SerializationUtils to reuse stream Reader/Writer
instances for efficiency for callers that serialize/deserialize multiple
objects.

Change-Id: Ib85af035d31027ffe4e2ddd5bcd49c1df1c6a42a
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoBug 2268: Serialize ApppendEntries 83/14483/5
tpantelis [Wed, 21 Jan 2015 20:12:24 +0000 (15:12 -0500)]
Bug 2268: Serialize ApppendEntries

Changed AppendEntries to use java serialization instead of protobuff to
take advantage of payload streaming. Kept backwards compatibility
support for deserializing from the pre-Lithium protobuff message.

Change-Id: Ia1edf186cbe8eba3f46207bcf3ba17598c5bca37
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoImprove cluster test app logging 63/14663/1
tpantelis [Sat, 31 Jan 2015 05:18:30 +0000 (00:18 -0500)]
Improve cluster test app logging

Made a few improvements to the logging in PeopleCarListener and
PeopleProvider to help debugging test failures.

Change-Id: I25d27e4abbc4b0096b2dc812bfcbada208c588e4
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoImprove JavaAttribute performance 13/14513/2
Robert Varga [Mon, 26 Jan 2015 17:05:37 +0000 (18:05 +0100)]
Improve JavaAttribute performance

Instead of performing Arrays.copyOf(), use the .clone() method, which is
guaranteed to return a shallow copy.

Change-Id: Ided53e90693b28f924c056189abd7257647fe079
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2650: Fix ConcurrentModificationEx in TransactionProxy 91/14591/3
tpantelis [Fri, 23 Jan 2015 09:44:07 +0000 (04:44 -0500)]
Bug 2650: Fix ConcurrentModificationEx in TransactionProxy

There were a couple patches proposed by other folks. Gary's patch
https://git.opendaylight.org/gerrit/#/c/14577/ to use a BlockingQueue
would work and is slightly simpler code but I prefer to avoid the unneeded synchronization
overhead that BlockingQueue carries as we still need explicit
synchronization for atomic access to txOperationsOnComplete and
transactionContext.

I implemented something similar to Robert's propopsal in
https://git.opendaylight.org/gerrit/#/c/14565/ .

I added a unit test that does a transaction put after an async read but
unfortunately it didn't reproduce the issue due to the behavior of the
akka dispatcher in the unit tests. The read future callback is batched
by the dispatcher even when using the CallingThreadDispatcher so the
synchronous read callback isn't achieved. Somehow the threading behavior
is different in the producton system. Regardless I kept the unit test
anyway - better than not haviing it.

Change-Id: I70f4e2507411c63cff99d03bf046c65e78a8138e
Signed-off-by: tpantelis <tpanteli@brocade.com>
9 years agoSplit out TransactionContext classes 73/14573/1
Robert Varga [Tue, 27 Jan 2015 15:13:36 +0000 (16:13 +0100)]
Split out TransactionContext classes

The classes are static and quite large, splitting them out into separate
files allows for better readability.

Change-Id: I12f6da96b7bf128549bf4d990bcc797fdb348f0d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix String.format() strings 31/14531/2
Robert Varga [Tue, 27 Jan 2015 10:59:50 +0000 (11:59 +0100)]
Fix String.format() strings

String.format() takes %s as a placeholder.

Change-Id: I1465b36b4d5ef56f25d3ee433450bbdd2ee97c3b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd serialVersionUUID fields 17/14517/3
Robert Varga [Mon, 26 Jan 2015 18:09:53 +0000 (19:09 +0100)]
Add serialVersionUUID fields

Fix eclipse warnings by generating an explicit field.

Change-Id: Ice06a8ba6a2c59085998a725378d0ddd54cc032b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix a warning in CreateTransactionReply 16/14516/3
Robert Varga [Mon, 26 Jan 2015 18:09:15 +0000 (19:09 +0100)]
Fix a warning in CreateTransactionReply

Add a simple type argument to silence an eclipse warning.

Change-Id: Ib89c05ca6cc1161ac267313a559e5ae99605b090
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix ShardIdentifier warning 15/14515/3
Robert Varga [Mon, 26 Jan 2015 18:08:24 +0000 (19:08 +0100)]
Fix ShardIdentifier warning

The format string should be a constant, but we are not using it anyway.
Let's remmove it altogether and expand the corresponding comment.

Change-Id: I53245be3163ed3a874d14ddf981455dcd58c4ceb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoNormalizedNodeOutputStreamWriter should forward flush() 05/14505/4
Robert Varga [Mon, 26 Jan 2015 16:22:34 +0000 (17:22 +0100)]
NormalizedNodeOutputStreamWriter should forward flush()

When flush is called, we should cascade it to underlying stream, if it
is a stream. Failure to do so may cause problems with buffering.

Change-Id: I5ee32c3a0bab6aa112dc3c323ea1c4d5c4d5af5c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCleanup PathArgumentTypes 04/14504/4
Robert Varga [Mon, 26 Jan 2015 16:13:45 +0000 (17:13 +0100)]
Cleanup PathArgumentTypes

PathArgumentTypes is a utility class, it should be final with a private
constructor. Also make sure the internal map is truly constant.

Change-Id: I1cbbcac5c86daa64fc1fb79a7282fdd29b6566d7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoNodeTypes is a utility class 03/14503/4
Robert Varga [Mon, 26 Jan 2015 16:10:44 +0000 (17:10 +0100)]
NodeTypes is a utility class

Utility classes need to be final and have a private constructor.

Change-Id: I4f7ad749415a068be324bfe23c79110b96c4ed10
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize MetricsReporter class 02/14502/4
Robert Varga [Mon, 26 Jan 2015 16:00:59 +0000 (17:00 +0100)]
Optimize MetricsReporter class

Constants should really be static, singleton instance should be static
and the inner field should never be exposed to outside world.

Change-Id: I37776b190cef6b0402f1478b22c47746d547619d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Bug 2265: Use streaming for DeleteData message"
Moiz Raja [Wed, 28 Jan 2015 15:29:00 +0000 (15:29 +0000)]
Merge "Bug 2265: Use streaming for DeleteData message"

9 years agoMerge "Bug 2265: Address comments from 12448"
Moiz Raja [Wed, 28 Jan 2015 13:46:08 +0000 (13:46 +0000)]
Merge "Bug 2265: Address comments from 12448"

9 years agoMake sure write transaction cancellation is propagated 48/14548/2
Robert Varga [Tue, 27 Jan 2015 17:15:20 +0000 (18:15 +0100)]
Make sure write transaction cancellation is propagated

DOMForwardedWriteTransaction needs to notify subtransactions about
cancellation, as otherwise they will remain logically open and
potentially lost.

Change-Id: I15d926979fe181c60de65f44102b75513fd22dfc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize ValueSerializer 99/14499/5
Robert Varga [Mon, 26 Jan 2015 15:08:14 +0000 (16:08 +0100)]
Optimize ValueSerializer

Instead of having a switch() statement, which forces a comparison of
ValueTypes, embed the serialize() method in ValueType with package
visibility.

Change-Id: I1cf4aa998cc97dc7d920570744094409aa4a7f29
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Optimize ValueType class lookups"
Tom Pantelis [Tue, 27 Jan 2015 14:23:51 +0000 (14:23 +0000)]
Merge "Optimize ValueType class lookups"

9 years agoMerge "Optimize AugmentationIdentifierGenerator.getPathArguments()"
Tom Pantelis [Tue, 27 Jan 2015 14:22:21 +0000 (14:22 +0000)]
Merge "Optimize AugmentationIdentifierGenerator.getPathArguments()"

9 years agoMerge "Optimize PathUtils.toString()"
Tom Pantelis [Tue, 27 Jan 2015 14:20:40 +0000 (14:20 +0000)]
Merge "Optimize PathUtils.toString()"

9 years agoMigrate AbstractRuntimeCodeGenerator to new ClassLoaderUtils 33/14533/1
Robert Varga [Tue, 27 Jan 2015 11:00:37 +0000 (12:00 +0100)]
Migrate AbstractRuntimeCodeGenerator to new ClassLoaderUtils

Change the import so we use the non-deprecated version. Also fix
exception string formatting.

Change-Id: Ibf710c8b59d633609c5f557604882034b63f4505
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize ValueType class lookups 98/14498/4
Robert Varga [Mon, 26 Jan 2015 14:54:23 +0000 (15:54 +0100)]
Optimize ValueType class lookups

Instead of using a mutable HashMap, use an ImmutableMap, which has much
better lookup performance.

Change-Id: Ia44ef5243abce021bdbd8afc930e5f5fc9529724
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize AugmentationIdentifierGenerator.getPathArguments() 94/14494/4
Robert Varga [Mon, 26 Jan 2015 14:31:19 +0000 (15:31 +0100)]
Optimize AugmentationIdentifierGenerator.getPathArguments()

Instead of using a Regex-based splitting, instantiate a Splitter, which
is much faster.

Change-Id: I67c3cd1c9054f675b2543cb8ae62c7037f4edf19
Signed-off-by: Robert Varga <rovarga@cisco.com>