Search in sources :

Example 21 with DefaultDriverData

use of org.onosproject.net.driver.DefaultDriverData 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;
}
Also used : DefaultDriverHandler(org.onosproject.net.driver.DefaultDriverHandler) DriverHandler(org.onosproject.net.driver.DriverHandler) DefaultDriverHandler(org.onosproject.net.driver.DefaultDriverHandler) Driver(org.onosproject.net.driver.Driver) DefaultDriverData(org.onosproject.net.driver.DefaultDriverData)

Example 22 with DefaultDriverData

use of org.onosproject.net.driver.DefaultDriverData 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;
}
Also used : DeviceId(org.onosproject.net.DeviceId) DefaultDriverHandler(org.onosproject.net.driver.DefaultDriverHandler) DriverHandler(org.onosproject.net.driver.DriverHandler) DefaultDriverHandler(org.onosproject.net.driver.DefaultDriverHandler) Driver(org.onosproject.net.driver.Driver) DefaultDriverData(org.onosproject.net.driver.DefaultDriverData)

Aggregations

DefaultDriverData (org.onosproject.net.driver.DefaultDriverData)22 DefaultDriverHandler (org.onosproject.net.driver.DefaultDriverHandler)18 Driver (org.onosproject.net.driver.Driver)14 DriverHandler (org.onosproject.net.driver.DriverHandler)8 DeviceId (org.onosproject.net.DeviceId)6 DriverData (org.onosproject.net.driver.DriverData)6 ItemNotFoundException (org.onlab.util.ItemNotFoundException)3 DefaultDriver (org.onosproject.net.driver.DefaultDriver)3 ArrayList (java.util.ArrayList)2 ExtensionTreatmentResolver (org.onosproject.net.behaviour.ExtensionTreatmentResolver)2 PipelineTraceable (org.onosproject.net.behaviour.PipelineTraceable)2 DeviceDescriptionDiscovery (org.onosproject.net.device.DeviceDescriptionDiscovery)2 DriverService (org.onosproject.net.driver.DriverService)2 Beta (com.google.common.annotations.Beta)1 ImmutableList (com.google.common.collect.ImmutableList)1 ImmutableSet (com.google.common.collect.ImmutableSet)1 EnumSet (java.util.EnumSet)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Optional (java.util.Optional)1