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.

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.54%. Comparing base (e6c7a71) to head (e443959).
⚠️ Report is 58 commits behind head on main.

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.39%   17.54%   +0.14%     
- Complexity    15283    15470     +187     
============================================
  Files          5889     5897       +8     
  Lines        526184   527458    +1274     
  Branches      64242    64412     +170     
============================================
+ Hits          91542    92535     +993     
- Misses       424298   424526     +228     
- Partials      10344    10397      +53     
Flag Coverage Δ
uitests 3.60% <ø> (-0.02%) ⬇️
unittests 18.60% <43.75%> (+0.16%) ⬆️

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

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.

2 participants