Skip to content

fix a few issues

55a104d
Select commit
Loading
Failed to load commit list.
Draft

CLVM enhancements and fixes #12617

fix a few issues
55a104d
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed May 6, 2026 in 5m 35s

Quality Gate failed

Annotations

Check warning on line 378 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZycJTTp331ZRqy8rtij&open=AZycJTTp331ZRqy8rtij&pullRequest=12617

Check warning on line 1556 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 101 to 64, Complexity from 39 to 14, Nesting Level from 4 to 2, Number of Variables from 29 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVbYlpSFCu4-z-Dq&open=AZ0sIVbYlpSFCu4-z-Dq&pullRequest=12617

Check warning on line 443 in engine/storage/volume/src/test/java/org/apache/cloudstack/storage/volume/VolumeServiceImplClvmTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ1pFLaaHBDapnzk6Og-&open=AZ1pFLaaHBDapnzk6Og-&pullRequest=12617

Check warning on line 2141 in engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 79 to 64, Complexity from 21 to 14, Nesting Level from 5 to 2, Number of Variables from 25 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVBclpSFCu4-z-Dg&open=AZ0sIVBclpSFCu4-z-Dg&pullRequest=12617

Check warning on line 2827 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused method parameter "vm".

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVbYlpSFCu4-z-Dm&open=AZ0sIVbYlpSFCu4-z-Dm&pullRequest=12617

Check warning on line 192 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtPostMigrationCommandWrapperTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the declaration of thrown exception 'org.libvirt.LibvirtException', as it cannot be thrown from method's body.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ1pcbw51MRvjmKtxodP&open=AZ1pcbw51MRvjmKtxodP&pullRequest=12617

Check failure on line 689 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx901isOGjmrnjDs&open=AZ3aXx901isOGjmrnjDs&pullRequest=12617

Check warning on line 982 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this use of "Script"; it is deprecated.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXxzR1isOGjmrnjDd&open=AZ3aXxzR1isOGjmrnjDd&pullRequest=12617

Check warning on line 2973 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused private "findVolumeLockHost" method.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVbYlpSFCu4-z-Dl&open=AZ0sIVbYlpSFCu4-z-Dl&pullRequest=12617

Check warning on line 3561 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested try block into a separate method.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZz35YY_4256DVCsFLrG&open=AZz35YY_4256DVCsFLrG&pullRequest=12617

Check failure on line 368 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx901isOGjmrnjDj&open=AZ3aXx901isOGjmrnjDj&pullRequest=12617

Check failure on line 806 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx901isOGjmrnjDy&open=AZ3aXx901isOGjmrnjDy&pullRequest=12617

Check failure on line 343 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0mNDXNmxdebns9DnLw&open=AZ0mNDXNmxdebns9DnLw&pullRequest=12617

Check failure on line 1009 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx901isOGjmrnjD7&open=AZ3aXx901isOGjmrnjD7&pullRequest=12617

Check failure on line 593 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx901isOGjmrnjDp&open=AZ3aXx901isOGjmrnjDp&pullRequest=12617

Check failure on line 415 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add at least one assertion to this test case.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx901isOGjmrnjDm&open=AZ3aXx901isOGjmrnjDm&pullRequest=12617

Check warning on line 76 in engine/storage/src/test/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelectorTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this field "_volDetailsDao" to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0xehRNDDwRlMHM1FEu&open=AZ0xehRNDDwRlMHM1FEu&pullRequest=12617

Check warning on line 2810 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused private "areBothPoolsClvmType" method.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVbYlpSFCu4-z-Dk&open=AZ0sIVbYlpSFCu4-z-Dk&pullRequest=12617

Check warning on line 823 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Format specifiers should be used instead of string concatenation.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZz35YeN4256DVCsFLre&open=AZz35YeN4256DVCsFLre&pullRequest=12617

Check warning on line 2020 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 79 to 64, Complexity from 20 to 14, Nesting Level from 5 to 2, Number of Variables from 22 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXx4Y1isOGjmrnjDh&open=AZ3aXx4Y1isOGjmrnjDh&pullRequest=12617

Check warning on line 84 in engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZx43iV5jVPAID_RF5br&open=AZx43iV5jVPAID_RF5br&pullRequest=12617

Check warning on line 429 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/ClvmStorageAdaptor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Extract this nested ternary operation into an independent statement.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ3aXxzR1isOGjmrnjDP&open=AZ3aXxzR1isOGjmrnjDP&pullRequest=12617

Check warning on line 1050 in engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 69 to 64, Complexity from 16 to 14, Nesting Level from 3 to 2, Number of Variables from 21 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVBclpSFCu4-z-Df&open=AZ0sIVBclpSFCu4-z-Df&pullRequest=12617

Check warning on line 82 in engine/storage/src/main/java/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZxykZmDi8wmAtCWzk9h&open=AZxykZmDi8wmAtCWzk9h&pullRequest=12617

Check warning on line 2582 in server/src/test/java/com/cloud/storage/VolumeApiServiceImplTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this and every subsequent useless "eq(...)" invocation; pass the values directly.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ0sIVjxlpSFCu4-z-Dz&open=AZ0sIVjxlpSFCu4-z-Dz&pullRequest=12617