use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class ResetGlusterVolumeBrickCommandTest method getVdsStatic.
private VdsStatic getVdsStatic() {
VdsStatic vds = new VdsStatic();
vds.setClusterId(clusterId);
vds.setHostName(serverName);
return vds;
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class CreateGlusterVolumeCommandTest method getVdsStatic.
private VdsStatic getVdsStatic() {
VdsStatic vds = new VdsStatic();
vds.setClusterId(clusterId);
vds.setHostName(serverName);
return vds;
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class VdsStaticDaoTest method testGetAllForCluster.
/**
* Ensures all the right set of VdsStatic instances are returned.
*/
@Test
public void testGetAllForCluster() {
List<VdsStatic> result = dao.getAllForCluster(existingEntity.getClusterId());
assertNotNull(result);
assertFalse(result.isEmpty());
for (VdsStatic vds : result) {
assertEquals(existingEntity.getClusterId(), vds.getClusterId());
}
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class VdsStaticDaoTest method generateNewEntity.
@Override
protected VdsStatic generateNewEntity() {
VdsStatic newStaticVds = new VdsStatic();
newStaticVds.setHostName("farkle.redhat.com");
newStaticVds.setSshPort(22);
newStaticVds.setSshUsername("root");
newStaticVds.setClusterId(existingEntity.getClusterId());
newStaticVds.setSshKeyFingerprint("b5:ad:16:19:06:9f:b3:41:69:eb:1c:42:1d:12:b5:31");
newStaticVds.setCurrentKernelCmdline("a=b");
newStaticVds.setLastStoredKernelCmdline("c=d");
newStaticVds.setKernelCmdlineIommu(true);
return newStaticVds;
}
use of org.ovirt.engine.core.common.businessentities.VdsStatic in project ovirt-engine by oVirt.
the class HostMapperTest method testUpdateSshHost.
@Test
public void testUpdateSshHost() {
Ssh sshConf = new Ssh();
sshConf.setPort(22);
sshConf.setUser(new User());
sshConf.getUser().setUserName("root");
sshConf.setFingerprint("1234");
VdsStatic vdsStatic = new VdsStatic();
vdsStatic.setSshUsername("root");
vdsStatic.setSshPort(22);
vdsStatic.setSshKeyFingerprint("1234");
VdsStatic mappedVdsStatic = HostMapper.map(sshConf, vdsStatic);
assertEquals(22, mappedVdsStatic.getSshPort());
assertEquals("1234", mappedVdsStatic.getSshKeyFingerprint());
assertEquals("root", mappedVdsStatic.getSshUsername());
}
Aggregations