Skip to content

minor fix

f29d8a2
Select commit
Loading
Failed to load commit list.
Draft

CLVM enhancements and fixes #12617

minor fix
f29d8a2
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed May 27, 2026 in 5m 4s

Quality Gate failed

Annotations

Check warning on line 2278 in engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.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=AZ4Ig88pLLXNfHHEi1f7&open=AZ4Ig88pLLXNfHHEi1f7&pullRequest=12617

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

Remove this field injection and use constructor injection instead.

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

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

Check failure on line 611 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 "--output=json" 3 times.

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

Check warning on line 111 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=AZ4Ig9NWLLXNfHHEi1gj&open=AZ4Ig9NWLLXNfHHEi1gj&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=AZ4Ig9MCLLXNfHHEi1gc&open=AZ4Ig9MCLLXNfHHEi1gc&pullRequest=12617

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

Check warning on line 2079 in server/src/main/java/com/cloud/vm/UserVmManagerImpl.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 129 to 64, Complexity from 27 to 14, Nesting Level from 5 to 2, Number of Variables from 39 to 6.

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

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

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

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

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

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

Format specifiers should be used instead of string concatenation.

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

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

Refactor this method to not always return the same value.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ4Ig9XULLXNfHHEi1hi&open=AZ4Ig9XULLXNfHHEi1hi&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=AZ4Ig9SkLLXNfHHEi1hJ&open=AZ4Ig9SkLLXNfHHEi1hJ&pullRequest=12617

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

Use the built-in formatting to construct this argument.

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

Check failure on line 2711 in server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 47 in plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtPostMigrationCommandWrapper.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=AZ4Ig9OOLLXNfHHEi1gm&open=AZ4Ig9OOLLXNfHHEi1gm&pullRequest=12617

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

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

Replace these 3 tests with a single Parameterized one.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ4Ig9bNLLXNfHHEi1il&open=AZ4Ig9bNLLXNfHHEi1il&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=AZ4Ig9SkLLXNfHHEi1hN&open=AZ4Ig9SkLLXNfHHEi1hN&pullRequest=12617

Check warning on line 7208 in plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename "details" which hides the field declared at line 260.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AZ4Ig9YwLLXNfHHEi1hz&open=AZ4Ig9YwLLXNfHHEi1hz&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=AZ4Ig9XgLLXNfHHEi1hq&open=AZ4Ig9XgLLXNfHHEi1hq&pullRequest=12617

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

Check warning on line 236 in server/src/main/java/com/cloud/storage/clvm/ClvmPoolManager.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=AZ4Ig9f_LLXNfHHEi1ir&open=AZ4Ig9f_LLXNfHHEi1ir&pullRequest=12617