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

Fix rollback in junos_config #31424

Merged
merged 2 commits into from
Oct 11, 2017
Merged

Conversation

ganeshrn
Copy link
Member

@ganeshrn ganeshrn commented Oct 6, 2017

SUMMARY

Fixes #30778

  • Call load_configuration with rollback id in case
    the id is given as input
  • Pass rollback id to get_diff() to fetch diff from device
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

junos_config

ANSIBLE VERSION
2.4
ADDITIONAL INFORMATION

Fixes ansible#30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device
@ansibot
Copy link
Contributor

ansibot commented Oct 6, 2017

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. module_utils/ needs_triage Needs a first human triage before being processed. networking Network category owner_pr This PR is made by the module's maintainer. support:network This issue/PR relates to code supported by the Ansible Network Team. labels Oct 6, 2017
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Oct 6, 2017
@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. owner_pr This PR is made by the module's maintainer. labels Oct 6, 2017
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. owner_pr This PR is made by the module's maintainer. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Oct 9, 2017
@@ -101,9 +105,14 @@ def test_junos_config_confirm(self):
self.assertEqual(kwargs['confirm_timeout'], 40)

def test_junos_config_rollback(self):
set_module_args(dict(rollback=10))
rollback = 10
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure why you pulled this out

Copy link
Member Author

Choose a reason for hiding this comment

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

rollback value passed as input to the module is used in assert below to check right value is passed to function.

Copy link
Contributor

Choose a reason for hiding this comment

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

...right. Well I feel silly now

@ganeshrn ganeshrn merged commit 88da95b into ansible:devel Oct 11, 2017
@ganeshrn ganeshrn deleted the junos_config_rollback branch October 11, 2017 04:56
ganeshrn added a commit to ganeshrn/ansible that referenced this pull request Oct 11, 2017
* Fix rollback in junos_config

Fixes ansible#30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test

(cherry picked from commit 88da95b)
ganeshrn added a commit that referenced this pull request Oct 11, 2017
* Fix rollback in junos_config (#31424)

* Fix rollback in junos_config

Fixes #30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test

(cherry picked from commit 88da95b)

* Update changelog
BondAnthony pushed a commit to BondAnthony/ansible that referenced this pull request Oct 14, 2017
* Fix rollback in junos_config

Fixes ansible#30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test
mtb-xt pushed a commit to mtb-xt/ansible that referenced this pull request Oct 15, 2017
* Fix rollback in junos_config

Fixes ansible#30778

*  Call `load_configuration` with rollback id in case
   the id is given as input
*  Pass rollback id to `get_diff()` to fetch diff from device

* Fix unit test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module_utils/ module This issue/PR relates to a module. networking Network category owner_pr This PR is made by the module's maintainer. support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

junos_config commit/rollback not working
4 participants