IOS-XR NetConf and Cliconf plugin work (#33332)

*  - Netconf plugin addition for iosxr
 - Utilities refactoring to support netconf and cliconf
 - iosx_banner refactoring for netconf and cliconf
 - Integration testcases changes to accomodate above changes

* Fix sanity failures, shippable errors and review comments

* fix pep8 issue

* changes run_command method to send specific command args

* - Review comment fixes
- iosxr_command changes to remove ComplexDict based command_spec

* - Move namespaces removal method from utils to netconf plugin

* Minor refactoring in utils and change in deprecation message

* rewrite build_xml logic and import changes for new utils dir structure

* - Review comment changes and minor changes to documentation

* * refactor common code and docs updates
This commit is contained in:
Kedar Kekan 2017-12-06 22:37:31 +05:30 committed by GitHub
parent 4b6061ce3e
commit 2bc4c4f156
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 1090 additions and 247 deletions

View file

@ -22,6 +22,7 @@ short_description: Manage Interface on Cisco IOS XR network devices
description:
- This module provides declarative management of Interfaces
on Cisco IOS XR network devices.
extends_documentation_fragment: iosxr
notes:
- Tested against IOS XR 6.1.2
options:
@ -142,7 +143,7 @@ from ansible.module_utils._text import to_text
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.connection import exec_command
from ansible.module_utils.network.iosxr.iosxr import get_config, load_config
from ansible.module_utils.network.iosxr.iosxr import iosxr_argument_spec, check_args
from ansible.module_utils.network.iosxr.iosxr import iosxr_argument_spec
from ansible.module_utils.network.common.utils import conditional, remove_default_spec
@ -228,7 +229,7 @@ def map_params_to_obj(module):
def map_config_to_obj(module):
data = get_config(module, flags=['interface'])
data = get_config(module, config_filter='interface')
interfaces = data.strip().rstrip('!').split('!')
if not interfaces:
@ -387,7 +388,6 @@ def main():
supports_check_mode=True)
warnings = list()
check_args(module, warnings)
result = {'changed': False}
@ -402,7 +402,6 @@ def main():
if commands:
if not module.check_mode:
load_config(module, commands, result['warnings'], commit=True)
exec_command(module, 'exit')
result['changed'] = True
failed_conditions = check_declarative_intent_params(module, want, result)