[WIP] apps CLI changes for karaf upgrade
Change-Id: I283efc39c7d4f4b31344f1d2d0cdd2b98a60932d
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/AtomicValueTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/AtomicValueTestCommand.java
index 75a963f..1f3b489 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/AtomicValueTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/AtomicValueTestCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.AtomicValue;
@@ -53,7 +53,7 @@
AtomicValue<String> atomicValue;
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
atomicValue = storageService.<String>atomicValueBuilder()
.withName(name)
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java
index 3896830..a719fea 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/ConsistentMapTestCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.core.Version;
import org.onosproject.store.serializers.KryoNamespaces;
@@ -60,7 +60,7 @@
ConsistentMap<String, String> map;
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
map = storageService.<String, String>consistentMapBuilder()
.withName(name)
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java
index 4fd3f0f..f441508 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.service.AtomicCounter;
import org.onosproject.store.service.StorageService;
@@ -51,7 +51,7 @@
AtomicCounter atomicCounter;
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
atomicCounter = storageService.getAsyncAtomicCounter(counter).asAtomicCounter();
if ("get".equals(operation)) {
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestIncrementCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestIncrementCommand.java
index 381c906..2aee8a4 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestIncrementCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/CounterTestIncrementCommand.java
@@ -15,9 +15,9 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.service.AsyncAtomicCounter;
import org.onosproject.store.service.StorageService;
@@ -57,7 +57,7 @@
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
atomicCounter = storageService.getAsyncAtomicCounter(counter);
CompletableFuture<Long> result;
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DistributedLockTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DistributedLockTestCommand.java
index 9e23cb2..3bc0b36 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DistributedLockTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/DistributedLockTestCommand.java
@@ -17,8 +17,8 @@
import java.time.Duration;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.distributedprimitives.DistributedPrimitivesTest;
import org.onosproject.store.service.DistributedLock;
@@ -47,7 +47,7 @@
DistributedLock lock;
@Override
- protected void execute() {
+ protected void doExecute() {
DistributedPrimitivesTest test = get(DistributedPrimitivesTest.class);
lock = test.getLock(name);
if ("lock".equals(operation)) {
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/EventuallyConsistentMapTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/EventuallyConsistentMapTestCommand.java
index 359669b..249bd30 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/EventuallyConsistentMapTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/EventuallyConsistentMapTestCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.distributedprimitives.DistributedPrimitivesTest;
import org.onosproject.store.service.EventuallyConsistentMap;
@@ -56,7 +56,7 @@
EventuallyConsistentMap<String, String> map;
@Override
- protected void execute() {
+ protected void doExecute() {
DistributedPrimitivesTest test = get(DistributedPrimitivesTest.class);
map = test.getEcMap(name);
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java
index 2c0f838..743e3f2 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/LeaderElectorTestCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.Leadership;
@@ -48,7 +48,7 @@
LeaderElector leaderElector;
@Override
- protected void execute() {
+ protected void doExecute() {
ClusterService clusterService = get(ClusterService.class);
DistributedPrimitivesTest test = get(DistributedPrimitivesTest.class);
leaderElector = test.getLeaderElector(name);
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestAddCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestAddCommand.java
index 905a792..dd2be54 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestAddCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestAddCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onlab.util.KryoNamespace;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
@@ -51,7 +51,7 @@
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
set = storageService.<String>setBuilder()
.withName(setName)
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java
index d76806c..08b0af4 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestGetCommand.java
@@ -15,9 +15,9 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
import org.onlab.util.KryoNamespace;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
@@ -56,7 +56,7 @@
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
set = storageService.<String>setBuilder()
.withName(setName)
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestRemoveCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestRemoveCommand.java
index 018d177..1915621 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestRemoveCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/SetTestRemoveCommand.java
@@ -15,9 +15,9 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
-import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
+import org.apache.karaf.shell.api.action.Option;
import org.onlab.util.KryoNamespace;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
@@ -59,7 +59,7 @@
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
set = storageService.<String>setBuilder()
.withName(setName)
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java
index 0a5fda2..f103641 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestGetCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.Serializer;
@@ -41,7 +41,7 @@
Serializer serializer = Serializer.using(KryoNamespaces.BASIC);
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
TransactionContext context;
context = storageService.transactionContextBuilder().build();
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java
index 11f5493..231833b 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/TransactionalMapTestPutCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.Serializer;
@@ -47,7 +47,7 @@
Serializer serializer = Serializer.using(KryoNamespaces.BASIC);
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
TransactionContext context;
context = storageService.transactionContextBuilder().build();
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java
index dfaeafc..b3f1d62 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java
@@ -15,8 +15,8 @@
*/
package org.onosproject.distributedprimitives.cli;
-import org.apache.karaf.shell.commands.Argument;
-import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.api.action.Argument;
+import org.apache.karaf.shell.api.action.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.store.serializers.KryoNamespaces;
import org.onosproject.store.service.DistributedPrimitive;
@@ -62,7 +62,7 @@
WorkQueue<String> queue;
@Override
- protected void execute() {
+ protected void doExecute() {
StorageService storageService = get(StorageService.class);
Serializer serializer = Serializer.using(KryoNamespaces.BASIC);
queue = storageService.getWorkQueue(name, serializer);