Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | /** |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 2 | * Copyright 2011, Big Switch Networks, Inc. |
| 3 | * Originally created by David Erickson, Stanford University |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 6 | * not use this file except in compliance with the License. You may obtain |
| 7 | * a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | * License for the specific language governing permissions and limitations |
| 15 | * under the License. |
| 16 | **/ |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 17 | |
| 18 | package net.floodlightcontroller.core.web; |
| 19 | |
Srikanth Vavilapalli | b725851 | 2014-09-29 13:24:11 -0700 | [diff] [blame] | 20 | import java.util.ArrayList; |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 21 | import java.util.List; |
| 22 | import java.util.concurrent.Future; |
| 23 | import java.util.concurrent.TimeUnit; |
| 24 | |
| 25 | import net.floodlightcontroller.core.IFloodlightProviderService; |
| 26 | import net.floodlightcontroller.core.IOFSwitch; |
| 27 | import net.floodlightcontroller.core.annotations.LogMessageDoc; |
Fahad Naeem Khan | d563af6 | 2014-10-08 17:37:25 -0700 | [diff] [blame] | 28 | import net.onrc.onos.core.drivermanager.OFSwitchImplCPqD13; |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 29 | |
| 30 | import org.projectfloodlight.openflow.protocol.OFFeaturesReply; |
Fahad Naeem Khan | d89448d | 2014-10-06 18:40:45 -0700 | [diff] [blame] | 31 | import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry; |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 32 | import org.projectfloodlight.openflow.protocol.OFGroupDescStatsEntry; |
| 33 | import org.projectfloodlight.openflow.protocol.OFGroupDescStatsReply; |
Fahad Naeem Khan | 8a8daf2 | 2014-10-06 14:07:43 -0700 | [diff] [blame] | 34 | import org.projectfloodlight.openflow.protocol.OFGroupStatsEntry; |
| 35 | import org.projectfloodlight.openflow.protocol.OFGroupStatsReply; |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 36 | import org.projectfloodlight.openflow.protocol.OFMatchV3; |
| 37 | import org.projectfloodlight.openflow.protocol.OFOxmList; |
Srikanth Vavilapalli | b725851 | 2014-09-29 13:24:11 -0700 | [diff] [blame] | 38 | import org.projectfloodlight.openflow.protocol.OFPortStatsEntry; |
Fahad Naeem Khan | d89448d | 2014-10-06 18:40:45 -0700 | [diff] [blame] | 39 | import org.projectfloodlight.openflow.protocol.OFFlowStatsReply; |
Srikanth Vavilapalli | b725851 | 2014-09-29 13:24:11 -0700 | [diff] [blame] | 40 | import org.projectfloodlight.openflow.protocol.OFPortStatsReply; |
| 41 | import org.projectfloodlight.openflow.protocol.OFPortStatsRequest; |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 42 | import org.projectfloodlight.openflow.protocol.OFStatsReply; |
| 43 | import org.projectfloodlight.openflow.protocol.OFStatsRequest; |
| 44 | import org.projectfloodlight.openflow.protocol.OFStatsType; |
| 45 | import org.projectfloodlight.openflow.types.OFPort; |
| 46 | import org.projectfloodlight.openflow.types.TableId; |
| 47 | import org.projectfloodlight.openflow.util.HexString; |
| 48 | import org.restlet.resource.ResourceException; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 49 | import org.restlet.resource.ServerResource; |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 50 | import org.slf4j.Logger; |
| 51 | import org.slf4j.LoggerFactory; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * Base class for server resources related to switches |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 55 | * |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 56 | * @author readams |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 57 | */ |
Ray Milkey | ff73514 | 2014-05-22 19:06:02 -0700 | [diff] [blame] | 58 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 59 | public class SwitchResourceBase extends ServerResource { |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 60 | protected final static Logger log = LoggerFactory.getLogger(SwitchResourceBase.class); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 61 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 62 | public enum REQUESTTYPE { |
| 63 | OFSTATS, |
| 64 | OFFEATURES |
| 65 | } |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 66 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 67 | @Override |
| 68 | protected void doInit() throws ResourceException { |
| 69 | super.doInit(); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 70 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 71 | } |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 72 | |
| 73 | @LogMessageDoc(level = "ERROR", |
| 74 | message = "Failure retrieving statistics from switch {switch}", |
| 75 | explanation = "An error occurred while retrieving statistics" + |
| 76 | "from the switch", |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 77 | recommendation = LogMessageDoc.CHECK_SWITCH + " " + |
| 78 | LogMessageDoc.GENERIC_ACTION) |
| 79 | |
| 80 | protected List<?> getSwitchStatistics(long switchId, |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 81 | OFStatsType statType) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 82 | IFloodlightProviderService floodlightProvider = |
| 83 | (IFloodlightProviderService) getContext().getAttributes(). |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 84 | get(IFloodlightProviderService.class.getCanonicalName()); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 85 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 86 | IOFSwitch sw = floodlightProvider.getSwitches().get(switchId); |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 87 | Future<List<OFStatsReply>> future; |
| 88 | List<OFStatsReply> values = null; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 89 | if (sw != null) { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 90 | OFStatsRequest<?> req = null; |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 91 | if (statType == OFStatsType.FLOW) { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 92 | log.debug("Switch Flow Stats req sent for switch {}", |
| 93 | sw.getStringId()); |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 94 | OFMatchV3 match = sw.getFactory().buildMatchV3() |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 95 | .setOxmList(OFOxmList.EMPTY).build(); |
| 96 | req = sw.getFactory() |
| 97 | .buildFlowStatsRequest() |
| 98 | .setMatch(match) |
| 99 | .setOutPort(OFPort.ANY) |
| 100 | .setTableId(TableId.ALL) |
| 101 | .setXid(sw.getNextTransactionId()).build(); |
Fahad Naeem Khan | d89448d | 2014-10-06 18:40:45 -0700 | [diff] [blame] | 102 | List<OFFlowStatsEntryMod> flowStats = new ArrayList<OFFlowStatsEntryMod>(); |
| 103 | try { |
| 104 | future = sw.getStatistics(req); |
| 105 | values = future.get(10, TimeUnit.SECONDS); |
Fahad Naeem Khan | d89448d | 2014-10-06 18:40:45 -0700 | [diff] [blame] | 106 | for (OFFlowStatsEntry entry : ((OFFlowStatsReply)values.get(0)).getEntries()) { |
| 107 | OFFlowStatsEntryMod entryMod = new OFFlowStatsEntryMod(entry); |
| 108 | flowStats.add(entryMod); |
| 109 | } |
| 110 | log.debug("Switch flow Stats Entries from switch {} are {}", |
| 111 | sw.getStringId(), flowStats); |
| 112 | } catch (Exception e) { |
| 113 | log.error("Failure retrieving statistics from switch " + sw, e); |
| 114 | } |
| 115 | return flowStats; |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 116 | } |
| 117 | else if (statType == OFStatsType.PORT){ |
| 118 | log.debug("Switch Port Stats: req sent for all " |
| 119 | + "ports in switch {}", sw.getStringId()); |
| 120 | List<OFPortStatsEntryMod> portStats = null; |
| 121 | req = sw.getFactory() |
| 122 | .buildPortStatsRequest() |
| 123 | .setPortNo(OFPort.ANY).setXid |
| 124 | (sw.getNextTransactionId()).build(); |
| 125 | try { |
| 126 | future = sw.getStatistics(req); |
| 127 | values = future.get(10, TimeUnit.SECONDS); |
| 128 | portStats = new ArrayList<OFPortStatsEntryMod>(); |
| 129 | for (OFPortStatsEntry entry : ((OFPortStatsReply)values.get(0)).getEntries()) { |
| 130 | OFPortStatsEntryMod entryMod = new OFPortStatsEntryMod(entry); |
| 131 | portStats.add(entryMod); |
| 132 | } |
| 133 | log.debug("Switch Port Stats Entries from switch {} are {}", |
| 134 | sw.getStringId(), portStats); |
| 135 | } catch (Exception e) { |
| 136 | log.error("Failure retrieving statistics from switch " + sw, e); |
| 137 | } |
| 138 | return portStats; |
| 139 | } |
| 140 | else if (statType == OFStatsType.GROUP){ |
| 141 | log.debug("Switch Group Stats: req sent for all " |
| 142 | + "ports in switch {}", sw.getStringId()); |
| 143 | req = sw.getFactory().buildGroupStatsRequest().setXid |
| 144 | (sw.getNextTransactionId()).build(); |
Fahad Naeem Khan | 8a8daf2 | 2014-10-06 14:07:43 -0700 | [diff] [blame] | 145 | List<OFGroupStatsEntryMod> groupStats = new ArrayList<OFGroupStatsEntryMod>(); |
| 146 | try { |
| 147 | future = sw.getStatistics(req); |
| 148 | values = future.get(10, TimeUnit.SECONDS); |
| 149 | for (OFGroupStatsEntry entry : ((OFGroupStatsReply)values.get(0)).getEntries()) { |
| 150 | OFGroupStatsEntryMod entryMod = new OFGroupStatsEntryMod(entry); |
| 151 | groupStats.add(entryMod); |
| 152 | } |
| 153 | log.debug("Switch Group Stats Entries from switch {} are {}", |
| 154 | sw.getStringId(), groupStats); |
| 155 | } catch (Exception e) { |
| 156 | log.error("Failure retrieving statistics from switch " + sw, e); |
| 157 | } |
| 158 | return groupStats; |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 159 | } |
| 160 | else if (statType == OFStatsType.GROUP_DESC){ |
| 161 | log.debug("Switch Group Desc Stats: req sent for all " |
| 162 | + "ports in switch {}", sw.getStringId()); |
| 163 | List<OFGroupDescStatsEntryMod> GroupDescStats= new ArrayList<OFGroupDescStatsEntryMod>(); |
| 164 | req = sw.getFactory().buildGroupDescStatsRequest().setXid |
| 165 | (sw.getNextTransactionId()).build(); |
| 166 | try { |
| 167 | future = sw.getStatistics(req); |
| 168 | values = future.get(10, TimeUnit.SECONDS); |
| 169 | for (OFGroupDescStatsEntry entry : ((OFGroupDescStatsReply)values.get(0)).getEntries()) { |
| 170 | OFGroupDescStatsEntryMod entryMod = new OFGroupDescStatsEntryMod(entry); |
| 171 | GroupDescStats.add(entryMod); |
| 172 | } |
| 173 | log.debug("Switch Group_Desc Stats Entries from switch {} are {}", |
| 174 | sw.getStringId(), GroupDescStats); |
| 175 | } catch (Exception e) { |
| 176 | log.error("Failure retrieving statistics from switch " + sw, e); |
| 177 | } |
| 178 | return GroupDescStats; |
| 179 | } |
| 180 | /*else if (statType == OFStatisticsType.AGGREGATE) { |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 181 | OFAggregateStatisticsRequest specificReq = new OFAggregateStatisticsRequest(); |
| 182 | OFMatch match = new OFMatch(); |
| 183 | match.setWildcards(0xffffffff); |
| 184 | specificReq.setMatch(match); |
| 185 | specificReq.setOutPort(OFPort.OFPP_NONE.getValue()); |
| 186 | specificReq.setTableId((byte) 0xff); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 187 | req.setStatistics(Collections.singletonList((OFStatistics) specificReq)); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 188 | requestLength += specificReq.getLength(); |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 189 | } /*else if (statType == OFStatisticsType.QUEUE) { |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 190 | OFQueueStatisticsRequest specificReq = new OFQueueStatisticsRequest(); |
Ray Milkey | ff73514 | 2014-05-22 19:06:02 -0700 | [diff] [blame] | 191 | specificReq.setPortNumber(OFPort.OFPP_ALL.getValue()); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 192 | // LOOK! openflowj does not define OFPQ_ALL! pulled this from openflow.h |
| 193 | // note that I haven't seen this work yet though... |
| 194 | specificReq.setQueueId(0xffffffff); |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 195 | req.setStatistics(Collections.singletonList((OFStatistics) specificReq)); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 196 | requestLength += specificReq.getLength(); |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 197 | } else if (statType == OFStatisticsType.DESC || |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 198 | statType == OFStatisticsType.TABLE) { |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 199 | // pass - nothing todo besides set the type above |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 200 | }*/ |
Brian O'Connor | c67f9fa | 2014-08-07 18:17:46 -0700 | [diff] [blame] | 201 | // XXX S fix when we fix stats |
Jonathan Hart | c78b8f6 | 2014-08-07 22:31:09 -0700 | [diff] [blame] | 202 | try { |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 203 | future = sw.getStatistics(req); |
| 204 | values = future.get(10, TimeUnit.SECONDS); |
| 205 | } catch (Exception e) { |
| 206 | log.error("Failure retrieving statistics from switch " + sw, e); |
Jonathan Hart | c78b8f6 | 2014-08-07 22:31:09 -0700 | [diff] [blame] | 207 | } |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 208 | } |
| 209 | return values; |
| 210 | } |
| 211 | |
Srikanth Vavilapalli | b725851 | 2014-09-29 13:24:11 -0700 | [diff] [blame] | 212 | protected Object getSwitchStatistics(String switchId, OFStatsType statType) { |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 213 | return getSwitchStatistics(HexString.toLong(switchId), statType); |
| 214 | } |
Fahad Naeem Khan | d563af6 | 2014-10-08 17:37:25 -0700 | [diff] [blame] | 215 | //TODO: Java doc |
| 216 | protected List<?> getSwitchStatisticsForTable(long switchId, |
| 217 | OFStatsType statType, String tableType) { |
| 218 | IFloodlightProviderService floodlightProvider = |
| 219 | (IFloodlightProviderService) getContext().getAttributes(). |
| 220 | get(IFloodlightProviderService.class.getCanonicalName()); |
| 221 | IOFSwitch sw = floodlightProvider.getSwitches().get(switchId); |
| 222 | Future<List<OFStatsReply>> future; |
| 223 | List<OFStatsReply> values = null; |
| 224 | //getting tableId from CPqD driver |
| 225 | TableId tableId; |
| 226 | if (sw != null) { |
| 227 | if((tableId = ((OFSwitchImplCPqD13) sw).getTableId(tableType)) == null){ |
| 228 | log.error("Invalid tableType {} " + tableType); |
| 229 | return null; |
| 230 | } |
| 231 | OFStatsRequest<?> req = null; |
| 232 | if (statType == OFStatsType.FLOW) { |
| 233 | log.debug("Switch Flow Stats req for table {} sent to switch {}", |
| 234 | tableType,sw.getStringId()); |
| 235 | OFMatchV3 match = sw.getFactory().buildMatchV3() |
| 236 | .setOxmList(OFOxmList.EMPTY).build(); |
| 237 | req = sw.getFactory() |
| 238 | .buildFlowStatsRequest() |
| 239 | .setMatch(match) |
| 240 | .setOutPort(OFPort.ANY) |
| 241 | .setTableId(tableId) |
| 242 | .setXid(sw.getNextTransactionId()).build(); |
| 243 | List<OFFlowStatsEntryMod> flowStats = new ArrayList<OFFlowStatsEntryMod>(); |
| 244 | try { |
| 245 | future = sw.getStatistics(req); |
| 246 | values = future.get(10, TimeUnit.SECONDS); |
| 247 | for (OFFlowStatsEntry entry : ((OFFlowStatsReply)values.get(0)).getEntries()) { |
| 248 | OFFlowStatsEntryMod entryMod = new OFFlowStatsEntryMod(entry); |
| 249 | flowStats.add(entryMod); |
| 250 | } |
| 251 | log.debug("Switch flow Stats Entries for table {} from switch {} are {}", |
| 252 | tableType, sw.getStringId(), flowStats); |
| 253 | } catch (Exception e) { |
| 254 | log.error("Failure retrieving per table statistics from switch " + sw, e); |
| 255 | } |
| 256 | return flowStats; |
| 257 | } |
| 258 | } |
| 259 | //should never get to this point |
| 260 | log.error("Failure retrieving {} table statistics from switch {}",tableType, sw); |
| 261 | return null; |
| 262 | } |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 263 | |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 264 | protected OFFeaturesReply getSwitchFeaturesReply(long switchId) { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 265 | IFloodlightProviderService floodlightProvider = |
| 266 | (IFloodlightProviderService) getContext().getAttributes(). |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 267 | get(IFloodlightProviderService.class.getCanonicalName()); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 268 | |
| 269 | IOFSwitch sw = floodlightProvider.getSwitches().get(switchId); |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 270 | //uture<OFFeaturesReply> future; |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 271 | OFFeaturesReply featuresReply = null; |
| 272 | if (sw != null) { |
Srikanth Vavilapalli | f25c7b0 | 2014-10-01 14:30:43 -0700 | [diff] [blame] | 273 | // XXX S fix when we fix stats |
Jonathan Hart | c78b8f6 | 2014-08-07 22:31:09 -0700 | [diff] [blame] | 274 | try { |
Fahad Naeem Khan | 9ae7fa1 | 2014-10-03 14:30:55 -0700 | [diff] [blame] | 275 | //future = sw.getFeaturesReplyFromSwitch(); |
| 276 | //featuresReply = future.get(10, TimeUnit.SECONDS); |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 277 | } catch (Exception e) { |
| 278 | log.error("Failure getting features reply from switch" + sw, e); |
Jonathan Hart | c78b8f6 | 2014-08-07 22:31:09 -0700 | [diff] [blame] | 279 | } |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 280 | } |
| 281 | |
| 282 | return featuresReply; |
| 283 | } |
| 284 | |
| 285 | protected OFFeaturesReply getSwitchFeaturesReply(String switchId) { |
| 286 | return getSwitchFeaturesReply(HexString.toLong(switchId)); |
Srikanth Vavilapalli | a0e6d58 | 2014-09-28 22:42:34 -0700 | [diff] [blame] | 287 | } |
Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 288 | |
| 289 | } |