blob: ca34e10901f82530c0b9b5e66da2c1cce39fa8ec [file] [log] [blame]
alshabibe27055b2015-07-09 21:43:10 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
alshabibe27055b2015-07-09 21:43:10 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.provider.of.meter.impl;
18
alshabib1d2bc402015-07-31 17:04:11 -070019
alshabibc7911792015-07-30 17:55:30 -070020import com.google.common.cache.Cache;
21import com.google.common.cache.CacheBuilder;
22import com.google.common.cache.RemovalCause;
23import com.google.common.cache.RemovalNotification;
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -080024import com.google.common.collect.ImmutableSet;
alshabibc7911792015-07-30 17:55:30 -070025import com.google.common.collect.Maps;
Ray Milkeyd84f89b2018-08-17 14:54:17 -070026import org.osgi.service.component.annotations.Activate;
27import org.osgi.service.component.annotations.Component;
28import org.osgi.service.component.annotations.Deactivate;
29import org.osgi.service.component.annotations.Reference;
30import org.osgi.service.component.annotations.ReferenceCardinality;
Charles Chanb9cfc3a2017-08-04 17:50:21 -070031import org.onlab.util.ItemNotFoundException;
alshabib7bb05012015-08-05 10:15:09 -070032import org.onosproject.core.CoreService;
Charles Chana59f9b762017-07-30 18:09:44 -070033import org.onosproject.net.driver.Driver;
34import org.onosproject.net.driver.DriverService;
alshabib10c810b2015-08-18 16:59:04 -070035import org.onosproject.net.meter.Band;
36import org.onosproject.net.meter.DefaultBand;
37import org.onosproject.net.meter.DefaultMeter;
38import org.onosproject.net.meter.Meter;
39import org.onosproject.net.meter.MeterFailReason;
Jordi Ortizaa8de492016-12-01 00:21:36 +010040import org.onosproject.net.meter.MeterFeatures;
alshabib58fe6dc2015-08-19 17:16:13 -070041import org.onosproject.net.meter.MeterId;
alshabib10c810b2015-08-18 16:59:04 -070042import org.onosproject.net.meter.MeterOperation;
43import org.onosproject.net.meter.MeterOperations;
44import org.onosproject.net.meter.MeterProvider;
45import org.onosproject.net.meter.MeterProviderRegistry;
46import org.onosproject.net.meter.MeterProviderService;
47import org.onosproject.net.meter.MeterState;
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -080048import org.onosproject.net.Device;
alshabib7bb05012015-08-05 10:15:09 -070049import org.onosproject.net.DeviceId;
alshabibe27055b2015-07-09 21:43:10 -070050import org.onosproject.net.provider.AbstractProvider;
51import org.onosproject.net.provider.ProviderId;
alshabibc7911792015-07-30 17:55:30 -070052import org.onosproject.openflow.controller.Dpid;
alshabibe27055b2015-07-09 21:43:10 -070053import org.onosproject.openflow.controller.OpenFlowController;
alshabibc7911792015-07-30 17:55:30 -070054import org.onosproject.openflow.controller.OpenFlowEventListener;
55import org.onosproject.openflow.controller.OpenFlowSwitch;
56import org.onosproject.openflow.controller.OpenFlowSwitchListener;
57import org.onosproject.openflow.controller.RoleState;
Jordi Ortizaa8de492016-12-01 00:21:36 +010058import org.onosproject.provider.of.meter.util.MeterFeaturesBuilder;
alshabibc7911792015-07-30 17:55:30 -070059import org.projectfloodlight.openflow.protocol.OFErrorMsg;
60import org.projectfloodlight.openflow.protocol.OFErrorType;
61import org.projectfloodlight.openflow.protocol.OFMessage;
alshabib7bb05012015-08-05 10:15:09 -070062import org.projectfloodlight.openflow.protocol.OFMeterBandStats;
63import org.projectfloodlight.openflow.protocol.OFMeterConfigStatsReply;
Jordi Ortizaa8de492016-12-01 00:21:36 +010064import org.projectfloodlight.openflow.protocol.OFMeterFeatures;
alshabib7bb05012015-08-05 10:15:09 -070065import org.projectfloodlight.openflow.protocol.OFMeterStats;
66import org.projectfloodlight.openflow.protocol.OFMeterStatsReply;
alshabibc7911792015-07-30 17:55:30 -070067import org.projectfloodlight.openflow.protocol.OFPortStatus;
68import org.projectfloodlight.openflow.protocol.OFStatsReply;
alshabib7bb05012015-08-05 10:15:09 -070069import org.projectfloodlight.openflow.protocol.OFStatsType;
alshabibc7911792015-07-30 17:55:30 -070070import org.projectfloodlight.openflow.protocol.OFVersion;
71import org.projectfloodlight.openflow.protocol.errormsg.OFMeterModFailedErrorMsg;
alshabibe27055b2015-07-09 21:43:10 -070072import org.slf4j.Logger;
73
alshabib7bb05012015-08-05 10:15:09 -070074import java.util.Collection;
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -080075import java.util.EnumSet;
alshabib7bb05012015-08-05 10:15:09 -070076import java.util.List;
alshabibc7911792015-07-30 17:55:30 -070077import java.util.Map;
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -080078import java.util.Set;
alshabibc7911792015-07-30 17:55:30 -070079import java.util.concurrent.TimeUnit;
80import java.util.concurrent.atomic.AtomicLong;
alshabib7bb05012015-08-05 10:15:09 -070081import java.util.stream.Collectors;
alshabibc7911792015-07-30 17:55:30 -070082
Jordi Ortizaa8de492016-12-01 00:21:36 +010083import static org.onosproject.net.DeviceId.deviceId;
84import static org.onosproject.openflow.controller.Dpid.uri;
alshabibe27055b2015-07-09 21:43:10 -070085import static org.slf4j.LoggerFactory.getLogger;
86
87/**
88 * Provider which uses an OpenFlow controller to handle meters.
89 */
alshabib58fe6dc2015-08-19 17:16:13 -070090@Component(immediate = true, enabled = true)
alshabibe27055b2015-07-09 21:43:10 -070091public class OpenFlowMeterProvider extends AbstractProvider implements MeterProvider {
92
93 private final Logger log = getLogger(getClass());
94
Ray Milkeyd84f89b2018-08-17 14:54:17 -070095 @Reference(cardinality = ReferenceCardinality.MANDATORY)
alshabibe27055b2015-07-09 21:43:10 -070096 protected OpenFlowController controller;
97
Ray Milkeyd84f89b2018-08-17 14:54:17 -070098 @Reference(cardinality = ReferenceCardinality.MANDATORY)
alshabibc7911792015-07-30 17:55:30 -070099 protected MeterProviderRegistry providerRegistry;
100
Ray Milkeyd84f89b2018-08-17 14:54:17 -0700101 @Reference(cardinality = ReferenceCardinality.MANDATORY)
alshabib7bb05012015-08-05 10:15:09 -0700102 protected CoreService coreService;
103
Ray Milkeyd84f89b2018-08-17 14:54:17 -0700104 @Reference(cardinality = ReferenceCardinality.MANDATORY)
Charles Chana59f9b762017-07-30 18:09:44 -0700105 protected DriverService driverService;
106
alshabibc7911792015-07-30 17:55:30 -0700107 private MeterProviderService providerService;
108
109 private static final AtomicLong XID_COUNTER = new AtomicLong(1);
110
111 static final int POLL_INTERVAL = 10;
112 static final long TIMEOUT = 30;
113
alshabib7bb05012015-08-05 10:15:09 -0700114 private Cache<Long, MeterOperation> pendingOperations;
alshabibc7911792015-07-30 17:55:30 -0700115
116
117 private InternalMeterListener listener = new InternalMeterListener();
118 private Map<Dpid, MeterStatsCollector> collectors = Maps.newHashMap();
alshabibe27055b2015-07-09 21:43:10 -0700119
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -0800120 private static final Set<Device.Type> NO_METER_SUPPORT =
121 ImmutableSet.copyOf(EnumSet.of(Device.Type.ROADM,
122 Device.Type.ROADM_OTN,
123 Device.Type.FIBER_SWITCH,
Andrea Campanella1c24fb92018-12-20 16:43:59 +0100124 Device.Type.OTN,
125 Device.Type.OLS,
126 Device.Type.TERMINAL_DEVICE));
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -0800127
alshabibe27055b2015-07-09 21:43:10 -0700128 /**
129 * Creates a OpenFlow meter provider.
130 */
131 public OpenFlowMeterProvider() {
132 super(new ProviderId("of", "org.onosproject.provider.meter"));
133 }
alshabibbc371962015-07-09 22:26:21 -0700134
alshabibc7911792015-07-30 17:55:30 -0700135 @Activate
136 public void activate() {
137 providerService = providerRegistry.register(this);
138
139 pendingOperations = CacheBuilder.newBuilder()
140 .expireAfterWrite(TIMEOUT, TimeUnit.SECONDS)
alshabib7bb05012015-08-05 10:15:09 -0700141 .removalListener((RemovalNotification<Long, MeterOperation> notification) -> {
alshabibc7911792015-07-30 17:55:30 -0700142 if (notification.getCause() == RemovalCause.EXPIRED) {
143 providerService.meterOperationFailed(notification.getValue(),
144 MeterFailReason.TIMEOUT);
145 }
146 }).build();
147
148 controller.addEventListener(listener);
149 controller.addListener(listener);
150
151 controller.getSwitches().forEach((sw -> createStatsCollection(sw)));
152 }
153
154 @Deactivate
155 public void deactivate() {
156 providerRegistry.unregister(this);
Charles Chanecfdfb72015-11-24 19:05:50 -0800157 collectors.values().forEach(MeterStatsCollector::stop);
158 collectors.clear();
alshabibc7911792015-07-30 17:55:30 -0700159 controller.removeEventListener(listener);
160 controller.removeListener(listener);
161 providerService = null;
162 }
163
alshabibbc371962015-07-09 22:26:21 -0700164 @Override
165 public void performMeterOperation(DeviceId deviceId, MeterOperations meterOps) {
alshabibc7911792015-07-30 17:55:30 -0700166 Dpid dpid = Dpid.dpid(deviceId.uri());
167 OpenFlowSwitch sw = controller.getSwitch(dpid);
168 if (sw == null) {
169 log.error("Unknown device {}", deviceId);
170 meterOps.operations().forEach(op ->
171 providerService.meterOperationFailed(op,
172 MeterFailReason.UNKNOWN_DEVICE)
173 );
174 return;
175 }
alshabibbc371962015-07-09 22:26:21 -0700176
alshabibc7911792015-07-30 17:55:30 -0700177 meterOps.operations().forEach(op -> performOperation(sw, op));
alshabibbc371962015-07-09 22:26:21 -0700178 }
179
180 @Override
181 public void performMeterOperation(DeviceId deviceId, MeterOperation meterOp) {
alshabibc7911792015-07-30 17:55:30 -0700182 Dpid dpid = Dpid.dpid(deviceId.uri());
183 OpenFlowSwitch sw = controller.getSwitch(dpid);
184 if (sw == null) {
185 log.error("Unknown device {}", deviceId);
186 providerService.meterOperationFailed(meterOp,
187 MeterFailReason.UNKNOWN_DEVICE);
188 return;
189 }
alshabibbc371962015-07-09 22:26:21 -0700190
alshabib7bb05012015-08-05 10:15:09 -0700191 performOperation(sw, meterOp);
192
Jordi Ortiz9fe79a22017-04-25 12:57:11 +0200193 if (meterOp.type().equals(MeterOperation.Type.REMOVE)) {
194 forceMeterStats(deviceId);
195 }
196
197 }
198
199 private void forceMeterStats(DeviceId deviceId) {
200 Dpid dpid = Dpid.dpid(deviceId.uri());
201 OpenFlowSwitch sw = controller.getSwitch(dpid);
202
203 MeterStatsCollector once = new MeterStatsCollector(sw, 1);
Palash Kalaf95c38b2017-05-15 23:52:48 +0900204 once.sendMeterStatisticRequest();
Jordi Ortiz9fe79a22017-04-25 12:57:11 +0200205
alshabibbc371962015-07-09 22:26:21 -0700206 }
alshabibc7911792015-07-30 17:55:30 -0700207
208 private void performOperation(OpenFlowSwitch sw, MeterOperation op) {
209
210 pendingOperations.put(op.meter().id().id(), op);
211
212
213 Meter meter = op.meter();
214 MeterModBuilder builder = MeterModBuilder.builder(meter.id().id(), sw.factory());
215 if (meter.isBurst()) {
216 builder.burst();
217 }
218 builder.withBands(meter.bands())
219 .withId(meter.id())
220 .withRateUnit(meter.unit());
221
222 switch (op.type()) {
223 case ADD:
224 sw.sendMsg(builder.add());
225 break;
226 case REMOVE:
227 sw.sendMsg(builder.remove());
228 break;
229 case MODIFY:
230 sw.sendMsg(builder.modify());
231 break;
232 default:
233 log.warn("Unknown Meter command {}; not sending anything",
234 op.type());
235 providerService.meterOperationFailed(op,
236 MeterFailReason.UNKNOWN_COMMAND);
237 }
238
239 }
240
241 private void createStatsCollection(OpenFlowSwitch sw) {
Madan Jampani84382b92016-06-22 08:26:49 -0700242 if (sw != null && isMeterSupported(sw)) {
alshabibc7911792015-07-30 17:55:30 -0700243 MeterStatsCollector msc = new MeterStatsCollector(sw, POLL_INTERVAL);
Thomas Vachuskaa394b952016-06-14 15:02:09 -0700244 stopCollectorIfNeeded(collectors.put(new Dpid(sw.getId()), msc));
Palash Kalaa439afe2017-05-16 14:53:15 +0900245 msc.start();
Thomas Vachuskaa394b952016-06-14 15:02:09 -0700246 }
247 }
248
249 private void stopCollectorIfNeeded(MeterStatsCollector collector) {
250 if (collector != null) {
251 collector.stop();
alshabibc7911792015-07-30 17:55:30 -0700252 }
253 }
254
Charles Chan14967c22015-12-07 11:11:50 -0800255 // TODO: ONOS-3546 Support per device enabling/disabling via network config
alshabibc7911792015-07-30 17:55:30 -0700256 private boolean isMeterSupported(OpenFlowSwitch sw) {
257 if (sw.factory().getVersion() == OFVersion.OF_10 ||
258 sw.factory().getVersion() == OFVersion.OF_11 ||
Charles Chan14967c22015-12-07 11:11:50 -0800259 sw.factory().getVersion() == OFVersion.OF_12 ||
Yuta HIGUCHI67f2cca2017-01-19 19:31:58 -0800260 NO_METER_SUPPORT.contains(sw.deviceType()) ||
Charles Chana59f9b762017-07-30 18:09:44 -0700261 !isMeterCapable(sw)) {
sdn77b5cb82018-05-23 18:51:27 +0900262 log.debug("{} does not support Meter.\n", sw.getDpid());
alshabibc7911792015-07-30 17:55:30 -0700263 return false;
264 }
265
266 return true;
267 }
268
Charles Chana59f9b762017-07-30 18:09:44 -0700269 /**
270 * Determine whether the given switch is meter-capable.
271 *
272 * @param sw switch
273 * @return the boolean value of meterCapable property, or true if it is not configured.
274 */
275 private boolean isMeterCapable(OpenFlowSwitch sw) {
Charles Chanb9cfc3a2017-08-04 17:50:21 -0700276 Driver driver;
277
278 try {
279 driver = driverService.getDriver(DeviceId.deviceId(Dpid.uri(sw.getDpid())));
280 } catch (ItemNotFoundException e) {
281 driver = driverService.getDriver(sw.manufacturerDescription(), sw.hardwareDescription(),
282 sw.softwareDescription());
283 }
284
Charles Chana59f9b762017-07-30 18:09:44 -0700285 String isMeterCapable = driver.getProperty(METER_CAPABLE);
286 return isMeterCapable == null || Boolean.parseBoolean(isMeterCapable);
287 }
288
alshabibc7911792015-07-30 17:55:30 -0700289 private void pushMeterStats(Dpid dpid, OFStatsReply msg) {
alshabib7bb05012015-08-05 10:15:09 -0700290 DeviceId deviceId = DeviceId.deviceId(Dpid.uri(dpid));
alshabibc7911792015-07-30 17:55:30 -0700291
alshabib7bb05012015-08-05 10:15:09 -0700292 if (msg.getStatsType() == OFStatsType.METER) {
293 OFMeterStatsReply reply = (OFMeterStatsReply) msg;
294 Collection<Meter> meters = buildMeters(deviceId, reply.getEntries());
295 //TODO do meter accounting here.
296 providerService.pushMeterMetrics(deviceId, meters);
297 } else if (msg.getStatsType() == OFStatsType.METER_CONFIG) {
298 OFMeterConfigStatsReply reply = (OFMeterConfigStatsReply) msg;
299 // FIXME: Map<Long, Meter> meters = collectMeters(deviceId, reply);
300 }
301
302 }
303
Jordi Ortizaa8de492016-12-01 00:21:36 +0100304 private MeterFeatures buildMeterFeatures(Dpid dpid, OFMeterFeatures mf) {
305 if (mf != null) {
306 return new MeterFeaturesBuilder(mf, deviceId(uri(dpid)))
307 .build();
308 } else {
309 // This will usually happen for OpenFlow devices prior to 1.3
310 return MeterFeaturesBuilder.noMeterFeatures(deviceId(uri(dpid)));
311 }
312 }
313
314 private void pushMeterFeatures(Dpid dpid, OFMeterFeatures meterFeatures) {
315 providerService.pushMeterFeatures(deviceId(uri(dpid)),
316 buildMeterFeatures(dpid, meterFeatures));
317 }
318
319 private void destroyMeterFeatures(Dpid dpid) {
320 providerService.deleteMeterFeatures(deviceId(uri(dpid)));
321 }
322
alshabib7bb05012015-08-05 10:15:09 -0700323 private Map<Long, Meter> collectMeters(DeviceId deviceId,
324 OFMeterConfigStatsReply reply) {
325 return Maps.newHashMap();
326 //TODO: Needs a fix to be applied to loxi MeterConfig stat is incorrect
327 }
328
329 private Collection<Meter> buildMeters(DeviceId deviceId,
330 List<OFMeterStats> entries) {
331 return entries.stream().map(stat -> {
332 DefaultMeter.Builder builder = DefaultMeter.builder();
333 Collection<Band> bands = buildBands(stat.getBandStats());
334 builder.forDevice(deviceId)
alshabib58fe6dc2015-08-19 17:16:13 -0700335 .withId(MeterId.meterId(stat.getMeterId()))
alshabib7bb05012015-08-05 10:15:09 -0700336 //FIXME: need to encode appId in meter id, but that makes
337 // things a little annoying for debugging
338 .fromApp(coreService.getAppId("org.onosproject.core"))
339 .withBands(bands);
340 DefaultMeter meter = builder.build();
341 meter.setState(MeterState.ADDED);
342 meter.setLife(stat.getDurationSec());
343 meter.setProcessedBytes(stat.getByteInCount().getValue());
344 meter.setProcessedPackets(stat.getPacketInCount().getValue());
Cem Türker3baff672017-10-12 15:09:01 +0300345 if (stat.getVersion().getWireVersion() < OFVersion.OF_15.getWireVersion()) {
346 meter.setReferenceCount(stat.getFlowCount());
347 }
alshabib7bb05012015-08-05 10:15:09 -0700348 // marks the meter as seen on the dataplane
349 pendingOperations.invalidate(stat.getMeterId());
350 return meter;
351 }).collect(Collectors.toSet());
352 }
353
354 private Collection<Band> buildBands(List<OFMeterBandStats> bandStats) {
355 return bandStats.stream().map(stat -> {
Jordi Ortizaf75c132017-06-22 16:06:36 +0200356 DefaultBand band = ((DefaultBand.Builder) DefaultBand.builder().ofType(DefaultBand.Type.DROP)).build();
alshabib7bb05012015-08-05 10:15:09 -0700357 band.setBytes(stat.getByteBandCount().getValue());
358 band.setPackets(stat.getPacketBandCount().getValue());
359 return band;
Jordi Ortizaf75c132017-06-22 16:06:36 +0200360 }).collect(Collectors.toList());
alshabibc7911792015-07-30 17:55:30 -0700361 }
362
363 private void signalMeterError(OFMeterModFailedErrorMsg meterError,
364 MeterOperation op) {
365 switch (meterError.getCode()) {
366 case UNKNOWN:
367 providerService.meterOperationFailed(op,
368 MeterFailReason.UNKNOWN_DEVICE);
369 break;
370 case METER_EXISTS:
371 providerService.meterOperationFailed(op,
372 MeterFailReason.EXISTING_METER);
373 break;
374 case INVALID_METER:
375 providerService.meterOperationFailed(op,
376 MeterFailReason.INVALID_METER);
377 break;
378 case UNKNOWN_METER:
379 providerService.meterOperationFailed(op,
380 MeterFailReason.UNKNOWN);
381 break;
382 case BAD_COMMAND:
383 providerService.meterOperationFailed(op,
384 MeterFailReason.UNKNOWN_COMMAND);
385 break;
386 case BAD_FLAGS:
387 providerService.meterOperationFailed(op,
388 MeterFailReason.UNKNOWN_FLAGS);
389 break;
390 case BAD_RATE:
391 providerService.meterOperationFailed(op,
392 MeterFailReason.BAD_RATE);
393 break;
394 case BAD_BURST:
395 providerService.meterOperationFailed(op,
396 MeterFailReason.BAD_BURST);
397 break;
398 case BAD_BAND:
399 providerService.meterOperationFailed(op,
400 MeterFailReason.BAD_BAND);
401 break;
402 case BAD_BAND_VALUE:
403 providerService.meterOperationFailed(op,
404 MeterFailReason.BAD_BAND_VALUE);
405 break;
406 case OUT_OF_METERS:
407 providerService.meterOperationFailed(op,
408 MeterFailReason.OUT_OF_METERS);
409 break;
410 case OUT_OF_BANDS:
411 providerService.meterOperationFailed(op,
412 MeterFailReason.OUT_OF_BANDS);
413 break;
414 default:
415 providerService.meterOperationFailed(op,
416 MeterFailReason.UNKNOWN);
417 }
418 }
419
420 private class InternalMeterListener
421 implements OpenFlowSwitchListener, OpenFlowEventListener {
422 @Override
423 public void handleMessage(Dpid dpid, OFMessage msg) {
424 switch (msg.getType()) {
425 case STATS_REPLY:
426 pushMeterStats(dpid, (OFStatsReply) msg);
427 break;
428 case ERROR:
429 OFErrorMsg error = (OFErrorMsg) msg;
430 if (error.getErrType() == OFErrorType.METER_MOD_FAILED) {
431 MeterOperation op =
432 pendingOperations.getIfPresent(error.getXid());
433 pendingOperations.invalidate(error.getXid());
434 if (op == null) {
435 log.warn("Unknown Meter operation failed {}", error);
436 } else {
437 OFMeterModFailedErrorMsg meterError =
438 (OFMeterModFailedErrorMsg) error;
439 signalMeterError(meterError, op);
440 }
441 }
442 break;
443 default:
444 break;
445 }
446
447 }
448
449 @Override
450 public void switchAdded(Dpid dpid) {
451 createStatsCollection(controller.getSwitch(dpid));
Jordi Ortizaa8de492016-12-01 00:21:36 +0100452 pushMeterFeatures(dpid, controller.getSwitch(dpid).getMeterFeatures());
alshabibc7911792015-07-30 17:55:30 -0700453 }
454
455 @Override
456 public void switchRemoved(Dpid dpid) {
Thomas Vachuskaa394b952016-06-14 15:02:09 -0700457 stopCollectorIfNeeded(collectors.remove(dpid));
Jordi Ortizaa8de492016-12-01 00:21:36 +0100458 destroyMeterFeatures(dpid);
alshabibc7911792015-07-30 17:55:30 -0700459 }
460
461 @Override
462 public void switchChanged(Dpid dpid) {
463
464 }
465
466 @Override
467 public void portChanged(Dpid dpid, OFPortStatus status) {
468
469 }
470
471 @Override
472 public void receivedRoleReply(Dpid dpid, RoleState requested, RoleState response) {
473
474 }
475 }
476
477
478
alshabibe27055b2015-07-09 21:43:10 -0700479}