mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-8607 - Refactoring attribute name
- Refactoring attribute name from shouldUpdateHost to updatePasswdOnHost - Fixing ApiConstants class because it had an error in the constant name
This commit is contained in:
parent
0dd02ce043
commit
6c92ccf8d1
@ -180,7 +180,7 @@ public class ApiConstants {
|
||||
public static final String PARAMS = "params";
|
||||
public static final String PARENT_DOMAIN_ID = "parentdomainid";
|
||||
public static final String PASSWORD = "password";
|
||||
public static final String SHOULD_UPDATE_PASSWORD = "password";
|
||||
public static final String SHOULD_UPDATE_PASSWORD = "update_passwd_on_host";
|
||||
public static final String NEW_PASSWORD = "new_password";
|
||||
public static final String PASSWORD_ENABLED = "passwordenabled";
|
||||
public static final String SSHKEY_ENABLED = "sshkeyenabled";
|
||||
|
||||
@ -45,7 +45,7 @@ public class UpdateHostPasswordCmd extends BaseCmd {
|
||||
private Long clusterId;
|
||||
|
||||
@Parameter(name = ApiConstants.SHOULD_UPDATE_PASSWORD, type = CommandType.BOOLEAN, description = "if the password should also be updated on the hosts")
|
||||
private Boolean shouldUpdateHost;
|
||||
private Boolean updatePasswdOnHost;
|
||||
|
||||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "the username for the host/cluster")
|
||||
private String username;
|
||||
@ -66,8 +66,8 @@ public class UpdateHostPasswordCmd extends BaseCmd {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
public Boolean getShouldUpdateHost() {
|
||||
return shouldUpdateHost;
|
||||
public Boolean getUpdatePasswdOnHost() {
|
||||
return updatePasswdOnHost;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
|
||||
@ -2245,7 +2245,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
|
||||
|
||||
@Override
|
||||
public boolean updateClusterPassword(final UpdateHostPasswordCmd command) {
|
||||
final boolean shouldUpdateHostPasswd = command.getShouldUpdateHost();
|
||||
final boolean shouldUpdateHostPasswd = command.getUpdatePasswdOnHost();
|
||||
// get agents for the cluster
|
||||
final List<HostVO> hosts = listAllHostsInCluster(command.getClusterId());
|
||||
for (final HostVO host : hosts) {
|
||||
@ -2285,7 +2285,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
|
||||
s_logger.error("Agent is not availbale!", e);
|
||||
}
|
||||
|
||||
final boolean shouldUpdateHostPasswd = command.getShouldUpdateHost();
|
||||
final boolean shouldUpdateHostPasswd = command.getUpdatePasswdOnHost();
|
||||
// If shouldUpdateHostPasswd has been set to false, the method doUpdateHostPassword() won't be called.
|
||||
return shouldUpdateHostPasswd && doUpdateHostPassword(command.getHostId());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user