use of org.onosproject.net.link.LinkAdminService in project onos by opennetworkinglab.
the class WipeOutCommand method wipeOutLinks.
private void wipeOutLinks() {
print("Wiping links");
LinkAdminService linkAdminService = get(LinkAdminService.class);
while (linkAdminService.getLinkCount() > 0) {
try {
for (Link link : linkAdminService.getLinks()) {
linkAdminService.removeLinks(link.src());
linkAdminService.removeLinks(link.dst());
}
} catch (Exception e) {
log.info("Unable to wipe-out links", e);
}
}
}
Aggregations