Search in sources :

Example 1 with FabricCapabilities

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;
}
Also used : FabricCapabilities(org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities) FlowRuleService(org.onosproject.net.flow.FlowRuleService)

Example 2 with FabricCapabilities

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;
}
Also used : FabricCapabilities(org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities) FlowRuleService(org.onosproject.net.flow.FlowRuleService) Before(org.junit.Before)

Aggregations

FlowRuleService (org.onosproject.net.flow.FlowRuleService)2 FabricCapabilities (org.onosproject.pipelines.fabric.impl.behaviour.FabricCapabilities)2 Before (org.junit.Before)1