NetconfServiceProvider¶
-
class
NetconfServiceProvider: public path::ServiceProvider¶
Implementation of ServiceProvider for the netconf protocol.
NetconfServiceProvider(std::string address, std::string username, std::string password, int port = 830)¶Constructs an instance of the
NetconfServiceProviderto connect to a server which has to support model download
Parameters:
- 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
NetconfServiceProvider(const path::Repository &repo, std::string address, std::string username, std::string password, int port = 830)¶Constructs an instance of the
NetconfServiceProviderusing the providedrepository
Parameters:
- repository – Reference to an instance of
path::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
- path::RootSchemaNode &
get_root_schema() const¶Returns the
RootSchemaNodetree supported by this instance of theServiceProvider.
Returns: Pointer to the RootSchemaNodeornullptrif one could not be created.
- std::shared_ptr<path::DataNode>
invoke(path::Rpc &rpc) const¶ Invokes or executes the given rpc and returns aDataNodepointer if the Rpc has an output modelled in YANG.
Parameters: rpc – Reference to the Rpcnode.Returns: Shared pointer to the DataNoderepresenting the output.
- EncodingFormat
get_encoding()¶Returns the type of encoding supported by the service provider. In the case of netconf service provider,
EncodingFormat::XMLis returned.
~NetconfServiceProvider()¶