Package org.onosproject.cli.net
Class FlowsListCommand
- java.lang.Object
-
- org.onosproject.cli.AbstractShellCommand
-
- org.onosproject.cli.net.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
-
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log
-
-
Constructor Summary
Constructors Constructor Description FlowsListCommand()
-
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 org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, appId, codec, error, execute, get, getService, jsonForEntity, mapper, outputJson, print
-
-
-
-
Field Detail
-
ANY
public static final java.lang.String ANY
- See Also:
- Constant Field Values
-
-
Method Detail
-
doExecute
protected void doExecute()
Description copied from class:AbstractShellCommand
Body of the shell command.- Specified by:
doExecute
in classAbstractShellCommand
-
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 removeflowService
- FlowRuleService objectcoreService
- 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 serviceservice
- flow rule servicecoreService
- 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 deviceflows
- the set of flows for that devicecoreService
- core system service
-
-