Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iosxr cliconf plugin #43837

Merged
merged 4 commits into from
Aug 10, 2018

Conversation

ganeshrn
Copy link
Member

@ganeshrn ganeshrn commented Aug 8, 2018

SUMMARY

Fixes #39056

  • Update iosxr cliconf plugin
  • Modify iosxr module_utils code to support
    refactored cliconf plugin api's
  • Other minor changes
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

module_utils/network/ios/ios.py
module_utils/network/iosxr/iosxr.py
modules/network/iosxr/iosxr_command.py
modules/network/iosxr/iosxr_config.py
modules/network/iosxr/iosxr_facts.py
modules/network/iosxr/iosxr_interface.py
plugins/cliconf/init.py
plugins/cliconf/iosxr.py
plugins/cliconf/junos.py

ANSIBLE VERSION
2.7
ADDITIONAL INFORMATION

Fixes ansible#39056

*  Update iosxr cliconf plugin
*  Modify iosxr module_utils code to support
   refactored cliconf plugin api's
*  Other minor changes
@ganeshrn
Copy link
Member Author

ganeshrn commented Aug 8, 2018

Integration test run

$ ansible-test network-integration --inventory ~/targets/network.inventory iosxr_config -vvvv --diff
<--snip-->
PLAY RECAP *************************************************************************************************************************************************
iosxr-01 : ok=165  changed=46   unreachable=0    failed=0


$ ansible-test network-integration --inventory ~/targets/network.inventory iosxr_command -vvvv --diff
<--snip-->
PLAY RECAP *************************************************************************************************************************************************
iosxr-01 : ok=47   changed=0    unreachable=0    failed=0

@ansibot
Copy link
Contributor

ansibot commented Aug 8, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category nxos Cisco NXOS community support:core This issue/PR relates to code supported by the Ansible Engineering Team. support:network This issue/PR relates to code supported by the Ansible Network Team. labels Aug 8, 2018
@ganeshrn ganeshrn removed the needs_triage Needs a first human triage before being processed. label Aug 8, 2018
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Aug 8, 2018
@ansibot ansibot added test This PR relates to tests. core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 8, 2018
if prompt.endswith(')#'):
self.send_command('abort')
if admin and 'admin-' in prompt:
self.send_command('abort')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be 'exit' instead of 'abort'

Copy link
Member Author

@ganeshrn ganeshrn Aug 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing the config on device in candidate datastore that is already present and after that fetching the diff won't result in output. However while existing (without commit since no diff) will result in a prompt on iosxr.

RP/0/0/CPU0:an-iosxr-01(config)#interface Loopback888
RP/0/0/CPU0:an-iosxr-01(config-if)#description test for ansible
RP/0/0/CPU0:an-iosxr-01(config-if)#exit
RP/0/0/CPU0:an-iosxr-01(config)#exit
Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:

Since prompt is not handled it triggers command timeout. That's the reason abort is used

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Aug 9, 2018
Copy link
Contributor

@gdpak gdpak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iosxr- lgtm

@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Aug 10, 2018
@ansibot ansibot added the core_review In order to be merged, this PR must follow the core review workflow. label Aug 10, 2018
@ganeshrn ganeshrn merged commit d1de1e0 into ansible:devel Aug 10, 2018
@ganeshrn ganeshrn deleted the iosxr_cliconf_plugin_refactor branch August 10, 2018 07:42
alikins added a commit that referenced this pull request Aug 10, 2018
* devel: (30 commits)
  Prevent data being truncated over persistent connection socket (#43885)
  Fix eos_command integration test failures (#43922)
  Update iosxr cliconf plugin (#43837)
  win_domain modules: ensure Netlogon service is still running after promotion (#43703)
  openvswitch_db : Handle column value conversion and idempotency in no_key case (#43869)
  Fix typo
  Fix spelling of ansbile to ansible (#43898)
  added platform guides for NOS and VOSS (#43854)
  Fix download URL for yum integration test.
  New module for managing EMC VNX Block storage (#42945)
  Docker integration tests: factorize setup (#42306)
  VMware: datastore selection (#35812)
  Remove unnecessary features from cli_command (#43829)
  [doc] import_role: mention version from which behavior changed and fix some typos (#43843)
  Add source interface and use-vrf features (#43418)
  Fix unreferenced msg from vmware_host (#43872)
  set supports_generate_diff to False vyos (#43873)
  add group_by_os_family in azure dynamic inventory (#40702)
  ansible-test: Create public key creating Windows targets (#43760)
  azure_rm_loadbalancer_facts.py: list() takes at least 2 arguments fix (#29046) (#29050)
  ...
@dagwieers dagwieers added iosxr Cisco IOSXR community cisco Cisco technologies labels Feb 22, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 cisco Cisco technologies core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. iosxr Cisco IOSXR community module This issue/PR relates to a module. networking Network category nxos Cisco NXOS community support:core This issue/PR relates to code supported by the Ansible Engineering Team. support:network This issue/PR relates to code supported by the Ansible Network Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NET_MOD] Fix cliconf api's for supported network platforms
4 participants