Package org.onosproject.cli.net
Class DevicesListCommand
- java.lang.Object
-
- org.onosproject.cli.AbstractShellCommand
-
- org.onosproject.cli.net.DevicesListCommand
-
- All Implemented Interfaces:
org.apache.karaf.shell.api.action.Action,org.onosproject.codec.CodecContext
- Direct Known Subclasses:
DeviceInterfacesListCommand,DevicePortsListCommand
public class DevicesListCommand extends AbstractShellCommand
Lists all infrastructure devices.
-
-
Field Summary
-
Fields inherited from class org.onosproject.cli.AbstractShellCommand
log
-
-
Constructor Summary
Constructors Constructor Description DevicesListCommand()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute()Body of the shell command.static java.util.List<org.onosproject.net.Device>getSortedDevices(org.onosproject.net.device.DeviceService service)Returns the list of devices sorted using the device ID URIs.protected voidprintDevice(org.onosproject.net.device.DeviceService deviceService, org.onosproject.net.Device device)Prints information about the specified device.-
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:AbstractShellCommandBody of the shell command.- Specified by:
doExecutein classAbstractShellCommand
-
getSortedDevices
public static java.util.List<org.onosproject.net.Device> getSortedDevices(org.onosproject.net.device.DeviceService service)
Returns the list of devices sorted using the device ID URIs.- Parameters:
service- device service- Returns:
- sorted device list
-
printDevice
protected void printDevice(org.onosproject.net.device.DeviceService deviceService, org.onosproject.net.Device device)Prints information about the specified device.- Parameters:
deviceService- device servicedevice- infrastructure device
-
-