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 _api_data.py #324

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

Conversation

liquorice-head
Copy link
Contributor

SUMMARY

The behavior of the log and log-prefix fields has been changed. Previously, if these fields were not declared in the code, Ansible would attempt to delete them. Now, if the fields are not declared, Ansible will assign them the default value for the router OS

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • _api_data.py
ADDITIONAL INFORMATION

@liquorice-head liquorice-head marked this pull request as ready for review October 23, 2024 10:31
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

'log': KeyInfo(can_disable=True),
'log-prefix': KeyInfo(can_disable=True),
'log': KeyInfo(default=False),
'log-prefix': KeyInfo(default=''),
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the reason behind this change? Was the behavior always wrong, or did RouterOS's behavior change from one version to another?

Copy link
Contributor Author

@liquorice-head liquorice-head Oct 28, 2024

Choose a reason for hiding this comment

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

image As far as I'm concerned, the behavior was always wrong. I have tested on 6.49.10, 6.49.13, 7.14.1. If you use the --diff parameter in ansible with check mode, you will see that each time ansible tries to remove these fields.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can second that. It was always bugging me but I didn't have the time to investigate.

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Please note that the unit tests now fail, since some of them rely on the old structure of I think ip firewall filter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants