Search in sources :

Example 21 with VdsStatic

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;
}
Also used : VdsStatic(org.ovirt.engine.core.common.businessentities.VdsStatic)

Example 22 with VdsStatic

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;
}
Also used : VdsStatic(org.ovirt.engine.core.common.businessentities.VdsStatic)

Example 23 with VdsStatic

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());
    }
}
Also used : VdsStatic(org.ovirt.engine.core.common.businessentities.VdsStatic) Test(org.junit.Test)

Example 24 with VdsStatic

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;
}
Also used : VdsStatic(org.ovirt.engine.core.common.businessentities.VdsStatic)

Example 25 with VdsStatic

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());
}
Also used : VdsStatic(org.ovirt.engine.core.common.businessentities.VdsStatic) User(org.ovirt.engine.api.model.User) Ssh(org.ovirt.engine.api.model.Ssh) Test(org.junit.Test)

Aggregations

VdsStatic (org.ovirt.engine.core.common.businessentities.VdsStatic)49 Test (org.junit.Test)10 Guid (org.ovirt.engine.core.compat.Guid)8 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)4 ArrayList (java.util.ArrayList)3 List (java.util.List)3 Map (java.util.Map)3 Objects (java.util.Objects)3 Before (org.junit.Before)3 HostProviderProxy (org.ovirt.engine.core.bll.host.provider.HostProviderProxy)3 VdsDynamic (org.ovirt.engine.core.common.businessentities.VdsDynamic)3 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)3 Collections (java.util.Collections)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 Collectors (java.util.stream.Collectors)2 Inject (javax.inject.Inject)2 StringUtils (org.apache.commons.lang.StringUtils)2 Host (org.ovirt.engine.api.model.Host)2