Java源码示例:org.onosproject.net.behaviour.PipelinerContext
示例1
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
// Terminate internal references
// We are terminating the references here
// because when the device is offline the apps
// are still sending flowobjectives
if (groupChecker != null) {
groupChecker.shutdown();
}
// create a new executor at each init and a new empty queue
groupChecker = Executors.newSingleThreadScheduledExecutor(groupedThreads("onos/driver",
"ovs-ofdpa-%d", log));
if (flowRuleQueue != null) {
flowRuleQueue.clear();
}
flowRuleQueue = new ConcurrentLinkedQueue<>();
groupCheckerLock = new ReentrantLock();
groupChecker.scheduleAtFixedRate(new PopVlanPuntGroupChecker(), 20, 50, TimeUnit.MILLISECONDS);
super.init(deviceId, context);
}
示例2
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
serviceDirectory = context.directory();
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
groupService = serviceDirectory.get(GroupService.class);
flowObjectiveStore = context.store();
deviceService = serviceDirectory.get(DeviceService.class);
// Init the accumulator, if enabled
if (isAccumulatorEnabled(this)) {
accumulator = new ForwardingObjectiveAccumulator(context.accumulatorMaxObjectives(),
context.accumulatorMaxBatchMillis(),
context.accumulatorMaxIdleMillis());
}
initDriverId();
initGroupHander(context);
initializePipeline();
}
示例3
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
flowObjectiveStore = context.store();
filters = Collections.newSetFromMap(new ConcurrentHashMap<Filter, Boolean>());
pendingVersatiles = Collections.newSetFromMap(
new ConcurrentHashMap<ForwardingObjective, Boolean>());
appId = coreService.registerApplication(
"org.onosproject.driver.OVSPicaPipeline");
initializePipeline();
}
示例4
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
serviceDirectory = context.directory();
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
groupService = serviceDirectory.get(GroupService.class);
meterService = serviceDirectory.get(MeterService.class);
deviceService = serviceDirectory.get(DeviceService.class);
flowObjectiveStore = context.store();
appId = coreService.registerApplication(APPLICATION_ID);
device = deviceService.getDevice(deviceId);
deviceHwVersion = device.hwVersion();
//Initialization of model specific features
log.debug("HP Driver - Initializing unsupported features for switch {}", deviceHwVersion);
initUnSupportedFeatures();
log.debug("HP Driver - Initializing features supported in hardware");
initHardwareCriteria();
initHardwareInstructions();
log.debug("HP Driver - Initializing pipeline");
installHPTableZero();
installHPHardwareTable();
installHPSoftwareTable();
}
示例5
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
super.init(deviceId, context);
this.deviceId = deviceId;
this.serviceDirectory = context.directory();
deviceService = serviceDirectory.get(DeviceService.class);
}
示例6
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
flowObjectiveStore = context.store();
driverId = coreService.registerApplication(
"org.onosproject.driver.SoftRouterPipeline");
initializePipeline();
}
示例7
@Override
protected void initGroupHander(PipelinerContext context) {
// Terminate internal references
// We are terminating the references here
// because when the device is offline the apps
// are still sending flowobjectives
if (groupHandler != null) {
groupHandler.terminate();
}
groupHandler = new Ofdpa3GroupHandler();
groupHandler.init(deviceId, context);
}
示例8
@Override
protected void initGroupHander(PipelinerContext context) {
// Terminate internal references
// We are terminating the references here
// because when the device is offline the apps
// are still sending flowobjectives
if (groupHandler != null) {
groupHandler.terminate();
}
groupHandler = new OvsOfdpaGroupHandler();
groupHandler.init(deviceId, context);
}
示例9
protected void initGroupHander(PipelinerContext context) {
// Terminate internal references
// We are terminating the references here
// because when the device is offline the apps
// are still sending flowobjectives
if (groupHandler != null) {
groupHandler.terminate();
}
groupHandler = new Ofdpa2GroupHandler();
groupHandler.init(deviceId, context);
}
示例10
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
log.debug("Initiate OLT pipeline");
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
flowRuleService = serviceDirectory.get(FlowRuleService.class);
coreService = serviceDirectory.get(CoreService.class);
groupService = serviceDirectory.get(GroupService.class);
flowObjectiveStore = context.store();
storageService = serviceDirectory.get(StorageService.class);
appId = coreService.registerApplication(
"org.onosproject.driver.OLTPipeline");
pendingGroups = CacheBuilder.newBuilder()
.expireAfterWrite(20, TimeUnit.SECONDS)
.removalListener((RemovalNotification<GroupKey, NextObjective> notification) -> {
if (notification.getCause() == RemovalCause.EXPIRED) {
fail(notification.getValue(), ObjectiveError.GROUPINSTALLATIONFAILED);
}
}).build();
groupService.addListener(new InnerGroupListener());
}
示例11
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
super.init(deviceId, context);
this.deviceId = deviceId;
this.serviceDirectory = context.directory();
this.flowRuleService = serviceDirectory.get(FlowRuleService.class);
deviceService = serviceDirectory.get(DeviceService.class);
}
示例12
@Override
protected void initGroupHander(PipelinerContext context) {
// Terminate internal references
// We are terminating the references here
// because when the device is offline the apps
// are still sending flowobjectives
if (groupHandler != null) {
groupHandler.terminate();
}
groupHandler = new XpliantGroupHandler();
groupHandler.init(deviceId, context);
}
示例13
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
pendingGroups = CacheBuilder.newBuilder()
.expireAfterWrite(20, TimeUnit.SECONDS)
.removalListener((RemovalNotification<GroupKey, NextObjective> notification) -> {
if (notification.getCause() == RemovalCause.EXPIRED) {
fail(notification.getValue(), ObjectiveError.GROUPINSTALLATIONFAILED);
}
}).build();
groupChecker.scheduleAtFixedRate(new GroupChecker(), 0, 500, TimeUnit.MILLISECONDS);
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
groupService = serviceDirectory.get(GroupService.class);
flowObjectiveStore = context.store();
groupService.addListener(new InnerGroupListener());
appId = coreService.registerApplication(
"org.onosproject.driver.CentecV350Pipeline");
initializePipeline();
}
示例14
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
flowRuleService = serviceDirectory.get(FlowRuleService.class);
flowObjectiveStore = serviceDirectory.get(FlowObjectiveStore.class);
}
示例15
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
super.init(deviceId, context);
this.deviceId = deviceId;
this.serviceDirectory = context.directory();
deviceService = serviceDirectory.get(DeviceService.class);
}
示例16
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
super.init(deviceId, context);
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
flowObjectiveStore = context.store();
appId = coreService
.registerApplication("org.onosproject.driver.OpenVSwitchPipeline");
initializePipeline();
}
示例17
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
pendingGroups = CacheBuilder
.newBuilder()
.expireAfterWrite(20, TimeUnit.SECONDS)
.removalListener((RemovalNotification<GroupKey, NextObjective> notification) -> {
if (notification.getCause() == RemovalCause.EXPIRED) {
fail(notification.getValue(),
ObjectiveError.GROUPINSTALLATIONFAILED);
}
}).build();
coreService = serviceDirectory.get(CoreService.class);
flowRuleService = serviceDirectory.get(FlowRuleService.class);
groupService = serviceDirectory.get(GroupService.class);
flowObjectiveStore = context.store();
groupService.addListener(new InnerGroupListener());
appId = coreService
.registerApplication("org.onosproject.driver.SpringOpenTTP");
setTableMissEntries();
log.info("Spring Open TTP driver initialized");
}
示例18
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
log.debug("Initiate OLT pipeline");
this.serviceDirectory = context.directory();
this.deviceId = deviceId;
flowRuleService = serviceDirectory.get(FlowRuleService.class);
coreService = serviceDirectory.get(CoreService.class);
groupService = serviceDirectory.get(GroupService.class);
flowObjectiveStore = context.store();
storageService = serviceDirectory.get(StorageService.class);
appId = coreService.registerApplication(
"org.onosproject.driver.OLTPipeline");
pendingGroups = CacheBuilder.newBuilder()
.expireAfterWrite(20, TimeUnit.SECONDS)
.removalListener((RemovalNotification<GroupKey, NextObjective> notification) -> {
if (notification.getCause() == RemovalCause.EXPIRED) {
fail(notification.getValue(), ObjectiveError.GROUPINSTALLATIONFAILED);
}
}).build();
groupService.addListener(new InnerGroupListener());
}
示例19
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
this.flowRuleService = context.directory().get(FlowRuleService.class);
this.groupService = context.directory().get(GroupService.class);
this.flowObjectiveStore = context.directory().get(FlowObjectiveStore.class);
this.filteringTranslator = new FilteringObjectiveTranslator(deviceId, capabilities);
this.forwardingTranslator = new ForwardingObjectiveTranslator(deviceId, capabilities);
this.nextTranslator = new NextObjectiveTranslator(deviceId, capabilities);
}
示例20
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
pendingNext = CacheBuilder.newBuilder()
.expireAfterWrite(20, TimeUnit.SECONDS)
.removalListener((RemovalNotification<Integer, NextObjective> notification) -> {
if (notification.getCause() == RemovalCause.EXPIRED) {
notification.getValue().context()
.ifPresent(c -> c.onError(notification.getValue(),
ObjectiveError.FLOWINSTALLATIONFAILED));
}
}).build();
}
示例21
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
this.flowRuleService = context.directory().get(FlowRuleService.class);
this.groupService = context.directory().get(GroupService.class);
}
示例22
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
this.flowRuleService = context.directory().get(FlowRuleService.class);
this.groupService = context.directory().get(GroupService.class);
}
示例23
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
this.flowRuleService = context.directory().get(FlowRuleService.class);
this.groupService = context.directory().get(GroupService.class);
}
示例24
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
this.flowRuleService = context.directory().get(FlowRuleService.class);
}
示例25
@Override
public void init(DeviceId deviceId, PipelinerContext context) {
this.deviceId = deviceId;
}