use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleLldpDataDifferentMac.
@Test
public void testHandleLldpDataDifferentMac() {
LldpInfoData updatedData = createLldpInfoDataData();
updatedData.setMacAddress(MAC_ADDRESS_2);
runHandleLldpDataWithAddedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleLldpDataDifferentVlan.
@Test
public void testHandleLldpDataDifferentVlan() {
LldpInfoData updatedData = createLldpInfoDataData();
updatedData.setVlans(Collections.singletonList(VLAN_2));
runHandleLldpDataWithAddedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketServiceTest method testHandleLldpDataUpdateDifferentPortDescription.
@Test
public void testHandleLldpDataUpdateDifferentPortDescription() throws InterruptedException {
LldpInfoData updatedData = createLldpInfoDataData();
updatedData.setPortDescription(PORT_DESCRIPTION_2);
runHandleLldpDataWithUpdatedDevice(updatedData);
}
use of org.openkilda.messaging.info.event.LldpInfoData in project open-kilda by telstra.
the class PacketBolt method handleInput.
@Override
protected void handleInput(Tuple input) throws PipelineException {
if (active) {
Message message = pullValue(input, FIELD_ID_PAYLOAD, Message.class);
if (message instanceof InfoMessage) {
log.debug("Received info message {}", message);
InfoData data = ((InfoMessage) message).getData();
if (data instanceof LldpInfoData) {
packetService.handleLldpData((LldpInfoData) data);
} else if (data instanceof ArpInfoData) {
packetService.handleArpData((ArpInfoData) data);
} else {
unhandledInput(input);
}
} else {
unhandledInput(input);
}
}
}
use of org.openkilda.messaging.info.event.LldpInfoData 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());
}
Aggregations