cloudstack
cloudstack copied to clipboard
fix: clean magic value, and update if-else to switch
Description
This PR...
clean magic value, and update if-else to switch
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
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?
How did you try to break this feature and the system with this change?
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) Here are some useful points:
- In case of a new feature add useful documentation (raise doc PR at https://github.com/apache/cloudstack-documentation)
- Be patient and persistent. It might take some time to get a review or get the final approval from the committers.
- Pay attention to the quality of your code, ensure tests are passing and your PR doesn't have conflicts.
- Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Issues, Mailing list and Slack.
- Be sure to read the CloudStack Coding Conventions. Apache CloudStack is a community-driven project and together we are making it better 🚀. In case of doubts contact the developers at: Mailing List: [email protected] (https://cloudstack.apache.org/mailing-lists.html) Slack: https://apachecloudstack.slack.com/
@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.
Codecov Report
:x: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 31.06%. Comparing base (449ee8e) to head (78fac07).
:warning: Report is 1539 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...-proxy/rdpconsole/src/main/java/common/Client.java | 0.00% | 12 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #8848 +/- ##
============================================
- Coverage 31.16% 31.06% -0.11%
+ Complexity 34052 33954 -98
============================================
Files 5404 5404
Lines 380309 380309
Branches 55507 55505 -2
============================================
- Hits 118535 118150 -385
- Misses 246073 246491 +418
+ Partials 15701 15668 -33
| Flag | Coverage Δ | |
|---|---|---|
| simulator-marvin-tests | 24.80% <0.00%> (-0.14%) |
:arrow_down: |
| uitests | 4.34% <ø> (ø) |
|
| unit-tests | 16.88% <ø> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9099
@blueorangutan test alma9 kvm-alma9
@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests
suggestion:
use EnumUtils.getEnumIgnoreCase with a default value
[SF] Trillian test result (tid-9656) Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9 Total time taken: 53600 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8848-t9656-kvm-alma9.zip Smoke tests completed. 127 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| test_02_enableHumanReadableLogs | Error |
0.16 | test_human_readable_logs.py |
| test_03_secured_to_nonsecured_vm_migration | Error |
155.35 | test_vm_life_cycle.py |
| test_04_nonsecured_to_secured_vm_migration | Error |
274.39 | test_vm_life_cycle.py |
suggestion:
use EnumUtils.getEnumIgnoreCase with a default value
@cheng102e , will you replace the switch statement?
@blueorangutan package
@cheng102e , will you still be looking at this (and answer https://github.com/apache/cloudstack/pull/8848#discussion_r1555703046) ?
@blueorangutan package
tnx @sureshanaparti , let’s merge and keep the nit in mind.
@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 15394
@blueorangutan test
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian Build Failed (tid-14620)
[SF] Trillian test result (tid-14625) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 58672 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8848-t14625-kvm-ol8.zip Smoke tests completed. 148 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|---|---|---|
| test_10_reboot_cpvm_forced | Error |
10.01 | test_ssvm.py |
@blueorangutan package
@rosi-shapeblue 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 15448
@blueorangutan test
@rosi-shapeblue a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
[SF] Trillian test result (tid-14661) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 57653 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8848-t14661-kvm-ol8.zip Smoke tests completed. 149 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:
| Test | Result | Time (s) | Test File |
|---|