Updated Branches: refs/heads/master a7833cdfb -> 81938c68a
CLOUDSTACK-4482: getVMPassword() API call does not return password for Vms that are deployed with password enabled templates. Improving the error message saying ssh key pair should be assinged to VM to get the encrypted password. Signed-off-by: Koushik Das <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/81938c68 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/81938c68 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/81938c68 Branch: refs/heads/master Commit: 81938c68acd3a049aa0fcb0c5ea8bc4a822d3200 Parents: a7833cd Author: Harikrishna Patnala <[email protected]> Authored: Tue Aug 27 11:46:26 2013 +0530 Committer: Koushik Das <[email protected]> Committed: Tue Aug 27 16:41:07 2013 +0530 ---------------------------------------------------------------------- server/src/com/cloud/server/ManagementServerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81938c68/server/src/com/cloud/server/ManagementServerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index a936539..7a6fb80 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -3634,7 +3634,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe _userVmDao.loadDetails(vm); String password = vm.getDetail("Encrypted.Password"); if (password == null || password.equals("")) { - InvalidParameterValueException ex = new InvalidParameterValueException("No password for VM with specified id found."); + InvalidParameterValueException ex = new InvalidParameterValueException("No password for VM with specified id found. " + + "If VM is created from password enabled template and SSH keypair is assigned to VM then only password can be retrieved."); ex.addProxyObject(vm.getUuid(), "vmId"); throw ex; }
