diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index ee98e060aed..830583b5458 100644 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -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"; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java index 3915cee5abb..d8c4ea5319c 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java @@ -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() { diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java index c31d2a53129..e9825ff0af8 100644 --- a/server/src/com/cloud/resource/ResourceManagerImpl.java +++ b/server/src/com/cloud/resource/ResourceManagerImpl.java @@ -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 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()); }