Introduce Quota resource statement API#13236
Conversation
|
@blueorangutan package |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13236 +/- ##
============================================
+ Coverage 18.10% 18.11% +0.01%
- Complexity 16746 16773 +27
============================================
Files 6037 6040 +3
Lines 542933 543004 +71
Branches 66487 66476 -11
============================================
+ Hits 98283 98388 +105
+ Misses 433602 433568 -34
Partials 11048 11048
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:
|
|
@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 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16186)
|
|
@winterhazel , I can review, but you probably have someone more knowledgeable to look at this... |
@DaanHoogland I already asked some people that are familiar with Quota to review this one, but feel free to review as well if you want to. Your reviews would still be appreciated :) |
|
@blueorangutan package |
|
@winterhazel 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 ✖️ debian ✖️ suse15. SL-JID 18067 |
|
@blueorangutan package |
|
@winterhazel 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 18069 |
DaanHoogland
left a comment
There was a problem hiding this comment.
code looks generally good, a few questions only.
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.