linux-system-roles / network

An ansible role to configure networking
https://linux-system-roles.github.io/network/
BSD 3-Clause "New" or "Revised" License
238 stars 106 forks source link

feat: Add the support for the optional route source parameter in nm provider #714

Closed liangwen12year closed 3 months ago

liangwen12year commented 3 months ago

Enhancement: Add the optional route source parameter for the nm provider

Reason: In a scenario where you have a machine with multiple public IP addresses, typically due to a multi-WAN setup, the src parameter in the context of routes allows you to specify which source IP address should be used when sending packets via a specific route. This is crucial when you want to ensure that outbound traffic uses a specific IP address tied to a particular network interface, especially when dealing with multiple WAN connections.

Result: Adding support for the src parameter in routes results in a more powerful and flexible network configuration capability, especially important in environments with multiple network interfaces or multiple IP addresses, it provides better control over traffic routing.

Resolves: https://issues.redhat.com/browse/RHEL-3252

Issue Tracker Tickets (Jira or BZ if any):

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 43.29%. Comparing base (34d1f2d) to head (169d276). Report is 22 commits behind head on main.

Files Patch % Lines
library/network_connections.py 0.00% 2 Missing :warning:
module_utils/network_lsr/argument_validator.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #714 +/- ## =========================================== + Coverage 20.50% 43.29% +22.79% =========================================== Files 10 12 +2 Lines 1478 3109 +1631 Branches 433 0 -433 =========================================== + Hits 303 1346 +1043 - Misses 1174 1763 +589 + Partials 1 0 -1 ``` | [Flag](https://app.codecov.io/gh/linux-system-roles/network/pull/714/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | Coverage Δ | | |---|---|---| | [sanity](https://app.codecov.io/gh/linux-system-roles/network/pull/714/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | `?` | | 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.

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

liangwen12year commented 3 months ago

[citest]

liangwen12year commented 3 months ago

[citest]

liangwen12year commented 3 months ago

This PR takes part of the code from https://github.com/linux-system-roles/network/pull/529.

liangwen12year commented 3 months ago

[citest]