Search in sources :

Example 6 with DeviceAdminService

use of org.onosproject.net.device.DeviceAdminService in project onos by opennetworkinglab.

the class WipeOutCommand method wipeOutFlows.

private void wipeOutFlows() {
    print("Wiping Flows");
    FlowRuleService flowRuleService = get(FlowRuleService.class);
    DeviceAdminService deviceAdminService = get(DeviceAdminService.class);
    for (Device device : deviceAdminService.getDevices()) {
        flowRuleService.purgeFlowRules(device.id());
    }
}
Also used : Device(org.onosproject.net.Device) DeviceAdminService(org.onosproject.net.device.DeviceAdminService) FlowRuleService(org.onosproject.net.flow.FlowRuleService)

Aggregations

DeviceAdminService (org.onosproject.net.device.DeviceAdminService)6 Device (org.onosproject.net.Device)5 ExecutionException (java.util.concurrent.ExecutionException)1 TimeoutException (java.util.concurrent.TimeoutException)1 Before (org.junit.Before)1 Port (org.onosproject.net.Port)1 PortNumber (org.onosproject.net.PortNumber)1 DeviceService (org.onosproject.net.device.DeviceService)1 FlowRuleService (org.onosproject.net.flow.FlowRuleService)1 GroupService (org.onosproject.net.group.GroupService)1 MeterService (org.onosproject.net.meter.MeterService)1 OvsdbClientService (org.onosproject.ovsdb.controller.OvsdbClientService)1 OvsdbController (org.onosproject.ovsdb.controller.OvsdbController)1