NETCONF Service Provider

class ydk.providers.NetconfServiceProvider(address, username, password=None, port=830, protocol='ssh', timeout=-1, repo=None, private_key_path='', public_key_path='')

Constructs an instance of the NetconfServiceProvider class and connects to Netconf server via NetconfSession.

Parameters
  • address – (str) IP address or DNS name of device, which supports Netconf server; required parameter

  • username – (str) Username to log in to the device; required parameter

  • password – (str) Password to log in to the device

  • port – (int) The Netconf server access port; defaults to 830

  • protocol – (str) Currently supported ssh for secure connection and tcp for insecure connection; default - ssh

  • timeout – (int) The timeout in microseconds, -1 for infinite timeout, 0 for non-blocking

  • repo – (Repository) User provided repository - directory, which stores cached Yang models

  • private_key_path – (str) Path to private key file. Requires public_key_path field.

  • public_key_path – (str) Path to public key file. Does not allow password field.

get_encoding()

Returns the type of encoding supported by the service provider.

get_session()

Returns the instance of the NetconfSession used to connect to the Netconf server

Returns

A NetconfSession instance.

get_capabilities()

Returns a list of capabilities of the Netconf server

Returns

A list of str representing the client’s/server’s capabilities