use of com.cloud.hypervisor.vmware.VmwareDatacenterZoneMapVO in project cloudstack by apache.
the class ResultWrapper method getLoginInfo.
private LoginInfo getLoginInfo(long zoneId) {
VmwareDatacenterZoneMapVO vmwareDcZoneMap = vmwareDcZoneMapDao.findByZoneId(zoneId);
Long associatedVmwareDcId = vmwareDcZoneMap.getVmwareDcId();
VmwareDatacenterVO associatedVmwareDc = vmwareDcDao.findById(associatedVmwareDcId);
String host = associatedVmwareDc.getVcenterHost();
String username = associatedVmwareDc.getUser();
String password = associatedVmwareDc.getPassword();
return new LoginInfo(host, username, password);
}
use of com.cloud.hypervisor.vmware.VmwareDatacenterZoneMapVO in project cloudstack by apache.
the class VmwareManagerImplTest method beforeTest.
@Before
public void beforeTest() {
VmwareDatacenterZoneMapVO vmwareDatacenterZoneMap = new VmwareDatacenterZoneMapVO();
vmwareDatacenterZoneMap.setZoneId(1);
vmwareDatacenterZoneMap.setVmwareDcId(1);
VmwareDatacenterVO vmwareDatacenterVO = new VmwareDatacenterVO(1, "some-guid", "some-name", "10.1.1.1", "username", "password");
Mockito.doReturn(vmwareDatacenterZoneMap).when(vmwareDatacenterZoneMapDao).findByZoneId(Mockito.anyLong());
Mockito.doReturn(vmwareDatacenterVO).when(vmwareDcDao).findById(Mockito.anyLong());
Mockito.doReturn(1L).when(updateVmwareDcCmd).getZoneId();
}
Aggregations