Class BasicDeviceConfig


  • public final class BasicDeviceConfig
    extends BasicElementConfig<DeviceId>
    Basic configuration for network infrastructure devices.
    • Constructor Detail

      • BasicDeviceConfig

        public BasicDeviceConfig()
    • Method Detail

      • isValid

        public boolean isValid()
        Description copied from class: Config
        Indicates whether or not the backing JSON node contains valid data.

        Default implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.

        Overrides:
        isValid in class BasicElementConfig<DeviceId>
        Returns:
        true if the data is valid; false otherwise
      • type

        public Device.Type type()
        Returns the device type.
        Returns:
        device type override
      • driver

        public java.lang.String driver()
        Returns the device driver name.
        Returns:
        driver name or null if not set
      • driver

        public BasicDeviceConfig driver​(java.lang.String driverName)
        Sets the driver name.
        Parameters:
        driverName - new driver name; null to clear
        Returns:
        self
      • manufacturer

        public java.lang.String manufacturer()
        Returns the device manufacturer.
        Returns:
        manufacturer or null if not set
      • manufacturer

        public BasicDeviceConfig manufacturer​(java.lang.String manufacturerName)
        Sets the device manufacturer.
        Parameters:
        manufacturerName - new manufacturer; null to clear
        Returns:
        self
      • hwVersion

        public java.lang.String hwVersion()
        Returns the device hardware version.
        Returns:
        hardware version or null if not set
      • hwVersion

        public BasicDeviceConfig hwVersion​(java.lang.String hwVersion)
        Sets the device hardware version.
        Parameters:
        hwVersion - new hardware version; null to clear
        Returns:
        self
      • swVersion

        public java.lang.String swVersion()
        Returns the device software version.
        Returns:
        software version or null if not set
      • swVersion

        public BasicDeviceConfig swVersion​(java.lang.String swVersion)
        Sets the device software version.
        Parameters:
        swVersion - new software version; null to clear
        Returns:
        self
      • serial

        public java.lang.String serial()
        Returns the device serial number.
        Returns:
        serial number or null if not set
      • serial

        public BasicDeviceConfig serial​(java.lang.String serial)
        Sets the device serial number.
        Parameters:
        serial - new serial number; null to clear
        Returns:
        self
      • managementAddress

        public java.lang.String managementAddress()
        Returns the device management address (e.g, "ip:port" or full URI string).
        Returns:
        device management address or null if not set
      • pipeconf

        public java.lang.String pipeconf()
        Returns the device pipeconf.
        Returns:
        device pipeconf or null if not set
      • managementAddress

        public BasicDeviceConfig managementAddress​(java.lang.String managementAddress)
        Sets the device management ip (ip:port).
        Parameters:
        managementAddress - new device management address (ip:port); null to clear
        Returns:
        self
      • pipeconf

        public BasicDeviceConfig pipeconf​(java.lang.String pipeconf)
        Sets the device pipeconf.
        Parameters:
        pipeconf - new device pipeconf
        Returns:
        self
      • deviceKeyId

        public DeviceKeyId deviceKeyId()
        Returns the device key id.
        Returns:
        device key id or null if not set
      • deviceKeyId

        public BasicDeviceConfig deviceKeyId​(DeviceKeyId deviceKeyId)
        Sets the device key id.
        Parameters:
        deviceKeyId - the new device key id; null to clear
        Returns:
        self