Search in sources :

Example 6 with GlusterServer

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.

the class GlusterServerDaoTest method testRemove.

@Test
public void testRemove() {
    dao.remove(FixturesTool.GLUSTER_BRICK_SERVER1);
    GlusterServer entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
    assertNull(entity);
}
Also used : GlusterServer(org.ovirt.engine.core.common.businessentities.gluster.GlusterServer) Test(org.junit.Test)

Example 7 with GlusterServer

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.

the class GlusterServerDaoTest method testUpdateKnownAddresses.

@Test
public void testUpdateKnownAddresses() {
    GlusterServer entityToUpdate = new GlusterServer(FixturesTool.GLUSTER_BRICK_SERVER1, FixturesTool.GLUSTER_SERVER_UUID_NEW);
    dao.update(entityToUpdate);
    dao.addKnownAddress(FixturesTool.GLUSTER_BRICK_SERVER1, "a.1");
    GlusterServer entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
    assertNotNull(entity);
    assertEquals(1, entity.getKnownAddresses().size());
    assertEquals("a.1", entity.getKnownAddresses().get(0));
    ArrayList<String> knownAddresses = new ArrayList<>();
    knownAddresses.add("a.2");
    dao.updateKnownAddresses(FixturesTool.GLUSTER_BRICK_SERVER1, knownAddresses);
    entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
    assertNotNull(entity);
    assertEquals(1, entity.getKnownAddresses().size());
    assertEquals("a.2", entity.getKnownAddresses().get(0));
}
Also used : GlusterServer(org.ovirt.engine.core.common.businessentities.gluster.GlusterServer) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 8 with GlusterServer

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.

the class GlusterServerDaoTest method testAddKnownAddresses.

@Test
public void testAddKnownAddresses() {
    GlusterServer entityToUpdate = new GlusterServer(FixturesTool.GLUSTER_BRICK_SERVER1, FixturesTool.GLUSTER_SERVER_UUID_NEW);
    dao.update(entityToUpdate);
    dao.addKnownAddress(FixturesTool.GLUSTER_BRICK_SERVER1, "a.1");
    GlusterServer entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
    assertNotNull(entity);
    assertEquals(1, entity.getKnownAddresses().size());
    assertEquals("a.1", entity.getKnownAddresses().get(0));
    dao.addKnownAddress(FixturesTool.GLUSTER_BRICK_SERVER1, "a.2");
    entity = dao.getByServerId(FixturesTool.GLUSTER_BRICK_SERVER1);
    assertNotNull(entity);
    assertEquals(2, entity.getKnownAddresses().size());
    assertEquals("a.2", entity.getKnownAddresses().get(1));
}
Also used : GlusterServer(org.ovirt.engine.core.common.businessentities.gluster.GlusterServer) Test(org.junit.Test)

Example 9 with GlusterServer

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.

the class GetGlusterVolumeRemoveBricksStatusQueryTest method getGlusterServer.

private GlusterServer getGlusterServer() {
    GlusterServer glusterServer = new GlusterServer();
    glusterServer.setId(SERVER_ID);
    glusterServer.setGlusterServerUuid(SERVER_UUID_1);
    return glusterServer;
}
Also used : GlusterServer(org.ovirt.engine.core.common.businessentities.gluster.GlusterServer)

Example 10 with GlusterServer

use of org.ovirt.engine.core.common.businessentities.gluster.GlusterServer in project ovirt-engine by oVirt.

the class GetGlusterVolumeRebalanceStatusQueryTest method getGlusterServer.

private GlusterServer getGlusterServer() {
    GlusterServer glusterServer = new GlusterServer();
    glusterServer.setId(SERVER_ID);
    glusterServer.setGlusterServerUuid(SERVER_UUID_1);
    return glusterServer;
}
Also used : GlusterServer(org.ovirt.engine.core.common.businessentities.gluster.GlusterServer)

Aggregations

GlusterServer (org.ovirt.engine.core.common.businessentities.gluster.GlusterServer)19 Test (org.junit.Test)8 VdsStatic (org.ovirt.engine.core.common.businessentities.VdsStatic)3 GlusterBrickEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity)3 VDS (org.ovirt.engine.core.common.businessentities.VDS)2 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)2 Guid (org.ovirt.engine.core.compat.Guid)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 GlusterVolumeParameters (org.ovirt.engine.core.common.action.gluster.GlusterVolumeParameters)1 GlusterGeoRepSession (org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession)1 GlusterGeoRepSessionDetails (org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionDetails)1 GlusterStatus (org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus)1 GlusterVolumeTaskStatusForHost (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeTaskStatusForHost)1 Network (org.ovirt.engine.core.common.businessentities.network.Network)1 VdsNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface)1 GlusterDBUtils (org.ovirt.engine.core.dao.gluster.GlusterDBUtils)1