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

cs_firewall: add dest cidrs #84

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

resmo
Copy link
Member

@resmo resmo commented Aug 11, 2021

closes #76

/cc @nathanmcgarvey may you have a look and test it?

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #84 (f228096) into master (d16c15f) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
- Coverage   84.25%   84.23%   -0.03%     
==========================================
  Files          56       56              
  Lines        5597     5602       +5     
  Branches     1255     1256       +1     
==========================================
+ Hits         4716     4719       +3     
- Misses        445      446       +1     
- Partials      436      437       +1     
Impacted Files Coverage Δ
plugins/modules/cs_firewall.py 87.60% <66.66%> (-1.19%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d16c15f...f228096. Read the comment docs.

@resmo resmo force-pushed the feature/cs_firewall_dest_cidrs branch from 051972c to 0621d7b Compare August 11, 2021 17:52
@resmo resmo force-pushed the feature/cs_firewall_dest_cidrs branch from 0621d7b to f228096 Compare August 15, 2021 09:36
@resmo resmo added ready and removed changelog labels Aug 15, 2021
@rvalle
Copy link
Collaborator

rvalle commented May 17, 2024

hi @resmo, this is implemented but not released, right?
Is it testing that is missing?
I would also benefit from this enhancement, I can help here.

@resmo
Copy link
Member Author

resmo commented May 17, 2024

hey @rvalle, yes, only testing is missing.

@rvalle
Copy link
Collaborator

rvalle commented May 17, 2024

ok @resmo will test it and let you know.

@rvalle
Copy link
Collaborator

rvalle commented May 17, 2024

@resmo, setting dest_cidr works, however, it should be called "dest_cidrs", as it takes an array of cidrs for destination, and for source, the parameter it is already called cidrs, in plural.

I tested with one, and several values and they get set properly on ACS (using 4.16.x)
What I noticed, is that once set, if the module is called with another set of dest_cidr the rule is not executed. dest_cidr seems not to be part of the data used to workout if the module needs to be applied or if the state is already OK.

@rvalle
Copy link
Collaborator

rvalle commented May 17, 2024

ok, I can see that it is dest_cidrs, dont know where I picked dest_cidr from, which I see it works because it is an alias only.

@resmo
Copy link
Member Author

resmo commented May 17, 2024

ok, I can see that it is dest_cidrs, dont know where I picked dest_cidr from, which I see it works because it is an alias only.

yeah, it was a "design decision" I made in the early development days to have an alias for lists in the "singular" form because ansible allows to use the list as "single" value:

dest_cidrs: example

when you would expect it should have been:

dest_cidrs: [ example ]

that is why a singluar alias makes sense:

dest_cidr: example

But the downside of it, is, you can not see anymore from the name that it the value is actually a list.

@rvalle
Copy link
Collaborator

rvalle commented May 17, 2024

@resmo I dont see any obvious bug with not detecting the change of dest_cidrs... any idea?

@rvalle
Copy link
Collaborator

rvalle commented May 30, 2024

@resmo I would suggest we release this feature in its current state. it is certainly an improvement.

It does not always detect changes, but it is certainly not the only module with that issue. Perhaps we should open a different issue to deal with functionalities for which change is not detected.

@resmo resmo force-pushed the master branch 2 times, most recently from 2e1f31b to 52fcebc Compare December 2, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing argument for cs_firewall: destcidrlist
2 participants