-
Notifications
You must be signed in to change notification settings - Fork 69
T6837 / #288 support for replace in vyos_config module #361
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
base: main
Are you sure you want to change the base?
T6837 / #288 support for replace in vyos_config module #361
Conversation
…g for the module. Also Improved detection of config lines already present on router, and filter them out in calculated diff
@mrvantage Thanks so much for the contribution. Can you add unit tests for this PR, please? Specifically testing each new route through the code and any variations (such as error cases and the quote misalignments). Unit tests for
|
Yes, I think this definitely requires some proper unit tests. I already found an issue with my proposed implementation. This doesn't cover the situation where deleting config lines leaves a group without any sub settings. This could lead to invalid configuration, and there's no nice way of cleaning this up in replace mode. For example, when removing a wireguard peer from the config maintained in ansible, the peer remains without any settings on the router, which is invalid. I need to come up with a solution for this first. If I manage, I will look at writing some unit tests to cover these kind of situations. |
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
I have read the CLA Document and I hereby sign the CLA |
1 similar comment
I have read the CLA Document and I hereby sign the CLA |
Change Summary
T6837 / #288 Implemented replace functionality using a boolean arg for the module. Also Improved detection of config lines already present on router, and filter them out in calculated diff
Types of changes
Adjustment of filter logic, to filter out lines already present on router. This to only push changes to router, and avoid setting config that is in place already.
Related Task(s)
T6837
Related PR(s)
n/a
Proposed changes
false
by default, for backward compatibilitytrue
all lines from the running configHow to test
Checklist: