Robert Varga [Thu, 23 May 2024 16:25:59 +0000 (18:25 +0200)]
Refactor ShutdownProvider.shutdown()
Returning a Boolean is confusing with regard to error reporting:
- users are really ignoring the value and rely on exception cause
- that is not what the code does, as it is confused about mapping,
running set(true/false) followed by an optional setException()
Change the future type to Void, making it the value does not hold
anything and rely on setException() to deliver the failure cause.
Change-Id: Id6d97580b8d908caf37338f3578045598d2555f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
945b2dd05df3c725941fe4c4677f6b2972249256)
Robert Varga [Thu, 23 May 2024 16:02:32 +0000 (18:02 +0200)]
Refactor SwitchConnectionProvider a bit
This interface specifies AutoCloseable, which is an implementation leak
from the days of Config Subsystem. Eliminate this specification and make
sure the close() method performs deactivation.
This is the step in the direction of having well-defined lifecycle,
where the users cannot interfere with what the provider is doing.
Change-Id: I1ccbb6987f21b3871d80a9da694211e3c3d19204
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b753a6614a2036e78f76d7c17fde521a58f887da)
Robert Varga [Thu, 23 May 2024 14:54:25 +0000 (16:54 +0200)]
Refactor TcpConnectionInitializer
TcpConnectionInitializer is *not* a ServerFacade, disconnect it from
that interface and eliminate all dead code.
While we are at it, make sure to define ServerFacade.run() to make it
easy to see the actual implementations.
Change-Id: Ied7fc8ccacadf8a27f995ebc9553b88a281f6553
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
acb41d869c8f1e253e18b9a973cb79e4ef6228ec)
Robert Varga [Thu, 23 May 2024 11:57:03 +0000 (13:57 +0200)]
Change getIsOnlineFuture() return type
Provising a Boolean is superfluous -- we are just reporting
success/failure. Clean this up by using Void as the return type.
Change-Id: I7e292941a59f255d27df25828f6848bfc6b8059e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5a64f2402b8af587dec4c692c57b44563368b463)
Robert Varga [Thu, 23 May 2024 09:55:09 +0000 (11:55 +0200)]
Remove ServerFacade.setThreadConfig()
This method is not used anywhere, remove it.
Change-Id: Icf4f5202bd17b9b467857e2c3eab8080d9fb46f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 May 2024 13:40:53 +0000 (15:40 +0200)]
Wire OpenFlowPluginProviderImpl via OSGi DS
OpenFlowPluginProviderImpl has interactions with injected
SwitchConnectionProviders which get interacted with during shutdown.
This is problematic if Blueprint fails to notice it is shutting down
and there is no point in listening for dependencies showing up in the
proxy interfaces.
While the SwitchConnectionProvider lifecycle needs a deep look, take
advantage of the fact that OPNFLWPLUG-1129 laid the SCR ground work
and move OpenFlowPluginProviderImpl to SCR as well.
This takes Blueprint out of the picture, with SCR guaranteeing we are
looking at a live SwitchConnectionProvider when shutting down.
Unfortunately we still have one more service in Blueprint, hence we need
to manually specify Provides manifest header. That part will be
addressed in a follow-up patch.
JIRA: OPNFLWPLUG-1132
Change-Id: I5329c3209342f52caf7b4403f5c0bcff65c9f669
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 22 May 2024 11:35:47 +0000 (13:35 +0200)]
Clean up command naming
Drop the 'Provider' suffix and fix typos in 'Command'.
JIRA: OPNFLWPLUG-1127
Change-Id: I06e3d80920f832c7a03d360908c116e2a18c7794
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ruslan Kashapov [Tue, 12 Mar 2024 15:29:03 +0000 (17:29 +0200)]
Eliminate blueprint for openflowplugins-impl karaf commands
Karaf commands are refactored to use Karaf-4 new-style definitions.
We do not use karaf-services-maven-plugin, as we justs need the
Karaf-Commands directive and not all the complexity it brings to the
table.
While we are touching tests, convert them to JUnit5.
JIRA: OPNFLWPLUG-1127
Change-Id: Ie9092226457c40f6d0fcd22c39657875b70e8975
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 May 2024 17:54:12 +0000 (19:54 +0200)]
Refactor ConfigurationServiceFactoryOsgiImpl
Turn this class into an OSGi DS component, renaming it to
OSGiConfigurationServiceFactory -- which is a more fitting name.
JIRA: OPNFLWPLUG-1131
Change-Id: I3fd3a352591bc6833a529184e4207592fb810c8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 May 2024 17:13:51 +0000 (19:13 +0200)]
Use OSGi DS for MessageIntelligenceAgencyImpl
Rather than using static field in OpenFlowPluginProviderImpl, make
MessageIntelligenceAgencyImpl a proper singleton component and inject it
where neeeded.
JIRA: OPNFLWPLUG-1130
Change-Id: I1265c558fdbd4093283b356e2b469a0ed6723e68
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 May 2024 14:31:42 +0000 (16:31 +0200)]
Fix MastershipChangeServiceManagerImpl services
We should not be exposing AutoCloseable into OSGi SR. Fix that by
explicitly listing MastershipChangeServiceManager as the sole service.
Change-Id: Ib268828146aa3566d7fe96449551f1a5f221f03f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 20 May 2024 21:22:25 +0000 (23:22 +0200)]
Hide PingPongDataBroker
The ability to create merging transaction chains has long been
integrated into DataBroker. Eliminate the intermediate interface
capturing the DataBroker trait and turn it into an implementation detail
of OpenFlowPluginProviderImpl.
Change-Id: I470f85eead331b82ac3511e4669e86cbc3a34b85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 20 May 2024 19:19:25 +0000 (21:19 +0200)]
Rewire SwitchConnectionProvider configuration
Eliminate use of blueprint by replacing it with two components:
OSGiFactorySwitchConnectionConfiguration populates default configuration
into the datastore if not already present.
OSGiSwitchConnectionProviders listens on datastore configuration and
instantiates SwitchConnectionProviders based on observed configuration.
JIRA: OPNFLWPLUG-1129
Change-Id: I7d762b7b07f010d37ba0590515dd30cbcfe3b479
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 20 May 2024 16:14:58 +0000 (18:14 +0200)]
Remove SwitchConnectionProviderList
This is an utterly-superfluous construct. Revert to explicit injection
of references and construct the argument List in
openflowplugin-impl.xml.
This allows us to ditch Aries-specific blueprint extension and rely on
proper interfaces instead.
JIRA: OPNFLWPLUG-1129
Change-Id: I093cfe3eae3067945bcdc5ea370a0e96488334b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 20 May 2024 09:18:45 +0000 (11:18 +0200)]
Fix checkstyle
Upgraded checkstyle is finding violations around declaration/use
distance. Fix those up.
Change-Id: I53e5f5215ddd0977242982f3387a7ce25cc30f91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5ae202299fe5069a5c112fbe8c6cdd456ef528c0)
Robert Varga [Mon, 20 May 2024 15:20:45 +0000 (17:20 +0200)]
Clean up dependencies a bit
openflowjava artifacts have a warnigs about used undeclared
dependencies, fix that up a bit.
Change-Id: Ib07fcd06b58a286cc5fe180cfb29c5f358908280
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ruslan Kashapov [Fri, 12 Apr 2024 08:51:28 +0000 (11:51 +0300)]
Eliminate blueprint for southbound-cli commands
Command implementations updated to recent karaf api.
Command artifacts renamed for consistency.
JIRA: OPNFLWPLUG-1113
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Change-Id: I741542d706975e27b3850238367fc74ccbd0dfba
jenkins-releng [Tue, 9 Apr 2024 12:49:43 +0000 (12:49 +0000)]
Bump versions by x.(y+1).z
Change-Id: I67308b2d0983081b1e5ccedb0b88645a2a118753
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Robert Varga [Wed, 3 Apr 2024 22:15:25 +0000 (00:15 +0200)]
Bump upstreams
Adopt:
- controller-9.0.2
- aaa-0.19.3
- netconf-7.0.4
Change-Id: Ie2e57c7fa500e8ba7aba8b63735b7b8b12d75f27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 20 Mar 2024 13:03:55 +0000 (14:03 +0100)]
Cleanup up registration lifecycle
We have a StackOverflowError during shutdown caused by recursive
invocation. This stems from a lifecycle misunderstanding.
Remove close() methods and use plain yangtools.concepts.Registration
to have clear semantics.
Change-Id: I356f9f5e7bd179799b7ca5e081714d02d4ee0903
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 20 Mar 2024 00:15:55 +0000 (01:15 +0100)]
Bump netconf to 7.0.3
Pick up latest regression fixes from upstream.
Change-Id: Ib23fd2418282095c93ea8b156f03c9e2a2ad16a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 17 Mar 2024 21:39:23 +0000 (22:39 +0100)]
Bump upstreams
Adopt:
- odlparent-13.0.11
- infrautils-6.0.6
- yangtools-13.0.2
- mdsal-13.0.1
- controller-9.0.1
- aaa-0.19.2
- netconf-7.0.2
Change-Id: Id0fc17094dfe151c2c28e376d14dac32e4b3a52f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 15 Mar 2024 14:34:25 +0000 (15:34 +0100)]
Remove getreconciliationstate -d parameter
The implementation of this command is deeply flawed and does not work
for anything but localhost in any reasonable deployment. Remove it.
JIRA: OPNFLWPLUG-1128
Change-Id: Id2b9ddcd662177828675c91bdc0590e4d6860439
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ruslan Kashapov [Thu, 14 Mar 2024 07:42:07 +0000 (09:42 +0200)]
Eliminate blueprint for drop-test-karaf commands
Command implementations updated, this resolves issue with
referenced declarative services being null on command
execution at CSIT
JIRA: OPNFLWPLUG-1127
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Change-Id: I820bb43927bcfd8530b6d38712f27d64c6f25fda
Robert Varga [Thu, 7 Mar 2024 14:39:13 +0000 (15:39 +0100)]
Add RTD configuration
RTD build is failing, fix it by adding configuration.
Change-Id: Iba03bcad9792b3f65ca54404aa676c4840481782
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 6 Mar 2024 20:11:16 +0000 (21:11 +0100)]
Bump netconf to 7.0.1
Pick up fixes from upstream.
Change-Id: Ia160061c718fab982d5baecce58bbac522ce0390
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 6 Mar 2024 14:28:29 +0000 (15:28 +0100)]
Fix drop-test-karaf service injection
drop-test-karaf is based on blueprint, hence it can only consume
interface-based services.
Introduce DropTest{,Commiter,Sender} interfaces to allow injection to
work, fixing a NPE seen in CSIT.
JIRA: OPNFLWPLUG-1112
Change-Id: I3b929fe4f2c01761c0451c440e9408c144a8bc73
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 16:16:19 +0000 (17:16 +0100)]
Fix a few warnings in openflowplugin-impl
Fixup use of deprecated MD-SAL methods and the way static methods are
invoked.
Change-Id: I7586c080cce4e30b805fb0fbd6d6c490c9be6c68
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 16:14:03 +0000 (17:14 +0100)]
Fix contains() check
Eclipse is flagging a type mismatch, fix that up.
Change-Id: I1926028fb3a091c0090d9001dbf86b345c86b163
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 16:12:37 +0000 (17:12 +0100)]
Migrate southbound-cli
Migrate users of deprecated MD-SAL methods.
Change-Id: Ice0276342efde8b3dd7a266be1b4e61bbe84ff66
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 16:09:56 +0000 (17:09 +0100)]
Fix warnings in sample-bundles
We have a few warnings around deprecated APIs, fix them up.
Change-Id: I3037fe65dcdced3cd14db842d3b7276836fcbe55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 16:06:44 +0000 (17:06 +0100)]
Fix warnings in table-miss-enforcer
We have a few warnings, fix them up.
Change-Id: I65c02c2c27de82066e95e88723e5ec47b0bc80f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 16:06:27 +0000 (17:06 +0100)]
Fix warnings in topology-lldp-discovery
We have a few warnings, fix them up.
Change-Id: I6bc16edfc7873350a2186f6bf8bfa982717eef70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 15:55:21 +0000 (16:55 +0100)]
Clean up warnings in forwardingrules-sync
We have a number of deprecation warnings, ditch old methods and
concepts.
Change-Id: I111550650ea571269af12a425d88ab5230fb8c76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 13:35:59 +0000 (14:35 +0100)]
Drop use of ClusteredDataTreeChangeLister
ForwardingRulesCommiter is registered using
registerTreeChangeListener(), hence we can use a simple
DataTreeChangeLister.
Change-Id: I743673c10b23c040797e3b962b5752846a968296
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 13:34:06 +0000 (14:34 +0100)]
Remove ListenerRegistrationHelper
The indirection here is completely useless, as the DataBroker interface
is not exposed in OSGi SR until after all shards have settled.
Change-Id: I13a4d143145816f86bc4348d0497e2c7760c2da6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Mar 2024 13:26:51 +0000 (14:26 +0100)]
Migrate users of deprecated methods
Drop the get prefix from DataObjectModification method callers and
migrate to registerTreeChangeListener().
Change-Id: I878b6969e9dfe65ad82c23541178e61f44381914
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 11:59:44 +0000 (12:59 +0100)]
Bump upstreams
Adopt:
- yangtools-13.0.1
- mdsal-13.0.0
- controller-9.0.0
- aaa-0.19.1
- netconf-7.0.0
Change-Id: Id7893692f463b1841c8a051e11737bddd54163bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 11 Feb 2024 22:58:44 +0000 (23:58 +0100)]
Refactor ReconciliationServiceImpl
This service implements a single RPC, Reconcile, and is injected into
its sole user.
Defile a separate interface, ReconcileService, which defines the two
possibilities the RPC can handle.
Rename ReconciliationServiceImpl to DefaultReconcileService and let it
register the RPC itself. While we are at it, convert it to OSGi DS.
JIRA: OPNFLWPLUG-1112
JIRA: OPNFLWPLUG-1125
Change-Id: Ifc9d3707191484b492ebf5a190f65d5b673a5bdc
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 11 Feb 2024 20:04:19 +0000 (21:04 +0100)]
Migrate topology-manager to OSGi DS
Remove the bluprint container, turning FlowCapableTopologyProvider into
a proper component.
JIRA: OPNFLWPLUG-1112
Change-Id: Iec7a07ee628cda4be5f0ee12c170e785ebfed26c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 11 Feb 2024 21:46:40 +0000 (22:46 +0100)]
Refactor NodeListener
This is an active cache, for the purpose of exposing stuff through CLI.
Refactor it to an interface (DpnTracker) and implementation and activate
it via OSGi DS.
JIRA: OPNFLWPLUG-1112
Change-Id: I20594e4f64dab2d688fe90936844da1793ae43da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 11 Feb 2024 21:18:03 +0000 (22:18 +0100)]
Eliminate AlarmAgent
AlarmAgent is a rather useless indirection for invoking MBean
operations. Integrate its functionality into ReconciliationServiceImpl,
which makes it clear it is not just a CLI component.
JIRA: OPNFLWPLUG-1112
Change-Id: I775fab6d462daeccea611b39108b74a80063ea16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 11 Feb 2024 17:35:31 +0000 (18:35 +0100)]
Move TransactionChainManagerTest
Tests should really be co-located with what they are testing. Move
TransactionChainManagerTest to openflowplugin-common.
Change-Id: Id3e89709431001148236d339f8e5de3e4a6d67e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 10 Feb 2024 12:56:22 +0000 (13:56 +0100)]
Eliminate blueprint from test-extension
This is a simple component, migrate it.
JIRA: OPNFLWPLUG-1112
Change-Id: I3fccec39289314aa23bc906cc57b2138f408bf81
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 23:30:27 +0000 (00:30 +0100)]
Do not use SalFlowService in test-extension
Use just a plain AddFlow RPC, not the deprecated interface.
JIRA: OPNFLWPLUG-1125
Change-Id: Id7512ad832916ac461f4be368cb39c8fe9d13397
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 23:27:34 +0000 (00:27 +0100)]
Remove reference to SalFlowService
We do not use this interface anymore, drop the reference in javadoc.
JIRA: OPNFLWPLUG-1125
Change-Id: I987bd41b82ae4c97de5fbc0f89a183337d96ddad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 16:34:28 +0000 (17:34 +0100)]
More FRM convertions
Convert ForwardingRulesManager to use single RPCs. While we are at it,
ditch the dependency on ClusterSingletonServiceProvider, as it is not
used.
JIRA: OPNFLWPLUG-1125
Change-Id: I73a353eb0ac9eb4047d34fc93442c48cbd6efca3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 17:20:54 +0000 (18:20 +0100)]
Move FRM tests
We have a 'mock' and 'mock.util' top-level package. Move those into the
appropriate place.
JIRA: OPNFLWPLUG-1125
Change-Id: I3b0d9a4c73da8b9c25d2709887b2c4072efd4c1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 02:49:57 +0000 (03:49 +0100)]
Refactor reconciliation wiring
Current wiring is a bit buggy in that it confuses local (e.g. OSGi SR)
and global (e.g. RPC) access and uses the latter for OSGi service
injection.
Remove the confusion by removing the OSGi SR registration, and instead:
- expose the interface for ForwardingRulesManager
- move the RPC implementation to its sole registrant, where it is a
simple wrapper around
We have only a single RPC to register, which is now wired through OSGi.
JIRA: OPNFLWPLUG-1112
JIRA: OPNFLWPLUG-1125
Change-Id: I1fa7cb5a94380a8761aba843f8caadaf108fd7dc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 12:28:54 +0000 (13:28 +0100)]
Clean up of-switch-config-pusher dependencies
We have unused and unused dependencies, clean them up.
Change-Id: Icc618102f6b088f97ba2ab3700fe5cd88dc02d8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 12:24:01 +0000 (13:24 +0100)]
Clean up simple-client dependencies
We have used and unused dependencies. Clean them up.
Change-Id: I97e9f8bcec9b78cf0eca5d9dc5d5b2bc34f5ba1d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 04:13:12 +0000 (05:13 +0100)]
Improve DeviceMastershipManager locking
Use a concurrent implementation of Set internally, which allows us to
perform add/remove concurrently -- and we can use the return value to
know when a device was added/removed.
While we are here, ditch the double lookup in setNodeOperationalStatus()
and issue a get() with a null check.
Furthermore convert lockObj to an explicit lock, as that is a more
friendly thing to do.
Change-Id: Ib5589db4cdb35259f6b400091ec2817c6b0751cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 9 Feb 2024 03:13:38 +0000 (04:13 +0100)]
Do not use JdkFutureAdapters
Expose a ListenableFuture from our APIs, so that callers can hook to
async processing.
Where we are using an executor, wrap the invocation in Futures.submit(),
so we get a proper ListenableFuture.
Finally fix a thinko, where we would be reporting a success before the
enqueued task finishes.
Change-Id: Ideffb18ea6fbe47ca4d56616a52891b3155088f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Feb 2024 21:35:47 +0000 (22:35 +0100)]
Do not use OpenflowProtocolListener in ConnectionAdapter
OpenflowProtocolListener is going away, but we still need the protocol
definition. Capture the contract, slightly modified, as MessageListener,
matching the naming of its receiving method.
JIRA: OPNFLWPLUG-1125
Change-Id: I141465a5ef891037909841bc7427ed9d1511d972
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Feb 2024 20:42:36 +0000 (21:42 +0100)]
Do not use AutoCloseable
ClusterSingletonServiceProvider is giving us a Registration, which
cannot fail in close(). Do not lose that safety.
Change-Id: I18137f4ae9fb44ef42784fb8488b7cb70b9556c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Feb 2024 20:31:15 +0000 (21:31 +0100)]
Remove Optional.ofNullable().map()
This is the final bit in conversion making it pretty clear what is
going on.
Change-Id: Ibf5dfdba47773890dc06da4f1a5662f32adfa236
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Feb 2024 20:17:08 +0000 (21:17 +0100)]
Use instanceof patterns in FlowMessageSerializer
We have multiple accesses and explicit casts going on here, just use
instanceof patterns to simplify/speed up.
Change-Id: I52b3b1f772361ae1478c078c9f107e8419c4f181
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ruslan Kashapov [Mon, 25 Sep 2023 13:31:17 +0000 (16:31 +0300)]
Do not use OpenflowProtocolService in ConnectionAdapter
OpenflowProtocolService is very convenient, as it defines all the RPCs
that a connection can provide.
That interface is going away, so replicate these definitions in
ConnectionAdapter.
JIRA: OPNFLWPLUG-1125
Change-Id: Ib74c20c08c338088de2cff3ad23de83811a5bc53
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
lubos-cicut [Mon, 2 Oct 2023 16:00:01 +0000 (18:00 +0200)]
Do not use RpcService in SalRoleServiceImpl class
Migrated usage of RpcService to Rpc<?,?> for SalRoleServiceImpl class.
JIRA: OPNFLWPLUG-1125
Change-Id: I056cf6f9ee7823a7c02120531037e97dee9507db
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Robert Varga [Tue, 6 Feb 2024 21:20:20 +0000 (22:20 +0100)]
Expose DeviceFlowRegistry.createKey()
We are lugging around protocol version, which is already known to
DeviceFlowRegistry implementation only to circle back to a utility
method, which then performs lookup and static dispatch.
Short circuit this dance by exposing createKey(), which allows
DeviceFlowRegistryImpl to cleanly integrate with rest of the world.
All sorts of aspects are addressed as well:
- use a record for the canonical key implementation
- use well-known constants for FlowRegistryKeyFactory and simple if/else
dispatch
- make MatchNormalizationUtil a class capturing its associated version
- AddressNormalizationUtil is turned into an enum
Future improvements are marked with FIXMEs, as these will further
reduce reliance on constant protocol version passing.
Change-Id: I70d22f0db65b97df4b63c2bc1bf4cff457a11785
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 8 Feb 2024 15:01:23 +0000 (16:01 +0100)]
Refactor lldp-speaker
lldp-speaker is overzealous in its use of blueprint. Integrate the RPC
services offered into LLDPSpeaker and lookup the single RPC we need,
TransmitPacket, from RpcConsumerRegistry.
JIRA: OPNFLWPLUG-1112
JIRA: OPNFLWPLUG-1125
Change-Id: I23438bb495859be2e953c8ac69e8548f9c4201bf
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Sangwook Ha [Sat, 24 Jun 2023 01:28:12 +0000 (01:28 +0000)]
Migrate reconciliation-framework CLI
Karaf provides a more modern way of integrating CLI commands, use that
instead of Blueprint.
Change-Id: Ib063bd2a8639c1e0bf872152645fabb45f7631be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Robert Varga [Wed, 7 Feb 2024 13:48:59 +0000 (14:48 +0100)]
Clean up ForwardingRulesManager interface
start()/close() should not be exposed from the interface, as they are
lifecycle methods of the implementation.
JIRA: OPNFLWPLUG-1112
Change-Id: I5609dba0d8777eed2ddc99f18fd5a12a4d318c58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 13:28:08 +0000 (14:28 +0100)]
Break out more FRM components
We have various bits of wiring which can easily be catered to by OSGi
DS. Break them out of the blueprint container.
JIRA: OPNFLWPLUG-1112
Change-Id: I226f7436c5f7aedcd456deb9d719ab0dfc5be508
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 12:59:59 +0000 (13:59 +0100)]
Convert ListenerRegistrationHelper into a component
ListenerRegistrationHelper really only contains a polling thing. Split
it out and inject it as a service reference.
JIRA: OPNFLWPLUG-1112
Change-Id: Ia98c3dd0d59f9c13d1988007ef9f833338a37e65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 02:26:24 +0000 (03:26 +0100)]
Ditch use of SystemNotificationsListener
Introduce SystemListener, which does essentially the same thing.
Change-Id: I97ae5237e3313d757e1a01ad9d022cfbfda498e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 12:24:02 +0000 (13:24 +0100)]
Convert arbitratorreconciliation to OSGi DS
We have yet another simple component, convert it to declarative
services. While we are here, also clean up RPC service usage.
JIRA: OPNFLWPLUG-1112
JIRA: OPNFLWPLUG-1125
Change-Id: I4c0fb874c0f6f3f5ebd2319d860d42f1ede2c3d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 11:51:25 +0000 (12:51 +0100)]
Convert reconciliation-framework to OSGi DS
This is an extremely simple component, convert it. Also make sure it
shuts down properly, by cleaning up its registration.
JIRA: OPNFLWPLUG-1112
Change-Id: I6243e87d5395446c68d50f928f947423dca01416
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 11:25:13 +0000 (12:25 +0100)]
Make MastershipChangeServiceManagerImpl a component
This is a standalone component, let's activate it without blueprint.
JIRA: OPNFLWPLUG-1112
Change-Id: Icc9307c44641b8ae5f63c9696cd640c7c13d122d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 11:17:07 +0000 (12:17 +0100)]
Convert sample-bundles to OSGi DS
This is yet another simplistic application, convert it to declarative
services.
JIRA: OPNFLWPLUG-1112
Change-Id: Ifd3feec479149846d97a6c65c98fa46604424b67
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 10:23:02 +0000 (11:23 +0100)]
Ditch blueprint from drop-test-karaf
Use simple OSGi injection instead of a blueprint. This forces a refactor
in test-common, which ends up working much more nicely than before.
JIRA: OPNFLWPLUG-1112
Change-Id: I9496c9fd41bb6919e205ab354a35c03e1206b697
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 09:29:16 +0000 (10:29 +0100)]
Ditch blueprint from table-miss-enforcer
This again is a very simple AddFlow-based application, use
annotation-driven activation.
JIRA: OPNFLWPLUG-1112
Change-Id: If994133803cc60020e0fde38f33a15b67c4a5c66
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 09:12:29 +0000 (10:12 +0100)]
Ditch blueprint from of-switch-config-pusher
The blueprint is again extremely simple, migrate it to OSGi DS.
Also correct artifacts declarations, so that device-ownership-service
has a version declaration.
JIRA: OPNFLWPLUG-1112
Change-Id: Ib916383eb517bde7a4a3c2969ef58ec24aea53da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 08:16:42 +0000 (09:16 +0100)]
Ditch blueprint from device-ownership-service
We have an extremely simplistic blueprint with inject annotations
already present. Convert to using Declarative Services.
JIRA: OPNFLWPLUG-1112
Change-Id: I4346ac4d4acd50c354f9d2b2f8296598a8bae6aa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 07:57:24 +0000 (08:57 +0100)]
Ditch bluprint from sample-consumer
This sample is extremely simplistic. Turn it into a component.
JIRA: OPNFLWPLUG-1112
Change-Id: I83733f43e6dc965a16e085e7d0fee15206a7ee22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Feb 2024 07:44:42 +0000 (08:44 +0100)]
Ditch blueprint from frm-sync
forwarding-rules-sync has an extremely simplistic blueprint, replace it
with Declarative Services wiring.
JIRA: OPNFLWPLUG-1112
Change-Id: I35d9add3e1b861cdd59000ed9ba0e395f706e6a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
lubos-cicut [Tue, 3 Oct 2023 19:49:33 +0000 (21:49 +0200)]
Do not use RpcService in learning-switch
Use simple RPCs instead of rolled-up RpcServices. Also ditch blueprint
as our dependencies have changed.
JIRA: OPNFLWPLUG-1112
JIRA: OPNFLWPLUG-1125
Change-Id: I76f7a4de09c9eb66cc9d4cd4704485c7a0dac36d
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
lubos-cicut [Sun, 1 Oct 2023 18:51:22 +0000 (20:51 +0200)]
Do not use RpcService in bulk-o-matic
Use single RPCs instead of rolled-up RpcServices. We also register all
RPCs as an atomic entity via the SalBulkFlowRpcs component -- ditching
blueprint in the process of doing so.
JIRA: OPNFLWPLUG-1112
JIRA: OPNFLWPLUG-1125
Change-Id: Id7d1a1c8fa330d4f8d798d707fe06a9d8ca9da0e
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
lubos-cicut [Tue, 3 Oct 2023 10:11:09 +0000 (12:11 +0200)]
Do not use RpcService in forwardingrules-sync
Use simple Rpcs instead of aggregates, which gives us better
inter-component binding.
JIRA: OPNFLWPLUG-1125
Change-Id: Ie3c914cc7c9ca824a3a7eed6461bb2e657af7489
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Feb 2024 17:36:55 +0000 (18:36 +0100)]
Specialize {Add,Remove,Update}Flow implementations
The use of single-layer is a constant when we are instantiating RPCs,
hence we can specialize implementations rather than checking with
DeviceInfo on each invocation.
This leads to lower memory footprint as well as more efficient
execution.
Change-Id: I1409a50bbdcd0ee5f549b44d46b92973a758b7a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 5 Jul 2023 23:47:43 +0000 (01:47 +0200)]
Reduce mocking in FlowDirectStatisticsServiceTest
Do not mock things that we can build through generated code.
Change-Id: I23e9442ece27e60e8a29996e6c4604ed722e4924
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Feb 2024 17:06:28 +0000 (18:06 +0100)]
Correct FlowRegistryKeyFactory
@NonNull is a TYPE_USE annotation, place it accordingly. Also clean up
FlowRegistryKeyDto's equals() method.
Change-Id: Ie9cc897281938ad5ee52ee73e99cf5ef6f8f1a47
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Feb 2024 17:03:59 +0000 (18:03 +0100)]
Clean up MatchNormalizationUtil
Multiple things going on here:
- create a secondary weak cache for normalizers
- use ImmutableSet in both normalizer registries
- correct @NonNull placement
- ditch Optional.ofNullable() logic, clarifying what is going on
Change-Id: I1bccb2ae98c5239cb1b7e832bd2f03ddddcc3d91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 6 Feb 2024 16:28:25 +0000 (17:28 +0100)]
Reuse singleLayer boolean
We have already checked this property, reuse the result.
Change-Id: Ia21b4bb9d7f927d4c922cbeb58c1a82b6c6e9621
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 16:29:34 +0000 (17:29 +0100)]
Decompose RPC implementation classes
RpcContextImpl registers a multitude of RPC services when it becomes
active. We really want to make that registration atomic -- which is
something we can do with
RpcProviderService.registerRpcImplementations().
This patch splits up our implementation classes to individual RPCs and
then uses a single call to register them in one go.
For bonus points we get rid of the horrible java.lang.IllegalAccessError
throws and correctly report RPC unavailability (because we do not
register those RPCs).
We also ditch OpendaylightDirectStatisticsServiceProvider and its
associated *LayerDirectStatisticsProviderInitializer, as they can be
cleanly bound without per-request lookups.
JIRA: OPNFLWPLUG-1125
Change-Id: I80ade2f9f51fc765c0d685f544e5b102061d033c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 16:06:06 +0000 (17:06 +0100)]
Remove unused routedRpcRegistration
This field is not referenced, remove it.
JIRA: OPNFLWPLUG-1125
Change-Id: Ia5c3b9c8e701e93268b1ff61e0d99ccb7e0e33b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 13:28:14 +0000 (14:28 +0100)]
Refactor RpcContext
The public API here does not make sense:
- lookup is only used in tests
- register is only used internally
- unregister is only used internally to lookup already-registered
service
Eliminate public API methods and inline MdSalRegistrationUtils,
eliminate the need for various lookups.
JIRA: OPNFLWPLUG-1125
Change-Id: I28b4d8e4b8b63e715921cf8e851dcb3bb2f6a13a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 13:04:06 +0000 (14:04 +0100)]
Clean up RoleService
Use a switch expression to convert the OFJ enum, resulting in
elimination of the default case.
While we are here, perform overall cleanups by using:
- builders fluently
- adding listener directly
- accessing errors only once
Change-Id: I0a09d57cef2bd76ef33177077a8c347e4d9d17ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 12:54:29 +0000 (13:54 +0100)]
Remove AbstractVoidService
RPCs have not been producing Void for a long time, remove
AbstractVoidService, as it has only be useful in that context.
Change-Id: I09194eaff79767df9c291fe2639761cb45f4339f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 5 Feb 2024 12:15:58 +0000 (13:15 +0100)]
Migrate StatisticsManagerImpl
Migrate to not use generated roll-up RPC service.
JIRA: OPNFLWPLUG-1125
Change-Id: I8b2bcf9d113d6d140d96bb64f374d500bea20241
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
lubos-cicut [Sun, 1 Oct 2023 20:50:09 +0000 (22:50 +0200)]
Do not use RpcService in test-provider module
Removed usage of RpcService from test-provider by registering individual
RPC implementations.
While we are at it, split up activation, so that we have
properly-decomposed components.
JIRA: OPNFLWPLUG-1125
Change-Id: I02bdb491b517bc5898bfa43bab7430fa69c28b6a
Signed-off-by: lubos-cicut <lubos.cicut@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Jan 2024 11:46:20 +0000 (12:46 +0100)]
Bump upstreams
Adopt:
- odparent-13.0.10
- infrautils-6.0.5
- yangtools-11.0.5
- mdsal-12.0.4
- controller-8.0.4
- aaa-0.18.4
- netconf-6.0.6
Also fixes up fallout from I35697d2544464d6cdc4ee88d13978eaabcf33353,
which broke unregistration -- this is now found by SpotBugs.
Change-Id: Id58314c7a4157e3c00a1ac0929964b9302be1756
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0267562f3c2be39373f289008a367776dd325ff8)
Robert Varga [Wed, 15 Nov 2023 09:13:31 +0000 (10:13 +0100)]
Bump upstreams
Adopt:
- odlparent-13.0.7
- infrautils-6.0.4
- yangtools-11.0.4
- mdsal-12.0.3
- controller-8.0.3
- aaa-0.18.3
- netconf-6.0.5
Change-Id: I137ef1ac5d3e68f713badfefd84b47526b090693
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
44ff926b40d9f14f8967bb7392c9eeb24f6eaf09)
Robert Varga [Sun, 24 Sep 2023 22:42:38 +0000 (00:42 +0200)]
Bump upstreams
Adopt
- yangtools-11.0.2
- mdsal-12.0.2
- controller-8.0.2
- aaa-0.18.2
- netconf-6.0.4
Change-Id: I07b7995ad42d1edc9b7f35409188aad067f1ead2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a7a40b42de14c0a2cd14729d192718c300d63d21)
jenkins-releng [Tue, 12 Sep 2023 02:20:52 +0000 (02:20 +0000)]
Bump versions by x.(y+1).z
Change-Id: I58b328c207c8052bd98e4805fd3b5d5db9a24496
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Robert Varga [Fri, 8 Sep 2023 15:24:26 +0000 (17:24 +0200)]
Bump netconf to 6.0.3
Adopt latest fixes.
Change-Id: Ie2fbb4324f0bddea768ce89208c4a5f7157af4ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 31 Aug 2023 18:50:02 +0000 (20:50 +0200)]
Fix odl-openflowplugin-flow-services-rest
We have a odl-restconf reference which is fixed to a single version. We
should be using a range.
Change-Id: I602f4080b029eda8bf86c74fc21e5cf52a8e2039
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 31 Aug 2023 15:37:06 +0000 (17:37 +0200)]
Bump upstreams
Adopt:
- odparent-13.0.4
- infrautils-6.0.2
- yangtools-11.0.1
- mdsal-12.0.1
- controller-8.0.1
- aaa-0.18.1
- netconf-6.0.2
Change-Id: I4ab0b93d34c5fd1268e8727ef7f7145bcd034b24
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 31 Aug 2023 15:53:54 +0000 (17:53 +0200)]
Fixup checkstyle
Upgraded checkstyle is catching new violations, fix them up.
Change-Id: I81bc794f3216c25b22cec79f53d9646f9b24b069
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 7 Aug 2023 11:41:21 +0000 (13:41 +0200)]
Bump netconf to 6.0.1
Pick up latest fixes.
Change-Id: I7ccfa78a74c5990c28fc3f688f52b416b39017ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>