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 String driver()
        Returns the device driver name.
        Returns:
        driver name or null if not set
      • driver

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

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

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

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

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

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

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

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

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

        public 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 String pipeconf()
        Returns the device pipeconf.
        Returns:
        device pipeconf or null if not set
      • managementAddress

        public BasicDeviceConfig managementAddress​(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​(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
      • purgeOnDisconnection

        public boolean purgeOnDisconnection()
        Returns the device purgeOnDisconnection flag for this device.
        Returns:
        device purgeOnDisconnection, false if not set.
      • purgeOnDisconnection

        public BasicDeviceConfig purgeOnDisconnection​(boolean purgeOnDisconnection)
        Sets the purgeOnDisconnection flag for the device.
        Parameters:
        purgeOnDisconnection - purges flows, groups, meters on disconnection.
        Returns:
        self
      • isPurgeOnDisconnectionConfigured

        public boolean isPurgeOnDisconnectionConfigured()
        Returns if the device purgeOnDisconnection flag for this device has been explicitly configured.
        Returns:
        device purgeOnDisconnection explicitly configured, false if not.