use of org.onosproject.net.driver.DriverHandler in project onos by opennetworkinglab.
the class OvsdbBridgeConfig method getPortNumbers.
@Override
public Set<PortNumber> getPortNumbers() {
DriverHandler handler = handler();
OvsdbClientService client = getOvsdbClientService(handler);
if (client == null) {
return Collections.emptySet();
}
Set<OvsdbPort> ports = client.getPorts();
return ports.stream().map(x -> PortNumber.portNumber(x.portNumber().value(), x.portName().value())).collect(Collectors.toSet());
}
use of org.onosproject.net.driver.DriverHandler in project onos by opennetworkinglab.
the class OvsdbMirroringConfig method getMirroringStatistics.
/**
* Returns a collection of MirroringStatistics.
*
* @return statistics collection
*/
@Override
public Collection<MirroringStatistics> getMirroringStatistics() {
DriverHandler handler = handler();
OvsdbClientService ovsdbClient = getOvsdbClientService(handler);
return ovsdbClient.getMirroringStatistics(handler.data().deviceId());
}
use of org.onosproject.net.driver.DriverHandler in project onos by opennetworkinglab.
the class OvsdbMirroringConfig method deleteMirroring.
/**
* Removes a mirroring.
*
* @param mirroringName mirroring name
*/
@Override
public void deleteMirroring(MirroringName mirroringName) {
DriverHandler handler = handler();
OvsdbClientService ovsdbClient = getOvsdbClientService(handler);
ovsdbClient.dropMirror(mirroringName);
}
use of org.onosproject.net.driver.DriverHandler in project onos by opennetworkinglab.
the class OFAgentVirtualFlowEntryBuilder method getDriver.
protected static DriverHandler getDriver(DeviceId devId, DriverService driverService) {
log.debug("calling getDriver for {}", devId);
Driver driver = driverService.getDriver(DRIVER_NAME);
DriverHandler handler = new DefaultDriverHandler(new DefaultDriverData(driver, devId));
return handler;
}
use of org.onosproject.net.driver.DriverHandler in project onos by opennetworkinglab.
the class OFAgentVirtualGroupBucketEntryBuilder method getDriver.
/**
* Retrieves the driver handler for the specified device.
*
* @param dpid datapath identifier
* @return driver handler
*/
protected DriverHandler getDriver(Dpid dpid) {
DeviceId devId = DeviceId.deviceId(Dpid.uri(dpid));
log.debug("running getDriver for {}", devId);
Driver driver = driverService.getDriver(DRIVER_NAME);
DriverHandler handler = new DefaultDriverHandler(new DefaultDriverData(driver, devId));
return handler;
}
Aggregations