Add access modifiers to VirtualMachineTO#9277
Conversation
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
|
@FelipeM525 there are some test failures |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@blueorangutan package |
There was a problem hiding this comment.
Pull Request Overview
This PR improves encapsulation in the VirtualMachineTO class by adding private access modifiers to previously package-private fields and introducing corresponding getters and setters.
- Changed field visibility to private.
- Added new accessor and mutator methods for improved object-oriented design.
- Ensured backward compatibility with existing functionality.
Comments suppressed due to low confidence (2)
api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java:257
- [nitpick] Consider renaming isEnableHA() to isHaEnabled() to better align with Java naming conventions for boolean getters.
public boolean isEnableHA() {
api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java:440
- Consider adding JavaDoc comments to the newly added getters and setters to improve code clarity and maintainability.
public void setSpeed(Integer speed) {
|
@sureshanaparti 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 ✖️ debian ✖️ suse15. SL-JID 13629 |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13722 |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 13739 |
|
@winterhazel , can you assess the status of this PR , please? |
|
@blueorangutan package |
|
@winterhazel 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. |
@DaanHoogland I fixed the merge conflicts, it should be good to go if the CI passses. I don't think we need more testing for a simple change like this one. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9277 +/- ##
============================================
- Coverage 16.60% 16.60% -0.01%
- Complexity 13923 13924 +1
============================================
Files 5730 5730
Lines 508224 508254 +30
Branches 61789 61789
============================================
- Hits 84383 84382 -1
- Misses 414406 414436 +30
- Partials 9435 9436 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13783 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13532)
|
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
Description
The class
VirtualMachineTOlacks access modifiers in its fields. This PR aims to improve adherence to object-oriented programming by adding private access modifiers to all fields in the class mentioned above, along with their respective getters and setters.Types of changes
Feature/Enhancement Scale
How Has This Been Tested?
I ran all the tests related to
VirtualMachineTO, checked all usages of the class, and made sure nothing was broken.