diff --git a/src/main/java/net/floodlightcontroller/servicechaining/BITWServiceNode.java b/src/main/java/net/floodlightcontroller/servicechaining/BITWServiceNode.java deleted file mode 100644 index 38752f0651b771a5662c7e91e26d9e538b16d9e1..0000000000000000000000000000000000000000 --- a/src/main/java/net/floodlightcontroller/servicechaining/BITWServiceNode.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.floodlightcontroller.servicechaining; - -import net.floodlightcontroller.topology.NodePortTuple; - -public class BITWServiceNode extends ServiceNode { - protected NodePortTuple ingressPort; - protected NodePortTuple egressPort; - - public BITWServiceNode(String tenant, String name) { - super(tenant, name, InsertionType.BUMPINTHEWIRE); - } - - public NodePortTuple getIngressPort() { - return ingressPort; - } - - public void setIngressPort(NodePortTuple ingressPort) { - this.ingressPort = ingressPort; - } - - public NodePortTuple getEgressPort() { - return egressPort; - } - - public void setEgressPort(NodePortTuple egressPort) { - this.egressPort = egressPort; - } -} diff --git a/src/main/java/net/floodlightcontroller/servicechaining/IServiceChainingService.java b/src/main/java/net/floodlightcontroller/servicechaining/IServiceChainingService.java deleted file mode 100644 index e72a5c84a7c78f861b0b2c1e81ed312b884d23fb..0000000000000000000000000000000000000000 --- a/src/main/java/net/floodlightcontroller/servicechaining/IServiceChainingService.java +++ /dev/null @@ -1,27 +0,0 @@ -package net.floodlightcontroller.servicechaining; - -import net.floodlightcontroller.core.FloodlightContextStore; -import net.floodlightcontroller.core.module.IFloodlightService; - -public interface IServiceChainingService extends IFloodlightService { - /** - * A FloodlightContextStore object that can be used to interact with the - * FloodlightContext information created by ServiceInsertion. - */ - public static final FloodlightContextStore<String> scStore = - new FloodlightContextStore<String>(); - - /** - * Returns the service chain by source BVS. - * @param bvsName - * @return the ServiceChain, null is the requested service is not found. - */ - public ServiceChain getServiceChainBySrcBVS(String bvsName); - - /** - * Returns the service chain by destination BVS. - * @param bvsName - * @return the ServiceChain, null is the requested service is not found. - */ - public ServiceChain getServiceChainByDstBVS(String bvsName); -} diff --git a/src/main/java/net/floodlightcontroller/servicechaining/ServiceChain.java b/src/main/java/net/floodlightcontroller/servicechaining/ServiceChain.java deleted file mode 100644 index 7e2a6d4bc2ca811646318e0aace05b01a66ec647..0000000000000000000000000000000000000000 --- a/src/main/java/net/floodlightcontroller/servicechaining/ServiceChain.java +++ /dev/null @@ -1,123 +0,0 @@ -package net.floodlightcontroller.servicechaining; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * ServiceChaining module encapsulates properties of service chains and their member nodes - * - * @author kjiang - * - */ -public class ServiceChain { - // Tenant - private String tenant; - - // Service Chain name - private String name; - - // Source network - private String srcBvsName; - - // Destination network - private String dstBvsName; - - // Service Description - private String description; - - // Ordered list of service Nodes - private List<ServiceNode> nodes; - - /** - * Constructor to create a NetworkService - * - * @param name - * @param vMac - * @param vIp - */ - public ServiceChain(String tenant, String name, String description, - String srcBvsName, String dstBvsName) { - this.tenant = tenant; - this.name = name; - this.description = description; - this.srcBvsName = srcBvsName; - this.dstBvsName = dstBvsName; - this.nodes = new ArrayList<ServiceNode>(); - } - - /** - * A getter for service tenant - * @return - */ - public String getTenant() { - return tenant; - } - - /** - * A getter for service name - * @return - */ - public String getName() { - return name; - } - - /** - * A getter for service description - * @return - */ - public String getDescription() { - return description; - } - - /** - * A getter for source BVS - */ - public String getSourceBvs() { - return srcBvsName; - } - - /** - * A getter for destination BVS - */ - public String getDestinationBvs() { - return dstBvsName; - } - - /** - * A getter returns an unmodifiable map of service nodes. - * @return - */ - public List<ServiceNode> getServiceNodes() { - return Collections.unmodifiableList(nodes); - } - - /** - * Add a service node to the end of the node list - */ - public boolean addNode(ServiceNode node) { - try { - return nodes.add(node); - } catch (Exception e) { - return false; - } - } - - /** - * Remove a service node from the node list - */ - public boolean removeNode(ServiceNode node) { - try { - return nodes.remove(node); - } catch (Exception e) { - return false; - } - } - - @Override - public String toString() { - return "ServiceChain [tenant=" + tenant + ", name=" + name - + ", srcBvsName=" + srcBvsName + ", dstBvsName=" + dstBvsName - + ", description=" + description + "]"; - } -} diff --git a/src/main/java/net/floodlightcontroller/servicechaining/ServiceNode.java b/src/main/java/net/floodlightcontroller/servicechaining/ServiceNode.java deleted file mode 100644 index dfceead4439b51c59c7bb3a0142797817cdbf7f8..0000000000000000000000000000000000000000 --- a/src/main/java/net/floodlightcontroller/servicechaining/ServiceNode.java +++ /dev/null @@ -1,67 +0,0 @@ -package net.floodlightcontroller.servicechaining; - -public class ServiceNode { - public enum InsertionType { - L3, L2, BUMPINTHEWIRE, TAP, UNKNOWN - } - - public enum Direction { - INGRESS, EGRESS, ANY - } - - protected String name; - protected String tenant; - protected InsertionType type; - - public ServiceNode(String tenant, String name, InsertionType type) { - this.tenant = tenant; - this.name = name; - this.type = type; - } - - public String getTenant() { - return tenant; - } - - public String getName() { - return name; - } - - public InsertionType getServiceType() { - return this.type; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result + ((tenant == null) ? 0 : tenant.hashCode()); - result = prime * result + ((type == null) ? 0 : type.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - ServiceNode other = (ServiceNode) obj; - if (name == null) { - if (other.name != null) - return false; - } else if (!name.equals(other.name)) - return false; - if (tenant == null) { - if (other.tenant != null) - return false; - } else if (!tenant.equals(other.tenant)) - return false; - if (type != other.type) - return false; - return true; - } -} diff --git a/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java b/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java index 015a36ae1461f4bffe6af5bab1492082dbb9a8ea..664205337c6945bbebf240aa9d00b6510b3a6850 100644 --- a/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java +++ b/src/main/java/net/floodlightcontroller/topology/TopologyInstance.java @@ -30,7 +30,6 @@ import net.floodlightcontroller.routing.BroadcastTree; import net.floodlightcontroller.routing.Link; import net.floodlightcontroller.routing.Route; import net.floodlightcontroller.routing.RouteId; -import net.floodlightcontroller.servicechaining.ServiceChain; import net.floodlightcontroller.util.ClusterDFS; import org.projectfloodlight.openflow.types.DatapathId; @@ -861,7 +860,7 @@ public class TopologyInstance { /* * Calculates E2E route */ - protected Route getRoute(ServiceChain sc, DatapathId srcId, OFPort srcPort, + protected Route getRoute(DatapathId srcId, OFPort srcPort, DatapathId dstId, OFPort dstPort, U64 cookie) { // Return null if the route source and destination are the // same switch ports. diff --git a/src/main/java/net/floodlightcontroller/topology/TopologyManager.java b/src/main/java/net/floodlightcontroller/topology/TopologyManager.java index 9ca3074b0e92b796169f99f0a15c63bd3d6a3c49..7044c5ae6bf717ff3af7380c410c7aac4b6947aa 100644 --- a/src/main/java/net/floodlightcontroller/topology/TopologyManager.java +++ b/src/main/java/net/floodlightcontroller/topology/TopologyManager.java @@ -696,7 +696,7 @@ public class TopologyManager implements IFloodlightModule, ITopologyService, IRo public Route getRoute(DatapathId src, OFPort srcPort, DatapathId dst, OFPort dstPort, U64 cookie, boolean tunnelEnabled) { TopologyInstance ti = getCurrentInstance(tunnelEnabled); - return ti.getRoute(null, src, srcPort, dst, dstPort, cookie); + return ti.getRoute(src, srcPort, dst, dstPort, cookie); } @Override