Remove deprecated MD-SAL APIs The APIs in controller have been deprecated for removal and cannot sustain an upgrade to Guava-28+. Remove them along with all supporting implementations. JIRA: CONTROLLER-1903 Change-Id: I213797b7045cfd7bef744e249614e2b1f6169c1c Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Suppress modernization Modernize as much as possible, but as we have legacy APIs in play, we have to add also some suppressions. Change-Id: I844821f129ad0bb0e186b6a4848a6d2937513f7b Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Deprecate all MD-SAL APIs These APIs have either been completely deprecated or have their replacements in the mdsal project. Mark all of them as deprecated, including their implementations. JIRA: CONTROLLER-1902 Change-Id: I903afcef57c70c1013ab479cfcf31a42f475dc0f Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Make private methods static Eclipse is flagging a number of methods as potentially-static, make sure we mark them as such. Change-Id: I4254dd29716f4365d71f81c3f3a0e7a9590d9801 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Do not use NodeIdentifierWithPredicates constructors This class will transition into a value-based object for memory efficiency reasons. Switch to using its static factory methods. Change-Id: I7e21a6ccf1ad999d2d0427769b26dffeac166274 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Refactor odl-mdsal-distributed-datastore odl-mdsal-distributed-datastore forms the baseline for supporting akka-based cluster. This refactors it to pull its dependencies in so it can be properly tested. This also moves CommitStatsMXBean, so we do not depend on controller's broker at all. Finally we co-locate all configuration files into this feature, so it can boot up. JIRA: CONTROLLER-1584 Change-Id: I9319de78d61d63e3c49825e940af5c8c70657185 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bump yangtools to 3.0.0 This is bumps yangtools to 3.0.0, adjusting for changed APIs. The changes specifically include: - use ListenerRegistry.getRegistrations() instead of it implementing Iterable - adjust for NormalizedNodeStreamWriter interface change - remove use of *AttrBuilder, as NormalizedNodes no longer hold attributes - DataTreeCandidateNodes.empty() instead of home-grown implementation - adjust for DataTreeCandidateNode.getModifiedChild() returning Optional - use QueuedNotificationManager.BatchedInvoker Change-Id: Ia30d73ccf6380e3759414b3026b822df0950a481 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Reduce JSR305 proliferation retention=runtime annotations are mixing really badly with Java EE injection and Java 11. Make sure we do not use javax.annotation package in APIs and reduce overall proliferation inside implementations. Change-Id: I569815f0336efdc0de662c3b80f0fa6e5dd47d8a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix unit test with Java 9+ With https://bugs.openjdk.java.net/browse/JDK-8068730 Instant.now() has microsecond precision, which leads to a comparison failure. Fix this by truncating the result of Instant.now() to milliseconds. Change-Id: Ida8172e5b02cf352325e6f516e19592be4a83d67 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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 <robert.varga@pantheon.tech>
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 <skitt@redhat.com>
Remove unused exceptions This drops exception declarations which are never used. Change-Id: Icc8938b9c3b437a0d5961ec1b481fd06c52d47f2 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Adjust to mdsal invokeRpc API change mdsal patch: https://git.opendaylight.org/gerrit/#/c/74365/ Change-Id: Ie14d9d582f5e6f141b852248f2b7cc8dca1b97b3 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
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 <robert.varga@pantheon.tech>
Proxy DOMNotificationRouter to the mdsal implementation Proxying to the dom mdsal notification service(s) will allow an easier migration path where both can co-exist. Change-Id: I514c319d457bce3261e6f9b36cb189828800fe97 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Proxy DOMRpcRouter to the mdsal implementation Proxying to the dom mdsal RPC service(s) will allow an easier migration path where both can co-exist. Change-Id: Ib31efc2985b24e83106e6a25d2c94c9c29850eb2 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Default AsyncWriteTransaction.submit() Now that all downstream implementations implement commit(), the deprecated submit() method can be defaulted instead instead of commit(). Change-Id: Idd684bc3fdc7d4f048257154988ef1f7c7811e97 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Add AsyncWriteTransaction.commit() Equivalent to the recent md-sal API addition. The CommitInfo class is re-used from md-sal. I also modified all implementations in the controller to implement commit even though it's defaulted. As soon as implementations in other projects do the same then we can default submit(). Change-Id: I0801d5aa4c197177af838e7fbb71b7766a90e043 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Remove deprecated controller EOS APIs and impl Change-Id: Idbbc19646790ad9fd6800845a6dd93a210543811 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>