Removed obsolete methods SwitchPort.dpid() and SwitchPort.port()
Instead, always use the equivalent SwitchPort.getDpid() and
SwitchPort.getPortNumber()
No functional changes.
Change-Id: Ia654bb4b1e2c2f7582307f5b0d2c83dd60405525
diff --git a/src/main/java/net/onrc/onos/core/linkdiscovery/LinkDiscoveryManager.java b/src/main/java/net/onrc/onos/core/linkdiscovery/LinkDiscoveryManager.java
index fbd06b7..8ffe4ee 100644
--- a/src/main/java/net/onrc/onos/core/linkdiscovery/LinkDiscoveryManager.java
+++ b/src/main/java/net/onrc/onos/core/linkdiscovery/LinkDiscoveryManager.java
@@ -445,10 +445,10 @@
}
SwitchPort switchPort = OnosLldp.extractSwitchPort(packetData);
- long remoteDpid = switchPort.dpid().value();
- short remotePort = switchPort.port().shortValue();
+ long remoteDpid = switchPort.getDpid().value();
+ short remotePort = switchPort.getPortNumber().shortValue();
IOFSwitch remoteSwitch = floodlightProvider.getSwitches().get(
- switchPort.dpid().value());
+ switchPort.getDpid().value());
OFPortDesc physicalPort = null;
if (remoteSwitch != null) {
diff --git a/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java b/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java
index ca4c4b1..35aca3a 100644
--- a/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java
+++ b/src/main/java/net/onrc/onos/core/packetservice/PacketModule.java
@@ -104,7 +104,7 @@
public void sendPacket(Ethernet eth, SwitchPort switchPort) {
SinglePacketOutNotification notification =
new SinglePacketOutNotification(eth.serialize(), 0,
- switchPort.dpid().value(), switchPort.port().shortValue());
+ switchPort.getDpid().value(), switchPort.getPortNumber().shortValue());
// TODO We shouldn't care what the destination MAC is
long dstMac = eth.getDestinationMAC().toLong();
@@ -127,7 +127,7 @@
public void broadcastPacketOutEdge(Ethernet eth, SwitchPort inSwitchPort) {
BroadcastPacketOutNotification notification =
new BroadcastPacketOutNotification(eth.serialize(), 0,
- inSwitchPort.dpid().value(), inSwitchPort.port().shortValue());
+ inSwitchPort.getDpid().value(), inSwitchPort.getPortNumber().shortValue());
long dstMac = eth.getDestinationMAC().toLong();
packetOutEventChannel.addTransientEntry(dstMac, notification);
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java b/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
index a0248b7..31b143d 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
@@ -142,7 +142,7 @@
@Override
public Port getPort(SwitchPort port) {
- return getPort(port.dpid(), port.port());
+ return getPort(port.getDpid(), port.getPortNumber());
}
@Override
diff --git a/src/main/java/net/onrc/onos/core/util/SwitchPort.java b/src/main/java/net/onrc/onos/core/util/SwitchPort.java
index cbe4bcb..e296b7b 100644
--- a/src/main/java/net/onrc/onos/core/util/SwitchPort.java
+++ b/src/main/java/net/onrc/onos/core/util/SwitchPort.java
@@ -11,8 +11,8 @@
*/
@JsonSerialize(using = SwitchPortSerializer.class)
public final class SwitchPort {
- private final Dpid dpid; // The DPID of the switch
- private final PortNumber port; // The port of the switch
+ private final Dpid dpid; // The DPID of the switch
+ private final PortNumber port; // The port number on the switch
/**
* Default constructor for Serializer to use.
@@ -62,29 +62,11 @@
*
* @return the DPID value of the Switch-Port.
*/
- public Dpid dpid() {
- return dpid;
- }
-
- /**
- * Get the DPID value of the Switch-Port.
- *
- * @return the DPID value of the Switch-Port.
- */
public Dpid getDpid() {
return dpid;
}
/**
- * Get the port value of the Switch-Port.
- *
- * @return the port value of the Switch-Port.
- */
- public PortNumber port() {
- return port;
- }
-
- /**
* Get the port number of the Switch-Port.
*
* @return the port number of the Switch-Port.