NetconfServiceProvider¶
-
class
ydk::
NetconfServiceProvider
: public ydk::ServiceProvider¶ Implementation of
ServiceProvider
for the netconf protocol.-
NetconfServiceProvider
(std::string address, std::string username, std::string password, int port = 830, const std::string &protocol = "ssh", bool on_demand = true, bool common_cache = false, int timeout = -1)¶ Constructs an instance of
NetconfServiceProvider
connect to a server which has to support model downloadParameters: - address – IP address of the device supporting a netconf interface.
- username – Username to log in to the device.
- password – Password to log in to the device.
- port – Device port used to access the netconf interface. Default value is 830.
- protocol –
ssh
ortcp
. - on_demand – On demand downloading by default.
- common_cache – Use common caching directory if enabled.
- timeout – The timeout in microseconds, -1 for infinite timeout, 0 for non-blocking
-
NetconfServiceProvider
(const path::Repository &repo, std::string address, std::string username, std::string password, int port = 830, const std::string &protocol = "ssh", bool on_demand = true, int timeout = -1)¶ Constructs an instance of
NetconfServiceProvider
using the providedrepository
Parameters: - repo – Reference to an instance of
Repository
- address – IP address of the device supporting a netconf interface
- username – Username to log in to the device
- password – Password to log in to the device
- port – Device port used to access the netconf interface. Default value is 830
- timeout – The timeout in microseconds, -1 for infinite timeout, 0 for non-blocking
- repo – Reference to an instance of
-
NetconfServiceProvider
(const path::Repository &repo, std::string address, std::string username, std::string private_key_path, std::string public_key_path, int port = 830, bool on_demand = true, int timeout = -1)¶ Constructs an instance of
NetconfServiceProvider
connect to a server which has to support model downloadParameters: - repo – Reference to an instance of
Repository
- address – IP address of the device supporting a netconf interface.
- username – Username to log in to the device.
- private_key_path – Either relative or absolute path to private key file.
- public_key_path – Either relative or absolute path to public key file.
- port – Device port used to access the netconf interface. Default value is 830.
- on_demand – On demand downloading by default.
- timeout – The timeout in microseconds, -1 for infinite timeout, 0 for non-blocking
- repo – Reference to an instance of
-
NetconfServiceProvider
(std::string address, std::string username, std::string private_key_path, std::string public_key_path, int port = 830, bool on_demand = true, bool common_cache = false, int timeout = -1)¶ Constructs an instance of
NetconfServiceProvider
using the providedrepository
Parameters: - address – IP address of the device supporting a netconf interface
- username – Username to log in to the device
- private_key_path – Either relative or absolute path to private key file.
- public_key_path – Either relative or absolute path to public key file.
- port – Device port used to access the netconf interface. Default value is 830
- on_demand – On demand downloading by default.
- common_cache – Use common caching directory if enabled.
- timeout – The timeout in microseconds, -1 for infinite timeout, 0 for non-blocking
-
EncodingFormat
get_encoding
() const¶ Returns the type of encoding supported by the service provider. In the case of Netconf Service Provider, the
EncodingFormat::XML
is returned.
-
const NetconfSession
get_session
() const¶ Returns a reference of the
NetconfSession
used to connect to the netconf server.
-
std::vector<std::string>
get_capabilities
() const¶ Returns a vector of the client’s capabilities
Returns: A vector of std::string
representing the client/server capabilities
-
~NetconfServiceProvider
()¶
-