Skip to content

config cleanup - #13884

Draft
DaanHoogland wants to merge 41 commits into
mainfrom
ghi10752-configCleanup
Draft

config cleanup#13884
DaanHoogland wants to merge 41 commits into
mainfrom
ghi10752-configCleanup

replace key lookups with value() calls in remaining small groups

d005a05
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Aug 16, 2026 in 6m 5s

Quality Gate failed

Failed conditions
24.5% Coverage on New Code (required ≥ 40%)
C Reliability Rating on New Code (required ≥ B)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check failure on line 31 in api/src/main/java/com/cloud/network/NetworkUsageService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 57 in server/src/main/java/com/cloud/server/ManagementServer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Hidden" 10 times.

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

Check warning on line 149 in server/src/main/java/com/cloud/alert/AlertManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the "_publicIPCapacityThreshold" field and declare it as a local variable in the relevant methods.

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

Check failure on line 31 in plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/manager/BaremetalManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Advanced" 6 times.

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

Check warning on line 120 in server/src/main/java/com/cloud/network/ExternalFirewallDeviceManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Split this “Monster Class” into smaller and more specialized ones to reduce its dependencies on other classes from 31 to the maximum authorized 20 or less.

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

Check failure on line 76 in server/src/main/java/com/cloud/projects/ProjectManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename method "allowUserToCreateProject" to prevent any misunderstanding/clash with field "AllowUserToCreateProject".

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

Check failure on line 34 in server/src/main/java/com/cloud/projects/ProjectManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Project Defaults" 7 times.

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

Check failure on line 45 in server/src/main/java/com/cloud/configuration/Config.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check warning on line 142 in server/src/main/java/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Split this “Monster Class” into smaller and more specialized ones to reduce its dependencies on other classes from 37 to the maximum authorized 20 or less.

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

Check failure on line 35 in plugins/network-elements/elastic-loadbalancer/src/main/java/com/cloud/network/lb/ElasticLoadBalancerManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Advanced" 4 times.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaAHqtW-RdE24u2TNGQJ&open=AaAHqtW-RdE24u2TNGQJ&pullRequest=13884

Check warning on line 154 in server/src/main/java/com/cloud/alert/AlertManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the "_localStorageCapacityThreshold" field and declare it as a local variable in the relevant methods.

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

Check failure on line 82 in server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "false" 4 times.

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

Check warning on line 2078 in server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a primitive boolean expression here.

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

Check failure on line 130 in server/src/main/java/com/cloud/deploy/FirstFitPlanner.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename field "implicitHostTags" to prevent any misunderstanding/clash with field "ImplicitHostTags" defined in interface "com.cloud.deploy.DeploymentClusterPlanner".

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

Check failure on line 39 in server/src/main/java/com/cloud/server/ManagementServer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Advanced" 37 times.

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

Check warning on line 151 in server/src/main/java/com/cloud/alert/AlertManagerImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the "_secondaryStorageCapacityThreshold" field and declare it as a local variable in the relevant methods.

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

Check warning on line 2301 in server/src/main/java/com/cloud/api/ApiDBUtils.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Immediately return this expression instead of assigning it to the temporary variable "providerDnsName".

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

Check failure on line 379 in server/src/main/java/com/cloud/server/StatsCollector.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename field "hostStatsInterval" to prevent any misunderstanding/clash with field "HostStatsInterval".

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

Check failure on line 74 in server/src/main/java/com/cloud/projects/ProjectManager.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename method "projectInviteRequired" to prevent any misunderstanding/clash with field "ProjectInviteRequired".

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

Check warning on line 1429 in server/src/test/java/com/cloud/configuration/ConfigurationManagerTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "when".

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

Check failure on line 380 in server/src/main/java/com/cloud/server/StatsCollector.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename field "vmStatsInterval" to prevent any misunderstanding/clash with field "VmStatsInterval".

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

Check warning on line 1555 in server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.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=AaAGbHtbTV2yRQvmzXM0&open=AaAGbHtbTV2yRQvmzXM0&pullRequest=13884

Check failure on line 30 in api/src/main/java/org/apache/cloudstack/usage/UsageService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Usage" 6 times.

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

Check warning on line 880 in server/src/test/java/com/cloud/configuration/ConfigurationManagerImplTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use a static import for "mock".

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

Check failure on line 52 in api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Advanced" 6 times.

See more on https://sonarcloud.io/project/issues?id=apache_cloudstack&issues=AaAHMT-LH6sOtJrG0c_X&open=AaAHMT-LH6sOtJrG0c_X&pullRequest=13884