genius.git
6 years agoRefactor InterfaceManagerCommonUtils to non-static 44/64544/9
Tom Pantelis [Thu, 19 Oct 2017 20:35:56 +0000 (16:35 -0400)]
Refactor InterfaceManagerCommonUtils to non-static

Change-Id: I17fe65b53cb887056a1be58c8cb715885057cd2d
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoCleanup in idmanager-impl 34/64834/4
Tom Pantelis [Fri, 27 Oct 2017 22:46:59 +0000 (18:46 -0400)]
Cleanup in idmanager-impl

- Change public Map fields, allocatedIdMap and releaseIdLatchMap, in
IdUtils to private and added methods to access them.

- In ReleasedIdHolder, delayedEntries is expected to be thread-safe and
is initialized to a CopyOnWriteArrayList however it can be set externally
via setDelayedEntries with no knowledge if the passed List is thread-safe.
It turns out the 3 callers do pass in a CopyOnWriteArrayList however it
shouldn't rely on callers doing the right thing so I changed it to create
a new CopyOnWriteArrayList from the past List to guarantee it. This also
ensures delayedEntries is never null.

Change-Id: I792012ecb218609fb40e1f9efb78dc9d077d2d05
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove deploy-site.xml 99/64899/2
Thanh Ha [Mon, 30 Oct 2017 21:05:16 +0000 (17:05 -0400)]
Remove deploy-site.xml

With the javadoc jobs now available to generate javadoc it is time to
remove the maven-sites and related files.

Change-Id: I7761c1efaf216cacf87d909f9a38ec2b265fda66
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoFutureRpcResults with StackTraces.getCallersCallerMethodName() 79/64879/4
Michael Vorburger [Mon, 30 Oct 2017 13:47:36 +0000 (14:47 +0100)]
FutureRpcResults with StackTraces.getCallersCallerMethodName()

Change-Id: Ibd45d12c75e67de2b54fb1dbfe5e96fdff58859d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoHandle logging symmetrically in FutureRpcResults 93/64793/4
Stephen Kitt [Fri, 27 Oct 2017 08:18:36 +0000 (10:18 +0200)]
Handle logging symmetrically in FutureRpcResults

This patch treats logging and result (or error) processing
independently, in a symmetrical fashion for both success and error
cases.

* LogLevel handles the logging façade in front of Logger.
* A new NONE LogLevel allows logging (by the default handler) to be
  disabled.
* The success log level is configurable (including NONE).
* The default consumers do nothing (logging is handled separately).
* The onSuccess/onFailure handlers follow the same pattern, and the
  onFailure handler is re-used for external error handling.

Change-Id: Ie4f799d4ba655c438ac1616b04b323a11a913684
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoRefactor FlowBasedIngress/Egress classes to non-static 00/64500/10
Tom Pantelis [Thu, 19 Oct 2017 01:46:15 +0000 (21:46 -0400)]
Refactor FlowBasedIngress/Egress classes to non-static

Change-Id: Idef01d927a79acd2cbad2a9f930de3f8244bacb7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRefactor AlivenessMonitorUtils to non-static 99/64499/9
Tom Pantelis [Thu, 19 Oct 2017 01:07:52 +0000 (21:07 -0400)]
Refactor AlivenessMonitorUtils to non-static

Change-Id: I940bfe61b6e18e54db18a5a5145e2d95fa688954
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoConvert to JobCoordinator in interfacemanager 92/64492/9
Tom Pantelis [Wed, 18 Oct 2017 20:40:44 +0000 (16:40 -0400)]
Convert to JobCoordinator in interfacemanager

Also cleaned up some statics in the process.

Change-Id: I0f26b145e8d587554e6daff275a00218a65c1932
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoConvert to JobCoordinator in idmanager-impl 30/64830/1
Tom Pantelis [Fri, 27 Oct 2017 21:17:36 +0000 (17:17 -0400)]
Convert to JobCoordinator in idmanager-impl

Change-Id: I75a0edccef1b47ecf1c246c9e51e7717916f1da2
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoINFRAUTILS-18: TestableJobCoordinatorEventsWaiter 2 min. instead 30s 05/64805/3
Michael Vorburger [Fri, 27 Oct 2017 12:37:34 +0000 (14:37 +0200)]
INFRAUTILS-18: TestableJobCoordinatorEventsWaiter 2 min. instead 30s

and include details of JobCoordinator state when stuck

Requires Iac27dbdd707a599fcb912bb68425e6cbe969d0e3 c/64806 in infrautils
for the new JobCoordinator toString() implementations.

Change-Id: Ibaf06bd75a8f5f5ba48ffc6e0f1c26fbab3d96f5
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoFix the listeners closing process 03/64803/1
David Suarez [Fri, 27 Oct 2017 11:58:42 +0000 (13:58 +0200)]
Fix the listeners closing process

In some cases, dataChangeListenerRegistration might be null, provoking
an NPE. This fixes that problem.

Change-Id: Iaa1a22a54b47b38783eddf15edbf42b14b0bb84a
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agotestutils InterfaceHelper with correct @NonNull read 75/64675/2
Michael Vorburger [Tue, 24 Oct 2017 18:28:51 +0000 (20:28 +0200)]
testutils InterfaceHelper with correct @NonNull read

Change-Id: I0936c2894c7cd153016b51dc5717c104714e1c27
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoSRM: Add implementation code 63/61963/15
Vishal Thapar [Thu, 27 Jul 2017 21:41:05 +0000 (03:11 +0530)]
SRM: Add implementation code

This adds the following:
1. RPC Implementation in impl and required util class
2. CLI for SRM as mentioned in spec.
3. Debug CLI to clear out SRM operDS.

These cover Work Items 3 and 4 of SRM Spec.

Change-Id: I04553678580ff53217c7757594cdd836aa8abfae
Signed-off-by: Vishal Thapar <vishal.thapar@ericsson.com>
6 years agoMake @Deprecated DataStoreJobCoordinator delegate to infrautils' 03/60303/19
Michael Vorburger [Thu, 13 Jul 2017 11:30:36 +0000 (17:00 +0530)]
Make @Deprecated DataStoreJobCoordinator delegate to infrautils'

In an ideal world, we would instead now switch all uses of the
@Deprecated DataStoreJobCoordinator everywhere in genius and netvirt to
the new infrautils' JobCoordinator @OsgiService instead of having to do
this, but I would propose to do it in 2 steps and get this in first
(now), and then starting migrating, and then once everyone is off
DataStoreJobCoordinator and there are no usages left, delete it.

At least like this we would have only one version of this code, instead
of maintaining 2 split incarnations in genius and infrautils.

Also, and importantly, this change includes new infrastructure making it
easy to use JobCoordinator in the netvirt aclservice and genius
interfacemanager component tests, as used in IdManagerTest, see also
TestableJobCoordinatorEventsWaiterTest.

This change must be merged into genius at the same time as
I0f2c5258315f40f9db88806fe0a33619f0f7bb77 will go into netvirt.

This change requires I5e423212e8f720fb4b20837f12ad59de6f2a66d4 in
infrautils.

This change includes the fix for bug GENIUS-93.

Change-Id: I2043d32d612fb63990721908ccfff33a3ddf0689
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoJavaDoc for AbstractAsyncDataTreeChangeListener 99/63799/6
Michael Vorburger [Thu, 28 Sep 2017 20:12:40 +0000 (22:12 +0200)]
JavaDoc for AbstractAsyncDataTreeChangeListener

Change-Id: Ie8acafc15f280c9a7e08c13a6dcbcb5d2ee0bdf5
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agoRemove IdManager from ItmManagerRpcService & ItmUtils as unused there 51/64451/5
Michael Vorburger [Wed, 18 Oct 2017 13:04:02 +0000 (15:04 +0200)]
Remove IdManager from ItmManagerRpcService & ItmUtils as unused there

NB however that it *IS* used in some other ITM classes, incl. e.g.
ItmProvider, TransportZoneListener, ItmTepRemoveWorker, ItmTepAddWorker.

Change-Id: I8fa1f2f21dd9de343ba45c5bfa80e674c880d78e
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoAdd component-based removeFlow() 05/64305/6
Stephen Kitt [Mon, 16 Oct 2017 15:23:04 +0000 (17:23 +0200)]
Add component-based removeFlow()

... which will be used in NetVirt to simplify flow removal methods.

Change-Id: Id882570c15f018ce751b3829fac4a446f4aecfc8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoInterface manager: split makeTunnelIngressFlow 35/64435/4
Stephen Kitt [Wed, 18 Oct 2017 09:55:18 +0000 (11:55 +0200)]
Interface manager: split makeTunnelIngressFlow

Having separate add/remove methods allows the removal path to be
simplified, and avoids having an obscure “addOrRemove” parameter.

Change-Id: Ie144e64fd8ab6cc84cfb1ed9ebc265df00e8e6b7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoAliveness monitor: manage transactions 25/64725/3
Stephen Kitt [Wed, 25 Oct 2017 15:18:52 +0000 (17:18 +0200)]
Aliveness monitor: manage transactions

Use the transaction manager to handle all write transactions.

Change-Id: I8d8b4d4fbf1bb03aaee54e19f37d2345dc36bb56
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoEnable bound services update 23/64123/4
Shashidhar Raja [Tue, 10 Oct 2017 16:39:24 +0000 (22:09 +0530)]
Enable bound services update

An update for bound services was ignored by the Bound Services Listener.
It has to be allowed for ACL Service in order fix breakage in
communication between two tenant networks using default security groups
(stateful mode).

Change-Id: Ib05a8fcfac8e74fa5a925edd0db49b7254bbed6a
Signed-off-by: Shashidhar Raja <shashidharr@altencalsoftlabs.com>
Signed-off-by: Sam Hague <shague@redhat.com>
6 years agoFix broken netvirt build following TestInterfaceManager change 74/64674/2
Michael Vorburger [Tue, 24 Oct 2017 18:10:38 +0000 (20:10 +0200)]
Fix broken netvirt build following TestInterfaceManager change

Several tests in netvirt (in both aclservice and elanmanager) actually
use TestInterfaceManager without a DataBroker... so the netvirt build
broke following merge of I873999721e135c3cc968ef0d1aa239d794d12cb3.

My first attempt in I31ab80c583c2f1da73edc5b42cd7419311897bae was to
"just" fix those tests, but after 1h into that I'm giving up (and will
let Riyazahmed Talikoti finish it up), and instead put together this
workaround, which basically lets one still use TestInterfaceManager
without a DataBroker, like before, for now.

Change-Id: I3a9b551acd4b145af18d41549fba1fc25e4cf0ea
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoRetryingManagedNewTransactionRunner for OptimisticLockFailedException 71/63471/12
Michael Vorburger [Sat, 23 Sep 2017 00:50:27 +0000 (02:50 +0200)]
RetryingManagedNewTransactionRunner for OptimisticLockFailedException

TODO in xN future follow-up changes: Start fixing (many)
OptimisticLockFailedException that appear in logs, by using this... ;)

Change-Id: I8fee2b50b562dc2c0f416d59082ad4bded0cdf58
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoDataBrokerFailures failSubmits with int howManyTimes 22/64622/3
Michael Vorburger [Mon, 23 Oct 2017 20:01:36 +0000 (22:01 +0200)]
DataBrokerFailures failSubmits with int howManyTimes

This is particularly useful e.g. to test OptimisticLockFailedException,
and will be used in I8fee2b50b562dc2c0f416d59082ad4bded0cdf58.

Change-Id: I775f394d30b67e69d59560f8f3b8f2a750373155
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoTestStubs for Elan-Evpn Junit 63/63263/9
Riyazahmed D Talikoti [Tue, 19 Sep 2017 07:22:11 +0000 (12:52 +0530)]
TestStubs for Elan-Evpn Junit

Teststubs are written  for InterfaceManager and ITM
Right now these stubs contains testcode mainly required by Elan. These can
be expanded as we write more testcases.

Added addInterfaceInfo and addTunnelInterfaceInfo methods.

Elan Junit Testcases are written and raised as seperate review in netvirt
https://git.opendaylight.org/gerrit/#/c/62894/

Change-Id: I873999721e135c3cc968ef0d1aa239d794d12cb3
Signed-off-by: Riyazahmed D Talikoti <riyazahmed.d.talikoti@ericsson.com>
6 years agoUse JobCoordinator in TestableJobCoordinatorEventsWaiter 26/64626/3
Tom Pantelis [Mon, 23 Oct 2017 21:51:20 +0000 (17:51 -0400)]
Use JobCoordinator in TestableJobCoordinatorEventsWaiter

Added support for JobCoordinator in TestableJobCoordinatorEventsWaiter.
Support for DataStoreJobCoordinator was retained for now for
compatibility.

The other alternative is to move TestableJobCoordinatorEventsWaiter et al
to infrautils, see https://git.opendaylight.org/gerrit/#/c/64468/, but
it got -1. Maybe we can revisit that later.

Change-Id: Id483fbb1515c24d448e874ba358dd5477fa0c53a
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoManagedNewTransactionRunnerImplTest with new negative DB failure tests 18/64618/2
Michael Vorburger [Mon, 23 Oct 2017 18:31:14 +0000 (20:31 +0200)]
ManagedNewTransactionRunnerImplTest with new negative DB failure tests

These 2 new tests will be customized in
I8fee2b50b562dc2c0f416d59082ad4bded0cdf58 to illustrate how the
RetryingManagedNewTransactionRunner, contrary to the
ManagedNewTransactionRunnerImpl, handles the
OptimisticLockFailedException.

Change-Id: I8e0da146cde5ddd853f9f388cf2ee6ba895ef086
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoConvert interfacemanager-impl to use mdsal EOS APIs 57/64257/7
Tom Pantelis [Fri, 13 Oct 2017 17:38:19 +0000 (13:38 -0400)]
Convert interfacemanager-impl to use mdsal EOS APIs

The controller EOS APIs are deprecated.

Change-Id: Idba9454204a1a1d3eab0e004a86383e21c70490b
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoAdd access to the ExecutorService 48/64248/7
David Suarez [Wed, 11 Oct 2017 09:21:28 +0000 (11:21 +0200)]
Add access to the ExecutorService

Add accessor to the ExecutorService so that the derived listeners can
shutdown it.

Change-Id: I51ec725c3238f0849e2091eb48532a1ceec24582
Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
6 years agoRemove duplicate (identical) maven-jar-plugin to fix Maven WARNING 17/64617/1
Michael Vorburger [Mon, 23 Oct 2017 16:43:45 +0000 (18:43 +0200)]
Remove duplicate (identical) maven-jar-plugin to fix Maven WARNING

[WARNING] Some problems were encountered while building the effective
model for org.opendaylight.genius:mdsalutil-api:bundle:0.4.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but
found duplicate declaration of plugin
org.apache.maven.plugins:maven-jar-plugin @ line 164, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they
threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support
building such malformed projects.

Change-Id: I5360209dfbbb0d13ee9e33ffcfc7ff22dd3fcbff
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>