TPT-4551: Only get obj quota usage when has_usage is true#825
Merged
Conversation
zliang-akamai
requested review from
jbilskiAkam and
mawilk90
and removed request for
a team
July 14, 2026 03:15
…djust target versions
ezilber-akamai
approved these changes
Jul 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the object_storage_quota_info info module to only fetch/return quota usage when the API indicates usage is available (has_usage), aligning behavior with other quota-style modules and preventing unnecessary usage lookups.
Changes:
- Add conditional usage retrieval so
quota_usageis only fetched whenhas_usageis true. - Update the object storage quota integration test assertion to tolerate quotas without usage.
- Update Python tooling configuration (Black target versions, Pylint
py-version).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
plugins/modules/object_storage_quota_info.py |
Adds a helper get_quota_usage and wires it into secondary results so usage is only retrieved when available. |
tests/integration/targets/object_storage_quota_info/tasks/main.yaml |
Updates assertion logic to only require usage fields when has_usage is true. |
pyproject.toml |
Adjusts formatter/linter Python version targeting (Black + Pylint). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
lgarber-akamai
approved these changes
Jul 15, 2026
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.
📝 Description
Keep the behavior consistent with the global quota modules. Only to get and return the usage when
has_usageis true.✔️ How to Test