return true on success

This commit is contained in:
Abhinandan Prateek 2011-05-16 16:02:35 +05:30
parent 542e3d6f53
commit 733a892aa4
1 changed files with 6 additions and 5 deletions

View File

@ -2101,13 +2101,14 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, ResourceS
}
else if (event == Event.UpdatePassword) {
AgentAttache attache = findAttache(hostId);
DetailVO nv = _detailsDao.findDetail(hostId, ApiConstants.USERNAME);
String username = nv.getValue();
nv = _detailsDao.findDetail(hostId, ApiConstants.PASSWORD);
String password = nv.getValue();
UpdateHostPasswordCommand cmd = new UpdateHostPasswordCommand(username, password);
if (attache != null) {
DetailVO nv = _detailsDao.findDetail(hostId, ApiConstants.USERNAME);
String username = nv.getValue();
nv = _detailsDao.findDetail(hostId, ApiConstants.PASSWORD);
String password = nv.getValue();
UpdateHostPasswordCommand cmd = new UpdateHostPasswordCommand(username, password);
attache.updatePassword(cmd);
return true;
}
}
return false;