public class DevicesListCommand extends AbstractShellCommand
| Constructor and Description |
|---|
DevicesListCommand() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
execute()
Executes this command.
|
static List<org.onosproject.net.Device> |
getSortedDevices(org.onosproject.net.device.DeviceService service)
Returns the list of devices sorted using the device ID URIs.
|
static com.fasterxml.jackson.databind.JsonNode |
json(org.onosproject.net.device.DeviceService service,
Iterable<org.onosproject.net.Device> devices)
Returns JSON node representing the specified devices.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
json(org.onosproject.net.device.DeviceService service,
com.fasterxml.jackson.databind.ObjectMapper mapper,
org.onosproject.net.Device device)
Returns JSON node representing the specified device.
|
protected void |
printDevice(org.onosproject.net.device.DeviceService service,
org.onosproject.net.Device device)
Prints information about the specified device.
|
annotations, annotations, appId, doExecute, error, get, outputJson, printprotected void execute()
AbstractShellCommandexecute in class AbstractShellCommandpublic static com.fasterxml.jackson.databind.JsonNode json(org.onosproject.net.device.DeviceService service,
Iterable<org.onosproject.net.Device> devices)
service - device servicedevices - collection of devicespublic static com.fasterxml.jackson.databind.node.ObjectNode json(org.onosproject.net.device.DeviceService service,
com.fasterxml.jackson.databind.ObjectMapper mapper,
org.onosproject.net.Device device)
service - device servicemapper - object mapperdevice - infrastructure devicepublic static List<org.onosproject.net.Device> getSortedDevices(org.onosproject.net.device.DeviceService service)
service - device serviceprotected void printDevice(org.onosproject.net.device.DeviceService service,
org.onosproject.net.Device device)
service - device servicedevice - infrastructure deviceCopyright © 2015. All rights reserved.