Class DevicePortsListCommand

  • All Implemented Interfaces:
    org.apache.karaf.shell.api.action.Action, org.onosproject.codec.CodecContext

    public class DevicePortsListCommand
    extends DevicesListCommand
    Lists all ports or all ports of a device.
    • Field Detail

    • Constructor Detail

      • DevicePortsListCommand

        public DevicePortsListCommand()
    • Method Detail

      • jsonPorts

        public com.fasterxml.jackson.databind.JsonNode jsonPorts​(org.onosproject.net.device.DeviceService service,
                                                                 Iterable<org.onosproject.net.Device> devices)
        Produces JSON array containing ports of the specified devices.
        Parameters:
        service - device service
        devices - collection of devices
        Returns:
        JSON array
      • jsonPorts

        public com.fasterxml.jackson.databind.JsonNode jsonPorts​(org.onosproject.net.device.DeviceService service,
                                                                 com.fasterxml.jackson.databind.ObjectMapper mapper,
                                                                 org.onosproject.net.Device device)
        Produces JSON array containing ports of the specified device.
        Parameters:
        service - device service
        mapper - object mapper
        device - infrastructure devices
        Returns:
        JSON array
      • isIncluded

        protected boolean isIncluded​(org.onosproject.net.Port port)
      • printPorts

        protected void printPorts​(org.onosproject.net.device.DeviceService service,
                                  org.onosproject.net.Device device)