use of org.openkilda.wfm.topology.connecteddevices.service.PacketService.FlowRelatedData in project open-kilda by telstra.
the class PacketServiceTest method findFlowRelatedDataForVlanFlowTest.
@Test
@Parameters(method = "getVlanFlowParameters")
public void findFlowRelatedDataForVlanFlowTest(int inVlan, int srcVlan, int dstVlan, int transitVlan, List<Integer> vlansInPacket, boolean source) {
createFlow(FLOW_ID, srcVlan, dstVlan, transitVlan, false, false);
LldpInfoData data = createLldpInfoDataData(source ? SWITCH_ID_1 : SWITCH_ID_2, vlansInPacket, source ? PORT_NUMBER_1 : PORT_NUMBER_2);
FlowRelatedData flowRelatedData = packetService.findFlowRelatedDataForVlanFlow(data);
assertEquals(FLOW_ID, flowRelatedData.getFlowId());
assertEquals(inVlan, flowRelatedData.getOriginalVlan());
assertEquals(source, flowRelatedData.getSource());
}
use of org.openkilda.wfm.topology.connecteddevices.service.PacketService.FlowRelatedData in project open-kilda by telstra.
the class PacketServiceTest method findFlowRelatedDataForOneSwitchFlowTest.
@Test
@Parameters(method = "getOneSwitchFlowParameters")
public void findFlowRelatedDataForOneSwitchFlowTest(int inVlan, int srcVlan, int dstVlan, List<Integer> vlansInPacket, boolean source) {
createFlow(FLOW_ID, srcVlan, dstVlan, null, true, false);
LldpInfoData data = createLldpInfoDataData(SWITCH_ID_1, vlansInPacket, source ? PORT_NUMBER_1 : PORT_NUMBER_2);
FlowRelatedData flowRelatedData = packetService.findFlowRelatedDataForOneSwitchFlow(data);
assertEquals(FLOW_ID, flowRelatedData.getFlowId());
assertEquals(inVlan, flowRelatedData.getOriginalVlan());
assertEquals(source, flowRelatedData.getSource());
}
use of org.openkilda.wfm.topology.connecteddevices.service.PacketService.FlowRelatedData in project open-kilda by telstra.
the class PacketServiceTest method findFlowRelatedDataForVxlanFlowTest.
@Test
@Parameters(method = "getInOutVlanCombinationForVxlanParameters")
public void findFlowRelatedDataForVxlanFlowTest(int inVlan, int srcVlan, int dstVlan, List<Integer> vlansInPacket, boolean source) {
createFlow(FLOW_ID, srcVlan, dstVlan, null, false, false);
LldpInfoData data = createLldpInfoDataData(source ? SWITCH_ID_1 : SWITCH_ID_2, vlansInPacket, source ? PORT_NUMBER_1 : PORT_NUMBER_2);
FlowRelatedData flowRelatedData = packetService.findFlowRelatedDataForVxlanFlow(data);
assertEquals(FLOW_ID, flowRelatedData.getFlowId());
assertEquals(inVlan, flowRelatedData.getOriginalVlan());
assertEquals(source, flowRelatedData.getSource());
}
use of org.openkilda.wfm.topology.connecteddevices.service.PacketService.FlowRelatedData in project open-kilda by telstra.
the class PacketServiceTest method findFlowRelatedDataForOneSwitchOnePortFlowTest.
@Test
@Parameters(method = "getOneSwitchOnePortFlowParameters")
public void findFlowRelatedDataForOneSwitchOnePortFlowTest(int inVlan, int srcVlan, int dstVlan, List<Integer> vlansInPacket, boolean source) {
createFlow(FLOW_ID, srcVlan, dstVlan, null, true, true);
LldpInfoData data = createLldpInfoDataData(SWITCH_ID_1, vlansInPacket, PORT_NUMBER_1);
FlowRelatedData flowRelatedData = packetService.findFlowRelatedDataForOneSwitchFlow(data);
assertEquals(FLOW_ID, flowRelatedData.getFlowId());
assertEquals(inVlan, flowRelatedData.getOriginalVlan());
assertEquals(source, flowRelatedData.getSource());
}
Aggregations