Skip to content

Conversation

@hsato03
Copy link
Collaborator

@hsato03 hsato03 commented Oct 8, 2025

Description

This PR adds two new preset variables for Network and VPC usage type Quota tariffs.

For Network tariffs, the variables value.networkOffering.id and value.networkOffering.name have been created. For VPC tariffs, the variables value.vpcOffering.id and value.vpcOffering.name have been added.

They represent the resource's offering ID and name, respectively.

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

I created an isolated network and a VPC with the following offerings.

Offering ID Name
Network 30b8c61a-f75a-4b65-8ff3-52a20b179333 DefaultIsolatedNetworkOfferingWithSourceNatService
VPC 2128acd0-9753-4e2a-8c99-2815da566873 Default VPC offering

Then, I created a Network tariff (offering-test-network) with the following activation rule.

if (value.networkOffering.id === '30b8c61a-f75a-4b65-8ff3-52a20b179333 && value.networkOffering.name === 'DefaultIsolatedNetworkOfferingWithSourceNatService') {
300
} else {
0
}

Next, I created a VPC tariff (offering-test-vpc) with the following activation rule.

if (value.vpcOffering.id === '2128acd0-9753-4e2a-8c99-2815da566873 && value.vpcOffering.name === 'Default VPC offering') {
500
} else {
0
}

I called the quotaUpdate API and verified that the value 300 was returned by the offering-test-network activation rule, while offering-test-vpc returned 500.

How did you try to break this feature and the system with this change?

@hsato03
Copy link
Collaborator Author

hsato03 commented Oct 8, 2025

@blueorangutan package

@blueorangutan
Copy link

@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
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

❌ Patch coverage is 43.75000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.85%. Comparing base (04b58ac) to head (30aab35).

Files with missing lines Patch % Lines
...ck/quota/activationrule/presetvariables/Value.java 0.00% 14 Missing ⚠️
...tionrule/presetvariables/PresetVariableHelper.java 77.77% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11810   +/-   ##
=========================================
  Coverage     17.84%   17.85%           
- Complexity    15983    15985    +2     
=========================================
  Files          5929     5929           
  Lines        531084   531116   +32     
  Branches      64914    64914           
=========================================
+ Hits          94795    94810   +15     
- Misses       425675   425691   +16     
- Partials      10614    10615    +1     
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.94% <43.75%> (+<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.

@blueorangutan
Copy link

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

@winterhazel winterhazel added this to the 4.23.0 milestone Dec 20, 2025
@github-actions
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

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

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.

4 participants