Skip to content

Apply suggestions from code review

f4502f1
Select commit
Loading
Failed to load commit list.
Draft

CLVM enhancements and fixes #12617

Apply suggestions from code review
f4502f1
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 30, 2026 in 5m 54s

Quality Gate failed

Annotations

Check warning on line 901 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 hard-coded path-delimiter.

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

Check warning on line 830 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 hard-coded path-delimiter.

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

Check warning on line 107 in server/src/test/java/com/cloud/storage/ClvmPoolManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 1327 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

Refactor this method to reduce its Cognitive Complexity from 23 to the 15 allowed.

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

Check warning on line 6813 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused method parameter "resource".

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

Check warning on line 477 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=AZ1pFLaaHBDapnzk6OhA&open=AZ1pFLaaHBDapnzk6OhA&pullRequest=12617

Check warning on line 109 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtClvmLockTransferCommandWrapper.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=AZ1pFLiFHBDapnzk6OhE&open=AZ1pFLiFHBDapnzk6OhE&pullRequest=12617

Check warning on line 147 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=AZ1pcbw51MRvjmKtxodN&open=AZ1pcbw51MRvjmKtxodN&pullRequest=12617

Check warning on line 26 in core/src/main/java/org/apache/cloudstack/storage/clvm/command/ClvmLockTransferAnswer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Override the "equals" method in this class.

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

Check failure on line 941 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=AZ3aXx901isOGjmrnjD2&open=AZ3aXx901isOGjmrnjD2&pullRequest=12617

Check warning on line 426 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=AZ1pFLaaHBDapnzk6Og9&open=AZ1pFLaaHBDapnzk6Og9&pullRequest=12617

Check failure on line 216 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=AZ0mNDXNmxdebns9DnLk&open=AZ0mNDXNmxdebns9DnLk&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 85 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

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=AZx43iV5jVPAID_RF5bq&open=AZx43iV5jVPAID_RF5bq&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 failure on line 475 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

Define a constant instead of duplicating this literal "--unbuffered" 3 times.

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

Check warning on line 271 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

This block of commented-out lines of code should be removed.

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

Check failure on line 276 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

Refactor this method to reduce its Cognitive Complexity from 33 to the 15 allowed.

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

Check warning on line 177 in server/src/main/java/com/cloud/storage/clvm/ClvmPoolManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Reduce the total number of break and continue statements in this loop to use at most one.

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

Check warning on line 681 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=AZxEJ4RLTdhpX5MPbvmA&open=AZxEJ4RLTdhpX5MPbvmA&pullRequest=12617

Check failure on line 854 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=AZ3aXx901isOGjmrnjD1&open=AZ3aXx901isOGjmrnjD1&pullRequest=12617

Check warning on line 283 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

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

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

Check failure on line 646 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=AZ3aXx901isOGjmrnjDr&open=AZ3aXx901isOGjmrnjDr&pullRequest=12617

Check failure on line 6813 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 24 to the 15 allowed.

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

Check failure on line 490 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=AZ3aXx901isOGjmrnjDo&open=AZ3aXx901isOGjmrnjDo&pullRequest=12617