use of org.onosproject.incubator.net.resource.label.LabelResource in project onos by opennetworkinglab.
the class GlobalLabelApplyCommand method doExecute.
@Override
protected void doExecute() {
LabelResourceService lrs = get(LabelResourceService.class);
Collection<LabelResource> result = lrs.applyFromGlobalPool(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());
}
}
}
use of org.onosproject.incubator.net.resource.label.LabelResource 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