![]() |
Open Kilda Java Documentation
|
Public Member Functions | |
AvailableNetwork (Driver driver, boolean ignoreBandwidth, long requestedBandwidth) | |
AvailableNetwork (Driver driver) | |
AvailableNetwork | addLink (SwitchId srcDpid, SwitchId dstDpid, int srcPort, int dstPort, int cost, int latency) |
Map< SwitchId, SimpleSwitch > | getSwitches () |
SimpleSwitch | getSimpleSwitch (SwitchId dpid) |
Map< String, Integer > | getCounts () |
void | sanityCheck () |
void | reduceByCost () |
AvailableNetwork | removeSelfLoops () |
void | addIslsOccupiedByFlow (String flowId, boolean ignoreBandwidth, long flowBandwidth) |
String | toString () |
Semantically, this class represents an "available network". That means everything in it is active, and the available bandwidth of the isl links matches the criteria specified.
It supports unidirectional links - ie either Inbound or Outbound can be null.
Definition at line 47 of file AvailableNetwork.java.
org.openkilda.pce.model.AvailableNetwork.AvailableNetwork | ( | Driver | driver, |
boolean | ignoreBandwidth, | ||
long | requestedBandwidth | ||
) |
Main constructor that reads topology from the database.
Definition at line 58 of file AvailableNetwork.java.
org.openkilda.pce.model.AvailableNetwork.AvailableNetwork | ( | Driver | driver | ) |
Creates empty representation of network topology.
Definition at line 67 of file AvailableNetwork.java.
void org.openkilda.pce.model.AvailableNetwork.addIslsOccupiedByFlow | ( | String | flowId, |
boolean | ignoreBandwidth, | ||
long | flowBandwidth | ||
) |
Since flow might be already existed and occupied some isls we should take it into account when filtering out ISLs that don't have enough available bandwidth.
flowId | current flow id. |
ignoreBandwidth | defines whether bandwidth of links should be ignored. |
flowBandwidth | required bandwidth amount that should be available on ISLs. |
Definition at line 198 of file AvailableNetwork.java.
AvailableNetwork org.openkilda.pce.model.AvailableNetwork.addLink | ( | SwitchId | srcDpid, |
SwitchId | dstDpid, | ||
int | srcPort, | ||
int | dstPort, | ||
int | cost, | ||
int | latency | ||
) |
Creates switches (if they are not created yet) and ISL between them.
Definition at line 89 of file AvailableNetwork.java.
Map<String, Integer> org.openkilda.pce.model.AvailableNetwork.getCounts | ( | ) |
This call can be used to determine the effect of things like reduceByCost and removeSelfLoops.
Definition at line 112 of file AvailableNetwork.java.
SimpleSwitch org.openkilda.pce.model.AvailableNetwork.getSimpleSwitch | ( | SwitchId | dpid | ) |
Definition at line 104 of file AvailableNetwork.java.
Map<SwitchId, SimpleSwitch> org.openkilda.pce.model.AvailableNetwork.getSwitches | ( | ) |
Definition at line 100 of file AvailableNetwork.java.
void org.openkilda.pce.model.AvailableNetwork.reduceByCost | ( | ) |
Call this function to reduce the network to single (directed) links between src and dst switches. The algorithm runs on the Outgoing and the Incoming links, which could have different values. Consequently, one of these could be null by the end.
Definition at line 150 of file AvailableNetwork.java.
AvailableNetwork org.openkilda.pce.model.AvailableNetwork.removeSelfLoops | ( | ) |
Eliminate any self loops (ie src and dst switch is the same.
Definition at line 182 of file AvailableNetwork.java.
void org.openkilda.pce.model.AvailableNetwork.sanityCheck | ( | ) |
This function can be / should be called after initialization so that all of the checks can be made to ensure the data is okay.
Definition at line 135 of file AvailableNetwork.java.
String org.openkilda.pce.model.AvailableNetwork.toString | ( | ) |
Definition at line 267 of file AvailableNetwork.java.