alshabib | f1216ed | 2014-09-03 11:53:54 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.of.drivers.impl; |
alshabib | d777b20 | 2014-08-28 17:52:55 -0700 | [diff] [blame] | 2 | |
alshabib | 6171f18 | 2014-09-02 19:00:32 -0700 | [diff] [blame] | 3 | import java.util.List; |
| 4 | |
alshabib | d777b20 | 2014-08-28 17:52:55 -0700 | [diff] [blame] | 5 | import org.onlab.onos.of.controller.Dpid; |
alshabib | 6171f18 | 2014-09-02 19:00:32 -0700 | [diff] [blame] | 6 | import org.onlab.onos.of.controller.driver.AbstractOpenFlowSwitch; |
alshabib | d777b20 | 2014-08-28 17:52:55 -0700 | [diff] [blame] | 7 | import org.projectfloodlight.openflow.protocol.OFDescStatsReply; |
| 8 | import org.projectfloodlight.openflow.protocol.OFMessage; |
| 9 | |
| 10 | /** |
| 11 | * OFDescriptionStatistics Vendor (Manufacturer Desc.): Nicira, Inc. Make |
| 12 | * (Hardware Desc.) : Open vSwitch Model (Datapath Desc.) : None Software : |
| 13 | * 1.11.90 (or whatever version + build) Serial : None |
| 14 | */ |
| 15 | public class OFSwitchImplOVS10 extends AbstractOpenFlowSwitch { |
| 16 | |
| 17 | public OFSwitchImplOVS10(Dpid dpid, OFDescStatsReply desc) { |
| 18 | super(dpid); |
| 19 | setSwitchDescription(desc); |
| 20 | |
| 21 | } |
| 22 | |
| 23 | /* (non-Javadoc) |
| 24 | * @see java.lang.Object#toString() |
| 25 | */ |
| 26 | @Override |
| 27 | public String toString() { |
| 28 | return "OFSwitchImplOVS10 [" + ((channel != null) |
| 29 | ? channel.getRemoteAddress() : "?") |
| 30 | + " DPID[" + ((getStringId() != null) ? getStringId() : "?") + "]]"; |
| 31 | } |
| 32 | |
| 33 | @Override |
alshabib | d777b20 | 2014-08-28 17:52:55 -0700 | [diff] [blame] | 34 | public Boolean supportNxRole() { |
| 35 | return true; |
| 36 | } |
| 37 | |
| 38 | @Override |
| 39 | public void startDriverHandshake() {} |
| 40 | |
| 41 | @Override |
| 42 | public boolean isDriverHandshakeComplete() { |
| 43 | return true; |
| 44 | } |
| 45 | |
| 46 | @Override |
| 47 | public void processDriverHandshakeMessage(OFMessage m) {} |
alshabib | 6171f18 | 2014-09-02 19:00:32 -0700 | [diff] [blame] | 48 | |
| 49 | @Override |
| 50 | public void write(OFMessage msg) { |
| 51 | channel.write(msg); |
| 52 | |
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | public void write(List<OFMessage> msgs) { |
| 57 | channel.write(msgs); |
| 58 | } |
alshabib | d777b20 | 2014-08-28 17:52:55 -0700 | [diff] [blame] | 59 | } |