Fix runtime of P4-related stuff with new karaf

Change-Id: I139575d5b038224ca8ccce4ec71ec8a84b35dfeb
diff --git a/cli/src/main/java/org/onosproject/cli/net/PipeconfCommand.java b/cli/src/main/java/org/onosproject/cli/net/PipeconfCommand.java
index e70d7eb..8753a68 100644
--- a/cli/src/main/java/org/onosproject/cli/net/PipeconfCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/PipeconfCommand.java
@@ -19,6 +19,7 @@
 
 import org.apache.karaf.shell.api.action.Command;
 import org.apache.karaf.shell.api.action.Option;
+import org.apache.karaf.shell.api.action.lifecycle.Service;
 import org.onosproject.cli.AbstractShellCommand;
 import org.onosproject.net.driver.Behaviour;
 import org.onosproject.net.pi.model.PiPipeconf;
@@ -31,8 +32,9 @@
 /**
  * Query registered pipeconfs.
  */
+@Service
 @Command(scope = "onos", name = "pipeconfs",
-        description = "Query registered pipeconfs.")
+        description = "List registered pipeconfs")
 public class PipeconfCommand extends AbstractShellCommand {
 
     protected PiPipeconfService piPipeconfService;
diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/AbstractDistributedP4RuntimeMirror.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/AbstractDistributedP4RuntimeMirror.java
index b98e7ec..f45a4e5 100644
--- a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/AbstractDistributedP4RuntimeMirror.java
+++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/AbstractDistributedP4RuntimeMirror.java
@@ -18,12 +18,6 @@
 
 import com.google.common.annotations.Beta;
 import com.google.common.collect.Maps;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Reference;
-import org.osgi.service.component.annotations.ReferenceCardinality;
-
 import org.onlab.util.KryoNamespace;
 import org.onlab.util.SharedExecutors;
 import org.onosproject.net.Annotations;
@@ -36,6 +30,10 @@
 import org.onosproject.store.service.EventuallyConsistentMap;
 import org.onosproject.store.service.StorageService;
 import org.onosproject.store.service.WallClockTimestamp;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
 import org.slf4j.Logger;
 
 import java.util.Collection;
@@ -56,7 +54,6 @@
  * @param <E> entry class
  */
 @Beta
-@Component(immediate = true)
 public abstract class AbstractDistributedP4RuntimeMirror
         <H extends PiHandle, E extends PiEntity>
         implements P4RuntimeMirror<H, E> {
@@ -64,10 +61,10 @@
     private final Logger log = getLogger(getClass());
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
-    private StorageService storageService;
+    protected StorageService storageService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
-    private PiPipeconfWatchdogService pipeconfWatchdogService;
+    protected PiPipeconfWatchdogService pipeconfWatchdogService;
 
     private EventuallyConsistentMap<H, TimedEntry<E>> mirrorMap;
 
diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeActionProfileMemberMirror.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeActionProfileMemberMirror.java
index 1ca29c1..5974ae2 100644
--- a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeActionProfileMemberMirror.java
+++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/mirror/DistributedP4RuntimeActionProfileMemberMirror.java
@@ -25,7 +25,7 @@
 /**
  * Distributed implementation of a P4Runtime action profile member mirror.
  */
-@Component(immediate = true, service = AbstractDistributedP4RuntimeMirror.class)
+@Component(immediate = true, service = P4RuntimeActionProfileMemberMirror.class)
 public class DistributedP4RuntimeActionProfileMemberMirror
         extends AbstractDistributedP4RuntimeMirror
         <PiActionGroupMemberHandle, PiActionGroupMember>
diff --git a/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumDriversLoader.java b/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumDriversLoader.java
index a68729a..a6c8b11 100644
--- a/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumDriversLoader.java
+++ b/drivers/stratum/src/main/java/org/onosproject/drivers/stratum/StratumDriversLoader.java
@@ -20,7 +20,7 @@
 import org.osgi.service.component.annotations.Component;
 
 /**
- * Loader for Stratum Switch device drivers.
+ * Loader for Stratum device drivers.
  */
 @Component(immediate = true)
 public class StratumDriversLoader extends AbstractDriverLoader {
diff --git a/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java b/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java
index cf14712..13ab168 100644
--- a/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java
+++ b/protocols/gnmi/ctl/src/main/java/org/onosproject/gnmi/ctl/GnmiControllerImpl.java
@@ -36,6 +36,7 @@
 public class GnmiControllerImpl
         extends AbstractGrpcClientController<GnmiClientKey, GnmiClient, GnmiEvent, GnmiEventListener>
         implements GnmiController {
+
     private final Logger log = getLogger(getClass());
 
     @Activate
diff --git a/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java b/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java
index bf2bbf1..375ff32 100644
--- a/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java
+++ b/protocols/grpc/ctl/src/main/java/org/onosproject/grpc/ctl/AbstractGrpcClientController.java
@@ -31,7 +31,6 @@
 import org.onosproject.grpc.api.GrpcClientKey;
 import org.onosproject.net.DeviceId;
 import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
 import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.component.annotations.ReferenceCardinality;
@@ -54,7 +53,6 @@
  * @param <E> the event type of the gRPC client
  * @param <L> the event listener of event {@link E}
  */
-@Component
 public abstract class AbstractGrpcClientController
         <K extends GrpcClientKey, C extends GrpcClient, E extends Event, L extends EventListener<E>>
         extends AbstractListenerManager<E, L>
@@ -74,7 +72,7 @@
     private final Striped<Lock> stripedLocks = Striped.lock(DEFAULT_DEVICE_LOCK_SIZE);
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
-    private GrpcChannelController grpcChannelController;
+    protected GrpcChannelController grpcChannelController;
 
     @Activate
     public void activate() {