RESTCONF Service Provider
- class ydk.providers.RestconfServiceProvider(repo, address, username, password, port, encoding)
Constructs an instance of the
RestconfServiceProviderto connect to a server which has to support model download. Since the class is a Python wrapper for C++RestconfServiceProviderclass, which has clean up methods implemented in its destructor. The user does not need to worry about close RESTCONF session.- Parameters:
repo – (
Repository) User provided repository stores cached modelsaddress – (
str) IP address of the device supporting a restconf interfaceusername – (
str) Username to log in to the devicepassword – (
str) Password to log in to the deviceport – (
int) Device port used to access the restconf interface, the default value being 80encoding – (
EncodingFormat) Type of encoding to be used for the payload, the default beingJSON
- get_encoding()
Returns the type of encoding supported by the service provider.
- get_session()
Returns the instance of the
NetconfSessionused to connect to the netconf server- Returns:
A
NetconfSessioninstance.