Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IOPS and bytes preset variables to VOLUME usage type #10326

Conversation

lucas-a-martins
Copy link
Collaborator

Description

This PR adds the following preset variables to the activation rules of VOLUME Quota tariffs:

Disk Offering:
  • value.diskOffering.bytesReadRate: returns a long with the bytes read rate of the disk offering;

  • value.diskOffering.bytesReadBurst: returns a long with the burst bytes read rate of the disk offering;

  • value.diskOffering.bytesReadBurstLength: returns the length, in seconds, of the bytes read rate burst;

  • value.diskOffering.bytesWriteRate: returns a long with the bytes write rate of the disk offering;

  • value.diskOffering.bytesWriteBurst: returns a long with the burst bytes write rate of the disk offering;

  • value.diskOffering.bytesWriteBurstLength: returns the length, in seconds, of the bytes write rate burst;

  • value.diskOffering.iopsReadRate: returns a long with the I/O requests read rate of the disk offering;

  • value.diskOffering.iopsReadBurst: returns a long with the burst I/O requests read rate of the disk offering;

  • value.diskOffering.iopsReadBurstLength: returns the length, in seconds, of the IOPS read burst in seconds;

  • value.diskOffering.iopsWriteRate: returns a long with the I/O requests write rate of the disk offering;

  • value.diskOffering.iopsWriteBurst: returns a long with the burst I/O requests write rate of the disk offering;

  • value.diskOffering.iopsWriteBurstLength: returns the length, in seconds, of the IOPS write burst.

Volume:
  • value.volumeType: the volume type. Values can be: UNKNOWN, ROOT, SWAP, DATADISK and ISO.

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

How Has This Been Tested?

First, I executed the quotaPresetVariablesList API using the parameter usagetype=6, and it listed all the new preset variables.

Then, in the Create Quota Tariff form, I checked if the presets were available for different usage types by using them in an activation rule and pressing the Validate activation rule button. As expected, the VOLUME usage type was the only one that didn't result in an error.

Finally, for each preset variable, I created a tariff using them, and the tariff was applied in every case, as expected.

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 66.97248% with 36 lines in your changes missing coverage. Please review.

Project coverage is 16.03%. Comparing base (cd81398) to head (928c043).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
...e/presetvariables/DiskOfferingPresetVariables.java 57.64% 36 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10326      +/-   ##
============================================
+ Coverage     16.02%   16.03%   +0.01%     
- Complexity    13147    13161      +14     
============================================
  Files          5658     5659       +1     
  Lines        496312   496417     +105     
  Branches      60109    60109              
============================================
+ Hits          79527    79600      +73     
- Misses       407943   407968      +25     
- Partials       8842     8849       +7     
Flag Coverage Δ
uitests 4.01% <ø> (ø)
unittests 16.87% <66.97%> (+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.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@JoaoJandre
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@JoaoJandre 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.

@blueorangutan
Copy link

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

@JoaoJandre
Copy link
Contributor

@rohityadavcloud @sureshanaparti @shwstppr could we run the CI here?

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-12391)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 54290 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10326-t12391-kvm-ol8.zip
Smoke tests completed. 139 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_11_isolated_network_with_dynamic_routed_mode Error 1.27 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 2.37 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 2.37 test_ipv4_routing.py
test_12_start_vm_multiple_volumes_allocated Error 16.95 test_vm_life_cycle.py

@DaanHoogland DaanHoogland added this to the 4.21.0 milestone Feb 14, 2025
@JoaoJandre
Copy link
Contributor

Merging as these tests failures are not related and are happening on every PR (see #10372 (comment), for example)

@JoaoJandre JoaoJandre merged commit a093f00 into apache:main Feb 14, 2025
25 of 26 checks passed
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