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

WAFv2: Add support for IP sets and logging configuration #7680

Merged
merged 10 commits into from May 8, 2024

Conversation

pinzon
Copy link
Contributor

@pinzon pinzon commented May 7, 2024

This pull request introduces support for IP Sets and Logging configurations resources within the WAFv2 service. It includes the implementation of new operations:

  • create_ip_set
  • delete_ip_set
  • list_ip_sets
  • get_ip_set
  • update_ip_set
  • put_logging_configuration
  • get_logging_configuration
  • list_logging_configurations
  • delete_logging_configuration

Additionally, two CRUD tests have been added for these resources. These tests have been successfully executed against AWS without any complications.

Partially addresses localstack/localstack#10558

Copy link
Collaborator

@bblommers bblommers 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 the PR @pinzon!

It looks like the mypy check is failing:
https://github.com/getmoto/moto/actions/runs/8992773456/job/24703301155

I also think that for most of these types, we would have to use the mypy-version instead of the builtin-type - i.e. List[Dict[str, Any]] instead of list[dict[str, any]]. As far as I know, the builtin types are only supported in more recent Python versions, and we still support 3.8.

moto/wafv2/responses.py Outdated Show resolved Hide resolved
@pinzon pinzon requested a review from bblommers May 8, 2024 15:52
Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 96.31902% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 94.29%. Comparing base (9093b78) to head (e8e7e49).
Report is 18 commits behind head on master.

Files Patch % Lines
moto/wafv2/models.py 93.50% 5 Missing ⚠️
moto/wafv2/utils.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7680    +/-   ##
========================================
  Coverage   94.29%   94.29%            
========================================
  Files        1086     1087     +1     
  Lines       92356    92557   +201     
========================================
+ Hits        87090    87281   +191     
- Misses       5266     5276    +10     
Flag Coverage Δ
servertests 29.42% <15.33%> (-0.04%) ⬇️
unittests 94.26% <96.31%> (+<0.01%) ⬆️

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.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome - thank you @pinzon!

@bblommers bblommers added this to the 5.0.7 milestone May 8, 2024
@bblommers bblommers merged commit b21ae7c into getmoto:master May 8, 2024
40 checks passed
Copy link
Contributor

github-actions bot commented May 8, 2024

This is now part of moto >= 5.0.7.dev37

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.

None yet

2 participants