OpenDaylightServiceProvider¶
-
class
OpenDaylightServiceProvider
¶
A service provider to be used to communicate with an OpenDaylight instance.
OpenDaylightServiceProvider
(path::Repository &repo, const std::string &address, const std::string &username, const std::string &password, int port = 8181, EncodingFormat encoding = EncodingFormat::JSON, Protocol protocol = Protocol::restconf)¶Constructs an instance of the
OpenDaylightServiceProvider
to connect to a OpenDaylight instance
Parameters:
- repository – Reference to an instance of
path::Repository
- address – IP address of the ODL instance
- username – Username to log in to the instance
- password – Password to log in to the instance
- port – Device port used to access the ODL instance. Default value is 8181
- encoding – Type of encoding to be used for the payload. Default is
JSON
- protocol – Type of OpenDaylight northbound protocol. Currently, only restconf is supported and is the default value
- path::ServiceProvider &
get_node_provider
(const std::string &node_id)¶Returns the
ServiceProvider
instance corresponding to the device being controlled by the OpenDaylight instance, indicated by “node_id”.
Parameters: node_id – The name of the device being controlled by the OpenDaylight instance. Returns: Reference to the ServiceProvider
or raisesYCPPServiceProviderError
if one could not be found.
- const std::vector<std::string> &
get_node_ids
()¶ Returns a list of node ID’s of the devices being controlled by this OpenDaylight instance.
Returns: List of node ID’s of the devices being controlled by this OpenDaylight instance.
~OpenDaylightServiceProvider
()¶