.. _ansible.netcommon.netconf_get_module:
*****************************
ansible.netcommon.netconf_get
*****************************
**Fetch configuration/state data from NETCONF enabled network devices.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- NETCONF is a network management protocol developed and standardized by the IETF. It is documented in RFC 6241.
- This module allows the user to fetch configuration and state data from NETCONF enabled network devices.
Requirements
------------
The below requirements are needed on the host that executes this module.
- ncclient (>=v0.5.2)
- jxmlease (for display=json)
- xmltodict (for display=native)
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
display
string
|
Choices:
- json
- pretty
- xml
- native
|
Encoding scheme to use when serializing output from the device. The option json will serialize the output as JSON data. If the option value is json it requires jxmlease to be installed on control node. The option pretty is similar to received XML response but is using human readable format (spaces, new lines). The option value xml is similar to received XML response but removes all XML namespaces.
|
|
filter
raw
|
|
This argument specifies the string which acts as a filter to restrict the portions of the data to be are retrieved from the remote device. If this option is not specified entire configuration or state data is returned in result depending on the value of source option. The filter value can be either XML string or XPath or JSON string or native python dictionary, if the filter is in XPath format the NETCONF server running on remote host should support xpath capability else it will result in an error. If the filter is in JSON format the xmltodict library should be installed on the control node for JSON to XML conversion.
|
|
lock
string
|
Choices:
never ←
- always
- if-supported
|
Instructs the module to explicitly lock the datastore specified as source. If no source is defined, the running datastore will be locked. By setting the option value always is will explicitly lock the datastore mentioned in source option. By setting the option value never it will not lock the source datastore. The value if-supported allows better interworking with NETCONF servers, which do not support the (un)lock operation for all supported datastores.
|
|
source
string
|
Choices:
- running
- candidate
- startup
|
This argument specifies the datastore from which configuration data should be fetched. Valid values are running, candidate and startup. If the source value is not set both configuration and state information are returned in response from running datastore.
|