mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-12-06 18:01:53 +01:00
Fix runtime of P4-related stuff with new karaf
Change-Id: I139575d5b038224ca8ccce4ec71ec8a84b35dfeb
This commit is contained in:
parent
15693a23e8
commit
a46f554fb1
@ -19,6 +19,7 @@ package org.onosproject.cli.net;
|
||||
|
||||
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 @@ import java.util.Collection;
|
||||
/**
|
||||
* 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;
|
||||
|
||||
@ -18,12 +18,6 @@ package org.onosproject.drivers.p4runtime.mirror;
|
||||
|
||||
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.net.pi.service.PiPipeconfWatchdogService;
|
||||
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 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* @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 @@ public abstract class AbstractDistributedP4RuntimeMirror
|
||||
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;
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ import org.osgi.service.component.annotations.Component;
|
||||
/**
|
||||
* 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>
|
||||
|
||||
@ -20,7 +20,7 @@ import org.onosproject.net.driver.AbstractDriverLoader;
|
||||
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 {
|
||||
|
||||
@ -36,6 +36,7 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
public class GnmiControllerImpl
|
||||
extends AbstractGrpcClientController<GnmiClientKey, GnmiClient, GnmiEvent, GnmiEventListener>
|
||||
implements GnmiController {
|
||||
|
||||
private final Logger log = getLogger(getClass());
|
||||
|
||||
@Activate
|
||||
|
||||
@ -31,7 +31,6 @@ import org.onosproject.grpc.api.GrpcClientController;
|
||||
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 @@ import static org.slf4j.LoggerFactory.getLogger;
|
||||
* @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 @@ public abstract class AbstractGrpcClientController
|
||||
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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user