Class NetconfDeviceConfig


  • @Beta
    public class NetconfDeviceConfig
    extends org.onosproject.net.config.Config<org.onosproject.net.DeviceId>
    Configuration for Netconf provider. The URI for a netconf device is of the format netconf:<ip>[:<port>][/<path>] The ip and port are used to create a netconf connection to the device. The path is an optional component that is not used by the default netconf driver, but is leveragable by custom drivers.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.onosproject.net.config.Config

        org.onosproject.net.config.Config.FieldPresence
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONFIG_KEY
      netcfg ConfigKey.
      static java.lang.String CONNECT_TIMEOUT  
      static java.lang.String IDLE_TIMEOUT  
      static java.lang.String IP  
      static java.lang.String PASSWORD  
      static java.lang.String PATH  
      static java.lang.String PORT  
      static java.lang.String REPLY_TIMEOUT  
      static java.lang.String SSHCLIENT  
      static java.lang.String SSHKEY  
      static java.lang.String USERNAME  
      • Fields inherited from class org.onosproject.net.config.Config

        array, delegate, key, mapper, node, object, subject
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.OptionalInt connectTimeout()
      Gets the connect timeout of the SSH connection.
      java.util.OptionalInt idleTimeout()
      Gets the idle timeout of the SSH connection.
      org.onlab.packet.IpAddress ip()
      Gets the Ip of the NETCONF device.
      boolean isValid()  
      java.lang.String password()
      Gets the password of the NETCONF device.
      java.util.Optional<java.lang.String> path()
      Gets the path of the NETCONF device.
      int port()
      Gets the port of the NETCONF device.
      java.util.OptionalInt replyTimeout()
      Gets the reply timeout of the SSH connection.
      NetconfDeviceConfig setConnectTimeout​(java.lang.Integer connectTimeout)
      Sets the NETCONF Connect Timeout for the Device.
      NetconfDeviceConfig setIdleTimeout​(java.lang.Integer idleTimeout)
      Sets the NETCONF Idle Timeout for the Device.
      NetconfDeviceConfig setIp​(java.lang.String ip)
      Sets the Ip for the Device.
      NetconfDeviceConfig setPassword​(java.lang.String password)
      Sets the password for the Device.
      NetconfDeviceConfig setPath​(java.lang.String path)
      Sets the path for the device.
      NetconfDeviceConfig setPort​(int port)
      Sets the Port for the Device.
      NetconfDeviceConfig setReplyTimeout​(java.lang.Integer replyTimeout)
      Sets the NETCONF Reply Timeout for the Device.
      NetconfDeviceConfig setSshImpl​(java.lang.String sshimpl)
      Sets the NETCONF Ssh client implementation for the Device.
      NetconfDeviceConfig setSshKey​(java.lang.String sshKey)
      Sets the SshKey for the Device.
      NetconfDeviceConfig setUsername​(java.lang.String username)
      Sets the username for the Device.
      java.util.Optional<java.lang.String> sshClient()
      Gets the NETCONF SSH Client implementation.
      java.lang.String sshKey()
      Gets the sshKey of the NETCONF device.
      java.lang.String username()
      Gets the username of the NETCONF device.
      • Methods inherited from class org.onosproject.net.config.Config

        apply, clear, get, get, get, get, get, get, getList, getList, hasField, hasField, hasFields, hasFields, hasOnlyFields, hasOnlyFields, init, isBoolean, isBoolean, isConnectPoint, isConnectPoint, isDecimal, isDecimal, isIntegralNumber, isIntegralNumber, isIpAddress, isIpAddress, isIpPrefix, isIpPrefix, isMacAddress, isMacAddress, isNumber, isNumber, isString, isString, isTpPort, isTpPort, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • NetconfDeviceConfig

        public NetconfDeviceConfig()
    • Method Detail

      • isValid

        public boolean isValid()
        Overrides:
        isValid in class org.onosproject.net.config.Config<org.onosproject.net.DeviceId>
      • ip

        public org.onlab.packet.IpAddress ip()
        Gets the Ip of the NETCONF device.
        Returns:
        ip
      • port

        public int port()
        Gets the port of the NETCONF device.
        Returns:
        port
      • path

        public java.util.Optional<java.lang.String> path()
        Gets the path of the NETCONF device.
        Returns:
        path
      • username

        public java.lang.String username()
        Gets the username of the NETCONF device.
        Returns:
        username
      • password

        public java.lang.String password()
        Gets the password of the NETCONF device.
        Returns:
        password
      • sshKey

        public java.lang.String sshKey()
        Gets the sshKey of the NETCONF device.
        Returns:
        sshkey
      • sshClient

        public java.util.Optional<java.lang.String> sshClient()
        Gets the NETCONF SSH Client implementation. Expecting "apache-mina"
        Returns:
        sshClient
      • connectTimeout

        public java.util.OptionalInt connectTimeout()
        Gets the connect timeout of the SSH connection.
        Returns:
        connectTimeout
      • replyTimeout

        public java.util.OptionalInt replyTimeout()
        Gets the reply timeout of the SSH connection.
        Returns:
        replyTimeout
      • idleTimeout

        public java.util.OptionalInt idleTimeout()
        Gets the idle timeout of the SSH connection.
        Returns:
        idleTimeout
      • setIp

        public NetconfDeviceConfig setIp​(java.lang.String ip)
        Sets the Ip for the Device.
        Parameters:
        ip - the ip
        Returns:
        instance for chaining
      • setPort

        public NetconfDeviceConfig setPort​(int port)
        Sets the Port for the Device.
        Parameters:
        port - the port
        Returns:
        instance for chaining
      • setPath

        public NetconfDeviceConfig setPath​(java.lang.String path)
        Sets the path for the device.
        Parameters:
        path - the path
        Returns:
        instance for chaining
      • setUsername

        public NetconfDeviceConfig setUsername​(java.lang.String username)
        Sets the username for the Device.
        Parameters:
        username - username
        Returns:
        instance for chaining
      • setPassword

        public NetconfDeviceConfig setPassword​(java.lang.String password)
        Sets the password for the Device.
        Parameters:
        password - password
        Returns:
        instance for chaining
      • setSshKey

        public NetconfDeviceConfig setSshKey​(java.lang.String sshKey)
        Sets the SshKey for the Device.
        Parameters:
        sshKey - sshKey as string
        Returns:
        instance for chaining
      • setSshImpl

        public NetconfDeviceConfig setSshImpl​(java.lang.String sshimpl)
        Sets the NETCONF Ssh client implementation for the Device. Must be 'apache-mina' When specified, overrides NetconfControllerImpl.sshLibrary for this device
        Parameters:
        sshimpl - sshimpl as string
        Returns:
        instance for chaining
      • setConnectTimeout

        public NetconfDeviceConfig setConnectTimeout​(java.lang.Integer connectTimeout)
        Sets the NETCONF Connect Timeout for the Device. This is the amount of time in seconds allowed for the SSH handshake to take place Minimum 1 second When specified, overrides NetconfControllerImpl.netconfConnectTimeout for this device
        Parameters:
        connectTimeout - connectTimeout as int
        Returns:
        instance for chaining
      • setReplyTimeout

        public NetconfDeviceConfig setReplyTimeout​(java.lang.Integer replyTimeout)
        Sets the NETCONF Reply Timeout for the Device. This is the amount of time in seconds allowed for the NETCONF Reply to a command Minimum 1 second When specified, overrides NetconfControllerImpl.netconfReplyTimeout for this device
        Parameters:
        replyTimeout - replyTimeout as int
        Returns:
        instance for chaining
      • setIdleTimeout

        public NetconfDeviceConfig setIdleTimeout​(java.lang.Integer idleTimeout)
        Sets the NETCONF Idle Timeout for the Device. This is the amount of time in seconds after which the SSH connection will close if no traffic is detected Minimum 10 second When specified, overrides NetconfControllerImpl.netconfIdleTimeout for this device
        Parameters:
        idleTimeout - idleTimeout as int
        Returns:
        instance for chaining