genius.git
6 years agoConvert fcapsapplication-impl to use mdsal EOS APIs 63/64263/3
Tom Pantelis [Fri, 13 Oct 2017 18:39:39 +0000 (14:39 -0400)]
Convert fcapsapplication-impl to use mdsal EOS APIs

The controller EOS APIs are deprecated.

Change-Id: I7c4e4e2c11a0817f752bd83e4724eb65827aec52
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoInterface Manager: use ManagedNewTransactionRunner 95/63995/4
Stephen Kitt [Thu, 5 Oct 2017 16:57:58 +0000 (18:57 +0200)]
Interface Manager: use ManagedNewTransactionRunner

This is a first stab at migrating WriteTransactions to
ManagedNewTransactionRunner (including one ReadWriteTransaction). It
illustrates a variety of different approaches.

Change-Id: I71237ecf047ff30f20cc52535eba3ab473bb9e6d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoAdd new EntityOwnershipUtils 26/64126/6
Tom Pantelis [Tue, 10 Oct 2017 18:17:42 +0000 (14:17 -0400)]
Add new EntityOwnershipUtils

Added EntityOwnershipUtils that uses the mdsal EOS APIs instead of
the deprecated controller APIs. Deprecated the prior Utils classes -
they will be removed once all users are migrated.

Modified DataStoreJobCoordinator to implement the new JobCoordinator
interface to avoid propagating the further use of a deprecated API
in EntityOwnershipUtils.

EntityOwnerUtils#registerEntityCandidateForOwnerShip has the side
effect of registering a global EntityOwnershipListener that maintains
local ownership state for all entities in a static cache. This is
unnecessary as the state is maintained by he EOS and can be queried.
It also stores change events in a static (unsynchronized) EVENTS_HISTORY
list which grows unbounded. This is only used in one place to print the
history via a CLI command. Both these side effects are problematic
and I don't think need/should be propagated forward. In addition,
it ignores the registration instance that is returned from the EOS
which should be closed by the caller - and the same with the
optional listener that is passed in..

Change-Id: Id923de354fac7b5495912eb122ee63c9adbbc72f
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoReplace deprecated Futures.addCallback by the newer version 56/64056/3
David Suarez [Mon, 9 Oct 2017 10:48:37 +0000 (12:48 +0200)]
Replace deprecated Futures.addCallback by the newer version

The method addCallback(ListenableFuture<V> future,
FutureCallback<? super V> callback) is deprecated and will be replaced
by a new its new version addCallback(ListenableFuture<V> future,
FutureCallback<? super V> callback, Executor executor) in April 2018.

Some other minor changes to pass the new version of checkstyle.

Change-Id: Ie5552d5bde426a17fb0ea0e30370af71875400a8
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agoThis patch implements the genius mdsal interface for 35/64135/1
Bertrand [Fri, 15 Sep 2017 05:16:45 +0000 (22:16 -0700)]
This patch implements the genius mdsal interface for
supporting conntrack ct_mark match (with mask) and
action (without mask).

Change-Id: Iedb16c3751f2f6b4500d921d9ca9e2cbab90ac79
Signed-off-by: Bertrand <bertrand.low@hcl.com>
6 years agoReplacing DS read with cache read in ShowVlan CLI 97/64097/1
Faseela K [Tue, 10 Oct 2017 05:45:37 +0000 (11:15 +0530)]
Replacing DS read with cache read in ShowVlan CLI

Change-Id: Ic0e71cb0b061250d38ff87cde64ae15bc2b8757b
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoMigrate InterfaceChildInfoListener listener to use the new Listeners FW 05/63505/7
Michael Vorburger [Thu, 21 Sep 2017 15:34:49 +0000 (17:34 +0200)]
Migrate InterfaceChildInfoListener listener to use the new Listeners FW

Migrate the InterfaceChildInfoListener listener to use the new Listeners
framework available since [1].

[1] https://git.opendaylight.org/gerrit/#/c/59177/

Change-Id: I8cd496322a006e12ad6e063d77ddf79c4565eba7
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoCleanup 50/63950/2
David Suarez [Wed, 4 Oct 2017 16:38:45 +0000 (18:38 +0200)]
Cleanup

- Declare and rename itmCache as constant
- Other minor changes

Change-Id: Ifb0034e838c304117312a1a87ec05c402c1bdf49
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoBug 9238: DataStoreJobCoordinator now logs JobEntry before thread death 66/63966/4
Michael Vorburger [Wed, 4 Oct 2017 23:20:44 +0000 (01:20 +0200)]
Bug 9238: DataStoreJobCoordinator now logs JobEntry before thread death

This is just the "port" of
https://git.opendaylight.org/gerrit/#/c/63965/ from infrautils to
genius.

This is the last time I maintain this code in both places!
https://git.opendaylight.org/gerrit/#/q/topic:genius.DJC-to-infra.JC
coming real soon, now.

Change-Id: Ia73c1bc9036fa099a0ae49dc227a98d24acd9bb6
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoUse Executors.newSingleThreadExecutor in AsyncDataTreeChangeListenerBase 87/63787/4
Michael Vorburger [Thu, 28 Sep 2017 16:25:48 +0000 (18:25 +0200)]
Use Executors.newSingleThreadExecutor in AsyncDataTreeChangeListenerBase

as well as the same in AsyncClusteredDataTreeChangeListenerBase

instead of their current use of ThreadPoolExecutor, which [AFAIK...] is
pointless here now, since we switched it (a long time ago) to always be
of fixed size 1 only, for some reason?

This is JUST a clean-up, to make this class more easy to understand.
This should (AFAIK) NOT change anything in its behaviour, so safe.

This is also to align it with e.g.
https://git.opendaylight.org/gerrit/#/c/63505/ (and perhaps more changed
like that to come) - seeing the exact same ExecutorService used in both
IMHO makes it clearer how similar this old and that new async DTCL are.

NB: This is Executors from infrautils not java.util.concurrent, but
that's just a wrapper that deals with the setUncaughtExceptionHandler
etc.

Change-Id: If424fd7ec7cd41fe2d35a68ec1eee064e7742214
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd ReadWriteTransaction support 14/63414/5
Stephen Kitt [Thu, 21 Sep 2017 16:22:31 +0000 (18:22 +0200)]
Add ReadWriteTransaction support

This allows ItmTunnelAggregationHelper’s worker to be fully converted
to using the managed transaction runner.

Change-Id: Ia8c946dfc46f3218c15c7ce87215a434ba10ad85
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoFix currently broken master build 87/63987/1
Michael Vorburger [Thu, 5 Oct 2017 13:10:06 +0000 (15:10 +0200)]
Fix currently broken master build

This was to due to just merged c/63372 VS c/63120:

This unfortunately just happened (sorry!) because of
https://git.opendaylight.org/gerrit/#/c/63120/7/mdsalutil/mdsalutil-testutils/pom.xml
VS
https://git.opendaylight.org/gerrit/#/c/63372/8/mdsalutil/mdsalutil-testutils/pom.xml

which wanted conflicting things (without cause conflicts in the git
sense).  What we want is <scope>compile, so this removes the
<scope>test - which were duplicates!

Change-Id: Id8531644c3cefb6263eab647b639d804752f7cb7
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoManagedTransactionRunner utility to help close transactions 72/63372/8
Michael Vorburger [Wed, 20 Sep 2017 18:05:09 +0000 (20:05 +0200)]
ManagedTransactionRunner utility to help close transactions

inspired by
https://git.opendaylight.org/gerrit/#/q/topic:transaction-helper, but:

  (1) instead of the cancel-if-lambda-didn't-submit design, forbid
lambda from doing submit() or cancel(), and instead let new transaction
utility do that.  This is better because it already opens the door for
non-single transactions in the future (see upcoming next chained change)

  (2) allow lambda to throw checked exceptions (see CheckedConsumer),
which will, obviously, lead to the Transaction to be canceled. This is
important as it helps avoid errors where using code forget this.

TODO: Make all places which topic:transaction-helper converted to using
TransactionHelper use this change's ManagedNewTransactionRunner instead.

Change-Id: I613ab7720e226c09d46c90329f0bc767f4642530
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 8059: Fix lockmanager-impl OptimisticLockFailedExceptions logs 21/63121/5
Michael Vorburger [Thu, 14 Sep 2017 03:49:38 +0000 (05:49 +0200)]
Bug 8059: Fix lockmanager-impl OptimisticLockFailedExceptions logs

with true Test-Driven-Development: first simulated the problem using the
brand new shiny DataBrokerFailures' failSubmits() which together with
the infrautils LogCaptureRule caused LockManagerTest's new
testOptimisticLockFailedException() to fail due to (unwanted) ERROR logs
related to the OptimisticLockFailedExceptions, and then fixed it
properly.

This is an alternative / counter-proposal to (parts of)
https://git.opendaylight.org/gerrit/#/c/61526/

Change-Id: I9c04ad4355e94d6bed8ed3a458de0451f7433f50
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoDataBrokerFailures with failSubmits(TransactionCommitFailedException e) 20/63120/7
Michael Vorburger [Thu, 14 Sep 2017 03:25:03 +0000 (05:25 +0200)]
DataBrokerFailures with failSubmits(TransactionCommitFailedException e)

Change-Id: I8cfe7f0bca4d2c4c42e0e51b4b83c0e668f03fa0
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAbstractDataTreeChangeListener getDataBroker protected instead of public 00/63800/3
Michael Vorburger [Thu, 28 Sep 2017 20:18:12 +0000 (22:18 +0200)]
AbstractDataTreeChangeListener getDataBroker protected instead of public

The getDataBroker() method presumably is destined for use by subclasses?

Other classes should not use that to get a DataBroker, they should have
one injected for themselves.  (This is a general DI principle - like
"don't get services you require from other services" kind of thing.)

Change-Id: Ic2352bd9b648d15e7a1e187284359f3191562756
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoClean up 71/63771/4
David Suarez [Thu, 28 Sep 2017 13:11:14 +0000 (15:11 +0200)]
Clean up

- Remove some dead code
- Simplify some conditions
- Private constructor and final modifier for utility class
- Remove deprecated CheckedFuture
- Return results immediately without local assignment
- Strength access to methods & variables
- Other minor improvements and formatting

Other changes will follow this one.

Change-Id: If7f6833113263f10890a2ba3a26e842af661390d
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoDrop yangtools.version completely 77/63877/2
Michael Vorburger [Mon, 2 Oct 2017 16:04:52 +0000 (18:04 +0200)]
Drop yangtools.version completely

as well as mdsal.version & mdsal.model.version

because it turns out that all this is already available
via BOM/s inherited from the binding-parent, which is the
parent of genius/commons/binding-parent, anyway.

ACK: This is based on an idea raise on IRC by shague!

Change-Id: Ida00f70629d2dbea7687e18c1a7cabde3ee89b8d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBump genius to use yangtools 1.2.0 47/63747/4
Anil Belur [Thu, 28 Sep 2017 04:50:25 +0000 (14:50 +1000)]
Bump genius to use yangtools 1.2.0

Jira: releng-485
Change-Id: Ifb9cbc5c58d18484ae3aee98936d06dec3aa6750
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
7 years agoBump odlparent 2.0.4 to 2.0.5 56/63656/2
Stephen Kitt [Wed, 27 Sep 2017 13:36:15 +0000 (15:36 +0200)]
Bump odlparent 2.0.4 to 2.0.5

Change-Id: Ib8a87ed7dc7550082fde3abab9891b2ee105eb1f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoRemove explicit default super-constructor calls 26/63526/2
Stephen Kitt [Tue, 26 Sep 2017 14:47:25 +0000 (16:47 +0200)]
Remove explicit default super-constructor calls

The default constructor is called by default (hence its name), no need
to call it explicitly.

Change-Id: Id5153bce435a6f8d144d30d66a14435e26b53506
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoFutureRpcResults 13/63413/9
Michael Vorburger [Thu, 21 Sep 2017 15:34:49 +0000 (17:34 +0200)]
FutureRpcResults

This is https://git.opendaylight.org/gerrit/#/c/53998/ generalized!

Change-Id: Ieb425d8365e7abe6589971f057722b9cef50db00
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd @PreDestroy (and final) to AbstractDataTreeChangeListener's close 07/63507/2
Michael Vorburger [Mon, 25 Sep 2017 19:52:37 +0000 (21:52 +0200)]
Add @PreDestroy (and final) to AbstractDataTreeChangeListener's close

Change-Id: Ia13a6447f78eca0d888ed6801b8b47d17a35788c
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd gpe option to itm-config.xml 97/63497/1
Sam Hague [Mon, 25 Sep 2017 15:45:18 +0000 (11:45 -0400)]
Add gpe option to itm-config.xml

https://git.opendaylight.org/gerrit/60769 missed adding
the option into the config.xml.

Change-Id: Ib14895cc5f6f562dea9f92cf553fcda8fbfdf298
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoImprove the Genius Listeners Framework 73/63473/2
David Suarez [Sat, 23 Sep 2017 19:47:03 +0000 (21:47 +0200)]
Improve the Genius Listeners Framework

Improve the Listeners Framework created in [1] to ease registration
and un-registration processes for entities.

[1] https://git.opendaylight.org/gerrit/#/c/59177/

Change-Id: I497903950026dd30037ca19fb0928ff455b07682
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoRemove un-used InterfaceManagerRpcService IMdsalApiManager & methods 47/63447/1
Michael Vorburger [Fri, 22 Sep 2017 11:22:42 +0000 (13:22 +0200)]
Remove un-used InterfaceManagerRpcService IMdsalApiManager & methods

* buildInstructions()
* makeTerminatingServiceFlow()
* makeLFIBFlow()
* getFlowRef()

and instance field IMdsalApiManager mdsalMgr.

Change-Id: Icdce7e31f69510208c6171f77ec415c12d175281
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoEnforce findbugs maven plugin for module arputil-api 68/63268/2
David Suarez [Fri, 22 Sep 2017 08:20:56 +0000 (10:20 +0200)]
Enforce findbugs maven plugin for module arputil-api

Change-Id: I0a0e3137468cb1509e905bb6a5f7134cd016fb3e
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoLower log level for non errors 74/63374/4
Sam Hague [Wed, 20 Sep 2017 21:44:55 +0000 (17:44 -0400)]
Lower log level for non errors

Change-Id: Ie44e27fa23bc454a85385b22e2024aa2ba80897d
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoMechanical: ItmTunnelAggregationHelper Eclipse Auto-Save clean-up 11/63411/1
Michael Vorburger [Thu, 21 Sep 2017 15:07:19 +0000 (17:07 +0200)]
Mechanical: ItmTunnelAggregationHelper Eclipse Auto-Save clean-up

just so that this won't clutter
https://git.opendaylight.org/gerrit/#/c/63372/5/itm/itm-impl/src/main/java/org/opendaylight/genius/itm/confighelpers/ItmTunnelAggregationHelper.java@306

Change-Id: I377acd21f1c8e17e74c50450905c5aedf44a8cc8
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix problems detected by the FindBugs plugin 01/63301/3
David Suarez [Tue, 19 Sep 2017 21:13:07 +0000 (23:13 +0200)]
Fix problems detected by the FindBugs plugin

- FindBugs enforcement.

Change-Id: Ibfb739a1e74c64a85bafc49b0b1d0d61e5005b04
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoInterfaceManagerRpcService include exception cause in RPC result 98/53998/6
Michael Vorburger [Tue, 28 Mar 2017 17:01:28 +0000 (19:01 +0200)]
InterfaceManagerRpcService include exception cause in RPC result

and LOG.error SOME (but not all) of such problems (logging is as before)

Change-Id: Ib32d6707c41e5a5ea8f22a8eb05717eff17f0c9f
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd a basic framework to create DataTreeChangeListeners 77/59177/18
David Suarez [Mon, 19 Jun 2017 14:03:27 +0000 (16:03 +0200)]
Add a basic framework to create DataTreeChangeListeners

Add a basic framework to create DataTreeChangeListeners.

Change-Id: Iaf9ddea9bf312ba7659a57f1d63d5d93fa949938
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoInterfaceManagerConfigurationTest using TestableQueues awaitEmpty 31/61931/2
Michael Vorburger [Thu, 17 Aug 2017 13:40:48 +0000 (15:40 +0200)]
InterfaceManagerConfigurationTest using TestableQueues awaitEmpty

Change-Id: I560080569be4d772acd6c041735e2511e7e178e9
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoClean up MDSALManager.removeGroup() 63/62763/7
Stephen Kitt [Wed, 6 Sep 2017 13:41:18 +0000 (15:41 +0200)]
Clean up MDSALManager.removeGroup()

Removing a group only needs a DPN and group identifier; deprecate the
other forms, add a simple variant of removeGroup() and remove
duplicates.

This patch also moves the test package so that we avoid needing to
make methods public.

Change-Id: I70491f96890f2d3d0c1b82d23b298fd18fc40ce7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoCleanup config-parent usage 66/63366/5
Vishal Thapar [Wed, 20 Sep 2017 16:46:49 +0000 (22:16 +0530)]
Cleanup config-parent usage

Change-Id: Ic51def71c73210ed21969238538449b90e45b005
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoMigrating IDManager test cases to use GuiceRules 51/61951/13
Kency Kurian [Thu, 17 Aug 2017 18:26:12 +0000 (23:56 +0530)]
Migrating IDManager test cases to use GuiceRules

Change-Id: I9a88d7e832537ce32cd6e0362e293f07f6adb1cd
Signed-off-by: Kency Kurian <kency.kurian@ericsson.com>
7 years agoRemoved unnecessary/unused CSS config yang remnants 76/63176/2
Tom Pantelis [Fri, 15 Sep 2017 15:27:24 +0000 (11:27 -0400)]
Removed unnecessary/unused CSS config yang remnants

Removed unnecessary/unused config yang imports and service type
identities.

Change-Id: I0d1c72bdc9ffef96495dcee81d1a6eeb8220c6a4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
7 years agoRemove redundant dependencies in pom 35/63235/2
David Suarez [Mon, 18 Sep 2017 14:11:34 +0000 (16:11 +0200)]
Remove redundant dependencies in pom

These dependencies are already declared in parent pom.

Change-Id: Ibc5c1b14f95b000caac208a788e2a344f2584933
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoMinor cleanup in pom 69/63169/3
David Suarez [Fri, 15 Sep 2017 10:53:21 +0000 (12:53 +0200)]
Minor cleanup in pom

- Remove redundant dependencies already defined in parent pom.

Change-Id: Id4f05a454a17847995a5d0d2596038e3a537711b
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
Signed-off-by: David Suárez <david.suarez.fuentes@gmail.com>
7 years agoRemove redundant dependencies in pom 71/63171/1
David Suárez [Fri, 15 Sep 2017 11:25:09 +0000 (13:25 +0200)]
Remove redundant dependencies in pom

These dependencies are already declared in parent pom.

Signed-off-by: David Suárez <david.suarez.fuentes@gmail.com>
Change-Id: Id532fca6e8c97a9f54c55f9252eeec7b49a3402b

7 years agoRemove unused parameters 21/62921/5
Stephen Kitt [Fri, 8 Sep 2017 10:40:54 +0000 (12:40 +0200)]
Remove unused parameters

This patch removes unused parameters (except where they’re obviously
WIP). Where necessary, deprecated variants of affected methods are
provided so downstreams don’t break straight away.

Change-Id: Ia3fcb07ca03074d2f2e85c50d827865e9f125d3b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoOptional clean-up 29/63029/2
Stephen Kitt [Tue, 12 Sep 2017 10:13:02 +0000 (12:13 +0200)]
Optional clean-up

More whack-a-mole:
* method reference in IdManager;
* Optional-creation-instead-of-null-check in
  OvsInterfaceConfigAddHelper.

Change-Id: Ic48f90eede791c66430916ca6875972d48fb3c19
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoInitial bundle setup for SRM 40/60840/16
Vishal Thapar [Thu, 27 Jul 2017 21:41:05 +0000 (03:11 +0530)]
Initial bundle setup for SRM

This adds following:

1. Initial api, impl and shell bundles for ServiceRecoveryManager (SRM)
2. Adds them to genius features
3. Skeletal code for CLI and RPCs

Change-Id: Idcc7266ba0ba8680a23f50261ab4b9aae19f2ed7
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoClean up collections of Futures 86/62886/5
Stephen Kitt [Fri, 8 Sep 2017 08:42:57 +0000 (10:42 +0200)]
Clean up collections of Futures

This patch replaces lists of Futures with singleton lists where
possible, and cleans up some transaction initialisations so we don’t
end up creating a transaction and leaving it dangling following an
early return.

Change-Id: I6b48a02fe9883175ed09cbe184792cef519030b3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoMinor: LockManager "Failed to get lock" incl. number of retries 19/63119/1
Michael Vorburger [Thu, 14 Sep 2017 01:53:04 +0000 (03:53 +0200)]
Minor: LockManager "Failed to get lock" incl. number of retries

Change-Id: I2ff5426b420169656836b175380b995eb0813c27
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agobug 7380: Add getIfaceInfoFromConfigDataStore 10/63010/4
Sam Hague [Mon, 11 Sep 2017 23:35:43 +0000 (19:35 -0400)]
bug 7380: Add getIfaceInfoFromConfigDataStore

Add getInterfaceInfoFromConfigDataStore to
TestInterfaceManager

Change-Id: I4b28882cf79594a3cf0684682e4d32e98f529553
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoRemove deprecated CheckedFuture 69/62869/4
David Suarez [Thu, 7 Sep 2017 19:52:23 +0000 (21:52 +0200)]
Remove deprecated CheckedFuture

Remove deprecated CheckedFuture.

Change-Id: Ide74b976dcf4868f7dc9b4734e1cc468dac0ee37
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoRemove un-used MDSALUtil buildAction() 06/63106/1
Michael Vorburger [Wed, 13 Sep 2017 16:28:55 +0000 (18:28 +0200)]
Remove un-used MDSALUtil buildAction()

This has come up in https://git.opendaylight.org/gerrit/#/c/62921/

I've done a grep like search using this:

findx.sh "buildAction(" | grep -v "buildAction()" | grep ","

and found that this method appears to be un-used in genius and netvirt.

It's very weird anyway - why is it hard-coded to a PopVlanAction, but
called buildAction() like a general utility?  This probably shouldn't be
in this API.

Change-Id: I196d54882a71ec849169303c4ab78c191fd86f79
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoFix decl for ItmInternalTunnelAddWorker.updateOperationalDatastore 83/59883/4
Josh [Mon, 3 Jul 2017 13:56:19 +0000 (16:56 +0300)]
Fix decl for ItmInternalTunnelAddWorker.updateOperationalDatastore

Function name stated write was to operational when it
is actually written to config. Plus, three out of four
params were not used in the function.

Change-Id: I1e1205ba297b39b13f9aaea52537d00f86f053df
Signed-off-by: Josh <jhershbe@redhat.com>
7 years agoMake some classes final and not instantiables 53/62853/3
David Suarez [Thu, 7 Sep 2017 16:10:20 +0000 (18:10 +0200)]
Make some classes final and not instantiables

Make some classes final and not instantiables.

Change-Id: Ie1183b54effc2ad85a70fbe2a43cdd2f42b203b6
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoAvoid nullable Optional references 88/62888/2
Stephen Kitt [Fri, 8 Sep 2017 09:54:38 +0000 (11:54 +0200)]
Avoid nullable Optional references

Optional variables must never be null.

Change-Id: I1998283cb12db44a6428d0e885a5aafc14f2a2f3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoRemove deleteInterfaceChildEntry 87/62887/2
Stephen Kitt [Fri, 8 Sep 2017 09:50:08 +0000 (11:50 +0200)]
Remove deleteInterfaceChildEntry

This method is deprecated, obsolete and no longer used anywhere
(including NetVirt), let’s remove it.

Change-Id: I1ad51f5d86b000075c2d581541b3890ec6f27c72
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoStore original iface correctly in ISL worker 05/62905/1
Stephen Kitt [Fri, 8 Sep 2017 12:39:41 +0000 (14:39 +0200)]
Store original iface correctly in ISL worker

Presumably originalIface should store the originalIface parameter, not
the updatedIface.

Change-Id: I26675e972ae0f81e219176054763927b139ad6ba
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoidmanager now waits for Daexim's import-on-boot 69/61769/6
Michael Vorburger [Tue, 8 Aug 2017 10:27:45 +0000 (15:57 +0530)]
idmanager now waits for Daexim's import-on-boot

This requires https://git.opendaylight.org/gerrit/#/c/55035/ and
https://git.opendaylight.org/gerrit/#/c/56686/ and
https://git.opendaylight.org/gerrit/#/c/61486/ to go into Daexim,
first.

read also JavaDoc on https://git.opendaylight.org/gerrit/#/c/61480/ (BUT
this change does NOT require that c/61480; that's just a generalization
of this approach)

Change-Id: I7b7cd054298414919315f529bc041ec381a831ad
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoITM JMX MBean un-registeration 88/62688/3
Michael Vorburger [Tue, 5 Sep 2017 12:01:08 +0000 (14:01 +0200)]
ITM JMX MBean un-registeration

This is required for https://git.opendaylight.org/gerrit/#/c/62656/
(because otherwise there are ERROR logs in the test for JMX name dupes.)

Change-Id: I38a517a156ed983bfbe00fda71dedba49f6c4de0
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoAdd support for mpls-gre tunnels 96/61496/4
Vishal Thapar [Thu, 10 Aug 2017 13:11:43 +0000 (18:41 +0530)]
Add support for mpls-gre tunnels

OVS 2.8 supports mpls-gre as type=gr with option packet_type=legacy_l3.
With this change it will be possible to use MPLS-gre tunnels for DCGW
connectivity on switches that support it.

Change-Id: If34f29a0e2e20a8300e3c6b24e9f8793bba07e31
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoAdd LogCaptureRule to some component tests, to fail if any errors logged 56/62656/3
Michael Vorburger [Mon, 4 Sep 2017 22:00:52 +0000 (00:00 +0200)]
Add LogCaptureRule to some component tests, to fail if any errors logged

which is useful as is already to see test failure causes more clearly,
but will provide even more useful full information together with
https://git.opendaylight.org/gerrit/#/c/62654/

Change-Id: I24fb17cbac3b814d7e00e12ac7650d4d589a705d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoMinor: ItmProvider Eclipse auto-save code clean-up (mechanical) 87/62687/2
Michael Vorburger [Tue, 5 Sep 2017 11:59:01 +0000 (13:59 +0200)]
Minor: ItmProvider Eclipse auto-save code clean-up (mechanical)

Change-Id: I769e21936dae8fdf28c12cc0e5235f7a885d7d20
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 9099 - Suspected WriteOnlyTransaction leak in interfacemanager 40/62640/2
Faseela K [Mon, 4 Sep 2017 16:43:04 +0000 (22:13 +0530)]
Bug 9099 - Suspected WriteOnlyTransaction leak in interfacemanager

Change-Id: I37260ff709dd3661955cd8eb6598db24a7e7bd5e
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoService Binding on Tunnels - Basic Framework 45/51445/40
Edwin Anthony [Tue, 1 Aug 2017 07:33:45 +0000 (13:03 +0530)]
Service Binding on Tunnels - Basic Framework

Adding the basic constants and utilities and the base structure
of code flow for service binding on interface-type

Change-Id: Ice78b993459d3e0aae4e164289523266fc265ee9
Signed-off-by: Edwin Anthony <n.edwin.anthony@ericsson.com>
7 years agoRemove unused references to DataChangeListener 32/62432/3
Tom Pantelis [Wed, 30 Aug 2017 00:48:22 +0000 (20:48 -0400)]
Remove unused references to DataChangeListener

Change-Id: Icb444f8293de7681a959456fe6ded6d7008b7c8b
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
7 years agoLockManager unlock should not pretend its successful when it was not 26/54426/14
Michael Vorburger [Thu, 6 Apr 2017 11:54:33 +0000 (13:54 +0200)]
LockManager unlock should not pretend its successful when it was not

or was this intentionally done as-is, for some reason I'm missing?

It's seems strange to "hide" error during unlock (currently it logs an
INFO not even an ERROR, and returns sucess, when if there was a
problem).

If so, then it should be documented with an in-line comment...

Change-Id: I977d1cba241c735ba97325fece4ec09964a5355f
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoRemove TestableDataChangeListener 33/62433/3
Tom Pantelis [Wed, 30 Aug 2017 00:58:41 +0000 (20:58 -0400)]
Remove TestableDataChangeListener

This class is deprecated and implements DataChangeListener so
remove it, although I don't know if there are any downstream users.

Change-Id: I483ae7d72b454f335659a689b73180dc41bf7d7c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
7 years agoLockManagerTest without (unused) TestableDataTreeChangeListenerModule 47/61947/5
Michael Vorburger [Thu, 17 Aug 2017 15:46:03 +0000 (17:46 +0200)]
LockManagerTest without (unused) TestableDataTreeChangeListenerModule

It didn't do any harm, but it's not required or used (because this test
nowhere waits for a data store listener), so simpler.

Change-Id: I1d924001f7162a5b7f606d511f427a67a3d08188
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoCleanup 47/61047/8
David Suarez [Wed, 2 Aug 2017 15:01:56 +0000 (17:01 +0200)]
Cleanup

- Add private constructor to this utility class
- Fix log
- Move private method to the inner class

Change-Id: I87672f466e851f860c2bbcfbbcdef9388dfffa6b
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoFix failing LockManagerTest (NoClassDefFoundError) 46/62446/2
Michael Vorburger [Wed, 30 Aug 2017 10:53:14 +0000 (12:53 +0200)]
Fix failing LockManagerTest (NoClassDefFoundError)

The LockManagerTest is currently failing on clean master with:
java.lang.NoClassDefFoundError:
org/opendaylight/controller/md/sal/binding/impl/BindingToNormalizedNodeCodec

The cause of this problem is that genius.testutils has a dependency to
sal-binding-broker-impl's attached <type>test-jar, only - but not the
main artifact (where BindingToNormalizedNodeCodec is).

It's easy to fix like this - but I don't really understand, and don't
have time to further investigate, how this could have suddenly broken...
presumably someone changed a dependency in some POM in controller or
somewhere which had this as a side effect.  Be that as it may - it works
again now with this change.

Change-Id: Ic46d0f78cb89b0a704f1e603f8dd115f46987cb1
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoCleanup 37/61037/6
David Suarez [Wed, 2 Aug 2017 12:06:52 +0000 (14:06 +0200)]
Cleanup

- Private constructor for utility class
- Replace .size() by .empty()
- Change method names to comply with Java style

Change-Id: I92038ae360f3d1f614546ef4806cad8fd171e546
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoRemove start() method 28/61028/6
David Suarez [Fri, 18 Aug 2017 07:53:33 +0000 (09:53 +0200)]
Remove start() method

- Remove start() method to avoid the use of a
useless PostConstruct method, following the recommendations in [1].

- Replace info by debug
- Replace magic number by constant

[1] https://wiki.opendaylight.org/view/BestPractices/DI_Guidelines

Change-Id: If28fc67742e9107d6129ddca6816b1dc2fd58652
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoRemove DataStoreJobCoordinator enqueueJob(AbstractDataStoreJob job) 65/60265/6
Michael Vorburger [Wed, 12 Jul 2017 21:37:26 +0000 (03:07 +0530)]
Remove DataStoreJobCoordinator enqueueJob(AbstractDataStoreJob job)

because when we moved genius.DJC to infrautils.JC we had concluded that
this method does not need to be exposes publicly, and (at the time) was
only used in 1 place (netvirt vpnmanager), which was adjusted in
https://git.opendaylight.org/gerrit/#/c/60264/.

Removing this method now makes it a bit easier to in the future either
try making genius.DJC delegate to infrautils.JC to avoid having this
code twice in the code base (which would require both of their API's to
be identical, o proposing to remove this method) or directly removing
it.

Change-Id: I689d8ead013262b78b9469d4b74f3272b3dd28a9
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoBug 9034: LockManager cancel() ReadWriteTransaction if it's not submit() 96/62196/3
Michael Vorburger [Wed, 23 Aug 2017 11:41:04 +0000 (13:41 +0200)]
Bug 9034: LockManager cancel() ReadWriteTransaction if it's not submit()

Based on Robert's analysis, this change will not fix Bug 9034, because
that's due to a leaked TransactionChain (not the ReadWriteTransaction
being fixed here) - but this could well introduce ANOTHER memory leak
in mdsal, so we should get this in nevertheless ASAP.

Change-Id: I2f27c6bfe7428d864cfe9c3e3f07a390145ac98f
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
7 years agoGenius CSIT Failure : Missing Mandatory Node Error 19/62019/10
Faseela K [Sat, 19 Aug 2017 10:35:48 +0000 (16:05 +0530)]
Genius CSIT Failure : Missing Mandatory Node Error

Due to a recent commit in yangtools, Genius CSIT has broken
as the code was missing to populate one of the mandatory nodes in
interface-state

https://git.opendaylight.org/gerrit/#/c/48672/

Change-Id: I3d65303c849cfbdba06563f4d4160c468b3ee3e5
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoUse INFO for logging null DPID 30/62030/2
Sam Hague [Sun, 20 Aug 2017 01:30:36 +0000 (21:30 -0400)]
Use INFO for logging null DPID

OVS does not assign a DPID until later in the bridge reporting cycle so it isn't an error if the DPID is not set.

Change-Id: Ief39e213d0169d033c3eadb31cb5e6de3a242b38
Signed-off-by: Sam Hague <shague@redhat.com>
7 years agoBug 8938 - Resource-batch manager enhancement 60/61260/10
eaksahu [Mon, 7 Aug 2017 10:09:39 +0000 (15:39 +0530)]
Bug 8938 - Resource-batch manager enhancement

Adding capabilities to return Futures in Resource batch manager calls.
This fetures helps the caller to know whether the submitted tx job has
been successful or not.
And upon success or failure , the caller can take more corrective
action.

Change-Id: Iec5a08721979cfa15a34617fb1ccea0065853c84
Signed-off-by: eaksahu <a.k.sahu@ericsson.com>
7 years agoMove start() method into the constructor 22/61022/5
David Suarez [Fri, 18 Aug 2017 08:11:58 +0000 (10:11 +0200)]
Move start() method into the constructor

Move start() method into the constructor to avoid the use of a
PostConstruct method, following the recommendations in [1].

[1] https://wiki.opendaylight.org/view/BestPractices/DI_Guidelines

Change-Id: Ie18c5ca5f578dc5b6f5f0b4bb872e246b202b336
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoEnable checkstyle at common-parent 50/62050/2
Faseela K [Sun, 20 Aug 2017 16:32:24 +0000 (22:02 +0530)]
Enable checkstyle at common-parent

Remove the checkstyle plugin per pom and enable it at the common level

Change-Id: I5397f90565bdba540929632b675f0f7641a2c1d8
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoReplace *Index(" by *Index(' 97/61897/3
David Suarez [Thu, 17 Aug 2017 07:32:54 +0000 (09:32 +0200)]
Replace *Index(" by *Index('

Replace lastIndex("") and indexOf("") by their character counterparts.
This improve performance.

Change-Id: I02dd7893b29c1e45fe5b435084dc88e535713710
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
7 years agoFix initialization logs in service-binding helpers 51/62051/1
Faseela K [Sun, 20 Aug 2017 17:20:58 +0000 (22:50 +0530)]
Fix initialization logs in service-binding helpers

Change-Id: I36c5cd87381842ba0203eb77178be08dc44a6b5e
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoBUG 9000 - Fix ITM config file not installed 12/61912/2
Jaime Caamaño Ruiz [Wed, 16 Aug 2017 13:05:39 +0000 (15:05 +0200)]
BUG 9000 - Fix ITM config file not installed

Change-Id: Id20ed77d3e7564eaef064a3bc9881e1f472560c0
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
7 years agoBUG 9001 - Fix race condition on OpenFlow based tunnels 70/60770/14
Jaime Caamaño Ruiz [Wed, 9 Aug 2017 17:06:30 +0000 (19:06 +0200)]
BUG 9001 - Fix race condition on OpenFlow based tunnels

This change ensures for openflow based tunnels that the child interface
entry is created before both the parent and child interface states are
added. Otherwise the entry might be added after the inventory listener
is triggered so that child interface state is never added.

This is achieved creating the child interface entry within the ongoing
job, which key is changed yo the parent interface name in case of
openflow tunnels, so that it is synchronized with the interface state
operations.

Additionally, fix a problem when adding the child interface state if
it is not the first tunnel interface on the node and the parent
interface already exists for the openflow based tunnel.
InterfaceManagerCommonUtils#addStateEntry would fail to do so, using
OvsInterfaceStateAddHelper instead.

Change-Id: I212514b3fcedd588f6b59be3f02aae930bc74e16
Signed-off-by: Jaime Caamaño Ruiz <jaime.caamano.ruiz@ericsson.com>
7 years agoFix namespace violations in lockmanager-impl 34/61934/1
Vishal Thapar [Thu, 17 Aug 2017 13:55:01 +0000 (19:25 +0530)]
Fix namespace violations in lockmanager-impl

Change-Id: I4a6c2ca693261d4b73ab9df155a9ab9c52fccf4c
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
7 years agoFixed YANG key'ed list order probs in InterfaceManagerConfigurationTest 13/60313/10
Michael Vorburger [Thu, 13 Jul 2017 23:11:30 +0000 (04:41 +0530)]
Fixed YANG key'ed list order probs in InterfaceManagerConfigurationTest

YANG keyed lists are backed by maps, and re-created whenever they're
de-serialised (which happens e.g. when getAugmentation() is called,
apparently). This patch rebuilds TerminationPoints before comparing
them, sorting a couple of keyed lists.

See
https://lists.opendaylight.org/pipermail/genius-dev/2017-July/001713.html

Change-Id: Iab6189ca8e02c2b48a8b2b7516a1fc66b11363e7
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoIgnore newTunnelInterface tests in interafcemanager 01/61901/1
Faseela K [Thu, 17 Aug 2017 08:05:31 +0000 (13:35 +0530)]
Ignore newTunnelInterface tests in interafcemanager

As it is not working consistent, and hitting timing issues in master

Change-Id: I6ec36d522817e3abbca9c31e128f86029591afac
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoMerge "Logging enchancements for genius"
Michael Vorburger [Tue, 15 Aug 2017 15:44:13 +0000 (15:44 +0000)]
Merge "Logging enchancements for genius"

7 years agoBump versions by x.(y+1).z for next dev cycle 83/61683/1
Thanh Ha [Mon, 14 Aug 2017 17:22:04 +0000 (13:22 -0400)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: If2a8b480b686cfe6cc28d6e512f6f53b2ed8ebe6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
7 years agoLogging enchancements for genius 98/61398/5
Edwin Anthony [Wed, 9 Aug 2017 08:53:28 +0000 (14:23 +0530)]
Logging enchancements for genius

Change-Id: Ic4fccb25f03fc9fe5eaa0b05e89e33f335c39422
Signed-off-by: Edwin Anthony <n.edwin.anthony@ericsson.com>
7 years agoMerge "Log enhancements for better debuggability"
Faseela K [Fri, 11 Aug 2017 16:31:26 +0000 (16:31 +0000)]
Merge "Log enhancements for better debuggability"

7 years agoMerge "Bump odlparent 2.0.2 to 2.0.4"
Michael Vorburger [Thu, 10 Aug 2017 09:33:11 +0000 (09:33 +0000)]
Merge "Bump odlparent 2.0.2 to 2.0.4"

7 years agoMerge "Spec for ServiceRecovery Framework"
Sam Hague [Wed, 9 Aug 2017 18:34:34 +0000 (18:34 +0000)]
Merge "Spec for ServiceRecovery Framework"

7 years agoBump odlparent 2.0.2 to 2.0.4 69/61369/2
Stephen Kitt [Tue, 8 Aug 2017 16:21:05 +0000 (18:21 +0200)]
Bump odlparent 2.0.2 to 2.0.4

Change-Id: Ia01850eadff84cf8ca3fa698bbef1446cdde7349
Signed-off-by: Stephen Kitt <skitt@redhat.com>
7 years agoMerge "Bug 8882 - With conntrack SNAT communication with PNF fails "
Sam Hague [Wed, 9 Aug 2017 12:31:45 +0000 (12:31 +0000)]
Merge "Bug 8882 - With conntrack SNAT communication with PNF fails "

7 years agoLog enhancements for better debuggability 13/61413/1
Faseela K [Wed, 9 Aug 2017 09:27:19 +0000 (14:57 +0530)]
Log enhancements for better debuggability

Change-Id: I94b93304906e3d6cc8326056c64f9843f42f3261
Signed-off-by: Faseela K <faseela.k@ericsson.com>
7 years agoMerge "Add private constructor to this utility class"
Faseela K [Wed, 9 Aug 2017 07:16:51 +0000 (07:16 +0000)]
Merge "Add private constructor to this utility class"

7 years agoMerge "Cleanup"
Faseela K [Wed, 9 Aug 2017 07:11:45 +0000 (07:11 +0000)]
Merge "Cleanup"

7 years agoMerge "Changing the default value of Interfacemanager statistics polling interval...
Faseela K [Wed, 9 Aug 2017 06:57:34 +0000 (06:57 +0000)]
Merge "Changing the default value of Interfacemanager statistics polling interval to 15 Minutes"

7 years agoMerge "BUG 8876 - Fix to remove ELAN interface flows when external network deleted"
Sam Hague [Tue, 8 Aug 2017 18:39:26 +0000 (18:39 +0000)]
Merge "BUG 8876 - Fix to remove ELAN interface flows when external network deleted"

7 years agoBug 8882 - With conntrack SNAT communication with PNF fails 78/61378/3
Aswin Suryanarayanan [Tue, 8 Aug 2017 17:18:21 +0000 (22:48 +0530)]
Bug 8882 - With conntrack SNAT communication with PNF fails

Make the load metadata  start and end bit configurable.

Change-Id: If4ed5e311b249dbff942a936caaa5556d6c933fd
Signed-off-by: Aswin Suryanarayanan <asuryana@redhat.com>
7 years agoMerge "Add GPE option to ITM config"
Faseela K [Tue, 8 Aug 2017 10:45:36 +0000 (10:45 +0000)]
Merge "Add GPE option to ITM config"

7 years agoBug 7599 -hwvtep ucast mac consumption improvement 44/53544/14
Akash Kumar Sahu [Fri, 17 Mar 2017 06:48:54 +0000 (12:18 +0530)]
Bug 7599 -hwvtep ucast mac consumption improvement

Caching ITM External Tunnels so that it would be faster to get from cache
then to read from Data store.

Change-Id: Iac67eb65ac546cf1c197cedd5e039b06d54ab2af
Signed-off-by: Akash Kumar Sahu <a.k.sahu@ericsson.com>
7 years agoMerge "Bug 8859 : Table 220 programmed with wrong service-index"
Faseela K [Mon, 7 Aug 2017 17:35:26 +0000 (17:35 +0000)]
Merge "Bug 8859 : Table 220 programmed with wrong service-index"

7 years agoMerge "IdManager: Use lock only when required"
Faseela K [Mon, 7 Aug 2017 10:10:13 +0000 (10:10 +0000)]
Merge "IdManager: Use lock only when required"