pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/apache/cloudstack/pull/10506

s/global-b40ec823a1a6a1af.css" /> Improve Quota Statement by julien-vaz · Pull Request #10506 · apache/cloudstack · GitHub
Skip to content

Improve Quota Statement#10506

Open
julien-vaz wants to merge 13 commits intoapache:mainfrom
scclouds:improve-quota-statement
Open

Improve Quota Statement#10506
julien-vaz wants to merge 13 commits intoapache:mainfrom
scclouds:improve-quota-statement

Conversation

@julien-vaz
Copy link
Copy Markdown
Contributor

Description

In the current version, the quotaStatement API is returning the internal ID for account and domain, which is not useful for users, since all APIs use/return the UUID. Also, when the usage_type parameter is informed, the API shows dummy records.

To address those problems:

  • the API was modified so it returns the resources' UUID;
  • the dummy records bug was fixed;
  • a new parameter showresources was added to display more information to the user about each usage type;
  • a new quotaStatementDetails API was created to list more details about each usage type;

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?

On CloudMonkey the quotaStatement API was called and:

  • the resources' UUID was returned instead of the internal ID;
  • when specified a usage_type no dummy records were showed;
  • the showresources parameter is properly working;

The quotaStatementDetails API was called successfully as well.

@julien-vaz
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@julien-vaz a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12669

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 5, 2025

Codecov Report

❌ Patch coverage is 23.44498% with 320 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.02%. Comparing base (3166e64) to head (ce5d96a).

Files with missing lines Patch % Lines
...udstack/api/response/QuotaResponseBuilderImpl.java 32.05% 105 Missing and 1 partial ⚠️
...g/apache/cloudstack/quota/vo/QuotaUsageJoinVO.java 35.41% 62 Missing ⚠️
...he/cloudstack/quota/dao/QuotaUsageJoinDaoImpl.java 0.00% 37 Missing ⚠️
...apache/cloudstack/quota/vo/QuotaUsageDetailVO.java 0.00% 31 Missing ⚠️
...ache/cloudstack/quota/vo/QuotaUsageResourceVO.java 0.00% 27 Missing ⚠️
...ache/cloudstack/api/command/QuotaStatementCmd.java 15.78% 16 Missing ⚠️
.../cloudstack/quota/dao/QuotaUsageDetailDaoImpl.java 0.00% 15 Missing ⚠️
...i/response/QuotaStatementItemResourceResponse.java 0.00% 13 Missing ⚠️
...loudstack/api/response/QuotaStatementResponse.java 36.36% 7 Missing ⚠️
...c/main/java/com/cloud/utils/db/SearchCriteria.java 0.00% 4 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10506      +/-   ##
============================================
+ Coverage     18.01%   18.02%   +0.01%     
- Complexity    16607    16629      +22     
============================================
  Files          6029     6035       +6     
  Lines        542160   542455     +295     
  Branches      66451    66473      +22     
============================================
+ Hits          97682    97799     +117     
- Misses       433461   433643     +182     
+ Partials      11017    11013       -4     
Flag Coverage Δ
uitests 3.52% <ø> (ø)
unittests 19.18% <23.44%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@winterhazel winterhazel self-requested a review March 6, 2025 13:06
@julien-vaz
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@julien-vaz a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 12689

@julien-vaz
Copy link
Copy Markdown
Contributor Author

I've just successfully builded the packages locally with -Dnoredist. Therefore, I'm requesting the package building again

@julien-vaz
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@julien-vaz a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12742

Copy link
Copy Markdown
Contributor

@lucas-a-martins lucas-a-martins left a comment

Choose a reason for hiding this comment

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

CLGTM

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

"accountName", "accountId", "domainId", "startDate", "endDate", "type", "showDetails")));
}
logger.debug("Creating quota statement from [{}] usage records for parameters [{}].", quotaUsages.size(),
ReflectionToStringBuilderUtils.reflectOnlySelectedFields(cmd, "accountName", "accountId", "domainId", "startDate", "endDate", "type", "showDetails"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this seems the reuse of the same array of strings. Not for this PR but maybe we should allow String[] as parameter for ReflectionToStringBuilderUtils.reflectOnlySelectedFields. Or allow some kind of predefined default per class to be registered.

@bernardodemarco bernardodemarco self-requested a review June 4, 2025 17:38
@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@nvazquez
Copy link
Copy Markdown
Contributor

nvazquez commented Oct 1, 2025

Hi @julien-vaz is this PR ready for review? Looks like its missing SQL statements for new tables and views?

@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@winterhazel
Copy link
Copy Markdown
Member

Are schema changes missing here? Seeing some new VO classes but no corresponding SQL changes I can find

@shwstppr good catch, some schema changes are missing. I will add them.

@winterhazel
Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@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.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17410

@github-actions
Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@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.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17568

@winterhazel
Copy link
Copy Markdown
Member

@blueorangutan package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy