Introduce Quota resource statement API#13236
Open
winterhazel wants to merge 4 commits into
Open
Conversation
Member
Author
|
@blueorangutan package |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13236 +/- ##
==========================================
Coverage 18.10% 18.10%
- Complexity 16746 16759 +13
==========================================
Files 6037 6040 +3
Lines 542933 543141 +208
Branches 66487 66507 +20
==========================================
+ Hits 98283 98346 +63
- Misses 433602 433744 +142
- Partials 11048 11051 +3
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:
|
Contributor
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18042 |
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
This PR introduces the
quotaResourceStatementAPI to the Quota plugin. This API allows viewing the Quota consumption associated with a specific resource. It will be used by the Quota UI rework in a separate PR.In addition, some adjustments were made in the
quotaStatementAPI in order to allow including the consumption of subdomains in the resulting statement.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
I tested the API by fuzzing its parameters for root admin, domain admin, and user accounts. In the tests, I validated that the API returned the expected response while performing correct permission checking.
Environment configuration
My environment had two domains:
ROOTandd1.Each domain had a domain admin (
drforROOTandd1ford1) and a user account (urforROOTandu1ford1).ROOTalso had a project and the root admin.Test 1 (user accounts)
id: returns the statement scoped to the owning account when the caller has access to it, and an error when it does not.accountid: returns the statement scoped to the provided account if accessible, or an empty list otherwise.projectid: returns the statement scoped to the provided project if accessible, or an exception otherwise.isrecursive: ignored for user accounts.Test 2 (domain admins)
id: returns the statement scoped to the caller's domain.accountid: returns the statement scoped to the provided account if accessible, or an exception otherwise.projectid: returns the statement scoped to the provided project if accessible, or an exception otherwise.isrecursive: allows domain admins to generate the statement including usage records of subdomains.Test 3 (root admins)
id: returns the statement of any resource without limiting.accountid: returns the statement scoped to the provided account.projectid: returns the statement scoped to the provided project.isrecursive: allows admins to generate the statement including usage records of subdomains.