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 Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String uri  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute()
      Body of the shell command.
      protected boolean isIncluded​(org.onosproject.net.Port port)  
      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.
      com.fasterxml.jackson.databind.JsonNode jsonPorts​(org.onosproject.net.device.DeviceService service, java.lang.Iterable<org.onosproject.net.Device> devices)
      Produces JSON array containing ports of the specified devices.
      protected void printPorts​(org.onosproject.net.device.DeviceService service, org.onosproject.net.Device device)  
      • 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
    • Field Detail

      • uri

        protected java.lang.String uri
    • Constructor Detail

      • DevicePortsListCommand

        public DevicePortsListCommand()
    • Method Detail

      • jsonPorts

        public com.fasterxml.jackson.databind.JsonNode jsonPorts​(org.onosproject.net.device.DeviceService service,
                                                                 java.lang.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)