use of org.onosproject.openflow.controller.Dpid in project onos by opennetworkinglab.
the class OpenFlowMeterProvider method performMeterOperation.
@Override
public void performMeterOperation(DeviceId deviceId, MeterOperation meterOp) {
Dpid dpid = Dpid.dpid(deviceId.uri());
OpenFlowSwitch sw = controller.getSwitch(dpid);
if (sw == null) {
log.error("Unknown device {}", deviceId);
providerService.meterOperationFailed(meterOp, MeterFailReason.UNKNOWN_DEVICE);
return;
}
performOperation(sw, meterOp);
if (forceStatsAfterMeterRemoval && meterOp.type().equals(MeterOperation.Type.REMOVE)) {
forceMeterStats(deviceId);
}
}
use of org.onosproject.openflow.controller.Dpid in project onos by opennetworkinglab.
the class OpenFlowLambdaQuery method getPortDescs.
private List<OFPortDesc> getPortDescs() {
final Dpid dpid = dpid(handler().data().deviceId().uri());
OpenFlowSwitch sw = handler().get(OpenFlowController.class).getSwitch(dpid);
return sw.getPorts();
}
Aggregations