Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0105ec0
Improving code related to the Agent properties
Apr 29, 2022
4f0aece
Merge branch 'main' into map-agent-properties
May 4, 2022
ad0f150
Specify exception and remove unnecessary print
May 4, 2022
6d96c9e
Merge branch 'main' of https://github.com/apache/cloudstack into map-…
May 19, 2022
48c3957
fixing indentation
May 19, 2022
4304412
Merge branch 'main' of https://github.com/apache/cloudstack into map-…
May 24, 2022
0f61a34
Merge branch 'main' of https://github.com/apache/cloudstack into map-…
Jun 20, 2022
ca80585
Pass public and private interface to super class on LibvirtComputingR…
Jun 24, 2022
f98e925
Merge branch 'main' of https://github.com/apache/cloudstack into map-…
Jun 30, 2022
6022d8d
Removing code smells
Jul 1, 2022
c3b717b
Address review
JoaoJandre Jul 4, 2022
948212d
Address some code smells.
JoaoJandre Jul 6, 2022
ad433ef
Address more code smells
JoaoJandre Jul 6, 2022
0afd273
Addressed rename variables code smells
JoaoJandre Jul 6, 2022
dd8dd6b
address reviews
JoaoJandre Jul 8, 2022
951b181
Add unit test to validate class initialization
Aug 10, 2022
601cac9
Use AgentPropertiesFileHandler in AgentShell
Aug 11, 2022
3d0f3cf
Improve tests
Aug 12, 2022
217e289
Remove unnecessary comments on agent.properties
Aug 12, 2022
c32cda9
Null-safe validations
Aug 12, 2022
e9d76c9
Fix access to property 'workers'
Aug 12, 2022
35af64a
Fix AgentPropertiesTest
Aug 12, 2022
89d9669
Merge remote-tracking branch 'apache-github/main' into HEAD
Nov 1, 2022
39fed9d
Fix build failure
Nov 3, 2022
43716d8
Adjusts and review addressing
Nov 5, 2022
049cbed
Merge remote-tracking branch 'apache-github/main' into HEAD
Nov 9, 2022
b448f83
Fix merge main
Nov 9, 2022
37ad4e8
Merge remote-tracking branch 'apache-github/main' into HEAD
Dec 12, 2022
57adcb6
Fix call to method
Dec 12, 2022
c03dc60
Remove duplicated import
Dec 12, 2022
ad94cb3
Parse cmdline to agent.properties in system VMs bootstrap
Dec 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Null-safe validations
  • Loading branch information
GutoVeronezi committed Aug 12, 2022
commit c32cda9da635dece21cc05147182e06307818cbf
5 changes: 3 additions & 2 deletions agent/src/main/java/com/cloud/agent/AgentShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.commons.daemon.DaemonContext;
import org.apache.commons.daemon.DaemonInitException;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;
Expand Down Expand Up @@ -303,7 +304,7 @@ protected String getGuid(String guid) throws ConfigurationException {
return guid;
}

if (!AgentPropertiesFileHandler.getPropertyValue(AgentProperties.DEVELOPER)) {
if (BooleanUtils.isFalse(AgentPropertiesFileHandler.getPropertyValue(AgentProperties.DEVELOPER))) {
throw new ConfigurationException("Unable to find the guid");
}

Expand Down Expand Up @@ -488,7 +489,7 @@ public void start() {

String instance = getProperty(null, "instance");
if (instance == null) {
if (AgentPropertiesFileHandler.getPropertyValue(AgentProperties.DEVELOPER)) {
if (BooleanUtils.isTrue(AgentPropertiesFileHandler.getPropertyValue(AgentProperties.DEVELOPER))) {
instance = UUID.randomUUID().toString();
} else {
instance = "";
Expand Down