public class OVXPort extends Port<OVXSwitch,OVXLink> implements Persistable
OFPhysicalPort.OFPortConfig, OFPhysicalPort.OFPortFeatures, OFPhysicalPort.OFPortState
DB_KEY, isEdge, mac, parentSwitch, portLink
advertisedFeatures, config, currentFeatures, hardwareAddress, MINIMUM_LENGTH, name, OFP_ETH_ALEN, peerFeatures, portNumber, state, supportedFeatures
Constructor and Description |
---|
OVXPort(int tenantId,
PhysicalPort port,
boolean isEdge) |
OVXPort(int tenantId,
PhysicalPort port,
boolean isEdge,
short portNumber) |
Modifier and Type | Method and Description |
---|---|
void |
applyPortStatus(OVXPortStatus portstat)
Changes the attribute of this port according to a MODIFY PortStatus.
|
void |
boot() |
boolean |
equals(Object obj) |
boolean |
equals(OVXPort port) |
Map<String,Object> |
getDBIndex() |
String |
getDBKey() |
String |
getDBName() |
Map<String,Object> |
getDBObject() |
PhysicalPort |
getPhysicalPort() |
Short |
getPhysicalPortNumber() |
Integer |
getTenantId() |
void |
handleLinkDisable(OVXPortStatus stat)
Disables a link for LINK_DOWN or DELETE PortStats.
|
void |
handlePortDelete(OVXPortStatus stat)
Deletes this port after removing any links mapped to this port.
|
void |
handlePortDisable(OVXPortStatus stat)
Checks if this port has associated OVXLink(s) and/or SwitchRoute(s) and
attempts to neatly disable them.
|
void |
handlePortEnable(OVXPortStatus stat)
Brings a disabled port and its links (by association up).
|
void |
handleRouteDisable(OVXPortStatus stat)
Removes SwitchRoutes from a BVS's routing table if the end points of the
route are deleted.
|
int |
hashCode() |
boolean |
isActive() |
boolean |
isLink() |
void |
register()
Registers a port in the virtual parent switch and in the physical port.
|
void |
sendStatusMsg(OFPortStatus.OFPortReason reason) |
void |
tearDown() |
String |
toString() |
void |
unMap()
Undoes mapping for this port from the OVXSwitch and PhysicalPort.
|
void |
unMapHost()
Removes a host from this port, if it's an edge.
|
void |
unregister() |
void |
virtualizePortStat(OVXPortStatus portstat)
Modifies the fields of a OVXPortStatus message so that it is consistent
with the configs of the corresponding OVXPort.
|
getCurrentThroughput, getLink, getParentSwitch, isEdge, setEdge, setHardwareAddress, setInLink, setOutLink, toDPIDandPort
getAdvertisedFeatures, getConfig, getCurrentFeatures, getHardwareAddress, getName, getPeerFeatures, getPortNumber, getState, getSupportedFeatures, readFrom, setAdvertisedFeatures, setConfig, setCurrentFeatures, setName, setPeerFeatures, setPortNumber, setState, setSupportedFeatures, writeTo
public OVXPort(int tenantId, PhysicalPort port, boolean isEdge, short portNumber) throws IndexOutOfBoundException
IndexOutOfBoundException
public OVXPort(int tenantId, PhysicalPort port, boolean isEdge) throws IndexOutOfBoundException
IndexOutOfBoundException
public Integer getTenantId()
public PhysicalPort getPhysicalPort()
public Short getPhysicalPortNumber()
public boolean isActive()
public boolean isLink()
public void sendStatusMsg(OFPortStatus.OFPortReason reason)
public void register()
public void virtualizePortStat(OVXPortStatus portstat)
portstat
- the virtual port statuspublic void applyPortStatus(OVXPortStatus portstat)
portstat
- the virtual port statuspublic void boot()
public void tearDown()
public void unregister()
public Map<String,Object> getDBIndex()
getDBIndex
in interface Persistable
getDBIndex
in class Port<OVXSwitch,OVXLink>
public String getDBKey()
public String getDBName()
public Map<String,Object> getDBObject()
getDBObject
in interface Persistable
getDBObject
in class Port<OVXSwitch,OVXLink>
public boolean equals(OVXPort port)
public void unMap()
public void unMapHost() throws NetworkMappingException
NetworkMappingException
public void handlePortDelete(OVXPortStatus stat) throws NetworkMappingException
stat
- PortStatus triggering port deletionNetworkMappingException
LinkMappingException
public void handlePortDisable(OVXPortStatus stat) throws NetworkMappingException
stat
- PortStatus triggering link downNetworkMappingException
public void handleLinkDisable(OVXPortStatus stat) throws NetworkMappingException
stat
- the port statusNetworkMappingException
public void handleRouteDisable(OVXPortStatus stat)
stat
- public void handlePortEnable(OVXPortStatus stat) throws NetworkMappingException
stat
- PortStatus indicating link upNetworkMappingException
Copyright © 2015. All rights reserved.