use of org.onosproject.incubator.net.resource.label.LabelResourceService in project onos by opennetworkinglab.
the class LabelApplyCommand method doExecute.
@Override
protected void doExecute() {
LabelResourceService lrs = get(LabelResourceService.class);
Collection<LabelResource> result = lrs.applyFromDevicePool(DeviceId.deviceId(deviceId), Long.parseLong(applyNum));
if (!result.isEmpty()) {
for (Iterator<LabelResource> iterator = result.iterator(); iterator.hasNext(); ) {
DefaultLabelResource defaultLabelResource = (DefaultLabelResource) iterator.next();
print(FMT, defaultLabelResource.deviceId().toString(), defaultLabelResource.labelResourceId().toString());
}
}
}
Aggregations