use of org.onosproject.segmentrouting.SegmentRoutingService in project trellis-control by opennetworkinglab.
the class PseudowireRemoveCommand method doExecute.
@Override
protected void doExecute() {
SegmentRoutingService srService = AbstractShellCommand.get(SegmentRoutingService.class);
// remove the pseudowire
SegmentRoutingManager mngr = (SegmentRoutingManager) srService;
int pwIntId;
try {
pwIntId = parsePwId(pwId);
} catch (IllegalArgumentException e) {
log.error("Exception while parsing pseudowire id : \n\t %s", e.getMessage());
print("Exception while parsing pseudowire id : \n\t %s", e.getMessage());
return;
}
log.info("Removing pseudowire {} from the command line.", pwIntId);
L2TunnelHandler.Result res = mngr.removePseudowire(pwIntId);
switch(res) {
case WRONG_PARAMETERS:
error("Pseudowire could not be removed , wrong parameters: \n\t %s\n", res.getSpecificError());
break;
case INTERNAL_ERROR:
error("Pseudowire could not be removed, internal error : \n\t %s\n", res.getSpecificError());
break;
case SUCCESS:
break;
default:
break;
}
}
use of org.onosproject.segmentrouting.SegmentRoutingService in project trellis-control by opennetworkinglab.
the class ShouldProgramCommand method doExecute.
@Override
protected void doExecute() {
SegmentRoutingService srService = AbstractShellCommand.get(SegmentRoutingService.class);
Map<DeviceId, NodeId> shouldProgram = srService.getShouldProgramLeaders();
print("shouldProgram");
shouldProgram.forEach((k, v) -> print("%s -> %s", k, v));
}
use of org.onosproject.segmentrouting.SegmentRoutingService in project trellis-control by opennetworkinglab.
the class VerifyGroupsCommand method doExecute.
@Override
protected void doExecute() {
DeviceService deviceService = get(DeviceService.class);
SegmentRoutingService srService = AbstractShellCommand.get(SegmentRoutingService.class);
if (uri != null) {
Device dev = deviceService.getDevice(DeviceId.deviceId(uri));
if (dev != null) {
srService.verifyGroups(dev.id());
}
}
}
use of org.onosproject.segmentrouting.SegmentRoutingService in project trellis-control by opennetworkinglab.
the class EcmpGraphCommand method doExecute.
@Override
protected void doExecute() {
SegmentRoutingService srService = AbstractShellCommand.get(SegmentRoutingService.class);
printEcmpGraph(srService.getCurrentEcmpSpg());
}
use of org.onosproject.segmentrouting.SegmentRoutingService in project trellis-control by opennetworkinglab.
the class McastFilterListCommand method doExecute.
@Override
protected void doExecute() {
// Get SR service
SegmentRoutingService srService = get(SegmentRoutingService.class);
// Get the filt objs
Map<DeviceId, List<McastFilteringObjStoreKey>> filteringObjKeys = srService.getMcastFilters();
filteringObjKeys.forEach(this::printMcastFilter);
}
Aggregations