Added functionality to delete links and to add links to remote switches that have a link to a local switch.
diff --git a/src/main/java/net/floodlightcontroller/core/IOFSwitch.java b/src/main/java/net/floodlightcontroller/core/IOFSwitch.java
index d63624c..df609e7 100644
--- a/src/main/java/net/floodlightcontroller/core/IOFSwitch.java
+++ b/src/main/java/net/floodlightcontroller/core/IOFSwitch.java
@@ -338,6 +338,12 @@
Object removeAttribute(String name);
/**
+ * Setup an unconnected switch with the info required.
+ * @param dpid of the switch
+ */
+ public void setupRemoteSwitch(Long dpid);
+
+ /**
* Clear all flowmods on this switch
*/
public void clearAllFlowMods();
diff --git a/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java b/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java
index dff00fd..bf5aaf7 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/OFSwitchImpl.java
@@ -268,7 +268,7 @@
public void disconnectOutputStream() {
channel.close();
}
-
+
@Override
@JsonIgnore
public void setFeaturesReply(OFFeaturesReply featuresReply) {
@@ -854,4 +854,11 @@
public byte getTables() {
return tables;
}
+
+
+ @Override
+ public void setupRemoteSwitch(Long dpid) {
+ this.datapathId = dpid;
+ this.stringId = HexString.toHexString(this.datapathId);
+ }
}