Search in sources :

Example 11 with OFFlowAdd

use of org.projectfloodlight.openflow.protocol.OFFlowAdd in project open-kilda by telstra.

the class ReplaceInstallFlowTest method installIngressNoneFlow.

@Test
public void installIngressNoneFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_ingress_none_flow.json"), Charsets.UTF_8);
    InstallIngressFlow data = (InstallIngressFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.ingressNoneFlowMod(data.getInputPort(), data.getOutputPort(), data.getTransitVlanId(), data.getMeterId(), 123L);
    runTest(value, flowCommand, meterCommand, null, null);
}
Also used : InstallIngressFlow(org.openkilda.messaging.command.flow.InstallIngressFlow) OFMeterMod(org.projectfloodlight.openflow.protocol.OFMeterMod) OFFlowAdd(org.projectfloodlight.openflow.protocol.OFFlowAdd) Test(org.junit.Test)

Example 12 with OFFlowAdd

use of org.projectfloodlight.openflow.protocol.OFFlowAdd in project open-kilda by telstra.

the class ReplaceInstallFlowTest method installOneSwitchPopFlow.

@Test
public void installOneSwitchPopFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_one_switch_pop_flow.json"), Charsets.UTF_8);
    InstallOneSwitchFlow data = (InstallOneSwitchFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.oneSwitchPopFlowMod(data.getInputPort(), data.getOutputPort(), data.getInputVlanId(), data.getMeterId(), 123L);
    runTest(value, flowCommand, meterCommand, null, null);
}
Also used : InstallOneSwitchFlow(org.openkilda.messaging.command.flow.InstallOneSwitchFlow) OFMeterMod(org.projectfloodlight.openflow.protocol.OFMeterMod) OFFlowAdd(org.projectfloodlight.openflow.protocol.OFFlowAdd) Test(org.junit.Test)

Example 13 with OFFlowAdd

use of org.projectfloodlight.openflow.protocol.OFFlowAdd in project open-kilda by telstra.

the class ReplaceInstallFlowTest method installIngressPopFlow.

@Test
public void installIngressPopFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_ingress_pop_flow.json"), Charsets.UTF_8);
    InstallIngressFlow data = (InstallIngressFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.ingressPopFlowMod(data.getInputPort(), data.getOutputPort(), data.getInputVlanId(), data.getTransitVlanId(), data.getMeterId(), 123L);
    runTest(value, flowCommand, meterCommand, null, null);
}
Also used : InstallIngressFlow(org.openkilda.messaging.command.flow.InstallIngressFlow) OFMeterMod(org.projectfloodlight.openflow.protocol.OFMeterMod) OFFlowAdd(org.projectfloodlight.openflow.protocol.OFFlowAdd) Test(org.junit.Test)

Example 14 with OFFlowAdd

use of org.projectfloodlight.openflow.protocol.OFFlowAdd in project open-kilda by telstra.

the class ReplaceInstallFlowTest method installOneSwitchNoneFlow.

@Test
public void installOneSwitchNoneFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_one_switch_none_flow.json"), Charsets.UTF_8);
    InstallOneSwitchFlow data = (InstallOneSwitchFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.oneSwitchNoneFlowMod(data.getInputPort(), data.getOutputPort(), data.getMeterId(), 123L);
    runTest(value, flowCommand, meterCommand, null, null);
}
Also used : InstallOneSwitchFlow(org.openkilda.messaging.command.flow.InstallOneSwitchFlow) OFMeterMod(org.projectfloodlight.openflow.protocol.OFMeterMod) OFFlowAdd(org.projectfloodlight.openflow.protocol.OFFlowAdd) Test(org.junit.Test)

Aggregations

OFFlowAdd (org.projectfloodlight.openflow.protocol.OFFlowAdd)14 Test (org.junit.Test)13 OFMeterMod (org.projectfloodlight.openflow.protocol.OFMeterMod)9 InstallEgressFlow (org.openkilda.messaging.command.flow.InstallEgressFlow)4 InstallIngressFlow (org.openkilda.messaging.command.flow.InstallIngressFlow)4 InstallOneSwitchFlow (org.openkilda.messaging.command.flow.InstallOneSwitchFlow)4 ConsumerRecord (org.apache.kafka.clients.consumer.ConsumerRecord)1 MeterPool (org.openkilda.floodlight.switchmanager.MeterPool)1 InstallTransitFlow (org.openkilda.messaging.command.flow.InstallTransitFlow)1