Search in sources :

Example 1 with OFFlowAdd

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

the class ReplaceInstallFlowTest method installTransitFlow.

@Test
public void installTransitFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_transit_flow.json"), Charsets.UTF_8);
    InstallTransitFlow data = (InstallTransitFlow) prepareData(value);
    OFFlowAdd flowCommand = scheme.transitFlowMod(data.getInputPort(), data.getOutputPort(), data.getTransitVlanId(), 123L);
    runTest(value, flowCommand, null, null, null);
}
Also used : InstallTransitFlow(org.openkilda.messaging.command.flow.InstallTransitFlow) OFFlowAdd(org.projectfloodlight.openflow.protocol.OFFlowAdd) Test(org.junit.Test)

Example 2 with OFFlowAdd

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

the class ReplaceInstallFlowTest method installIngressPushFlow.

@Test
public void installIngressPushFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_ingress_push_flow.json"), Charsets.UTF_8);
    InstallIngressFlow data = (InstallIngressFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.ingressPushFlowMod(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 3 with OFFlowAdd

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

the class ReplaceInstallFlowTest method installIngressReplaceFlow.

@Test
public void installIngressReplaceFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_ingress_replace_flow.json"), Charsets.UTF_8);
    InstallIngressFlow data = (InstallIngressFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.ingressReplaceFlowMod(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 4 with OFFlowAdd

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

the class ReplaceInstallFlowTest method installEgressNoneFlow.

@Test
public void installEgressNoneFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_egress_none_flow.json"), Charsets.UTF_8);
    InstallEgressFlow data = (InstallEgressFlow) prepareData(value);
    OFFlowAdd flowCommand = scheme.egressNoneFlowMod(data.getInputPort(), data.getOutputPort(), data.getTransitVlanId(), 123L);
    runTest(value, flowCommand, null, null, null);
}
Also used : InstallEgressFlow(org.openkilda.messaging.command.flow.InstallEgressFlow) OFFlowAdd(org.projectfloodlight.openflow.protocol.OFFlowAdd) Test(org.junit.Test)

Example 5 with OFFlowAdd

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

the class ReplaceInstallFlowTest method installOneSwitchReplaceFlow.

@Test
public void installOneSwitchReplaceFlow() throws IOException, InterruptedException {
    String value = Resources.toString(getClass().getResource("/install_one_switch_replace_flow.json"), Charsets.UTF_8);
    InstallOneSwitchFlow data = (InstallOneSwitchFlow) prepareData(value);
    OFMeterMod meterCommand = scheme.installMeter(data.getBandwidth(), 1024, data.getMeterId());
    OFFlowAdd flowCommand = scheme.oneSwitchReplaceFlowMod(data.getInputPort(), data.getOutputPort(), data.getInputVlanId(), data.getOutputVlanId(), 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