Remove BaseCallHomeTopology 87/104487/4
authorYaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Wed, 22 Feb 2023 16:42:25 +0000 (18:42 +0200)
committerIvan Hrasko <ivan.hrasko@pantheon.tech>
Thu, 23 Feb 2023 13:23:57 +0000 (14:23 +0100)
BaseCallHomeTopology has only one child class.
We can remove it and use CallHomeTopology directly.

When at place remove unused CallHomeTopology's constructor.

JIRA: NETCONF-969
Change-Id: Ic80140322161786a228a4735a38ee96e269a27cf
Signed-off-by: Yaroslav Lastivka <yaroslav.lastivka@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/BaseCallHomeTopology.java [deleted file]
apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeTopology.java

diff --git a/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/BaseCallHomeTopology.java b/apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/BaseCallHomeTopology.java
deleted file mode 100644 (file)
index 2523335..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2016 Brocade Communication Systems and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.netconf.callhome.mount;
-
-import io.netty.util.concurrent.EventExecutor;
-import org.opendaylight.aaa.encrypt.AAAEncryptionService;
-import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
-import org.opendaylight.controller.config.threadpool.ThreadPool;
-import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.mdsal.dom.api.DOMMountPointService;
-import org.opendaylight.netconf.client.NetconfClientDispatcher;
-import org.opendaylight.netconf.sal.connect.api.DeviceActionFactory;
-import org.opendaylight.netconf.sal.connect.api.SchemaResourceManager;
-import org.opendaylight.netconf.sal.connect.netconf.schema.mapping.BaseNetconfSchemas;
-import org.opendaylight.netconf.topology.spi.AbstractNetconfTopology;
-
-abstract class BaseCallHomeTopology extends AbstractNetconfTopology {
-    BaseCallHomeTopology(final String topologyId, final NetconfClientDispatcher clientDispatcher,
-                         final EventExecutor eventExecutor,
-                         final ScheduledThreadPool keepaliveExecutor,
-                         final ThreadPool processingExecutor,
-                         final SchemaResourceManager schemaRepositoryProvider,
-                         final DataBroker dataBroker,
-                         final DOMMountPointService mountPointService,
-                         final AAAEncryptionService encryptionService,
-                         final DeviceActionFactory deviceActionFactory,
-                         final BaseNetconfSchemas baseSchemas) {
-        super(topologyId, clientDispatcher, eventExecutor, keepaliveExecutor,
-              processingExecutor, schemaRepositoryProvider, dataBroker, mountPointService,
-              encryptionService, deviceActionFactory, baseSchemas);
-    }
-}
index 60523edf1fcfb05ff4a7e601bae4711b8ce743c7..f0b0ec754e2e35799a822a0a0f46b821bb739e34 100644 (file)
@@ -17,19 +17,10 @@ import org.opendaylight.netconf.client.NetconfClientDispatcher;
 import org.opendaylight.netconf.sal.connect.api.DeviceActionFactory;
 import org.opendaylight.netconf.sal.connect.api.SchemaResourceManager;
 import org.opendaylight.netconf.sal.connect.netconf.schema.mapping.BaseNetconfSchemas;
+import org.opendaylight.netconf.topology.spi.AbstractNetconfTopology;
 
-public class CallHomeTopology extends BaseCallHomeTopology {
-
-    public CallHomeTopology(final String topologyId, final NetconfClientDispatcher clientDispatcher,
-            final EventExecutor eventExecutor,
-            final ScheduledThreadPool keepaliveExecutor, final ThreadPool processingExecutor,
-            final SchemaResourceManager schemaRepositoryProvider,
-            final DataBroker dataBroker, final DOMMountPointService mountPointService,
-            final AAAEncryptionService encryptionService, final BaseNetconfSchemas baseSchemas) {
-        this(topologyId, clientDispatcher, eventExecutor,
-                keepaliveExecutor, processingExecutor, schemaRepositoryProvider,
-                dataBroker, mountPointService, encryptionService, baseSchemas, null);
-    }
+// Non-final for mocking
+public class CallHomeTopology extends AbstractNetconfTopology {
 
     public CallHomeTopology(final String topologyId, final NetconfClientDispatcher clientDispatcher,
                             final EventExecutor eventExecutor,