public class PhysicalSwitch extends Switch<PhysicalPort>
channel, DB_KEY, desc, featuresReply, isConnected, map, portMap, switchId, switchName
Constructor and Description |
---|
PhysicalSwitch(long switchId)
Instantiates a new physical switch.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addPort(PhysicalPort port)
Adds the port.
|
boolean |
boot()
Starts up the switch.
|
void |
cleanUpTenant(Integer tenantId,
Short port) |
boolean |
equals(Object other) |
protected void |
fillPortMap()
Fill port map.
|
List<OVXFlowStatisticsReply> |
getFlowStats(int tid) |
Short |
getOVXPortNumber(Short physicalPortNumber,
Integer tenantId,
Integer vLinkId)
Gets the OVX port number.
|
PhysicalPort |
getPort(Short portNumber)
Gets the port.
|
OVXPortStatisticsReply |
getPortStat(short portNumber) |
void |
handleIO(OFMessage msg,
org.jboss.netty.channel.Channel channel) |
void |
handleRoleIO(OFVendor msg,
org.jboss.netty.channel.Channel channel) |
void |
removeChannel(org.jboss.netty.channel.Channel channel) |
void |
removeFlowMods(OVXStatisticsReply msg) |
boolean |
removePort(PhysicalPort port)
Removes the specified port from this PhysicalSwitch.
|
void |
sendMsg(OFMessage msg,
OVXSendMsg from) |
void |
setFlowStatistics(Map<Integer,List<OVXFlowStatisticsReply>> stats) |
void |
setPortStatistics(Map<Short,OVXPortStatisticsReply> stats) |
void |
tearDown()
Tear down.
|
String |
toString() |
int |
translate(OFMessage ofm,
OVXSwitch sw) |
void |
unregister()
Removes this PhysicalSwitch from the network.
|
XidPair<OVXSwitch> |
untranslate(OFMessage ofm) |
getFeaturesReply, getMap, getName, getPorts, getSwitchId, getSwitchName, removePort, setChannel, setConnected, setDescriptionStats, setFeaturesReply
public PhysicalSwitch(long switchId)
switchId
- the switch idpublic Short getOVXPortNumber(Short physicalPortNumber, Integer tenantId, Integer vLinkId)
physicalPortNumber
- the physical port numbertenantId
- the tenant idvLinkId
- the virtual link IDpublic void handleIO(OFMessage msg, org.jboss.netty.channel.Channel channel)
handleIO
in interface OVXEventHandler
handleIO
in class Switch<PhysicalPort>
public void tearDown()
Switch
tearDown
in class Switch<PhysicalPort>
protected void fillPortMap()
public boolean addPort(PhysicalPort port)
Switch
addPort
in class Switch<PhysicalPort>
port
- the port instancepublic boolean removePort(PhysicalPort port)
port
- the physical port instancepublic boolean boot()
Switch
boot
in class Switch<PhysicalPort>
public void unregister()
unregister
in class Switch<PhysicalPort>
public void sendMsg(OFMessage msg, OVXSendMsg from)
public String toString()
toString
in class Switch<PhysicalPort>
public PhysicalPort getPort(Short portNumber)
getPort
in class Switch<PhysicalPort>
portNumber
- the port numberpublic void setPortStatistics(Map<Short,OVXPortStatisticsReply> stats)
public void setFlowStatistics(Map<Integer,List<OVXFlowStatisticsReply>> stats)
public List<OVXFlowStatisticsReply> getFlowStats(int tid)
public OVXPortStatisticsReply getPortStat(short portNumber)
public void removeFlowMods(OVXStatisticsReply msg)
public void handleRoleIO(OFVendor msg, org.jboss.netty.channel.Channel channel)
handleRoleIO
in class Switch<PhysicalPort>
public void removeChannel(org.jboss.netty.channel.Channel channel)
removeChannel
in class Switch<PhysicalPort>
Copyright © 2015. All rights reserved.