use of org.onosproject.net.host.HostAdminService in project onos by opennetworkinglab.
the class WipeOutCommand method wipeOutHosts.
private void wipeOutHosts() {
print("Wiping hosts");
HostAdminService hostAdminService = get(HostAdminService.class);
while (hostAdminService.getHostCount() > 0) {
try {
for (Host host : hostAdminService.getHosts()) {
hostAdminService.removeHost(host.id());
}
} catch (Exception e) {
log.info("Unable to wipe-out hosts", e);
}
}
}
Aggregations