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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ANY  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute()
      Body of the shell command.
      protected java.util.SortedMap<org.onosproject.net.Device,​java.util.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.
      protected void printFlows​(org.onosproject.net.Device d, java.util.List<org.onosproject.net.flow.FlowEntry> flows, org.onosproject.core.CoreService coreService)
      Prints flows.
      void removeFlowsInteractive​(java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.onosproject.codec.CodecContext

        decode, encode
    • Constructor Detail

      • FlowsListCommand

        public FlowsListCommand()
    • Method Detail

      • removeFlowsInteractive

        public void removeFlowsInteractive​(java.lang.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 java.util.SortedMap<org.onosproject.net.Device,​java.util.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,
                                  java.util.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