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

Merged

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.

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.62%. Comparing base (14d89a3) to head (e014564).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   84.62%   84.62%           
=======================================
  Files          33       33           
  Lines        4111     4111           
  Branches      879      879           
=======================================
  Hits         3479     3479           
  Misses        452      452           
  Partials      180      180           
Flag Coverage Δ
integration 66.27% <ø> (ø)
sanity 21.53% <ø> (ø)
units 84.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@liquorice-head
Copy link
Contributor Author

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

@felixfontein fixed. please check

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, looks good to me!

@felixfontein felixfontein merged commit 249b1a9 into ansible-collections:main Nov 22, 2024
30 checks passed
@felixfontein
Copy link
Collaborator

@liquorice-head thanks for your contribution!
@derdeagle thanks for reviewing!

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