Skip to content

Commit e6eeb0b

Browse files
committed
Javadoc, naming convention
1 parent 9d00a6a commit e6eeb0b

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

agent/src/main/java/com/cloud/agent/Agent.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,14 @@ protected void cancelTasks() {
420420
}
421421
}
422422

423+
/**
424+
* Cleanup agent zone properties.
425+
*
426+
* Unset zone, cluster and pod values so that host is not added back
427+
* when service is restarted. This will be set to proper values
428+
* when host is added back
429+
*/
423430
protected void cleanupAgentZoneProperties() {
424-
// Unset zone, cluster and pod values so that host is not added back
425-
// when service is restarted. This will be set to proper values
426-
// when host is added back
427431
_shell.setPersistentProperty(null, "zone", "");
428432
_shell.setPersistentProperty(null, "cluster", "");
429433
_shell.setPersistentProperty(null, "pod", "");

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
410410
public final static ConfigKey<Long> IOPS_MAX_WRITE_LENGTH = new ConfigKey<Long>(Long.class, "vm.disk.iops.maximum.write.length", "Advanced", "0",
411411
"Maximum IOPS write burst duration (seconds). If '0' (zero) then does not check for maximum burst length.", true, ConfigKey.Scope.Global, null);
412412

413-
public static final ConfigKey<Boolean> AddHostOnServiceRestart = new ConfigKey<Boolean>(Boolean.class, "add.host.on.service.restart", "Advanced", "true",
413+
public static final ConfigKey<Boolean> ADD_HOST_ON_SERVICE_RESTART = new ConfigKey<Boolean>(Boolean.class, "add.host.on.service.restart", "Advanced", "true",
414414
"Indicates whether the host will be added back to cloudstack after restarting agent service on host. If false it wont be added back even after service restart",
415415
true, ConfigKey.Scope.Global, null);
416416

@@ -6383,6 +6383,6 @@ public String getConfigComponentName() {
63836383
@Override
63846384
public ConfigKey<?>[] getConfigKeys() {
63856385
return new ConfigKey<?>[] {SystemVMUseLocalStorage, IOPS_MAX_READ_LENGTH, IOPS_MAX_WRITE_LENGTH,
6386-
BYTES_MAX_READ_LENGTH, BYTES_MAX_WRITE_LENGTH, AddHostOnServiceRestart};
6386+
BYTES_MAX_READ_LENGTH, BYTES_MAX_WRITE_LENGTH, ADD_HOST_ON_SERVICE_RESTART};
63876387
}
63886388
}

server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
import com.cloud.utils.ssh.SSHCmdHelper;
6868
import com.trilead.ssh2.Connection;
6969

70-
import static com.cloud.configuration.ConfigurationManagerImpl.AddHostOnServiceRestart;
70+
import static com.cloud.configuration.ConfigurationManagerImpl.ADD_HOST_ON_SERVICE_RESTART;
7171

7272
public abstract class LibvirtServerDiscoverer extends DiscovererBase implements Discoverer, Listener, ResourceStateAdapter {
7373
private static final Logger s_logger = Logger.getLogger(LibvirtServerDiscoverer.class);
@@ -477,7 +477,7 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForc
477477

478478
_resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
479479
try {
480-
ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null, !AddHostOnServiceRestart.value());
480+
ShutdownCommand cmd = new ShutdownCommand(ShutdownCommand.DeleteHost, null, !ADD_HOST_ON_SERVICE_RESTART.value());
481481
agentMgr.send(host.getId(), cmd);
482482
} catch (AgentUnavailableException e) {
483483
s_logger.warn("Sending ShutdownCommand failed: ", e);

0 commit comments

Comments
 (0)