Clean up command naming 15/111815/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 22 May 2024 11:35:47 +0000 (13:35 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 22 May 2024 11:36:40 +0000 (13:36 +0200)
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>
13 files changed:
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommand.java [moved from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProvider.java with 95% similarity]
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesCommand.java [moved from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProvider.java with 94% similarity]
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsCommand.java [moved from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsComandProvider.java with 94% similarity]
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesCommand.java [moved from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesComandProvider.java with 94% similarity]
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommand.java [moved from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommandProvider.java with 94% similarity]
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommand.java [moved from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandProvider.java with 95% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/AbstractCommandTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/AbstractKarafTest.java with 98% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java with 86% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesCommandTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.java with 82% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsCommandTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsComandProviderTest.java with 82% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesCommandTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesComandProviderTest.java with 82% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommandTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommandProviderTest.java with 83% similarity]
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandrTest.java [moved from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandProviderTest.java with 86% similarity]

similarity index 95%
rename from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProvider.java
rename to openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommand.java
index b88a5e63a1789e59cb23548cc390816794480a21..e9e698f12eed4b35eb6be1ebf02c2fc6ebc01a41 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.Messa
 
 @Command(scope = "ofp", name = "clearStats", description = "Clear openflow statistics.")
 @Service
-public class ClearStatsCommandProvider implements Action {
+public class ClearStatsCommand implements Action {
     @Reference
     Session session;
     @Reference
similarity index 94%
rename from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProvider.java
rename to openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesCommand.java
index 429858c3842fce9d8f8de1fac9477977354e15bc..b387147deb7ac49703f83ff932c68181c6202456 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCou
  */
 @Command(scope = "ofp", name = "reset-time-counters", description = "Resets events time counters.")
 @Service
-public class ResetEventTimesComandProvider implements Action {
+public class ResetEventTimesCommand implements Action {
     @Reference
     Session session;
 
similarity index 94%
rename from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsComandProvider.java
rename to openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ResetSessionStatsCommand.java
index f1da8c6d156f18f579570ee6520b7eb39c241e17..e8167c5ad3ebea9d68273767aaa15ace3edfe47e 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatis
  */
 @Command(scope = "ofp", name = "reset-session-stats", description = "Resets session statistics counters.")
 @Service
-public class ResetSessionStatsComandProvider implements Action {
+public class ResetSessionStatsCommand implements Action {
     @Reference
     Session session;
 
similarity index 94%
rename from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesComandProvider.java
rename to openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesCommand.java
index 99b7a0d4ba3ba37d662ae3f3f6351eda376f175a..22bbea3b08051d75ef130889f6d89a966cc259f4 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCou
  */
 @Command(scope = "ofp", name = "show-time-counters", description = "Shows time counts for events.")
 @Service
-public class ShowEventTimesComandProvider implements Action {
+public class ShowEventTimesCommand implements Action {
     @Reference
     Session session;
 
similarity index 94%
rename from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommandProvider.java
rename to openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowSessionStatsCommand.java
index e97dcc2cf11bee63d82ce0a46480f5f02cd7178f..94b968d62e8c4a3b1e6bb6e04411e58bfd8302d1 100644 (file)
@@ -20,7 +20,7 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatis
 
 @Command(scope = "ofp", name = "show-session-stats", description = "Show session statistics.")
 @Service
-public class ShowSessionStatsCommandProvider implements Action {
+public class ShowSessionStatsCommand implements Action {
     @Reference
     Session session;
 
similarity index 95%
rename from openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandProvider.java
rename to openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommand.java
index 37bb9f4be1db8f298e3416f6e945b859509c89fb..31daa53bfeb7dcc36177fdc4e13689df3fff732c 100644 (file)
@@ -16,7 +16,7 @@ import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.Messa
 
 @Command(scope = "ofp", name = "showStats", description = "Show openflow statistics.")
 @Service
-public class ShowStatsCommandProvider implements Action {
+public class ShowStatsCommand implements Action {
     @Reference
     Session session;
     @Reference
similarity index 98%
rename from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/AbstractKarafTest.java
rename to openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/AbstractCommandTest.java
index 04a5c22625d89a57629083516c2ab8b913812c01..124ab0d3d4c838bd3966f33629d0d0879b12dad5 100644 (file)
@@ -24,7 +24,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
  * Created by mirehak on 7/29/15.
  */
 @ExtendWith(MockitoExtension.class)
-abstract class AbstractKarafTest {
+abstract class AbstractCommandTest {
     @Mock
     protected Session session;
     @Mock
similarity index 86%
rename from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandProviderTest.java
rename to openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ClearStatsCommandTest.java
index c797fd2ec4a707471a1fb48c1b873ae36a859ef3..c232e2101ef843b3afd048da6dfde1e7955c612c 100644 (file)
@@ -19,16 +19,16 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.MessageIntell
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 
 /**
- * Test for {@link ClearStatsCommandProvider}.
+ * Test for {@link ClearStatsCommand}.
  */
-class ClearStatsCommandProviderTest extends AbstractKarafTest {
+class ClearStatsCommandTest extends AbstractCommandTest {
     private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION =
         input -> input.endsWith(": no activity detected");
 
     private final MessageIntelligenceAgency messageIntelligenceAgency = new MessageIntelligenceAgencyImpl();
 
     @InjectMocks
-    private ClearStatsCommandProvider clearStatsCommand;
+    private ClearStatsCommand clearStatsCommand;
 
     @Override
     protected void doBeforeEach() {
@@ -38,7 +38,7 @@ class ClearStatsCommandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ClearStatsCommandProvider#execute()} when no stats were touched before.
+     * Test for {@link ClearStatsCommand#execute()} when no stats were touched before.
      */
     @Test
     void clearNoActivity() {
@@ -48,7 +48,7 @@ class ClearStatsCommandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ClearStatsCommandProvider#execute()} when stats were touched before.
+     * Test for {@link ClearStatsCommand#execute()} when stats were touched before.
      */
     @Test
     void clearHavingActivity() {
similarity index 82%
rename from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesComandProviderTest.java
rename to openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ResetEventTimesCommandTest.java
index 048873ae5d9e8a1e23ae34a420a4896d53c77a45..4003ad13782aa4eba7830448ad11f56905c9dc3a 100644 (file)
@@ -17,13 +17,13 @@ import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.Event
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
 
 /**
- * Test for {@link  ResetEventTimesComandProvider}.
+ * Test for {@link  ResetEventTimesCommand}.
  */
-class ResetEventTimesComandProviderTest extends AbstractKarafTest {
+class ResetEventTimesCommandTest extends AbstractCommandTest {
     private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
 
     @InjectMocks
-    private ResetEventTimesComandProvider resetEventTimesCommand;
+    private ResetEventTimesCommand resetEventTimesCommand;
 
     @Override
     protected void doBeforeEach() {
@@ -32,7 +32,7 @@ class ResetEventTimesComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ResetEventTimesComandProvider#execute()} when no stats were touched before.
+     * Test for {@link ResetEventTimesCommand#execute()} when no stats were touched before.
      */
     @Test
     void resetNoActivity() {
@@ -42,7 +42,7 @@ class ResetEventTimesComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ResetEventTimesComandProvider#execute()} when stats were touched before.
+     * Test for {@link ResetEventTimesCommand#execute()} when stats were touched before.
      */
     @Test
     void resetHavingActivity() {
@@ -17,11 +17,11 @@ import org.mockito.InjectMocks;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatistics;
 
 /**
- * Test for {@link ResetSessionStatsComandProvider}.
+ * Test for {@link ResetSessionStatsCommand}.
  */
-class ResetSessionStatsComandProviderTest extends AbstractKarafTest {
+class ResetSessionStatsCommandTest extends AbstractCommandTest {
     @InjectMocks
-    private ResetSessionStatsComandProvider resetSessionStatsCommand;
+    private ResetSessionStatsCommand resetSessionStatsCommand;
     private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
 
     @Override
@@ -31,7 +31,7 @@ class ResetSessionStatsComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ResetSessionStatsComandProvider#execute()} when no stats were touched before.
+     * Test for {@link ResetSessionStatsCommand#execute()} when no stats were touched before.
      */
     @Test
     void resetNoActivity() {
@@ -41,7 +41,7 @@ class ResetSessionStatsComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ResetSessionStatsComandProvider#execute()} when stats were touched before.
+     * Test for {@link ResetSessionStatsCommand#execute()} when stats were touched before.
      */
     @Test
     void resetHavingActivity() {
similarity index 82%
rename from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesComandProviderTest.java
rename to openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowEventTimesCommandTest.java
index 2cd8b0f7e3fe8f252a5b1429f8fc9308532de7e6..38a38c9c2a5bd78e3effb8b1e6154a7dd557c280 100644 (file)
@@ -19,13 +19,13 @@ import org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific.Event
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.EventsTimeCounter;
 
 /**
- * Test for {@link ShowEventTimesComandProvider}.
+ * Test for {@link ShowEventTimesCommand}.
  */
-class ShowEventTimesComandProviderTest extends AbstractKarafTest {
+class ShowEventTimesCommandTest extends AbstractCommandTest {
     private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
 
     @InjectMocks
-    private ShowEventTimesComandProvider showEventTimesCommand;
+    private ShowEventTimesCommand showEventTimesCommand;
 
     @Override
     protected void doBeforeEach() {
@@ -34,7 +34,7 @@ class ShowEventTimesComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ShowEventTimesComandProvider#execute()} when no stats were touched before.
+     * Test for {@link ShowEventTimesCommand#execute()} when no stats were touched before.
      */
     @Test
     void showNoActivity() {
@@ -44,7 +44,7 @@ class ShowEventTimesComandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ShowEventTimesComandProvider#execute()} when stats were touched before.
+     * Test for {@link ShowEventTimesCommand#execute()} when stats were touched before.
      */
     @Test
     void showHavingActivity() {
@@ -19,13 +19,13 @@ import org.mockito.InjectMocks;
 import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.SessionStatistics;
 
 /**
- * Test for {@link ShowSessionStatsCommandProvider}.
+ * Test for {@link ShowSessionStatsCommand}.
  */
-class ShowSessionStatsCommandProviderTest extends AbstractKarafTest {
+class ShowSessionStatsCommandTest extends AbstractCommandTest {
     private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION = String::isEmpty;
 
     @InjectMocks
-    private ShowSessionStatsCommandProvider showSessionStatsCommand;
+    private ShowSessionStatsCommand showSessionStatsCommand;
 
     @Override
     protected void doBeforeEach() {
@@ -34,7 +34,7 @@ class ShowSessionStatsCommandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ShowEventTimesComandProvider#execute()} when no stats were touched before.
+     * Test for {@link ShowEventTimesCommand#execute()} when no stats were touched before.
      */
     @Test
     void showNoActivity() {
@@ -44,7 +44,7 @@ class ShowSessionStatsCommandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ShowEventTimesComandProvider#execute()} when stats were touched before.
+     * Test for {@link ShowEventTimesCommand#execute()} when stats were touched before.
      */
     @Test
     void showHavingActivity() {
similarity index 86%
rename from openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandProviderTest.java
rename to openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/karaf/ShowStatsCommandrTest.java
index 69a07f9eda44e41ebd9507cba76157845161f901..bc1a3fbf0b5e83c8dbcb47a2621abf8314c28f63 100644 (file)
@@ -21,13 +21,13 @@ import org.opendaylight.openflowplugin.impl.statistics.ofpspecific.MessageIntell
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 
 /**
- * Test for {@link ShowStatsCommandProvider}.
+ * Test for {@link ShowStatsCommand}.
  */
-class ShowStatsCommandProviderTest extends AbstractKarafTest {
+class ShowStatsCommandrTest extends AbstractCommandTest {
     private final MessageIntelligenceAgency messageIntelligenceAgency = new MessageIntelligenceAgencyImpl();
 
     @InjectMocks
-    private ShowStatsCommandProvider showStatsCommand;
+    private ShowStatsCommand showStatsCommand;
 
     private static final Function<String, Boolean> CHECK_NO_ACTIVITY_FUNCTION =
         input -> input.endsWith(": no activity detected");
@@ -40,7 +40,7 @@ class ShowStatsCommandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ShowEventTimesComandProvider#execute()} when no stats were touched before.
+     * Test for {@link ShowEventTimesCommand#execute()} when no stats were touched before.
      */
     @Test
     void showNoActivity() {
@@ -50,7 +50,7 @@ class ShowStatsCommandProviderTest extends AbstractKarafTest {
     }
 
     /**
-     * Test for {@link ShowEventTimesComandProvider#execute()} when stats were touched before.
+     * Test for {@link ShowEventTimesCommand#execute()} when stats were touched before.
      */
     @Test
     void showHavingActivity() {