16 package org.openkilda.floodlight.converter;
24 import net.floodlightcontroller.core.IOFSwitch;
25 import net.floodlightcontroller.core.LogicalOFMessageCategory;
26 import org.projectfloodlight.openflow.protocol.OFFlowStatsReply;
28 import java.net.InetSocketAddress;
29 import java.util.List;
30 import java.util.stream.Collectors;
46 InetSocketAddress address = (InetSocketAddress) sw.getInetAddress();
47 InetSocketAddress controller = (InetSocketAddress) sw.getConnectionByCategory(
48 LogicalOFMessageCategory.MAIN).getRemoteInetAddress();
53 String.format(
"%s:%d",
54 address.getHostString(),
56 address.getHostName(),
57 String.format(
"%s %s %s",
58 sw.getSwitchDescription().getManufacturerDescription(),
59 sw.getOFFactory().getVersion().toString(),
60 sw.getSwitchDescription().getSoftwareDescription()),
61 controller.getHostString());
73 OFFlowStatsReply flowStats) {
76 List<FlowEntry> flows = flowStats.getEntries().stream()
78 .collect(Collectors.toList());
static FlowEntry toFlowEntry(final OFFlowStatsEntry entry)
static SwitchInfoExtendedData buildSwitchInfoDataExtended(IOFSwitch sw, SwitchState eventType, OFFlowStatsReply flowStats)
static SwitchInfoData buildSwitchInfoData(IOFSwitch sw, SwitchState eventType)