Wire OpenFlowPluginProviderImpl via OSGi DS 26/111826/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 21 May 2024 13:40:53 +0000 (15:40 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 23 May 2024 11:11:19 +0000 (13:11 +0200)
commit41e93b484243a86f71c5fe81245d17210495d3d8
tree92245b8d9494f866c9aba889371d0742fa2f6bf6
parent1baa73aa7ffd8b8c82c01b9ee88f47497cc062af
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>
(cherry picked from commit 271bb499582603561140828ae2b044dba2f12a2a)
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OpenFlowPluginProvider.java [deleted file]
openflowplugin-impl/pom.xml
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/OpenFlowPluginProviderImpl.java
openflowplugin-impl/src/main/resources/OSGI-INF/blueprint/openflowplugin-impl.xml
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/OpenFlowPluginProviderImplTest.java