netconf_get¶
NETCONF get.
Functions¶
|
Get configuration and state information over Netconf from device. |
Module Contents¶
- netconf_get.netconf_get(task: nornir.core.task.Task, path: nornir.core.task.Optional[str] = '', filter_type: nornir.core.task.Optional[str] = 'xpath') nornir.core.task.Result ¶
Get configuration and state information over Netconf from device.
- Parameters:
path (Optional[str]) – Subtree or xpath to filter
filter_type (Optional[str]) – Type of filtering to use, xpath or `subtree
Examples
Simple example:
> nr.run(task=netconf_get)
Passing options using
xpath
:> xpath = "/devices/device" > nr.run(task=netconf_get, > path=xpath)
Passing options using
subtree
:> subtree = "<interfaces></interfaces>" > nr.run(task=netconf_get, > filter_type="subtree", > path=subtree)
- Returns:
Result object with the following attributes set:
* result (RpcResult): Rpc and Manager