DELETE - Add S3 Key module for PowerScale (ECS02C-808)#241
Open
ShrinidhiRao15 wants to merge 12 commits into
Open
DELETE - Add S3 Key module for PowerScale (ECS02C-808)#241ShrinidhiRao15 wants to merge 12 commits into
ShrinidhiRao15 wants to merge 12 commits into
Conversation
Signed-off-by: fpfuetsch <54020707+fpfuetsch@users.noreply.github.com>
Signed-off-by: fpfuetsch <54020707+fpfuetsch@users.noreply.github.com>
Signed-off-by: fpfuetsch <54020707+fpfuetsch@users.noreply.github.com>
Signed-off-by: fpfuetsch <54020707+fpfuetsch@users.noreply.github.com>
Signed-off-by: fpfuetsch <54020707+fpfuetsch@users.noreply.github.com>
- Fix shared mock state leakage across unit tests by using deepcopy
for params and fresh MagicMock instances for protocol_api methods
- Add 6 new unit tests: 404 handling, idempotency (if_not_present),
check mode (create/delete), generic exception, key rotation response
- Add mock data for rotation response (S3_CREATE_KEY_WITH_ROTATION_RESPONSE)
- Fix typo in module docstring ("exisitng" -> "existing")
- Add RST documentation for s3_key module (docs/modules/s3_key.rst)
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #241 +/- ##
==========================================
+ Coverage 90.41% 90.56% +0.14%
==========================================
Files 143 146 +3
Lines 16969 17287 +318
Branches 2354 2376 +22
==========================================
+ Hits 15343 15656 +313
- Misses 959 962 +3
- Partials 667 669 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add three new test cases to address coverage findings from build 916 report (ECS02C-990): - test_prereqs_validation_failure: covers lines 196-197 (validate_module_pre_reqs returning all_packages_found=False) - test_get_s3_key_returns_none: covers line 218 (get_s3_key API returning None) - test_create_s3_key_falsy_response: covers line 268 (create_s3_key API returning falsy/None response) Also adds PREREQS_VALIDATE_FAILURE fixture to mock_s3_key_api. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Address three categories of CheckMarx security issues: Use_Of_Hardcoded_Password: - Replace hardcoded secret key in RETURN doc sample with masked value - Replace hardcoded secret keys in test mock data with masked values Information_Exposure_Through_an_Error_Message: - Separate detailed error info (via utils.determine_error) from user-facing fail_json messages. Raw error details are logged for debugging but no longer included in the Ansible task failure output. Filtering_Sensitive_Logs: - Remove logging of s3_key_params dict which could contain sensitive SDK objects. Log operation context (user, access_zone) instead. - Remove explicit no_log=False on existing_key_expiry_minutes parameter. All 19 unit tests pass with these changes. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Replace f-string interpolation in LOG.error() calls with lazy % formatting as required by pylint. Affects 4 error handler sites in get_key_details, create_key, and delete_key methods. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The existing_key_expiry_minutes parameter name triggers Ansible's validate-modules no-log-needed check due to the 'key' substring. Restore explicit no_log=False to acknowledge it is not a secret. This is the standard pattern used across the collection (e.g. info.py filter_key, subnet.py ranges). Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
To be deleted as the code change made here has been merged into customer PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the
s3_keymodule for managing S3 keys on Dell PowerScale.JIRA Story: ECS02C-808
Reference PR: #208
Reference Branch: https://github.com/fpfuetsch/ansible-powerscale/tree/feature-207-s3key-support
Purpose
Created from the commits in PR #208 for Jenkins testing of the s3_key module.
Changes
Testing
This branch is intended for Jenkins CI/CD pipeline testing.