use of org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities in project onos by opennetworkinglab.
the class FabricBngProgrammable method setupBehaviour.
@Override
protected boolean setupBehaviour(String opName) {
if (!super.setupBehaviour(opName)) {
return false;
}
flowRuleService = handler().get(FlowRuleService.class);
bngProgService = handler().get(FabricBngProgrammableService.class);
capabilities = new FabricCapabilities(pipeconf);
if (!capabilities.supportBng()) {
log.warn("Pipeconf {} on {} does not support BNG capabilities, " + "cannot perform {}", pipeconf.id(), deviceId, opName);
return false;
}
return true;
}
use of org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities in project onos by opennetworkinglab.
the class FabricPipelinerTest method setup.
@Before
public void setup() throws IOException {
FabricCapabilities capabilities = createMock(FabricCapabilities.class);
expect(capabilities.cpuPort()).andReturn(Optional.of(CPU_PORT)).anyTimes();
replay(capabilities);
// Services mock
flowRuleService = createMock(FlowRuleService.class);
pipeliner = new FabricPipeliner(capabilities);
pipeliner.flowRuleService = flowRuleService;
pipeliner.appId = APP_ID;
pipeliner.deviceId = DEVICE_ID;
}
Aggregations