Skip to content

CLVM enhancements and fixes#12617

Draft
Pearl1594 wants to merge 91 commits into
mainfrom
clvm-enhancements
Draft

CLVM enhancements and fixes#12617
Pearl1594 wants to merge 91 commits into
mainfrom
clvm-enhancements

optimization

5958b94
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jun 11, 2026 in 4m 55s

Quality Gate failed

Annotations

Check warning on line 712 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=AZ6opSWO-GQEym9Vaokf&open=AZ6opSWO-GQEym9Vaokf&pullRequest=12617

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "vm" local variable.

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

Check warning on line 480 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=AZ6opSWO-GQEym9VaokZ&open=AZ6opSWO-GQEym9VaokZ&pullRequest=12617

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

Invoke method(s) only conditionally.

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

Check failure on line 422 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=AZ6opSek-GQEym9Vaoln&open=AZ6opSek-GQEym9Vaoln&pullRequest=12617

Check failure on line 334 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=AZ6opSea-GQEym9Vaolf&open=AZ6opSea-GQEym9Vaolf&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

Remove this field injection and use constructor injection instead.

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

Check warning on line 1148 in server/src/main/java/com/cloud/storage/StorageManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Merge this if statement with the enclosing one.

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

Check warning on line 196 in engine/storage/snapshot/src/test/java/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategyTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this useless assignment to local variable "nfsPool".

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

Check warning on line 74 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=AZ6opSZ6-GQEym9VaolC&open=AZ6opSZ6-GQEym9VaolC&pullRequest=12617

Check warning on line 2550 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=AZ6opSuk-GQEym9Vaom2&open=AZ6opSuk-GQEym9Vaom2&pullRequest=12617

Check warning on line 32 in core/src/main/java/com/cloud/agent/api/PreMigrationCommand.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=AZ6opSQP-GQEym9Vaojz&open=AZ6opSQP-GQEym9Vaojz&pullRequest=12617

Check warning on line 146 in plugins/storage/volume/default/src/main/java/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.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=AZ6opSfI-GQEym9VaomE&open=AZ6opSfI-GQEym9VaomE&pullRequest=12617

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

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

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

Check failure on line 782 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=AZ6opSek-GQEym9Vaolx&open=AZ6opSek-GQEym9Vaolx&pullRequest=12617

Check failure on line 43 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtPreMigrationCommandWrapper.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"logger" is the name of a field in "CommandWrapper".

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

Check failure on line 2994 in engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

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

Update this method so that its implementation is not identical to "testCLVMPoolLocalPathFormat" on line 216.

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

Check failure on line 471 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=AZ6opSWO-GQEym9VaokM&open=AZ6opSWO-GQEym9VaokM&pullRequest=12617

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this "Map.containsKey()" with a call to "Map.computeIfAbsent()".

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

Check failure on line 960 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=AZ6opSek-GQEym9Vaol3&open=AZ6opSek-GQEym9Vaol3&pullRequest=12617

Check warning on line 5026 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 170 to 64, Complexity from 47 to 14, Nesting Level from 4 to 2, Number of Variables from 31 to 6.

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

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

Invoke method(s) only conditionally.

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

Check warning on line 655 in server/src/main/java/com/cloud/vm/UserVmManagerImpl.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=AZ6opSsy-GQEym9Vaomo&open=AZ6opSsy-GQEym9Vaomo&pullRequest=12617

Check warning on line 2923 in server/src/main/java/com/cloud/storage/StorageManagerImpl.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 74 to 64, Complexity from 20 to 14, Nesting Level from 6 to 2, Number of Variables from 21 to 6.

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