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