Package org.onosproject.cli.net
Class TableStatisticsCommand
- java.lang.Object
-
- org.onosproject.cli.AbstractShellCommand
-
- org.onosproject.cli.net.TableStatisticsCommand
-
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
,org.onosproject.codec.CodecContext
public class TableStatisticsCommand extends AbstractShellCommand
Lists port statistic of all ports in the system.
-
-
Field Summary
-
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log
-
-
Constructor Summary
Constructors Constructor Description TableStatisticsCommand()
-
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.TableStatisticsEntry>>
getSortedTableStats(org.onosproject.net.device.DeviceService deviceService, org.onosproject.net.flow.FlowRuleService flowService)
Returns the list of table statistics sorted using the device ID URIs and table IDs.protected void
printTableStats(org.onosproject.net.Device d, java.util.List<org.onosproject.net.flow.TableStatisticsEntry> tableStats)
Prints flow table statistics.-
Methods inherited from class org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, appId, codec, error, execute, get, getService, jsonForEntity, mapper, outputJson, print
-
-
-
-
Method Detail
-
doExecute
protected void doExecute()
Description copied from class:AbstractShellCommand
Body of the shell command.- Specified by:
doExecute
in classAbstractShellCommand
-
printTableStats
protected void printTableStats(org.onosproject.net.Device d, java.util.List<org.onosproject.net.flow.TableStatisticsEntry> tableStats)
Prints flow table statistics.- Parameters:
d
- the devicetableStats
- the set of flow table statistics for that device
-
getSortedTableStats
protected java.util.SortedMap<org.onosproject.net.Device,java.util.List<org.onosproject.net.flow.TableStatisticsEntry>> getSortedTableStats(org.onosproject.net.device.DeviceService deviceService, org.onosproject.net.flow.FlowRuleService flowService)
Returns the list of table statistics sorted using the device ID URIs and table IDs.- Parameters:
deviceService
- device serviceflowService
- flow rule service- Returns:
- sorted table statistics list
-
-