cloudstack
cloudstack copied to clipboard
Refactor SnapshotDataStoreDaoImpl
Description
PR #5909 is moving class SnapshotDataStoreDaoImpl
to another package. Sonarcloud identified it as changes in every line of the file, reporting several code smells. As for the PR context it is only necessary to move the class to another package, I created this PR to address the code smells and also refactor some methods of the class.
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)
- [x] Enhancement (improves an existing feature and functionality)
- [x] Cleanup (Code refactoring and cleanup, that may add test cases)
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
- [ ] Major
- [x] Minor
How Has This Been Tested?
I created unit tests for the methods.
Codecov Report
Merging #6751 (e9a76a8) into main (bbc1260) will increase coverage by
0.10%
. The diff coverage is5.03%
.
@@ Coverage Diff @@
## main #6751 +/- ##
============================================
+ Coverage 10.42% 10.52% +0.10%
- Complexity 6701 6787 +86
============================================
Files 2458 2464 +6
Lines 243246 244089 +843
Branches 38067 38203 +136
============================================
+ Hits 25358 25701 +343
- Misses 214714 215154 +440
- Partials 3174 3234 +60
Impacted Files | Coverage Δ | |
---|---|---|
...ack/storage/image/db/SnapshotDataStoreDaoImpl.java | 5.75% <5.03%> (+1.48%) |
:arrow_up: |
...rce/wrapper/LibvirtResizeVolumeCommandWrapper.java | 49.50% <0.00%> (-27.17%) |
:arrow_down: |
.../cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java | 70.27% <0.00%> (-10.98%) |
:arrow_down: |
...pper/LibvirtPrepareForMigrationCommandWrapper.java | 43.10% <0.00%> (-10.09%) |
:arrow_down: |
...loud/hypervisor/kvm/resource/LibvirtSecretDef.java | 60.00% <0.00%> (-3.16%) |
:arrow_down: |
.../hypervisor/kvm/storage/ScaleIOStorageAdaptor.java | 10.48% <0.00%> (-2.63%) |
:arrow_down: |
...apache/cloudstack/storage/volume/VolumeObject.java | 35.75% <0.00%> (-2.61%) |
:arrow_down: |
...vm/resource/wrapper/LibvirtStopCommandWrapper.java | 42.66% <0.00%> (-1.78%) |
:arrow_down: |
.../main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java | 27.34% <0.00%> (-0.74%) |
:arrow_down: |
...torage/allocator/AbstractStoragePoolAllocator.java | 9.03% <0.00%> (-0.66%) |
:arrow_down: |
... and 73 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@blueorangutan package
@GutoVeronezi a 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: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4222
@blueorangutan test
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Trillian Build Failed (tid-4936)
Trillian Build Failed (tid-4937)
@blueorangutan package
@DaanHoogland a 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: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4232
@blueorangutan test matrix
@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests
Trillian Build Failed (tid-4950)
Trillian Build Failed (tid-4951)
Trillian Build Failed (tid-4952)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6751 (SL-JID-2451)
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6751 (SL-JID-2452)
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6751 (SL-JID-2453)
@blueorangutan package
@DaanHoogland a 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: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 4331
@blueorangutan package