linux-system-roles / firewall

Configure firewalld and system-config-firewall
https://linux-system-roles.github.io/firewall/
GNU General Public License v2.0
57 stars 32 forks source link

fix: firewall_lib: make try_set_zone_of_interface idempotent #167

Closed BrennanPaciorek closed 1 year ago

BrennanPaciorek commented 1 year ago

Enhancement: Make try_set_zone_of_interface in library/firewall_lib.py return a second value, which denotes whether the interface's zone was changed.

Reason: Network Manager interface assignment reported changed when no changes were present

Result: The module now properly reports changes when assigning zones to interfaces handled by Network Manager.

Issue Tracker Tickets (Jira or BZ if any):

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.90% and project coverage change: +2.10% :tada:

Comparison is base (25dd295) 54.92% compared to head (086e048) 57.02%.

:exclamation: Current head 086e048 differs from pull request most recent head f8675a1. Consider uploading reports for the commit f8675a1 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #167 +/- ## ========================================== + Coverage 54.92% 57.02% +2.10% ========================================== Files 2 2 Lines 823 826 +3 ========================================== + Hits 452 471 +19 + Misses 371 355 -16 ``` | Flag | Coverage Δ | | |---|---|---| | sanity | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/linux-system-roles/firewall/pull/167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | Coverage Δ | | |---|---|---| | [library/firewall\_lib.py](https://app.codecov.io/gh/linux-system-roles/firewall/pull/167?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles#diff-bGlicmFyeS9maXJld2FsbF9saWIucHk=) | `66.71% <90.90%> (+2.41%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

richm commented 1 year ago

can you add a unit test for this?

BrennanPaciorek commented 1 year ago

can you add a unit test for this?

Yes, working on this now.

BrennanPaciorek commented 1 year ago

PR was not updating with new commits, so I closed then reopened PR

richm commented 1 year ago

[citest]