Remove NetconfMapperAggregator.OSGI_TYPE 53/105753/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 30 Apr 2023 17:52:02 +0000 (19:52 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 30 Apr 2023 17:53:13 +0000 (19:53 +0200)
We do not want strong binding here, as it just obscures our
dependencies. At the end of the day we want to make things a lot more
modular, but that will require a significant re-thinking of how the
server is wired.

JIRA: NETCONF-945
Change-Id: Iacd243dffe5a8d8884a1777ddc744168e470ab00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
netconf/mdsal-netconf-impl/src/main/java/org/opendaylight/netconf/impl/mdsal/NetconfMapperAggregator.java
netconf/mdsal-netconf-impl/src/main/java/org/opendaylight/netconf/impl/mdsal/OSGiNetconfServer.java

index 8e83e72210e28b8724fdcec067b18965b2567d9a..ff23c24f4084ecf4327b7a872ae80a9d64735c4d 100644 (file)
@@ -15,10 +15,8 @@ import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
 
 @Component(service = { NetconfOperationServiceFactory.class, NetconfOperationServiceFactoryListener.class },
-           property = NetconfMapperAggregator.OSGI_TYPE, immediate = true)
+           property = "type=mapper-aggregator-registry", immediate = true)
 public final class NetconfMapperAggregator extends AggregatedNetconfOperationServiceFactory {
-    static final String OSGI_TYPE = "type=mapper-aggregator-registry";
-
     @Activate
     public NetconfMapperAggregator() {
         super();
index 865719b1f223ffe3c9f3c6d598d675bacb480073..c58b10437737165165f077fb0cd9c22b1dbba6e9 100644 (file)
@@ -51,7 +51,7 @@ public final class OSGiNetconfServer {
             final ComponentFactory<DefaultNetconfMonitoringService> monitoringFactory,
             @Reference(target = "(component.factory=" + DefaultNetconfServerDispatcher.FACTORY_NAME + ")")
             final ComponentFactory<DefaultNetconfServerDispatcher> dispatcherFactory,
-            @Reference(target = "(" + NetconfMapperAggregator.OSGI_TYPE + ")")
+            @Reference(target = "(type=mapper-aggregator-registry)")
             final NetconfOperationServiceFactory mapperAggregatorRegistry,
             @Reference(target = "(type=global-netconf-ssh-scheduled-executor)")
             final ScheduledThreadPool sshScheduledExecutor,