�
�Udac @` s d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z d d
l
m Z d d l
m Z m Z d d l m Z e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust networkt supported_bys�
---
module: iosxr_netconf
version_added: "2.5"
author: "Kedar Kekan (@kedarX)"
short_description: Configures NetConf sub-system service on Cisco IOS-XR devices
description:
- This module provides an abstraction that enables and configures
the netconf system service running on Cisco IOS-XR Software.
This module can be used to easily enable the Netconf API. Netconf provides
a programmatic interface for working with configuration and state
resources as defined in RFC 6242.
extends_documentation_fragment: iosxr
options:
netconf_port:
description:
- This argument specifies the port the netconf service should
listen on for SSH connections. The default port as defined
in RFC 6242 is 830.
required: false
default: 830
aliases: ['listens_on']
netconf_vrf:
description:
- netconf vrf name
required: false
default: default
aliases: ['vrf']
state:
description:
- Specifies the state of the C(iosxr_netconf) resource on
the remote device. If the I(state) argument is set to
I(present) the netconf service will be configured. If the
I(state) argument is set to I(absent) the netconf service
will be removed from the configuration.
required: false
default: present
choices: ['present', 'absent']
notes:
- This module works with connection C(network_cli). See L(the IOS-XR Platform Options,../network/user_guide/platform_iosxr.html).
- Tested against Cisco IOS XR Software, Version 6.1.3
s�
- name: enable netconf service on port 830
iosxr_netconf:
listens_on: 830
state: present
- name: disable netconf service
iosxr_netconf:
state: absent
s�
commands:
description: Returns the command sent to the remote device
returned: when changed is True
type: str
sample: 'ssh server netconf port 830'
N( t
AnsibleModule( t iosxr_argument_spec( t
get_configt load_config( t iteritemsc C` s@ | \ } } t � } | d d k r� | d d k rE | j d � n d | k ri | j d | d � n | d r<x&