use of org.onosproject.net.behaviour.TributarySlotQuery in project onos by opennetworkinglab.
the class ResourceDeviceListener method queryTributarySlots.
private Set<TributarySlot> queryTributarySlots(DeviceId device, PortNumber port) {
try {
DriverHandler handler = driverService.createHandler(device);
if (handler == null || !handler.hasBehaviour(TributarySlotQuery.class)) {
return Collections.emptySet();
}
TributarySlotQuery query = handler.behaviour(TributarySlotQuery.class);
if (query != null) {
return query.queryTributarySlots(port);
} else {
return Collections.emptySet();
}
} catch (ItemNotFoundException e) {
return Collections.emptySet();
}
}
Aggregations