public class OVXLink extends Link<OVXPort,OVXSwitch>
| Constructor and Description |
|---|
OVXLink(Integer linkId,
Integer tenantId,
OVXPort srcPort,
OVXPort dstPort,
RoutingAlgorithms alg)
Instantiates a new virtual link.
|
| Modifier and Type | Method and Description |
|---|---|
void |
generateLinkFMs(OVXFlowMod fm,
Integer flowId)
Push the flow mod to all the intermediate switches of the virtual link.
|
RoutingAlgorithms |
getAlg()
Gets the routing algorithm.
|
Map<String,Object> |
getDBIndex() |
String |
getDBKey() |
String |
getDBName() |
Map<String,Object> |
getDBObject() |
Integer |
getLinkId()
Gets the unique link id.
|
byte |
getPriority()
Gets the priority value.
|
Integer |
getTenantId()
Gets the tenant id.
|
void |
register(List<PhysicalLink> physicalLinks,
byte priority)
Register mapping between virtual link and physical path.
|
void |
setAlg(RoutingAlgorithms alg)
Sets the routing algorithm.
|
void |
setPriority(byte priority)
Sets the priority value.
|
void |
switchPath(List<PhysicalLink> physicalLinks,
byte priority)
Switch the link to the given path and priority.
|
void |
tearDown()
Disables the virtual link by disabling its end points.
|
boolean |
tryRecovery(PhysicalLink plink)
Tries to switch link to a backup path, and updates mappings to "correct"
string of PhysicalLinks to use for this link.
|
boolean |
tryRevert(PhysicalLink plink)
Attempts to switch this link back to the original path.
|
void |
unregister()
Removes mappings and dependencies related to this link.
|
equals, getDstPort, getDstSwitch, getMetric, getSrcPort, getSrcSwitch, hashCode, toStringpublic OVXLink(Integer linkId, Integer tenantId, OVXPort srcPort, OVXPort dstPort, RoutingAlgorithms alg) throws PortMappingException
linkId - the unique link idtenantId - the tenant idsrcPort - virtual source portdstPort - virtual destination portalg - routing algorithm for the virtual linkPortMappingException - if one of the ports is invalidpublic Integer getLinkId()
public Integer getTenantId()
public byte getPriority()
public void setPriority(byte priority)
priority - the priority valuepublic RoutingAlgorithms getAlg()
public void setAlg(RoutingAlgorithms alg)
alg - the algorithmpublic void register(List<PhysicalLink> physicalLinks, byte priority)
physicalLinks - the path as a list of physical linkspriority - the priority valuepublic void unregister()
Linkunregister in class Link<OVXPort,OVXSwitch>public void tearDown()
public void switchPath(List<PhysicalLink> physicalLinks, byte priority)
physicalLinks - the path as a list of physical linkspriority - the priority valuepublic Map<String,Object> getDBIndex()
getDBIndex in interface PersistablegetDBIndex in class Link<OVXPort,OVXSwitch>public String getDBKey()
public String getDBName()
public Map<String,Object> getDBObject()
getDBObject in interface PersistablegetDBObject in class Link<OVXPort,OVXSwitch>public void generateLinkFMs(OVXFlowMod fm, Integer flowId)
fm - the original flow modflowId - the flow identifierpublic boolean tryRecovery(PhysicalLink plink)
plink - the failed PhysicalLinkpublic boolean tryRevert(PhysicalLink plink)
plink - the restored physical linkCopyright © 2015. All rights reserved.