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 change detection for recent Vyos versions #355

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

isundaylee
Copy link

@isundaylee isundaylee commented Sep 29, 2024

Change Summary

Recent Vyos versions started returning this for no-change compare saved output:

No changes between working and saved configurations.

[edit]

instead of just [edit]. This causes vyos_config to always return a changed result. This PR fixes the issue by properly detecting both cases.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Other (please describe):

Related Task(s)

N/A

Related PR(s)

N/A

Proposed changes

See "Change Summary" section.

How to test

Point my Ansible code to use a version of vyos.vyos with this patch in requirements.txt, run ansible-galaxy install -r requirements.yml --force, and verify that vyos_config now properly returns ok instead of changed when there are no changes.

- name: [email protected]:isundaylee/vyos.vyos.git
  type: git
  version: bug/vyos_config_changed

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@isundaylee
Copy link
Author

@c-po @sever-sever Thanks for the reviews! Just want to check - is there anything else I need to do before this gets merged? No rush at all - just checking. Thanks!

@c-po c-po enabled auto-merge (squash) October 14, 2024 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants