Number of running and stopped VMs as preset variables for Network type Quota tariffs#11689
Number of running and stopped VMs as preset variables for Network type Quota tariffs#11689hsato03 wants to merge 4 commits intoapache:mainfrom
Network type Quota tariffs#11689Conversation
|
@blueorangutan package |
|
@hsato03 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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11689 +/- ##
=========================================
Coverage 18.02% 18.02%
- Complexity 16460 16469 +9
=========================================
Files 5968 5969 +1
Lines 537213 537250 +37
Branches 65975 65977 +2
=========================================
+ Hits 96825 96862 +37
Misses 429469 429469
Partials 10919 10919
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:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15116 |
bernardodemarco
left a comment
There was a problem hiding this comment.
code lgtm, did not test it
...rk/quota/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/Value.java
Outdated
Show resolved
Hide resolved
…vationrule/presetvariables/Value.java Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
|
@blueorangutan package |
|
@hsato03 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 17292 |
Description
This PR aims to add two new preset variables for
Networktype Quota tariffs:value.resourceCounting.runningVmsandvalue.resourceCounting.stoppedVms.They represent the number of user instances that have a NIC on the network being processed. The preset variable
value.resourceCounting.runningVmsrefers to the number of running instances, andvalue.resourceCounting.stoppedVmsrefers to the number of stopped instances.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
I created 3 VMs on the same guest network (2 of them in running state and 1 in stopped state), then I created a
NetworkQuota tariff with the following activation rule:I called the
quotaUpdateAPI via CMK and verified that the value 300 was being returned when executing the activation rule.How did you try to break this feature and the system with this change?