From 1f082f5b87ce9a5b99895722c1de757fa43b394f Mon Sep 17 00:00:00 2001 From: Srinivasan Ramasubramanian <srini@bigswitch.com> Date: Thu, 16 May 2013 15:44:26 -0700 Subject: [PATCH] Remove source and destination port status from LinkInfo data strucuture. The source/destination port info is also removed in model and CLI. --- .../linkdiscovery/LinkInfo.java | 51 +------------ .../internal/EventHistoryTopologyLink.java | 10 --- .../internal/LinkDiscoveryManager.java | 74 ++----------------- .../web/DirectedLinksResource.java | 5 +- .../web/ExternalLinksResource.java | 4 - .../linkdiscovery/web/LinkWithType.java | 8 -- .../linkdiscovery/web/LinksResource.java | 4 - .../internal/LinkDiscoveryManagerTest.java | 40 ++++------ 8 files changed, 26 insertions(+), 170 deletions(-) diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/LinkInfo.java b/src/main/java/net/floodlightcontroller/linkdiscovery/LinkInfo.java index 8a8ee22a7..a816d47ab 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/LinkInfo.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/LinkInfo.java @@ -17,20 +17,14 @@ package net.floodlightcontroller.linkdiscovery; import net.floodlightcontroller.linkdiscovery.ILinkDiscovery.LinkType; -import org.openflow.protocol.OFPhysicalPort.OFPortState; - import com.fasterxml.jackson.annotation.JsonIgnore; public class LinkInfo { public LinkInfo(Long firstSeenTime, Long lastLldpReceivedTime, - Long lastBddpReceivedTime, - int srcPortState, - int dstPortState) { + Long lastBddpReceivedTime) { super(); - this.srcPortState = srcPortState; - this.dstPortState = dstPortState; this.firstSeenTime = firstSeenTime; this.lastLldpReceivedTime = lastLldpReceivedTime; this.lastBddpReceivedTime = lastBddpReceivedTime; @@ -41,15 +35,11 @@ public class LinkInfo { * Serialization/Deserialization */ public LinkInfo() { - this.srcPortState = null; - this.dstPortState = null; this.firstSeenTime = null; this.lastLldpReceivedTime = null; this.lastBddpReceivedTime = null; } - protected Integer srcPortState; - protected Integer dstPortState; protected Long firstSeenTime; protected Long lastLldpReceivedTime; /* Standard LLLDP received time */ protected Long lastBddpReceivedTime; /* Modified LLDP received time */ @@ -64,13 +54,6 @@ public class LinkInfo { * requires the new state to be written to storage. */ - - - public boolean linkStpBlocked() { - return ((srcPortState & OFPortState.OFPPS_STP_MASK.getValue()) == OFPortState.OFPPS_STP_BLOCK.getValue()) || - ((dstPortState & OFPortState.OFPPS_STP_MASK.getValue()) == OFPortState.OFPPS_STP_BLOCK.getValue()); - } - public Long getFirstSeenTime() { return firstSeenTime; } @@ -95,22 +78,6 @@ public class LinkInfo { this.lastBddpReceivedTime = multicastValidTime; } - public Integer getSrcPortState() { - return srcPortState; - } - - public void setSrcPortState(Integer srcPortState) { - this.srcPortState = srcPortState; - } - - public Integer getDstPortState() { - return dstPortState; - } - - public void setDstPortState(int dstPortState) { - this.dstPortState = dstPortState; - } - @JsonIgnore public LinkType getLinkType() { if (lastLldpReceivedTime != null) { @@ -131,8 +98,6 @@ public class LinkInfo { result = prime * result + ((firstSeenTime == null) ? 0 : firstSeenTime.hashCode()); result = prime * result + ((lastLldpReceivedTime == null) ? 0 : lastLldpReceivedTime.hashCode()); result = prime * result + ((lastBddpReceivedTime == null) ? 0 : lastBddpReceivedTime.hashCode()); - result = prime * result + ((srcPortState == null) ? 0 : srcPortState.hashCode()); - result = prime * result + ((dstPortState == null) ? 0 : dstPortState.hashCode()); return result; } @@ -167,18 +132,6 @@ public class LinkInfo { } else if (!lastBddpReceivedTime.equals(other.lastBddpReceivedTime)) return false; - if (srcPortState == null) { - if (other.srcPortState != null) - return false; - } else if (!srcPortState.equals(other.srcPortState)) - return false; - - if (dstPortState == null) { - if (other.dstPortState != null) - return false; - } else if (!dstPortState.equals(other.dstPortState)) - return false; - return true; } @@ -190,8 +143,6 @@ public class LinkInfo { public String toString() { return "LinkInfo [unicastValidTime=" + ((lastLldpReceivedTime == null) ? "null" : lastLldpReceivedTime) + ", multicastValidTime=" + ((lastBddpReceivedTime == null) ? "null" : lastBddpReceivedTime) - + ", srcPortState=" + ((srcPortState == null) ? "null" : srcPortState) - + ", dstPortState=" + ((dstPortState == null) ? "null" : srcPortState) + "]"; } } diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/EventHistoryTopologyLink.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/EventHistoryTopologyLink.java index b8d3e143c..63fea0349 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/EventHistoryTopologyLink.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/EventHistoryTopologyLink.java @@ -32,8 +32,6 @@ public class EventHistoryTopologyLink { // the front end (e.g. in cli in Python) public long srcSwDpid; public long dstSwDpid; - public int srcPortState; - public int dstPortState; public int srcSwport; public int dstSwport; public String linkType; @@ -49,14 +47,6 @@ public class EventHistoryTopologyLink { public long getDstSwDpid() { return dstSwDpid; } - @JsonProperty("SrcPortState") - public int getSrcPortState() { - return srcPortState; - } - @JsonProperty("DstPortState") - public int getDstPortState() { - return dstPortState; - } @JsonProperty("SrcPort") public int getSrcSwport() { return srcSwport; diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java index d9f111171..ffbae04d5 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManager.java @@ -134,10 +134,8 @@ public class LinkDiscoveryManager implements IOFMessageListener, private static final String LINK_ID = "id"; private static final String LINK_SRC_SWITCH = "src_switch_id"; private static final String LINK_SRC_PORT = "src_port"; - private static final String LINK_SRC_PORT_STATE = "src_port_state"; private static final String LINK_DST_SWITCH = "dst_switch_id"; private static final String LINK_DST_PORT = "dst_port"; - private static final String LINK_DST_PORT_STATE = "dst_port_state"; private static final String LINK_VALID_TIME = "valid_time"; private static final String LINK_TYPE = "link_type"; private static final String SWITCH_CONFIG_TABLE_NAME = "controller_switchconfig"; @@ -695,13 +693,6 @@ public class LinkDiscoveryManager implements IOFMessageListener, return Command.STOP; } - OFPhysicalPort physicalPort = remoteSwitch.getPort(remotePort); - int srcPortState = (physicalPort != null) ? physicalPort.getState() - : 0; - physicalPort = iofSwitch.getPort(inPort); - int dstPortState = (physicalPort != null) ? physicalPort.getState() - : 0; - // Store the time of update to this link, and push it out to // routingEngine Link lt = new Link(remoteSwitch.getId(), remotePort, @@ -723,8 +714,7 @@ public class LinkDiscoveryManager implements IOFMessageListener, lastBddpTime = System.currentTimeMillis(); LinkInfo newLinkInfo = new LinkInfo(firstSeenTime, lastLldpTime, - lastBddpTime, srcPortState, - dstPortState); + lastBddpTime); addOrUpdateLink(lt, newLinkInfo); @@ -755,8 +745,7 @@ public class LinkDiscoveryManager implements IOFMessageListener, // srcPortState and dstPort state are reversed. LinkInfo reverseInfo = new LinkInfo(firstSeenTime, lastLldpTime, - lastBddpTime, dstPortState, - srcPortState); + lastBddpTime); addOrUpdateLink(reverseLink, reverseInfo); } @@ -1272,13 +1261,6 @@ public class LinkDiscoveryManager implements IOFMessageListener, linkChanged = true; } - // Only update the port states if they've changed - if (newInfo.getSrcPortState().intValue() != oldInfo.getSrcPortState() - .intValue() - || newInfo.getDstPortState().intValue() != oldInfo.getDstPortState() - .intValue()) - linkChanged = true; - return linkChanged; } @@ -1324,15 +1306,13 @@ public class LinkDiscoveryManager implements IOFMessageListener, log.info("Inter-switch link detected: {}", lt); } evHistTopoLink(lt.getSrc(), lt.getDst(), lt.getSrcPort(), - lt.getDstPort(), newInfo.getSrcPortState(), - newInfo.getDstPortState(), + lt.getDstPort(), linkType, EvAction.LINK_ADDED, "LLDP Recvd"); } else { linkChanged = updateLink(lt, oldInfo, newInfo); if (linkChanged) { - updateOperation = getUpdateOperation(newInfo.getSrcPortState(), - newInfo.getDstPortState()); + updateOperation = UpdateOperation.LINK_UPDATED; LinkType linkType = getLinkType(lt, newInfo); if (linkType == ILinkDiscovery.LinkType.DIRECT_LINK) { log.info("Inter-switch link updated: {}", lt); @@ -1340,8 +1320,6 @@ public class LinkDiscoveryManager implements IOFMessageListener, // Add to event history evHistTopoLink(lt.getSrc(), lt.getDst(), lt.getSrcPort(), lt.getDstPort(), - newInfo.getSrcPortState(), - newInfo.getDstPortState(), linkType, EvAction.LINK_PORT_STATE_UPDATED, "LLDP Recvd"); @@ -1452,8 +1430,7 @@ public class LinkDiscoveryManager implements IOFMessageListener, // Update Event History evHistTopoLink(lt.getSrc(), lt.getDst(), lt.getSrcPort(), - lt.getDstPort(), 0, - 0, // Port states + lt.getDstPort(), ILinkDiscovery.LinkType.INVALID_LINK, EvAction.LINK_DELETED, reason); @@ -1537,13 +1514,10 @@ public class LinkDiscoveryManager implements IOFMessageListener, && info.getMulticastValidTime() == null) { eraseList.add(entry.getKey()); } else if (linkChanged) { - UpdateOperation operation; - operation = getUpdateOperation(info.getSrcPortState(), - info.getDstPortState()); updates.add(new LDUpdate(lt.getSrc(), lt.getSrcPort(), lt.getDst(), lt.getDstPort(), getLinkType(lt, info), - operation)); + UpdateOperation.LINK_UPDATED)); } } @@ -1855,39 +1829,10 @@ public class LinkDiscoveryManager implements IOFMessageListener, else rowValues.put(LINK_TYPE, "invalid"); - if (linkInfo.linkStpBlocked()) { - if (log.isTraceEnabled()) { - log.trace("writeLink, link {}, info {}, srcPortState Blocked", - lt, linkInfo); - } - rowValues.put(LINK_SRC_PORT_STATE, - OFPhysicalPort.OFPortState.OFPPS_STP_BLOCK.getValue()); - } else { - if (log.isTraceEnabled()) { - log.trace("writeLink, link {}, info {}, srcPortState {}", - new Object[] { lt, linkInfo, - linkInfo.getSrcPortState() }); - } - rowValues.put(LINK_SRC_PORT_STATE, linkInfo.getSrcPortState()); - } String dstDpid = HexString.toHexString(lt.getDst()); rowValues.put(LINK_DST_SWITCH, dstDpid); rowValues.put(LINK_DST_PORT, lt.getDstPort()); - if (linkInfo.linkStpBlocked()) { - if (log.isTraceEnabled()) { - log.trace("writeLink, link {}, info {}, dstPortState Blocked", - lt, linkInfo); - } - rowValues.put(LINK_DST_PORT_STATE, - OFPhysicalPort.OFPortState.OFPPS_STP_BLOCK.getValue()); - } else { - if (log.isTraceEnabled()) { - log.trace("writeLink, link {}, info {}, dstPortState {}", - new Object[] { lt, linkInfo, - linkInfo.getDstPortState() }); - } - rowValues.put(LINK_DST_PORT_STATE, linkInfo.getDstPortState()); - } + storageSource.updateRowAsync(LINK_TABLE_NAME, rowValues); } @@ -2194,8 +2139,7 @@ public class LinkDiscoveryManager implements IOFMessageListener, public EventHistoryTopologyCluster evTopoCluster; private void evHistTopoLink(long srcDpid, long dstDpid, short srcPort, - short dstPort, int srcPortState, - int dstPortState, + short dstPort, ILinkDiscovery.LinkType linkType, EvAction actn, String reason) { if (evTopoLink == null) { @@ -2205,8 +2149,6 @@ public class LinkDiscoveryManager implements IOFMessageListener, evTopoLink.dstSwDpid = dstDpid; evTopoLink.srcSwport = srcPort & 0xffff; evTopoLink.dstSwport = dstPort & 0xffff; - evTopoLink.srcPortState = srcPortState; - evTopoLink.dstPortState = dstPortState; evTopoLink.reason = reason; switch (linkType) { case DIRECT_LINK: diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/web/DirectedLinksResource.java b/src/main/java/net/floodlightcontroller/linkdiscovery/web/DirectedLinksResource.java index fe38d7670..37dbd3953 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/web/DirectedLinksResource.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/web/DirectedLinksResource.java @@ -46,10 +46,7 @@ public class DirectedLinksResource extends ServerResource { LinkType type = ld.getLinkType(link, info); if (type == LinkType.DIRECT_LINK || type == LinkType.TUNNEL) { LinkWithType lwt = new LinkWithType(link, - info.getSrcPortState(), - info.getDstPortState(), - type, - LinkDirection.UNIDIRECTIONAL); + type,LinkDirection.UNIDIRECTIONAL); returnLinkSet.add(lwt); } } diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/web/ExternalLinksResource.java b/src/main/java/net/floodlightcontroller/linkdiscovery/web/ExternalLinksResource.java index 69b39eeab..c2aa9d4e4 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/web/ExternalLinksResource.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/web/ExternalLinksResource.java @@ -61,8 +61,6 @@ public class ExternalLinksResource extends ServerResource { // It is sufficient to add only one side of it. if ((src < dst) || (src == dst && srcPort < dstPort)) { lwt = new LinkWithType(link, - info.getSrcPortState(), - info.getDstPortState(), type, LinkDirection.BIDIRECTIONAL); returnLinkSet.add(lwt); @@ -70,8 +68,6 @@ public class ExternalLinksResource extends ServerResource { } else { // This is a unidirectional link. lwt = new LinkWithType(link, - info.getSrcPortState(), - info.getDstPortState(), type, LinkDirection.UNIDIRECTIONAL); returnLinkSet.add(lwt); diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinkWithType.java b/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinkWithType.java index 8de425b16..d95235705 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinkWithType.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinkWithType.java @@ -38,10 +38,8 @@ import net.floodlightcontroller.routing.Link; public class LinkWithType extends JsonSerializer<LinkWithType> { public long srcSwDpid; public short srcPort; - public int srcPortState; public long dstSwDpid; public short dstPort; - public int dstPortState; public LinkType type; public LinkDirection direction; @@ -49,16 +47,12 @@ public class LinkWithType extends JsonSerializer<LinkWithType> { public LinkWithType() {} public LinkWithType(Link link, - int srcPortState, - int dstPortState, LinkType type, LinkDirection direction) { this.srcSwDpid = link.getSrc(); this.srcPort = link.getSrcPort(); - this.srcPortState = srcPortState; this.dstSwDpid = link.getDst(); this.dstPort = link.getDstPort(); - this.dstPortState = dstPortState; this.type = type; this.direction = direction; } @@ -70,10 +64,8 @@ public class LinkWithType extends JsonSerializer<LinkWithType> { jgen.writeStartObject(); jgen.writeStringField("src-switch", HexString.toHexString(lwt.srcSwDpid)); jgen.writeNumberField("src-port", lwt.srcPort); - jgen.writeNumberField("src-port-state", lwt.srcPortState); jgen.writeStringField("dst-switch", HexString.toHexString(lwt.dstSwDpid)); jgen.writeNumberField("dst-port", lwt.dstPort); - jgen.writeNumberField("dst-port-state", lwt.dstPortState); jgen.writeStringField("type", lwt.type.toString()); jgen.writeStringField("direction", lwt.direction.toString()); jgen.writeEndObject(); diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinksResource.java b/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinksResource.java index c8edf4333..0e488ddf2 100644 --- a/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinksResource.java +++ b/src/main/java/net/floodlightcontroller/linkdiscovery/web/LinksResource.java @@ -62,8 +62,6 @@ public class LinksResource extends ServerResource { // It is sufficient to add only one side of it. if ((src < dst) || (src == dst && srcPort < dstPort)) { lwt = new LinkWithType(link, - info.getSrcPortState(), - info.getDstPortState(), type, LinkDirection.BIDIRECTIONAL); returnLinkSet.add(lwt); @@ -71,8 +69,6 @@ public class LinksResource extends ServerResource { } else { // This is a unidirectional link. lwt = new LinkWithType(link, - info.getSrcPortState(), - info.getDstPortState(), type, LinkDirection.UNIDIRECTIONAL); returnLinkSet.add(lwt); diff --git a/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManagerTest.java b/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManagerTest.java index 6eecf116f..4a8a9106e 100644 --- a/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManagerTest.java +++ b/src/test/java/net/floodlightcontroller/linkdiscovery/internal/LinkDiscoveryManagerTest.java @@ -155,8 +155,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { Link lt = new Link(1L, 2, 2L, 1); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); @@ -179,8 +178,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { Link lt = new Link(1L, 2, 2L, 1); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); linkDiscovery.deleteLinks(Collections.singletonList(lt), "Test"); @@ -201,8 +199,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { NodePortTuple dstNpt = new NodePortTuple(2L, 3); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); // check invariants hold @@ -224,8 +221,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { NodePortTuple dstNpt = new NodePortTuple(2L, 3); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); linkDiscovery.deleteLinks(Collections.singletonList(lt), "Test to self"); @@ -245,8 +241,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { NodePortTuple srcNpt = new NodePortTuple(1L, 2); NodePortTuple dstNpt = new NodePortTuple(2L, 1); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); IOFSwitch sw1 = getMockFloodlightProvider().getSwitch(1L); @@ -270,8 +265,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { replay(sw1); Link lt = new Link(1L, 2, 1L, 3); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); // Mock up our expected behavior @@ -296,8 +290,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { LinkInfo info; info = new LinkInfo(System.currentTimeMillis() - 40000, - System.currentTimeMillis() - 40000, null, - 0, 0); + System.currentTimeMillis() - 40000, null); linkDiscovery.addOrUpdateLink(lt, info); // check invariants hold @@ -314,7 +307,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { info = new LinkInfo(System.currentTimeMillis(),/* firstseen */ null,/* unicast */ - System.currentTimeMillis(), 0, 0); + System.currentTimeMillis()); linkDiscovery.addOrUpdateLink(lt, info); assertTrue(linkDiscovery.links.get(lt).getUnicastValidTime() == null); assertTrue(linkDiscovery.links.get(lt).getMulticastValidTime() != null); @@ -326,7 +319,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { // with LT_OPENFLOW_LINK, the link property should be changed to LT_NON_OPENFLOW // by the addOrUpdateLink method. info = new LinkInfo(System.currentTimeMillis() - 40000, - System.currentTimeMillis() - 40000, null, 0, 0); + System.currentTimeMillis() - 40000, null); linkDiscovery.addOrUpdateLink(lt, info); // Expect to timeout the unicast Valid Time, but not the multicast Valid time @@ -337,14 +330,14 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { // Set the multicastValidTime to be old and see if that also times out. info = new LinkInfo(System.currentTimeMillis() - 40000, - null, System.currentTimeMillis() - 40000, 0, 0); + null, System.currentTimeMillis() - 40000); linkDiscovery.addOrUpdateLink(lt, info); linkDiscovery.timeoutLinks(); assertTrue(linkDiscovery.links.get(lt) == null); // Test again only with multicast LLDP info = new LinkInfo(System.currentTimeMillis() - 40000, - null, System.currentTimeMillis() - 40000, 0, 0); + null, System.currentTimeMillis() - 40000); linkDiscovery.addOrUpdateLink(lt, info); assertTrue(linkDiscovery.links.get(lt).getUnicastValidTime() == null); assertTrue(linkDiscovery.links.get(lt).getMulticastValidTime() != null); @@ -358,7 +351,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { srcNpt = new NodePortTuple(1L, 1); dstNpt = new NodePortTuple(1L, 2); info = new LinkInfo(System.currentTimeMillis() - 40000, - null, System.currentTimeMillis() - 40000, 0, 0); + null, System.currentTimeMillis() - 40000); linkDiscovery.addOrUpdateLink(lt, info); @@ -367,7 +360,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { srcNpt = new NodePortTuple(1L, 1); dstNpt = new NodePortTuple(1L, 3); info = new LinkInfo(System.currentTimeMillis() - 40000, - null, System.currentTimeMillis() - 40000, 0, 0); + null, System.currentTimeMillis() - 40000); linkDiscovery.addOrUpdateLink(lt, info); // Start clean and see if loops are also added. @@ -375,7 +368,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { srcNpt = new NodePortTuple(1L, 4); dstNpt = new NodePortTuple(1L, 5); info = new LinkInfo(System.currentTimeMillis() - 40000, - null, System.currentTimeMillis() - 40000, 0, 0); + null, System.currentTimeMillis() - 40000); linkDiscovery.addOrUpdateLink(lt, info); // Start clean and see if loops are also added. @@ -383,7 +376,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { srcNpt = new NodePortTuple(1L, 3); dstNpt = new NodePortTuple(1L, 5); info = new LinkInfo(System.currentTimeMillis() - 40000, - null, System.currentTimeMillis() - 40000, 0, 0); + null, System.currentTimeMillis() - 40000); linkDiscovery.addOrUpdateLink(lt, info); } @@ -397,8 +390,7 @@ public class LinkDiscoveryManagerTest extends FloodlightTestCase { NodePortTuple srcNpt = new NodePortTuple(1L, 2); NodePortTuple dstNpt = new NodePortTuple(2L, 1); LinkInfo info = new LinkInfo(System.currentTimeMillis(), - System.currentTimeMillis(), null, - 0, 0); + System.currentTimeMillis(), null); linkDiscovery.addOrUpdateLink(lt, info); // check invariants hold -- GitLab