Class FlowsListCommand

  • All Implemented Interfaces:
    org.apache.karaf.shell.api.action.Action, org.onosproject.codec.CodecContext

    public class FlowsListCommand
    extends AbstractShellCommand
    Lists all currently-known flows.
    • Constructor Detail

      • FlowsListCommand

        public FlowsListCommand()
    • Method Detail

      • removeFlowsInteractive

        public void removeFlowsInteractive​(Iterable<org.onosproject.net.flow.FlowEntry> flows,
                                           org.onosproject.net.flow.FlowRuleService flowService,
                                           org.onosproject.core.CoreService coreService)
        Removes the flows passed as argument after confirmation is provided for each of them. If no explicit confirmation is provided, the flow is not removed.
        Parameters:
        flows - list of flows to remove
        flowService - FlowRuleService object
        coreService - CoreService object
      • getSortedFlows

        protected SortedMap<org.onosproject.net.Device,​List<org.onosproject.net.flow.FlowEntry>> getSortedFlows​(org.onosproject.net.device.DeviceService deviceService,
                                                                                                                      org.onosproject.net.flow.FlowRuleService service,
                                                                                                                      org.onosproject.core.CoreService coreService)
        Returns the list of devices sorted using the device ID URIs.
        Parameters:
        deviceService - device service
        service - flow rule service
        coreService - core service
        Returns:
        sorted device list
      • printFlows

        protected void printFlows​(org.onosproject.net.Device d,
                                  List<org.onosproject.net.flow.FlowEntry> flows,
                                  org.onosproject.core.CoreService coreService)
        Prints flows.
        Parameters:
        d - the device
        flows - the set of flows for that device
        coreService - core system service