23 months agoImprove timeout check error message 53/78453/3
Robert Varga [Wed, 5 Dec 2018 10:26:34 +0000 (11:26 +0100)]
Improve timeout check error message

Report the value being set in checkArgument.

Change-Id: I76e88504f794300634f61b293876e1677c549792
Signed-off-by: Robert Varga <>
23 months agoRequire FiniteDuration in waitOnAsyncTask() 52/78452/2
Robert Varga [Wed, 5 Dec 2018 10:20:21 +0000 (11:20 +0100)]
Require FiniteDuration in waitOnAsyncTask()

We do not want tests to ever specify an infite duration, make sure
we express that in the contract.

Change-Id: If0202e6b81761461e0d34ad6a00ea207f8a28e50
Signed-off-by: Robert Varga <>
23 months agogetShardTransactionIdleTimeout() is always FiniteDuration 51/78451/2
Robert Varga [Wed, 5 Dec 2018 10:17:44 +0000 (11:17 +0100)]
getShardTransactionIdleTimeout() is always FiniteDuration

Since we are always creating a finite duration, it does not make
sense to hide this fact.

Change-Id: I26fa6356c54816400e23fee5b07e8e65c5f3fc17
Signed-off-by: Robert Varga <>
23 months agoRequire FiniteDuration in Actor props 50/78450/3
Robert Varga [Wed, 5 Dec 2018 10:10:42 +0000 (11:10 +0100)]
Require FiniteDuration in Actor props

All callers are using FiniteDuration and we really do not want
to have an infinite receive timeout. Require FiniteDuration
to be specified.

Change-Id: Ia4664dd2a1fea76ee4c42641ef132d6d47c78385
Signed-off-by: Robert Varga <>
23 months agoReduce use of scala.concurrent.duration.Duration 49/78449/2
Robert Varga [Wed, 5 Dec 2018 10:05:49 +0000 (11:05 +0100)]
Reduce use of scala.concurrent.duration.Duration

In most of the places we really are talking about a FiniteDuration,
hence use that class directly where it is an internal detail. Aside
from providing clarity, this also reduces potential confusion
with java.time.Duration.

Change-Id: I57d84c5ca058cfc6fa56ce57ebb0c8d4d3864a3a
Signed-off-by: Robert Varga <>
23 months agoMigrate to java.time.Duration 74/75374/41
Robert Varga [Wed, 22 Aug 2018 10:26:35 +0000 (12:26 +0200)]
Migrate to java.time.Duration

Akka 2.5.12 deprecated quite a few methods using Scala duration
to use java.time.Duration. Migrate ourselves.

Change-Id: Ieb92c219f529c5d2c606016d3ea717d4531dda1b
Signed-off-by: Robert Varga <>
23 months agoAlways save to local copy in IdIntsListener 47/78347/2
Tom Pantelis [Sun, 2 Dec 2018 20:49:16 +0000 (15:49 -0500)]
Always save to local copy in IdIntsListener

The Listener Stability CSIT fails intermittently due to the
IdIntsListener reporting that its local view of the data
tree as captured from DTCNs does not match the final read
of the data after the writes are done and the leader change
is complete. On DTCN, the IdIntsListener only stores the new
data if the data before in the DTCN matches its stored copy of
the data from the previous DTCN. When the test fails, this
check fails early on and after that it will never match. A
prior patch added a diff of the data nodes that failed the check
which shows that the id-int entry for "prefix-1" was missing
in the stored copy. This is added at the start of the test
(each node adds its own entry). It's unclear to me if it's
actually valid to ensure that the stored copy matches the
current DTCN's data before so I removed the check - let's see
if there's any further tests failures.

Change-Id: I7b861fc85b42586832072fdc19de103733e4fbf5
Signed-off-by: Tom Pantelis <>
23 months agoAdd specific serializer for SimpleReplicatedLogEntry 90/78390/3
Tom Pantelis [Mon, 3 Dec 2018 17:59:43 +0000 (12:59 -0500)]
Add specific serializer for SimpleReplicatedLogEntry

JFR shows a lot of re-allocations of the backing byte [] when
serializing SimpleReplicatedLogEntry. We can pretty closely
estimate the total serialized size with some reasonable padding
since the Payload is already serialized. Introduce a
specific akka serializer for this.

Change-Id: I94ac9528657119b5bab60dc2f37eef98f18ca1b0
Signed-off-by: Tom Pantelis <>
23 months agoUse SharedSingletonMapTemplate 18/78118/6
Robert Varga [Sun, 25 Nov 2018 17:21:00 +0000 (18:21 +0100)]
Use SharedSingletonMapTemplate

We know the key statically, hence we can use more efficient maps
to hold our NodeIdentifierWithPredicates. This saves some CPU cycles
as well as produces less garbage.

Change-Id: I55b89498ab725f8aba85f8e7f1c8bb16f0fe6565
Signed-off-by: Robert Varga <>
23 months agoImprove NormalizedNodeInputStreamReader 96/78096/8
Robert Varga [Sun, 25 Nov 2018 17:29:17 +0000 (18:29 +0100)]
Improve NormalizedNodeInputStreamReader

We really want to retain source iteration order of predicates
being streamed into the system, as they usually match the order

Refactor NormalizedNodeInputStreamReader to read complete
NodeIdentifierWithPredicate objects, thus allowing us to use
ImmutableOffsetMapTemplate to skip some data checks and copying

Change-Id: I162919c7e56109fc98933a4eeae8669b030dc992
Signed-off-by: Robert Varga <>
23 months agoBump to yangtools-2.1.4 and mdsal-3.0.2 10/77610/10
Robert Varga [Thu, 8 Nov 2018 09:46:20 +0000 (10:46 +0100)]
Bump to yangtools-2.1.4 and mdsal-3.0.2

This bumps the dependencies to 2.1.4 and 3.0.2, respectively.

Change-Id: Ia24de2f5374257cfe36d0a6bca31a84af2c8daff
Signed-off-by: Robert Varga <>
23 months agoImprove failure reporting in IdIntsListener 23/78323/2
Tom Pantelis [Fri, 30 Nov 2018 16:43:18 +0000 (11:43 -0500)]
Improve failure reporting in IdIntsListener

The Listener Stability CSIT fails intermittently where the
IdIntsListener reports that the final read of the data doesn't
match it's local copy obtained from DTCN's. It would be helpful
to output the difference.

When the test fails, there are a lot of "Ignoring notification"
warnings from IdIntsListener so output the diff the first time
that occurs.

Change-Id: I49e9cd0414a904a61778a8c028ead7dc2b8fd593
Signed-off-by: Tom Pantelis <>
23 months agoImprove error reporting in WriteTransactionsHandler 11/78311/2
Tom Pantelis [Fri, 30 Nov 2018 03:32:48 +0000 (22:32 -0500)]
Improve error reporting in WriteTransactionsHandler

The Leader Isolation CSIT is failing intermittently with a failed
tx and it would help to log the exception trace as restconf no longer
reports it. Also modified some fields to be thread-safe as they are
accessed by multiple threads although not concurrently/

Change-Id: Ifce3cd177e5e0cc7c7020866000cb915b9f9c4bf
Signed-off-by: Tom Pantelis <>
23 months agoForward CloseTransactionChain messages to the leader 15/78215/4
Robert Varga [Tue, 27 Nov 2018 16:03:21 +0000 (17:03 +0100)]
Forward CloseTransactionChain messages to the leader

The frontend broadcasts this message to all shards leaders,
but it may end up being misrouted. Make sure we forward the
request to the current leader.

Change-Id: I8b743c8ea9f4f4467878016dfed8b2ad459309f0
Signed-off-by: Robert Varga <>
23 months agoMake ShardDataTree.insertEntryStatic 28/78228/2
Robert Varga [Tue, 27 Nov 2018 21:04:40 +0000 (22:04 +0100)]
Make ShardDataTree.insertEntryStatic

Eclipse points out this can be static, make it so.

Change-Id: Ia3243dc4e02157c2365895bb082e8f9ea6aa6a25
Signed-off-by: Robert Varga <>
23 months agotell-based - reconnect on leader change 29/78029/5
Tom Pantelis [Wed, 21 Nov 2018 20:38:05 +0000 (15:38 -0500)]
tell-based - reconnect on leader change

The ShardManager is the aggregation point for shards so we need
to propagate shard leader change events etc to the ClientActorBehavior
to initiate a refresh of the backend info. The ModuleShardBackendResolver
sends a new message, RegisterForShardAvailabilityChanges, to the
ShardManager actor with a Consumer callback that is notified by the
ShardManager when events affecting shard leader availability occur.
The ModuleShardBackendResolver then propagates the event notification
to callbacks registered via a new notifyWhenBackendInfoIsStale method
exposed via the BackendInfoResolver interface, which the
ClientActorBehavior calls.

Change-Id: I9dbcabf5a75b195c811a22dd522115d329e5dc4b
Signed-off-by: Tom Pantelis <>
23 months agoDo not depend on controller APIs 95/78195/3
Robert Varga [Tue, 27 Nov 2018 08:21:12 +0000 (09:21 +0100)]
Do not depend on controller APIs

dsbenchmark is no longer using them, stop depending on them.

Change-Id: I853b99d69b2d47937e73e5ae5544f6b5baa6b7f1
Signed-off-by: Robert Varga <>
23 months agoMigrate ntfbenchmark to MDSAL APIs 94/78194/3
Robert Varga [Tue, 27 Nov 2018 08:19:09 +0000 (09:19 +0100)]
Migrate ntfbenchmark to MDSAL APIs

This is a trivial conversion to switch away from controller APIs.

Change-Id: I2bd98524b02d975ffb677d9718642cadcd7aa43c
Signed-off-by: Robert Varga <>
23 months agoUse explicit classes for Listener forwarding 08/78208/2
Robert Varga [Tue, 27 Nov 2018 12:09:30 +0000 (13:09 +0100)]
Use explicit classes for Listener forwarding

This allows us to use ForwardingObject, which will forward
toString() invocations intact, properly identifying registered

Change-Id: I486352d41047b20cb5b2735cff911d7d49aaf963
Signed-off-by: Robert Varga <>
23 months agoSkip deployment to top-level aggregator 72/78172/1
Robert Varga [Mon, 26 Nov 2018 20:41:32 +0000 (21:41 +0100)]
Skip deployment to top-level aggregator

This pom is useful only during build, do not install/deploy it.

Change-Id: I028db508d5138152d76ca72cf2ebd3fb1ef4c228
Signed-off-by: Robert Varga <>
23 months agoRecognize aggregated sonar reports 71/78171/1
Robert Varga [Mon, 26 Nov 2018 20:40:12 +0000 (21:40 +0100)]
Recognize aggregated sonar reports

This adds the necessary build support to aggregate jacoco reports,
so sonar can pick them up.

Change-Id: I345c449cb5a027ed043171659e74c74d93e5b223
Signed-off-by: Robert Varga <>
2 years agoUse pre-sized ImmutableLists for yang-data-api 17/78117/1
Robert Varga [Sun, 25 Nov 2018 17:23:50 +0000 (18:23 +0100)]
Use pre-sized ImmutableLists for yang-data-api

ImmutableList.builder() did not pre-size its arrays correctly,
leading to poor performance. That is no longer the case and we can
correctly pre-allocate it -- giving us the ArrayList equivalent in
immutable form, hence skipping copying in

Change-Id: I4a070dca26138f28de69e4a0e1f9b0298ee2312b
Signed-off-by: Robert Varga <>
2 years agoProxy MD-SAL interfaces in DOMMountPointServiceImpl 80/77580/16
Robert Varga [Wed, 7 Nov 2018 12:49:48 +0000 (13:49 +0100)]
Proxy MD-SAL interfaces in DOMMountPointServiceImpl

This patch deals with the case where a mount point is registered
via Controller interfaces and then accessed via MD-SAL interfaces
by providing any missing MD-SAL services via proxies built on top
of their Controller counterparts.

This also adds utility convertors to DOM{DataTree,Rpc}Identifier,
so they are readily available.

Change-Id: Iece3f1d2a2bba58669114f6f8b8abf89fd188690
Signed-off-by: Robert Varga <>
2 years agoUse Method.getParameterCount() 77/77877/2
Robert Varga [Fri, 16 Nov 2018 07:33:57 +0000 (08:33 +0100)]
Use Method.getParameterCount()

Java 8 introduced this method, which bypasses array cloning done
by getParameterTypes(), making it more efficient. Take advantage
of it.

Change-Id: I130a58c8ca667e57ae29c99abdd8066d8ca7dbd7
Signed-off-by: Robert Varga <>
2 years agoIntroduce ReadTransaction.exists() 67/77767/3
Robert Varga [Wed, 14 Nov 2018 09:11:44 +0000 (10:11 +0100)]
Introduce ReadTransaction.exists()

This method exists in the DOM API, but for some reason it was left
out if the Binding API. Introduce it as default methods riding on
the read() method and override them in all known implementations,
so the request is efficiently routed.

Change-Id: Id56332d6f720396305ac68e40554e62fd17c34fb
Signed-off-by: Robert Varga <>
2 years agoFix DOMDataReadTransaction javadoc 68/77768/2
Robert Varga [Wed, 14 Nov 2018 09:12:30 +0000 (10:12 +0100)]
Fix DOMDataReadTransaction javadoc

Remove double start of the javadoc.

Change-Id: I6524d117e3eecaeda77c0e7b40a50053dc944b96
Signed-off-by: Robert Varga <>
2 years agoProxy controller services in DOMMountPointServiceImpl 62/77562/18
Jakub Morvay [Tue, 6 Nov 2018 18:17:44 +0000 (19:17 +0100)]
Proxy controller services in DOMMountPointServiceImpl

When we are proxying a DOMMountPoint, we also need to take care
of bridging legacy interfaces on top of MD-SAL interfaces.

This patch refactors DOM{Notification,Rpc}Router to factor out
DOM{Notification,Rpc}Service adapters and creates DOMActionService
adapter. These are then used in DOMMountPointAdapter, which in
turn is used by DOMMountPointServiceImpl.

This deals with the case when an MD-SAL-registered mount point
is accessed via Controller APIs.

Change-Id: Ide4c636afdbd13e233880ab616aec52e46ea115f
Signed-off-by: Jakub Morvay <>
Signed-off-by: Robert Varga <>
2 years agoRemove LegacyShardedDOMDataBrokerAdapterUtils 85/77585/4
Robert Varga [Wed, 7 Nov 2018 17:50:55 +0000 (18:50 +0100)]
Remove LegacyShardedDOMDataBrokerAdapterUtils

LogicalDatastoreType.toMdsal() renders this utility class useless,
remove it.

Change-Id: I0bf6e66f83338fff7d2ab7e54be10a56398c44dc
Signed-off-by: Robert Varga <>
2 years agoRemove DOMMountPointServiceImpl.registerMountPoint() 82/77582/7
Robert Varga [Wed, 7 Nov 2018 12:58:13 +0000 (13:58 +0100)]
Remove DOMMountPointServiceImpl.registerMountPoint()

This method is a leak and was deprecated in Fluorine, remove it.

Change-Id: I46e2a0eaa1d8baef5c35b6664daa0c606b7ad401
Signed-off-by: Robert Varga <>
2 years agoBump operation timeout to 500ms 08/77608/2
Robert Varga [Thu, 8 Nov 2018 01:42:03 +0000 (02:42 +0100)]
Bump operation timeout to 500ms

It seems we cannot meet our own deadlines in our unit tests, let's
bump them to 500ms instead of 100ms.

Change-Id: Ic0f9f09da3108e150bd3ec2b465d66bb3aa80485
Signed-off-by: Robert Varga <>
(cherry picked from commit 1b51c280231f3829f445491c857c1a1648f917ce)

2 years agoSimplify DTCL registration support classes 02/77602/2
Jakub Morvay [Wed, 7 Nov 2018 18:48:16 +0000 (19:48 +0100)]
Simplify DTCL registration support classes

Historically, there was support for registration of both
data tree change listeners and data change listeners. Common
infrastructure interfaces, abstract and generic classes were introduced,
since registration of both listener types required similar steps.

Data change listeners were deprecated and removed so there is no need
for this common infrastructure anymore. Get rid of unnecessary
interfaces, abstract classes and type variables. Now they just add
complexity to the code.

Change-Id: Ie2ce510bb5b49b892bcf8e5c562c96ea8345418e
Signed-off-by: Jakub Morvay <>
2 years agoFix javadoc formatting 04/77604/1
Jakub Morvay [Thu, 8 Nov 2018 08:16:22 +0000 (09:16 +0100)]
Fix javadoc formatting

This fixes javadoc formatting in LeaderLocalDelegateFactory abstract

Change-Id: I94390bc91b7d534426adebd71bb92726de1890cf
Signed-off-by: Jakub Morvay <>
2 years agoHide DOMMountPointServiceImpl.registerMountPoint implementation 77/77577/2
Robert Varga [Wed, 7 Nov 2018 11:39:29 +0000 (12:39 +0100)]
Hide DOMMountPointServiceImpl.registerMountPoint implementation

This adds a trivial package-protected method which holds the
implementation, allowing us to short-circuit some casts.

Change-Id: I41d792c50d87638fc6ba51433cd26bf68980fca2
Signed-off-by: Robert Varga <>
2 years agoForce UntrustedXML to be initialized from activator 98/77298/1
Robert Varga [Wed, 24 Oct 2018 21:01:25 +0000 (23:01 +0200)]
Force UntrustedXML to be initialized from activator

Touching UntrustedXML during bundle activator should cause it to
bind to the JRE XML provider rather than discovering other members
via a TCCL.

Change-Id: I9c6625be7873ed96d5e292a3165e7f319ac68b56
Signed-off-by: Robert Varga <>
(cherry picked from commit 978ef9d2ccbbaf4e54aa43109f7af21603226516)

2 years agoIntegrate MRI projects for Neon 55/74855/74
Robert Varga [Mon, 6 Aug 2018 13:27:49 +0000 (15:27 +0200)]
Integrate MRI projects for Neon

This patch bumps:
- odlparent to 4.0.2
- yangtools to 2.1.2
- mdsal to 3.0.1

It also deals with:
- DOMRpcError.getErrors() changing
- java.util.Optional being used in MD-SAL
- xmlunit upgrade via xmlunit-legacy
- any(Class) not matching nulls
- lists disappearing and hence requiring at least one item
- remove explicit <null/> in blueprints, as that breaks blueprint-core
- adjust sal-binding-it to include byte-buddy, which is a mockito dependency
- adjust dependencies to account for ietf-{inet,yang}-types movement
- moving to tech.pantheon.triemap
- mdsal.common.api removals

Change-Id: I31b2d011015846537a99f963ded1d38e7b29d71e
Signed-off-by: Robert Varga <>
2 years agoUpdate procedure to restart controller on quarantined condition. 10/77010/1
Ajay Lele [Mon, 15 Oct 2018 18:23:37 +0000 (11:23 -0700)]
Update procedure to restart controller on quarantined condition.

There was a behavior change in Karaf [0] because of which restarting
the container now requires the system property karaf.restart to be
set to true in addition to karaf.restart.jvm property. Update
controller restart logic on quarantined condition for the same.


Change-Id: I7b93eb87f53870efea70f2c9a9b82eeca783aa0b
Signed-off-by: Ajay Lele <>
2 years agoRemove the use of ActorIdentity.getRef() 25/76825/1
Robert Varga [Wed, 10 Oct 2018 15:13:42 +0000 (17:13 +0200)]
Remove the use of ActorIdentity.getRef()

This method has been replaced with getActorRef(), which returns
an Optional.

Change-Id: I41e4c8f8ed06de87716c06077201287752c0e327
Signed-off-by: Robert Varga <>
2 years agoRemove use of Class.newInstance() 03/76803/3
Robert Varga [Tue, 9 Oct 2018 15:10:33 +0000 (17:10 +0200)]
Remove use of Class.newInstance()

This method is deprecated in JDK9+, migrate to its replacement.
This also means that any exceptions thrown are wrapped in
InvocationTargetException, hence we can (and are forced by FindBugs)
replace catching of Exception with catching of ClassCastException
and ReflectiveOperationException.

Change-Id: Iefd48ecef653fc73f74b2a77ac1ab7891b2575d3
Signed-off-by: Robert Varga <>
2 years agomove trace impl-blueprint.xml DI into TraceBindingBrokerWiring 61/72661/8
Michael Vorburger [Mon, 4 Jun 2018 14:18:49 +0000 (16:18 +0200)]
move trace impl-blueprint.xml DI into TraceBindingBrokerWiring

Change-Id: I1621e94c43fd5ddef4f1697cf7b87422e7ce0e5b
Signed-off-by: Michael Vorburger <>
2 years agomove binding-broker.xml DI into BindingBrokerWiring 85/72485/12
Michael Vorburger [Wed, 30 May 2018 12:39:21 +0000 (14:39 +0200)]
move binding-broker.xml DI into BindingBrokerWiring

Change-Id: I5fdc4f9018276db92ba9ae2eb35688d428383411
Signed-off-by: Michael Vorburger <>
2 years agoConvert blueprint ext classes to MDSAL APIs 16/76416/3
Tom Pantelis [Mon, 24 Sep 2018 14:45:18 +0000 (10:45 -0400)]
Convert blueprint ext classes to MDSAL APIs

All classes are now converted except for RoutedRpcMetadata as there
is no equivalent to the RoutedRpcRegistration in the MDSAL API.

Change-Id: If7720ad6dca5c281ae6c7ace50a60f3e7463f938
Signed-off-by: Tom Pantelis <>
2 years agoMove commit payload propagation 65/76565/1
Robert Varga [Tue, 2 Oct 2018 15:20:16 +0000 (17:20 +0200)]
Move commit payload propagation

Since Shard.persistPayload() will shortcut when we do not have
a followers or persistence, we must update metadata before we
notify the cohort of the success, as for commit-immediate
transactions that will result in a purge payload being persisted.
That payload will shortcut, too, and execute on stack, hence
metadata will see purge before commit -- leaving it in inconsistent
leaky state.

Move allMetadataCommittedTransaction() calls from
applyReplicatedPayload() down to just after we modify the data
tree and before we invoke listeners.

Change-Id: I1ed2f62756367982cfff08302c79f1c63a871df2
Signed-off-by: Robert Varga <>
2 years agoCorrect exception handling in LegacyDOMDataBrokerAdapter 24/76524/1
Robert Varga [Mon, 1 Oct 2018 09:50:13 +0000 (11:50 +0200)]
Correct exception handling in LegacyDOMDataBrokerAdapter

When a TransactionChain is closed, we need to make sure we throw
the correct (controller) exception instead of re-wrapping the mdsal

Change-Id: I74434115fe14a18ba520fc789fa8a21d932a4a15
Signed-off-by: Robert Varga <>
2 years agoUse LogicalDatastoreType.toMdsal() 23/76523/1
Robert Varga [Mon, 1 Oct 2018 08:39:27 +0000 (10:39 +0200)]
Use LogicalDatastoreType.toMdsal()

Use direct converter method rather than matching through name, which
results in faster mapping.

Change-Id: Ic247ebc5c5704d3eb1953eea4d7f36b1d3d49cb8
Signed-off-by: Robert Varga <>
(cherry picked from commit bc83a3eb1d1bd51865f97bfb4262716fe7841293)

2 years agoBump to Dropwizard Metrics 4.0.3 38/76438/1
Stephen Kitt [Tue, 25 Sep 2018 10:24:24 +0000 (12:24 +0200)]
Bump to Dropwizard Metrics 4.0.3

This also cleans up some duplicate dependencies.

Release notes:
* 4.0.0:
* 4.0.1:
* 4.0.2:
* 4.0.3: none available, see

Change-Id: I29050a587aebafcf0d169425242b6281dbb43519
Signed-off-by: Stephen Kitt <>
2 years agoConstruct IMDS delegate with proper type 66/76266/2
Robert Varga [Tue, 18 Sep 2018 08:35:47 +0000 (10:35 +0200)]
Construct IMDS delegate with proper type

This patch makes sure we do not ignore the datastore type, but
pass it down to MD-SAL's IMDS.

Since we are converting from controller to mdsal LogicalDatastoreType
in multiple places, centralize this via LogicalDatastoreType.toMdsal().

Change-Id: I5e027fd439e325ff91344de98511e503fc801992
Signed-off-by: Robert Varga <>
(cherry picked from commit 0425ce4501aec2d8f96d6379baa1116a5350fba2)

2 years agoMigrate controller docs to the controller project 71/75871/1
Thanh Ha [Sun, 9 Sep 2018 00:48:24 +0000 (20:48 -0400)]
Migrate controller docs to the controller project

Change-Id: Ic6ad9bade1240b08cc112f275ea2d1b4516d5446
Signed-off-by: Thanh Ha <>
2 years agoBootstrap Controller documentation 70/75870/1
Thanh Ha [Sun, 9 Sep 2018 00:44:58 +0000 (20:44 -0400)]
Bootstrap Controller documentation

Issue: DOCS-69
Change-Id: Iaf57d73e8d720b910c66cae41a75f10ceefba80f
Signed-off-by: Thanh Ha <>
2 years agoSwitch to Akka’s protobuf 55/75555/3
Stephen Kitt [Thu, 30 Aug 2018 08:07:10 +0000 (10:07 +0200)]
Switch to Akka’s protobuf

Akka has its own implementation of protobuf, use that instead of

Change-Id: Ibc99749dd2fff0b7a717e83dd9377aeb618cf171
Signed-off-by: Stephen Kitt <>
2 years agoAlign tested boolean/Boolean expectations 20/75420/19
Robert Varga [Thu, 23 Aug 2018 13:43:40 +0000 (15:43 +0200)]
Align tested boolean/Boolean expectations

This patch removes implicit boxing/unboxing by aligning boolean/Boolean

Future<Boolean>.get() will return a Boolean, hence use assertEquals() for
these (and Optional<Boolean>). Doing that instead of assertTrue()/assertFalse()
eliminates a single Eclipse info-level message about Boolean being unboxes.
This also has better behavior: if the tested method returns null, we'll get
an assertion failure instead of a NPE.

For isPersent() and other methods which return a boolean, use assertTrue()
or assertFalse(). Doing that instead of assertEquals() eliminates two Eclipse
info-level messages about boxing the two arguments to Boolean, for some
reason there is no assertEquals(boolean, boolean).

Change-Id: If86ef9fb1ecf4cdceb45bc079bba1a86cff311ac
Signed-off-by: Robert Varga <>
2 years agoEliminate ShardTestKit subclasses 17/75417/15
Robert Varga [Thu, 23 Aug 2018 13:36:38 +0000 (15:36 +0200)]
Eliminate ShardTestKit subclasses

The kit can be used as a simple class, no need to subclass it.

Change-Id: I5d696bf0111738fc4a8b863405b052f8838e391b
Signed-off-by: Robert Varga <>
2 years agoCleanup TestKit use 79/75379/23
Robert Varga [Wed, 22 Aug 2018 11:05:08 +0000 (13:05 +0200)]
Cleanup TestKit use

Do not subclass TestKit, but instantiate it as a common resource.
Also use static imports for mocking/asserts. This makes the tests
cleaner and less verbose.

Change-Id: I18d8765c8fb5019c9f4aa94bc9474277443a3097
Signed-off-by: Robert Varga <>
2 years agoEliminate IntegrationTestKit subclasses 81/75381/20
Robert Varga [Wed, 22 Aug 2018 13:46:20 +0000 (15:46 +0200)]
Eliminate IntegrationTestKit subclasses

The kit can be used as a simple class, no need to subclass it.

Change-Id: I098bb72411a662bf8670fd945dba517d6253dea4
Signed-off-by: Robert Varga <>
2 years agoEliminate use of exam.version 52/75452/2
Robert Varga [Thu, 23 Aug 2018 23:20:22 +0000 (01:20 +0200)]
Eliminate use of exam.version

The dependency is declared in odlparent, no need to re-declare

Change-Id: I0ad40bf595874c8f2ab3f86632a16d71d6397cd3
Signed-off-by: Robert Varga <>
2 years agoLower warn level in AbstractInvokableServiceMetadata 84/75384/2
Tom Pantelis [Wed, 22 Aug 2018 16:45:23 +0000 (12:45 -0400)]
Lower warn level in AbstractInvokableServiceMetadata

The warning "interface interface X has no accptable entries, assuming it is satisfied"
is emmitted quite often from RpcServiceMetadata, ie for every routed RPC I believe.
I'm unclear as to why it filters out routed RPCs here and why it's a warning but
we should at least reduce to debug to avoid the noise.

Change-Id: I954a4b7c6b2a5e0d3fdbe7bbd2cc44b47ef01fdc
Signed-off-by: Tom Pantelis <>
2 years agoFix mdsal reference 31/75431/1
Robert Varga [Thu, 23 Aug 2018 18:16:55 +0000 (20:16 +0200)]
Fix mdsal reference

Rather than referencing direct feature version import it from

Change-Id: Ic2fb49d270b4ca11a8f470c05fa45fb4d17011f4
Signed-off-by: Robert Varga <>
2 years agoFix illegal check in CreateTransactionReply 21/75421/1
Robert Varga [Thu, 23 Aug 2018 14:02:40 +0000 (16:02 +0200)]
Fix illegal check in CreateTransactionReply

The null check is wrong here, as instanceof will evaluate to a boolean,
which will always result in a non-null reference. Fix this by using

Change-Id: I9c5c1795227cafafc4393ea86aa464287cd96df2
Signed-off-by: Robert Varga <>
2 years agoDisable artery max frame size settingd 92/75392/2
Tom Pantelis [Wed, 22 Aug 2018 22:55:12 +0000 (18:55 -0400)]
Disable artery max frame size settingd

These were accidently set really large when we were first
looking at artery a while ago but they blow up with
java.lang.OutOfMemoryError: Direct buffer memory. So
set them to the defaults and comment them out.

Change-Id: I92dc150808601271f879bc3917a036b76af8d914
Signed-off-by: Tom Pantelis <>
2 years agoFix prefix shard configuration update handling 85/75385/2
Robert Varga [Wed, 22 Aug 2018 16:48:30 +0000 (18:48 +0200)]
Fix prefix shard configuration update handling

If the list of shards is completely deleted, we end up jumping
into an empty method -- obviously missing updates. This codepath
is really shared, as DataTreeCandidateNode resolves recursively,
creating apropriate delta for children.

Change-Id: I6a70421a5ca405830a1012798f302b390b7aa2f0
Signed-off-by: Robert Varga <>
2 years agoMigrate to expectNoMessage() 71/75371/1
Robert Varga [Wed, 22 Aug 2018 09:43:53 +0000 (11:43 +0200)]
Migrate to expectNoMessage()

expectNoMsg() has been deprecated, move to its replacement.

Change-Id: I51fc5dc28fd8131b76ca00d254de06403e06de69
Signed-off-by: Robert Varga <>
2 years agoCache reflection operations in AbstractSchemaAwareTest 32/75332/9
Robert Varga [Mon, 20 Aug 2018 16:11:28 +0000 (18:11 +0200)]
Cache reflection operations in AbstractSchemaAwareTest

The design of AbstractSchemaAwareTest requires reflection-based
loading of SchemaContext for each test case, which is slow.

Instantiate weak caches to speed up tests which are co-located
on the same class loader.

Change-Id: I1a79d7e99f6efcccab37445f3de25a74cb6f02b6
Signed-off-by: Robert Varga <>
2 years agoFix findbugs warnings 51/75351/4
Robert Varga [Mon, 20 Aug 2018 23:07:54 +0000 (01:07 +0200)]
Fix findbugs warnings

Upgraded findbugs finds these, fix them up.

Change-Id: Id5a008cddc6616c3a93f0528efca00b86843fc3c
Signed-off-by: Robert Varga <>
2 years agoMigrate to UntypedAbstractActor 02/65902/12
Robert Varga [Fri, 6 Apr 2018 12:15:35 +0000 (14:15 +0200)]
Migrate to UntypedAbstractActor

As per the 2.4-to-2.5 migration guide using UntypedAbstractActor
UntypedActor is our cheapest migration option. This requires
updating MeteringBehavior to integrate with Receive.

Change-Id: I692f723dffc966bb7e117124b7a0cd714572ab4f
Signed-off-by: Robert Varga <>
2 years agoSpeed up DistributedDataStoreTest 51/74951/3
Robert Varga [Wed, 8 Aug 2018 14:36:20 +0000 (16:36 +0200)]
Speed up DistributedDataStoreTest

Sharing SchemaContext shaves off about .5 seconds.

Change-Id: I628af3b577ca53fc9f5ace05dc825f7324b71b8f
Signed-off-by: Robert Varga <>
2 years agoSpeed up AbstractModificationTest 50/74950/3
Robert Varga [Wed, 8 Aug 2018 14:30:43 +0000 (16:30 +0200)]
Speed up AbstractModificationTest

Sharing SchemaContext here shaves off about 2 seconds from
test run time.

Change-Id: I5e7fa63dd061ee6e1a16831aeae59f61deaccb5f
Signed-off-by: Robert Varga <>
2 years agoSpeed up AbstractTransactionProxyTest 49/74949/3
Robert Varga [Wed, 8 Aug 2018 14:26:48 +0000 (16:26 +0200)]
Speed up AbstractTransactionProxyTest

Sharing SchemaContext here shaves off about 2 seconds from
test run time.

Change-Id: Ic32bbd2e57aa5a56910377422fd3ab34a3120d89
Signed-off-by: Robert Varga <>
2 years agoSpeed up ClientBackedDataStoreTest 48/74948/3
Robert Varga [Wed, 8 Aug 2018 14:21:46 +0000 (16:21 +0200)]
Speed up ClientBackedDataStoreTest

Sharing the SchemaContext shaves off about half a second.

Change-Id: I2db8c7d25d50b9ea3c4a8fd411d4eee7d5d5b429
Signed-off-by: Robert Varga <>
2 years agoSpeed up ShardManagerTest 47/74947/3
Robert Varga [Wed, 8 Aug 2018 14:17:37 +0000 (16:17 +0200)]
Speed up ShardManagerTest

We can share a single SchemaContext for all tests, which shaves off
some 4 seconds from test run time.

Change-Id: Ic3cba6343d7f4e08a00aa17e90738b62c686b4f5
Signed-off-by: Robert Varga <>
2 years agoRemove references to mdsal-model-artifacts 14/75114/2
Robert Varga [Sat, 11 Aug 2018 07:21:48 +0000 (09:21 +0200)]
Remove references to mdsal-model-artifacts

This artifact is going away, remove references to it.

Change-Id: I381b0fc6aaff72bbdf9e0d0192a0ca26a3b74e56
Signed-off-by: Robert Varga <>
2 years agoBump versions by x.(y+1).z for next dev cycle 88/74988/1
Anil Belur [Thu, 9 Aug 2018 12:40:14 +0000 (18:10 +0530)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: Ib2fae0d3ecc0b7d95a51ffb43a006685825738a6
Signed-off-by: Anil Belur <>
2 years agoBump yangtools to 2.0.10 80/74880/2
Robert Varga [Mon, 6 Aug 2018 15:44:25 +0000 (17:44 +0200)]
Bump yangtools to 2.0.10

This fixes an issue with actions, hence we need it in Fluorine.

Change-Id: I4b312e3e8ca2eafdd8a63781e78c0c019f4f7a4a
Signed-off-by: Robert Varga <>
2 years agoRemove RoutingLogic interface 53/74853/1
Tom Pantelis [Mon, 6 Aug 2018 12:56:43 +0000 (08:56 -0400)]
Remove RoutingLogic interface

This is no longer used...

Change-Id: I167eed99d7e457a7d6b1d53f39c07a1dfc6c5bf3
Signed-off-by: Tom Pantelis <>
2 years agoSimplify ListenableFuture translation 27/74827/4
Robert Varga [Sat, 4 Aug 2018 01:09:51 +0000 (03:09 +0200)]
Simplify ListenableFuture translation

We can forgo instantiation of immediate futures by using a simple

Change-Id: If33247bc473852d739f593bb7e752323b3ac6583
Signed-off-by: Robert Varga <>
2 years agoFix deprecation warnings and checkstyle in benchmarks 14/71214/13
Robert Varga [Mon, 23 Apr 2018 13:49:28 +0000 (15:49 +0200)]
Fix deprecation warnings and checkstyle in benchmarks

This fixes up warnings/checkstyle and flips the enforcement switch.

Change-Id: I22754c767ef643d703286a30252cf57006062ade
Signed-off-by: Robert Varga <>
2 years agoAdd MappingCheckedFuture 26/74826/3
Robert Varga [Sat, 4 Aug 2018 01:02:41 +0000 (03:02 +0200)]
Add MappingCheckedFuture

This class is moved here from MD-SAL, as CheckedFutures are not
used there anymore.

Change-Id: I84cda1d543a5bebdb17249943ee26ca8fe3f97bf
Signed-off-by: Robert Varga <>
2 years agoConvert dsbenchmark to mdsal APIs 04/74804/3
Robert Varga [Fri, 3 Aug 2018 15:31:22 +0000 (17:31 +0200)]
Convert dsbenchmark to mdsal APIs

With controller interfaces deprecated, move benchmark to use MD-SAL
interfaces instead.

Change-Id: I79f52260171e3f4f770511f389bbc773e86e6939
Signed-off-by: Robert Varga <>
2 years agoReduce use of deprecated methods 03/74803/2
Robert Varga [Fri, 3 Aug 2018 15:12:49 +0000 (17:12 +0200)]
Reduce use of deprecated methods

We do not really need the old semantics in a lot of sites, so
migrate them over to replacement methods.

Change-Id: Ib60e395dd9da82934d1591555c9ad46c05dac0e7
Signed-off-by: Robert Varga <>
2 years agoAllow DataObjectModification to address grouping nodes 06/74606/4
Robert Varga [Sat, 28 Jul 2018 08:50:19 +0000 (10:50 +0200)]
Allow DataObjectModification to address grouping nodes

This adds the API and implementation required to address child
nodes introduced in cases by the use of a grouping.

Change-Id: I70871dcaa3441fbef81dfb15bfd965d133aa0894
Signed-off-by: Robert Varga <>
2 years agoChange log to warn in LocalThreePhaseCommitCohort 01/74701/1
Tom Pantelis [Tue, 31 Jul 2018 18:22:14 +0000 (14:22 -0400)]
Change log to warn in LocalThreePhaseCommitCohort

Change-Id: Ieeb60989eb3665cad9cc4dc4d25c7ab7e0983437
Signed-off-by: Tom Pantelis <>
2 years agoAllow filtering transaction traces with a minimum 52/74652/3
Michael Vorburger [Mon, 30 Jul 2018 13:25:05 +0000 (15:25 +0200)]
Allow filtering transaction traces with a minimum

This adds a "minimum open number of transactions" option to
trace:transactions and print out a clear final message indicating
whether any leaks were found or not.

Change-Id: Ie9f4ee263ed7defcb84c8b82dc8ec6f1f81ba07d
Signed-off-by: Michael Vorburger <>
Signed-off-by: Stephen Kitt <>
2 years agosimplify a statement in NormalizedNodeInputStreamReader 76/74476/2
Michael Vorburger [Wed, 25 Jul 2018 21:47:46 +0000 (23:47 +0200)]
simplify a statement in NormalizedNodeInputStreamReader

and fix a JavaDoc warning in NormalizedNodeOutputStreamWriter

Change-Id: I471dc3d4c8d1327fa8adaca89b8ca1d46036929d
Signed-off-by: Michael Vorburger <>
2 years agoAdd Action(Provider)Adapters 10/74610/2
Robert Varga [Sat, 28 Jul 2018 11:13:52 +0000 (13:13 +0200)]
Add Action(Provider)Adapters

This adds adapters based on MD-SAL to sal-binding-broker, allowing
actions to be invoked.

Change-Id: I7efa0ef81c239d12e7d61097daa6a36391e7b89b
Signed-off-by: Robert Varga <>
2 years agoAdd (DOM)Action(Provider) bridges 09/74609/3
Robert Varga [Sat, 28 Jul 2018 10:56:34 +0000 (12:56 +0200)]
Add (DOM)Action(Provider) bridges

We need to add bridge interfaces which allow NETCONF to expose
DOMActionService through Controller's mountpoints. Also add binding
equivalents, so users of Controller Binding have access to them.

Change-Id: Ie6b0819345928637df29c5a15bf1634f8932de19
Signed-off-by: Robert Varga <>
2 years agoImprove ProgressTracker class javadoc 80/74580/3
Vratko Polak [Mon, 26 Jun 2017 16:58:07 +0000 (18:58 +0200)]
Improve ProgressTracker class javadoc

Previously it was mentioning only "frontend" and "backend".
Now it also mentions "users", to distinguish opening and closing tasks
(which happens on user-frontend boundary) from reconnect scenarios
(which happen on frontend-backend boundary).

Change-Id: I2e1739ac40d9e1b0661d9de42099fd97e816585c
Signed-off-by: Vratko Polak <>
2 years agoConvert sal-remoterpc to mdsal APIs 97/74597/1
Tom Pantelis [Fri, 27 Jul 2018 21:12:04 +0000 (17:12 -0400)]
Convert sal-remoterpc to mdsal APIs

Change-Id: I161be27bce6f5f453e7324a737c4057493d80fa2
Signed-off-by: Tom Pantelis <>
2 years agoBump yangtools to 2.0.9 73/74573/2
Robert Varga [Fri, 27 Jul 2018 12:09:03 +0000 (14:09 +0200)]
Bump yangtools to 2.0.9

This patch bumps yangtools to latest release.

Change-Id: If5342423112cd39f82232bf2379002e8cc08daed
Signed-off-by: Robert Varga <>
2 years agoDeprecate controller APIs 82/74582/2
Tom Pantelis [Fri, 27 Jul 2018 14:23:15 +0000 (10:23 -0400)]
Deprecate controller APIs

Deprecated the high-level interfaces, eg DataBroker.

Change-Id: I754e3a5059c05d70616f3bd4ff3a00a05115fead
Signed-off-by: Tom Pantelis <>
2 years agoAdjust to mdsal CursorAware API changes 79/74479/3
Tom Pantelis [Wed, 25 Jul 2018 22:26:30 +0000 (18:26 -0400)]
Adjust to mdsal CursorAware API changes

Corresponding mdsal patch:

Change-Id: I82041945b1f15c492f77d65c065068a6fab3878a
Signed-off-by: Tom Pantelis <>
2 years agoBump to odlparent 3.1.3 93/74193/5
Stephen Kitt [Wed, 18 Jul 2018 16:06:37 +0000 (18:06 +0200)]
Bump to odlparent 3.1.3

Change-Id: I61d53cb19006ea11fd3917e6e395ce0870b7367e
Signed-off-by: Stephen Kitt <>
2 years agoAdjust to DOMDataTreeCommitCohort API change 71/74471/1
Tom Pantelis [Wed, 25 Jul 2018 17:17:54 +0000 (13:17 -0400)]
Adjust to DOMDataTreeCommitCohort API change

Use the new canCommit method that returns FluentFuture
instead of the deprecated CheckedFuture.

Change-Id: I110722a96c4933d32d8ff4b3237a90feddf21747
Signed-off-by: Tom Pantelis <>
2 years agoSimplify code using Java 8 features 44/74344/4
Stephen Kitt [Mon, 23 Jul 2018 15:31:33 +0000 (17:31 +0200)]
Simplify code using Java 8 features

* List::sort
* lambda expressions
* Comparator::comparing...
* Collection::removeIf
* method references
* Map::computeIfAbsent
* Map::merge

Change-Id: I1793591c071c7ce5465939afe8b4846b769b5953
Signed-off-by: Stephen Kitt <>
2 years agoRemove unused exceptions 39/74339/5
Stephen Kitt [Mon, 23 Jul 2018 14:45:38 +0000 (16:45 +0200)]
Remove unused exceptions

This drops exception declarations which are never used.

Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2
Signed-off-by: Stephen Kitt <>
2 years agoAdjust to mdsal invokeRpc API change 66/74366/5
Tom Pantelis [Tue, 24 Jul 2018 00:07:26 +0000 (20:07 -0400)]
Adjust to mdsal invokeRpc API change

mdsal patch:

Change-Id: Ie14d9d582f5e6f141b852248f2b7cc8dca1b97b3
Signed-off-by: Tom Pantelis <>
2 years agoDrop unnecessary property reference 07/74407/3
Stephen Kitt [Tue, 24 Jul 2018 15:32:40 +0000 (17:32 +0200)]
Drop unnecessary property reference

maven-surefire-plugin is specified by odlparent, we don’t need to
re-specify the version here.

Change-Id: I94550466303a5839b68cd6422d742383e29d3b64
Signed-off-by: Stephen Kitt <>
2 years agoUse moved BindingReflections 89/74389/1
Robert Varga [Tue, 24 Jul 2018 11:18:17 +0000 (13:18 +0200)]
Use moved BindingReflections

BindingReflections are being evacuated from yang-binding, use them
from their new location.

Change-Id: Ib14971102980688227f1f761c17a22362d4e7e3c
Signed-off-by: Robert Varga <>
2 years agoSwitch to binding-dom-adapter's NotificationListenerInvoker 33/74333/2
Robert Varga [Mon, 23 Jul 2018 12:18:33 +0000 (14:18 +0200)]
Switch to binding-dom-adapter's NotificationListenerInvoker

NotificationListenerInvoker should not be in yang-binding, consume it
from the adapter instead.

Change-Id: I30f533342e7e27a26af583a15d4baec73580f2ef
Signed-off-by: Robert Varga <>
2 years agoSwitch to binding-dom-adapter's RpcServiceInvoker 30/74330/2
Robert Varga [Mon, 23 Jul 2018 10:38:28 +0000 (12:38 +0200)]
Switch to binding-dom-adapter's RpcServiceInvoker

RpcServiceInvoker should not be in yang-binding, consume it from
the adapter instead.

Change-Id: I79b3d282b3c86ef3e49645c8782bef3fa29f9722
Signed-off-by: Robert Varga <>
2 years agoFix DOMRpcRouter breakage 12/74312/1
Tom Pantelis [Sun, 22 Jul 2018 15:18:26 +0000 (11:18 -0400)]
Fix DOMRpcRouter breakage broke the DOMRpcRouter
for UTs that use the empty constructor. The mdsal DOMRpcRouter no longer
implements DOMRpcProviderService directly so the SchemaContext was not
getting set via onGlobalContextUpdated.

Change-Id: Ic9381742f43b05264724eb80eef41201a1285c2a
Signed-off-by: Tom Pantelis <>
2 years agoFix intermittent testFlipMemberVotingStates failure 99/74299/1
Tom Pantelis [Sat, 21 Jul 2018 03:26:47 +0000 (23:26 -0400)]
Fix intermittent testFlipMemberVotingStates failure

Failure was see in auto-release:

ClusterAdminRpcServiceTest.testFlipMemberVotingStates:976->lambda$testFlipMemberVotingStates$8:978 Expected leader member-1. Actual: member-1-shard-cars-oper_testFlipMemberVotingStates

The test output showed it timed out trying to transfer leadership to member-3. The
timeout deadline is the election timeout interval which is the
heartbeatInterval * election-timeout-factor which were set to 300 and 1.
It seems 300ms is a bit too low for comfort so I changed it to 1000ms (100 * 10);

Change-Id: I1e3c79de960dcced8af71fecdf1ab8bdba433448
Signed-off-by: Tom Pantelis <>
2 years agoFix DOMRpcRouter breakage from mdsal 69/74269/2
Robert Varga [Fri, 20 Jul 2018 08:15:00 +0000 (10:15 +0200)]
Fix DOMRpcRouter breakage from mdsal

MD-SAL's DOMRpcRouter no longer directly implements services,
acquire them from the accessor methods.

Change-Id: Icf337e8b8183726c87bf38d3252dccb0b911ba17
Signed-off-by: Robert Varga <>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.