Package org.onosproject.cli.net
Class HostsListCommand
- java.lang.Object
-
- org.onosproject.cli.AbstractShellCommand
-
- org.onosproject.cli.net.HostsListCommand
-
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action
,CodecContext
public class HostsListCommand extends AbstractShellCommand
Lists all currently-known hosts.
-
-
Field Summary
-
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log
-
-
Constructor Summary
Constructors Constructor Description HostsListCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doExecute()
Body of the shell command.protected List<Host>
getSortedHosts(HostService service)
Returns the list of devices sorted using the device ID URIs.protected void
printHost(Host host)
Prints information about a host.-
Methods inherited from class org.onosproject.cli.AbstractShellCommand
annotations, annotations, annotations, appId, codec, error, execute, get, getService, jsonForEntity, mapper, outputJson, print
-
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
-
-
-
-
Method Detail
-
doExecute
protected void doExecute()
Description copied from class:AbstractShellCommand
Body of the shell command.- Specified by:
doExecute
in classAbstractShellCommand
-
getSortedHosts
protected List<Host> getSortedHosts(HostService service)
Returns the list of devices sorted using the device ID URIs.- Parameters:
service
- device service- Returns:
- sorted device list
-
printHost
protected void printHost(Host host)
Prints information about a host.- Parameters:
host
- end-station host
-
-