Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8307 +/- ##
============================================
+ Coverage 31.08% 31.12% +0.04%
- Complexity 33887 33953 +66
============================================
Files 5397 5402 +5
Lines 379499 379658 +159
Branches 55373 55381 +8
============================================
+ Hits 117955 118170 +215
+ Misses 245899 245825 -74
- Partials 15645 15663 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
winterhazel
left a comment
There was a problem hiding this comment.
CLGTM, just pointed out some minor adjustments. I'll try testing soon.
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
I tested the feature introduced in this PR. It seems to be working as intended. First, I configured Quota to send e-mails. I also created an account with my e-mail, added 9 credits to it in order to enable Quota and configured its minimum balance to 10. To receive the e-mails at any time, I would set both
|
|
Thank you for testing @winterhazel |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
BryanMLima
left a comment
There was a problem hiding this comment.
Approving as my comments were addressed.
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
|
@JoaoJandre 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. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8937 |
|
@DaanHoogland @rohityadavcloud @shwstppr could we run the CI on this one? |
|
@blueorangutan test |
|
@shwstppr a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-9489)
|
|
Merging based on approvals, manual test results and CI results. |
* Quota email configuration feature
Description
Currently, users have no control on whether they receive Quota emails or not. If the Quota plugin is enabled, they will receive all applicable emails.
Furthermore, there is currently no way to set the (
min_balance) configuration without adding credits to the account. That value acts as a threshold for the QUOTA_LOW email template. However, there should be a way to easily configure it.To address the described problems, this PR creates a new API (
quotaConfigureEmail) which will has the following parameters: (accountid:String, emailTemplateName:String, enable:Boolean, minBalance:Integer).accountid) is required, since all configurations will only be in the accounts scope.emailTemplateName) is not required, unless the (enable) parameter is informed.enable) is not required, unless the (emailTemplateName) parameter is informed.minBalance) is not required. When informed, it will set the (minBalance) attribute in the (quota_account) table.accountid, emailTemplateName, enable) parameters are informed, the email referenced by (emailTemplateName) will be enabled/disabled based on (enable) for account referenced by (accountid).accountid, minBalance) parameters are informed, the (min_balance) of the account referenced by (accountid) will be set.Furthermore, a second API (
quotaListEmailConfiguration) was created, which has a single parameter: (accountid:String).To improve the user experience, the account-level setting
quota.enable.emailswas also created, which defines whether or not Quota emails will be sent to the account. By default, the setting has the valuetrue. When the setting is enabled, it is possible to disable sending specific email types (QUOTA_EMPTY,QUOTA_LOW,QUOTA_STATEMENTandQUOTA_UNLOCK_ACCOUNT) to the account via thequotaConfigureEmailAPI.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
Testing the
quotaConfigureEmailAPIaccountidaccountidandtemplatenameaccountid,templatenameandenablefor an account that does not have aQuota accountaccountid,templatename,enableandminbalancefor an account that does not have aQuota accountaccountid,templatenameandenableaccountidandminbalanceminbalanceupdatedaccountid,templatename,enableandminbalanceminbalanceupdatedTesting the
quotaListConfigurationAPIaccountidof an account that does not have email settingsaccountidof an account that has email settingsFeature tests: