api: fix ProjectResponse.setVpcLimit assigning the network limit - #14022
api: fix ProjectResponse.setVpcLimit assigning the network limit#14022nagaboinaramgopal wants to merge 1 commit into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #14022 +/- ##
============================================
+ Coverage 16.34% 19.78% +3.43%
- Complexity 13574 19996 +6422
============================================
Files 5669 6371 +702
Lines 501368 575899 +74531
Branches 60903 70495 +9592
============================================
+ Hits 81964 113944 +31980
- Misses 410219 449536 +39317
- Partials 9185 12419 +3234
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@shwstppr 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 19085 |
setVpcLimit ignored its parameter and copied the networkLimit field into vpcLimit (this.vpcLimit = networkLimit), so a projects reported vpclimit always mirrored its networklimit instead of the real VPC limit (and would be null if setVpcLimit ran before setNetworkLimit). The sibling setters all assign their own parameter. Assign the vpcLimit parameter. Adds a regression test asserting setVpcLimit stores its own value and leaves networkLimit untouched.
f00e6b0 to
7f5229e
Compare
|
@blueorangutan package |
|
@DaanHoogland 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19088 |
Description
ProjectResponse.setVpcLimit(String vpcLimit)ignored its argument and assignedthe
networkLimitfield instead:Actual behaviour:
listProjectsreports a project'svpclimitequal to itsnetworklimit(andnullifsetVpcLimitruns beforesetNetworkLimit).Expected behaviour:
vpclimitreflects the project's real VPC limit,independent of the network limit.
Every sibling setter in the class assigns its own parameter; this one was a
copy-paste slip. Fix: assign the
vpcLimitparameter.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
ProjectResponseTest) assertingsetVpcLimitstores its ownvalue and leaves
networkLimituntouched..debpackages and deployed a KVM advanced zone; confirmedlistProjectsreturns the correct, independentvpclimit.How did you try to break this feature and the system with this change?
Set different network and VPC limits on a project and verified via
listProjectsthat
vpclimitreflects the VPC limit — including when the VPC limit is setbefore the network limit.