Search in sources :

Example 21 with GlusterGeoRepSession

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

the class GeoRepCreateEligibilityBaseTest method getSession.

protected GlusterGeoRepSession getSession(Guid slaveVolumeId) {
    GlusterGeoRepSession session = new GlusterGeoRepSession();
    session.setId(Guid.newGuid());
    session.setMasterVolumeId(Guid.newGuid());
    session.setSlaveVolumeId(slaveVolumeId);
    return session;
}
Also used : GlusterGeoRepSession(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession)

Example 22 with GlusterGeoRepSession

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

the class GlusterGeoRepDaoTest method testGetById.

@Test
public void testGetById() {
    GlusterGeoRepSession session = dao.getById(FixturesTool.GLUSTER_GEOREP_SESSION_ID);
    assertNotNull(session);
    assertEquals(FixturesTool.GLUSTER_GEOREP_SESSION_ID, session.getId());
}
Also used : GlusterGeoRepSession(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession) Test(org.junit.Test)

Example 23 with GlusterGeoRepSession

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

the class GlusterGeoRepDaoTest method getGlusterGeoRepSession.

private GlusterGeoRepSession getGlusterGeoRepSession() {
    GlusterGeoRepSession georepSession = new GlusterGeoRepSession();
    georepSession.setId(SESSION_ID);
    georepSession.setMasterVolumeId(FixturesTool.GLUSTER_VOLUME_UUID1);
    georepSession.setSlaveHostName("remoteHost");
    georepSession.setSlaveVolumeName("remoteVol");
    georepSession.setSlaveNodeUuid(FixturesTool.GLUSTER_SERVER_UUID1);
    georepSession.setSessionKey("remoteHost:remoteVol");
    georepSession.setStatus(GeoRepSessionStatus.ACTIVE);
    return georepSession;
}
Also used : GlusterGeoRepSession(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession)

Example 24 with GlusterGeoRepSession

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

the class GlusterGeoRepDaoTest method testGetSessionByInvalidId.

@Test
public void testGetSessionByInvalidId() {
    GlusterGeoRepSession session = dao.getById(NONEXIST_SESSION_ID);
    assertNull(session);
}
Also used : GlusterGeoRepSession(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession) Test(org.junit.Test)

Example 25 with GlusterGeoRepSession

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

the class GlusterGeoRepDaoTest method testGetBySlaveHostNameAndVolume.

@Test
public void testGetBySlaveHostNameAndVolume() {
    GlusterGeoRepSession session = dao.getGeoRepSession(FixturesTool.GLUSTER_VOLUME_UUID1, "192.168.122.17", "slave-replica");
    assertNotNull(session);
    assertEquals(FixturesTool.GLUSTER_GEOREP_SESSION_ID, session.getId());
}
Also used : GlusterGeoRepSession(org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession) Test(org.junit.Test)

Aggregations

GlusterGeoRepSession (org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSession)49 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)12 EngineLock (org.ovirt.engine.core.utils.lock.EngineLock)9 GlusterVolumeGeoRepSessionParameters (org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionParameters)8 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)8 Test (org.junit.Test)7 ArrayList (java.util.ArrayList)6 VDS (org.ovirt.engine.core.common.businessentities.VDS)6 Guid (org.ovirt.engine.core.compat.Guid)6 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)5 GlusterVolumeGeoRepSessionVDSParameters (org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionVDSParameters)5 GlusterGeoRepSessionDetails (org.ovirt.engine.core.common.businessentities.gluster.GlusterGeoRepSessionDetails)3 GlusterVolumeSnapshotEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotEntity)3 HashMap (java.util.HashMap)2 Callable (java.util.concurrent.Callable)2 StorageDomainDR (org.ovirt.engine.core.common.businessentities.StorageDomainDR)2 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)2 GlusterBrickEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterBrickEntity)2 EngineException (org.ovirt.engine.core.common.errors.EngineException)2 CreateGlusterVolumeSnapshotVDSParameters (org.ovirt.engine.core.common.vdscommands.gluster.CreateGlusterVolumeSnapshotVDSParameters)2