use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method runHandleLldpDataWithAddedDevice.
private void runHandleLldpDataWithAddedDevice(LldpInfoData updatedData) {
LldpInfoData data = createLldpInfoDataData();
packetService.handleLldpData(data);
assertEquals(1, switchConnectedDeviceRepository.findAll().size());
assertLldpConnectedDeviceExistInDatabase(data);
// we must add second device
packetService.handleLldpData(updatedData);
assertEquals(2, switchConnectedDeviceRepository.findAll().size());
assertLldpConnectedDeviceExistInDatabase(data);
assertLldpConnectedDeviceExistInDatabase(updatedData);
}
use of org.openkilda.messaging.info.event.LldpInfoData 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.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleLldpDataUpdateDifferentTtl.
@Test
public void testHandleLldpDataUpdateDifferentTtl() throws InterruptedException {
LldpInfoData updatedData = createLldpInfoDataData();
updatedData.setTtl(TTL_2);
runHandleLldpDataWithUpdatedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleLldpDataDifferentSwitchId.
@Test
public void testHandleLldpDataDifferentSwitchId() {
LldpInfoData updatedData = createLldpInfoDataData();
updatedData.setSwitchId(SWITCH_ID_2);
runHandleLldpDataWithAddedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleLldpDataDifferentChassisId.
@Test
public void testHandleLldpDataDifferentChassisId() {
LldpInfoData updatedData = createLldpInfoDataData();
updatedData.setChassisId(CHASSIS_ID_2);
runHandleLldpDataWithAddedDevice(updatedData);
}
Aggregations