cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Quota enable config to user/domain scope

Open BryanMLima opened this issue 2 years ago • 14 comments

Description

Currently, ACS only has the option to enable the Quota plugin globally. However, for some use cases having the plugin active to specific accounts and domains may be more interesting. Therefore, this PR aims to add this functionality through the quota config quota.account.enabled. Moreover, a string was added to quota accounts with the plugin disabled in the quota summary section in the UI. In the future, a filter will be added for accounts with the plugin enabled, disabled and for removed accounts.

Finally, for the config to be used in a domain scope, when it cannot be found at user level, it is required that the following global configurations are enabled: enable.account.settings.for.domain and enable.domain.settings.for.child.domain.

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)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [x] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

List of accounts with the plugin enabled and disabled: image

How Has This Been Tested?

This was tested in a local lab setting the quota.account.enabled to true and false to random accounts. In the quota summary section the accounts where correctly displayed: accounts with the plugin disabled had the (quota-disabled) string attached and accounts with the plugin enabled were normally displayed.

BryanMLima avatar Aug 30 '22 14:08 BryanMLima

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Aug 30 '22 14:08 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Aug 30 '22 14:08 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6690 (SL-JID-2253)

blueorangutan avatar Aug 30 '22 14:08 blueorangutan

Codecov Report

Merging #6690 (8a9d15d) into main (4a06363) will increase coverage by 0.00%. The diff coverage is 50.00%.

:exclamation: Current head 8a9d15d differs from pull request most recent head 553538c. Consider uploading reports for the commit 553538c to get more accurate results

@@            Coverage Diff            @@
##               main    #6690   +/-   ##
=========================================
  Coverage     10.84%   10.84%           
- Complexity     7095     7101    +6     
=========================================
  Files          2485     2485           
  Lines        245370   245387   +17     
  Branches      38319    38322    +3     
=========================================
+ Hits          26602    26614   +12     
- Misses       215500   215505    +5     
  Partials       3268     3268           
Impacted Files Coverage Δ
.../org/apache/cloudstack/quota/QuotaManagerImpl.java 45.09% <0.00%> (-0.91%) :arrow_down:
.../cloudstack/api/response/QuotaSummaryResponse.java 0.00% <0.00%> (ø)
.../org/apache/cloudstack/quota/QuotaServiceImpl.java 35.86% <ø> (ø)
...ache/cloudstack/quota/dao/QuotaAccountDaoImpl.java 50.00% <88.88%> (+50.00%) :arrow_up:
.../apache/cloudstack/quota/constant/QuotaConfig.java 100.00% <100.00%> (ø)
...org/apache/cloudstack/quota/vo/QuotaAccountVO.java 76.31% <0.00%> (+2.63%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 30 '22 15:08 codecov[bot]

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Sep 06 '22 13:09 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Sep 06 '22 13:09 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6690 (SL-JID-2303)

blueorangutan avatar Sep 06 '22 13:09 blueorangutan

@blueorangutan package

DaanHoogland avatar Sep 06 '22 14:09 DaanHoogland

@DaanHoogland a 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 avatar Sep 06 '22 14:09 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4138

blueorangutan avatar Sep 06 '22 14:09 blueorangutan

@blueorangutan test

DaanHoogland avatar Sep 07 '22 07:09 DaanHoogland

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

blueorangutan avatar Sep 07 '22 07:09 blueorangutan

Trillian test result (tid-4833) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 43715 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6690-t4833-kvm-centos7.zip Smoke tests completed. 100 look OK, 1 have errors Only failed tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 640.10 test_kubernetes_clusters.py

blueorangutan avatar Sep 07 '22 19:09 blueorangutan

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

github-actions[bot] avatar Oct 17 '22 08:10 github-actions[bot]

@BryanMLima can you look at the conflicts

DaanHoogland avatar Oct 17 '22 08:10 DaanHoogland

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Oct 21 '22 17:10 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Oct 21 '22 17:10 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6690 (SL-JID-2543)

blueorangutan avatar Oct 21 '22 17:10 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Oct 21 '22 19:10 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Oct 21 '22 19:10 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6690 (SL-JID-2544)

blueorangutan avatar Oct 21 '22 19:10 blueorangutan

Found UI changes, kicking a new UI QA build @blueorangutan ui

acs-robot avatar Oct 25 '22 14:10 acs-robot

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

blueorangutan avatar Oct 25 '22 14:10 blueorangutan

UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6690 (SL-JID-2564)

blueorangutan avatar Oct 25 '22 14:10 blueorangutan

@blueorangutan package

DaanHoogland avatar Oct 26 '22 06:10 DaanHoogland

@DaanHoogland a 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 avatar Oct 26 '22 06:10 blueorangutan

Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4550

blueorangutan avatar Oct 26 '22 07:10 blueorangutan

@blueorangutan test

DaanHoogland avatar Oct 26 '22 09:10 DaanHoogland