You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2015/07/06 16:17:54 UTC
[4/8] git commit: updated refs/heads/master to 31c6b14
CLOUDSTACK-8607 - Refactoring attribute name
- Refactoring attribute name from shouldUpdateHost to updatePasswdOnHost
- Fixing ApiConstants class because it had an error in the constant name
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6c92ccf8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c92ccf8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c92ccf8
Branch: refs/heads/master
Commit: 6c92ccf8d1ef5b824d6e36ea727bbebf05a95001
Parents: 0dd02ce
Author: wilderrodrigues <wr...@schubergphilis.com>
Authored: Fri Jul 3 11:43:56 2015 +0200
Committer: wilderrodrigues <wr...@schubergphilis.com>
Committed: Fri Jul 3 11:43:56 2015 +0200
----------------------------------------------------------------------
api/src/org/apache/cloudstack/api/ApiConstants.java | 2 +-
.../api/command/admin/host/UpdateHostPasswordCmd.java | 6 +++---
server/src/com/cloud/resource/ResourceManagerImpl.java | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c92ccf8/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index ee98e06..830583b 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";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c92ccf8/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java
----------------------------------------------------------------------
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 3915cee..d8c4ea5 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() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c92ccf8/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java
index c31d2a5..e9825ff 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<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());
}