Skip to content

Add global quotas and quota usage support for OBJ services#661

Open
zliang-akamai wants to merge 5 commits intolinode:devfrom
zliang-akamai:zhiwei/obj-quotas
Open

Add global quotas and quota usage support for OBJ services#661
zliang-akamai wants to merge 5 commits intolinode:devfrom
zliang-akamai:zhiwei/obj-quotas

Conversation

@zliang-akamai
Copy link
Member

📝 Description

Add support for OBJ quota and global quota udpates.

✔️ How to Test

pytest test/integration/models/object_storage/test_obj_quotas.py -v
make test-unit

@zliang-akamai zliang-akamai requested a review from a team as a code owner March 5, 2026 22:04
@zliang-akamai zliang-akamai requested review from ckulinsk and mawilk90 and removed request for a team March 5, 2026 22:04
@zliang-akamai zliang-akamai requested a review from Copilot March 6, 2026 05:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds client-side support for Object Storage global (account-level) quotas and enriches existing Object Storage quota models with quota type and usage support metadata, along with corresponding unit/integration tests and fixtures.

Changes:

  • Add ObjectStorageGlobalQuota model with a usage() helper for global quota usage retrieval.
  • Expose quota_type and has_usage properties on ObjectStorageQuota, and add ObjectStorageGroup.global_quotas() for listing global quotas.
  • Extend unit/integration tests and fixtures to cover global quotas and the new quota fields.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
linode_api4/objects/object_storage.py Adds quota_type/has_usage to ObjectStorageQuota and introduces ObjectStorageGlobalQuota model + usage call.
linode_api4/groups/object_storage.py Adds ObjectStorageGroup.global_quotas() collection method.
test/unit/objects/object_storage_test.py Adds unit coverage for new quota fields and global quota get/list/usage flows.
test/integration/models/object_storage/test_obj_quotas.py Extends integration coverage for quota_type/has_usage and adds global quota tests and 404 handling cases.
test/fixtures/object-storage_quotas_obj-objects-us-ord-1.json Updates quota fixture to include quota_type and has_usage.
test/fixtures/object-storage_quotas.json Updates quotas list fixture to include quota_type and has_usage.
test/fixtures/object-storage_global-quotas.json Adds fixture for global quotas list endpoint.
test/fixtures/object-storage_global-quotas_obj-access-keys-per-account.json Adds fixture for a single global quota GET endpoint.
test/fixtures/object-storage_global-quotas_obj-access-keys-per-account_usage.json Adds fixture for global quota usage endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants