Search in sources :

Example 11 with VmPool

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

the class VmPoolDaoTest method testGetFilteredWithPermissionsNoPermissionsAndNoFilter.

@Test
public void testGetFilteredWithPermissionsNoPermissionsAndNoFilter() {
    VmPool result = dao.get(existingVmPool.getVmPoolId(), UNPRIVILEGED_USER_ID, false);
    assertGetResult(result);
}
Also used : VmPool(org.ovirt.engine.core.common.businessentities.VmPool) Test(org.junit.Test)

Example 12 with VmPool

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

the class VmPoolDaoTest method testGetByName.

/**
 * Ensures that getting a VM pool by name works as expected.
 */
@Test
public void testGetByName() {
    VmPool result = dao.getByName(existingVmPool.getName());
    assertNotNull(result);
    assertEquals(existingVmPool, result);
}
Also used : VmPool(org.ovirt.engine.core.common.businessentities.VmPool) Test(org.junit.Test)

Example 13 with VmPool

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

the class VmPoolDaoTest method testGetVmPool.

/**
 * Ensures that getting a VM pool works as expected.
 */
@Test
public void testGetVmPool() {
    VmPool result = dao.get(existingVmPool.getVmPoolId());
    assertGetResult(result);
}
Also used : VmPool(org.ovirt.engine.core.common.businessentities.VmPool) Test(org.junit.Test)

Example 14 with VmPool

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

the class VmPoolDaoTest method testSaveVmPool.

/**
 * Ensures that saving a VM pool works as expected.
 */
@Test
public void testSaveVmPool() {
    dao.save(newVmPool);
    VmPool result = dao.getByName(newVmPool.getName());
    assertNotNull(result);
    assertEquals(newVmPool, result);
}
Also used : VmPool(org.ovirt.engine.core.common.businessentities.VmPool) Test(org.junit.Test)

Example 15 with VmPool

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

the class VmPoolDaoTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    dao = dbFacade.getVmPoolDao();
    vmDao = dbFacade.getVmDao();
    existingVmPool = dao.get(EXISTING_VM_POOL_ID);
    deletableVmPool = dao.get(DELETABLE_VM_POOL_ID);
    newVmPool = new VmPool();
    newVmPool.setName("New VM Pool");
    newVmPool.setVmPoolDescription("This is a new VM pool.");
    newVmPool.setClusterId(FixturesTool.CLUSTER);
    newVmPoolMap = new VmPoolMap(FREE_VM_ID, EXISTING_VM_POOL_ID);
}
Also used : VmPoolMap(org.ovirt.engine.core.common.businessentities.VmPoolMap) VmPool(org.ovirt.engine.core.common.businessentities.VmPool)

Aggregations

VmPool (org.ovirt.engine.core.common.businessentities.VmPool)32 Test (org.junit.Test)12 VM (org.ovirt.engine.core.common.businessentities.VM)9 ArrayList (java.util.ArrayList)8 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)8 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)7 Guid (org.ovirt.engine.core.compat.Guid)7 QueryType (org.ovirt.engine.core.common.queries.QueryType)6 List (java.util.List)5 Frontend (org.ovirt.engine.ui.frontend.Frontend)5 HelpTag (org.ovirt.engine.ui.uicommonweb.help.HelpTag)5 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)5 ActionType (org.ovirt.engine.core.common.action.ActionType)4 VmPoolParametersBase (org.ovirt.engine.core.common.action.VmPoolParametersBase)4 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)3 AddVmPoolParameters (org.ovirt.engine.core.common.action.AddVmPoolParameters)3 VmPoolType (org.ovirt.engine.core.common.businessentities.VmPoolType)3 SearchType (org.ovirt.engine.core.common.interfaces.SearchType)3 SearchParameters (org.ovirt.engine.core.common.queries.SearchParameters)3 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)3