got correct username and password for host

This commit is contained in:
anthony 2011-06-13 20:31:45 -07:00
parent 1ac24cf4c8
commit c2dad312a5
1 changed files with 7 additions and 7 deletions

View File

@ -858,14 +858,14 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, ResourceS
// VMware only allows adding host to an existing cluster, as we already have a lot of information
// in cluster object, to simplify user input, we will construct neccessary information here
Map<String, String> clusterDetails = this._clusterDetailsDao.findDetails(clusterId);
username = clusterDetails.get("username");
assert(username != null);
password = clusterDetails.get("password");
assert(password != null);
if(hypervisorType.equalsIgnoreCase(HypervisorType.VMware.toString())) {
Map<String, String> clusterDetails = this._clusterDetailsDao.findDetails(clusterId);
username = clusterDetails.get("username");
assert(username != null);
password = clusterDetails.get("password");
assert(password != null);
try {
uri = new URI(UriUtils.encodeURIComponent(url));