use of org.onlab.osgi.ServiceNotFoundException in project onos by opennetworkinglab.
the class FlowObjectiveQueueListCommand method doExecute.
@Override
protected void doExecute() {
try {
FlowObjectiveService service = get(FlowObjectiveService.class);
ListMultimap<FilteringObjQueueKey, Objective> filtObjQueue = service.getFilteringObjQueue();
ListMultimap<ForwardingObjQueueKey, Objective> fwdObjQueue = service.getForwardingObjQueue();
ListMultimap<NextObjQueueKey, Objective> nextObjQueue = service.getNextObjQueue();
Map<FilteringObjQueueKey, Objective> filtObjQueueHead = service.getFilteringObjQueueHead();
Map<ForwardingObjQueueKey, Objective> fwdObjQueueHead = service.getForwardingObjQueueHead();
Map<NextObjQueueKey, Objective> nextObjQueueHead = service.getNextObjQueueHead();
if (cache) {
printMap("Filtering objective cache", filtObjQueueHead, sizeOnly);
printMap("Forwarding objective cache", fwdObjQueueHead, sizeOnly);
printMap("Next objective cache", nextObjQueueHead, sizeOnly);
} else {
printMap("Filtering objective queue", filtObjQueue.asMap(), sizeOnly);
printMap("Forwarding objective queue", fwdObjQueue.asMap(), sizeOnly);
printMap("Next objective queue", nextObjQueue.asMap(), sizeOnly);
}
} catch (ServiceNotFoundException e) {
print("FlowObjectiveService unavailable");
}
}
use of org.onlab.osgi.ServiceNotFoundException in project trellis-control by opennetworkinglab.
the class InvalidateNextCommand method doExecute.
@Override
protected void doExecute() {
if (please == null || !please.equals(CONFIRM_PHRASE)) {
print("WARNING: System may enter an unpredictable state if the next ID is force invalidated." + "Enter confirmation phrase to continue.");
return;
}
try {
SegmentRoutingService srService = AbstractShellCommand.get(SegmentRoutingService.class);
srService.invalidateNextObj(Integer.parseInt(nextId));
} catch (ServiceNotFoundException e) {
print("SegmentRoutingService unavailable");
}
}
Aggregations