Search in sources :

Example 26 with StoragePool

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

the class ForceSelectSPMCommandTest method createVDSandStoragePool.

private void createVDSandStoragePool() {
    vds = new VDS();
    vds.setId(vdsId);
    vds.setVdsName("TestVDS");
    vds.setStoragePoolId(storagePoolId);
    vds.setStatus(VDSStatus.Up);
    vds.setClusterSupportsVirtService(true);
    vds.setSpmStatus(VdsSpmStatus.None);
    vds.setVdsSpmPriority(10);
    storagePool = new StoragePool();
    storagePool.setId(storagePoolId);
    storagePool.setStatus(StoragePoolStatus.Up);
}
Also used : StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) VDS(org.ovirt.engine.core.common.businessentities.VDS)

Example 27 with StoragePool

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

the class GetStoragePoolByIdQueryTest method createStoragePool.

private StoragePool createStoragePool() {
    StoragePool expectedResult = new StoragePool();
    expectedResult.setId(STORAGE_POOL_ID);
    return expectedResult;
}
Also used : StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool)

Example 28 with StoragePool

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

the class GetStoragePoolByIdQueryTest method testExecuteQuery.

@Test
public void testExecuteQuery() {
    StoragePool expectedResult = createStoragePool();
    when(getQueryParameters().getId()).thenReturn(STORAGE_POOL_ID);
    when(storagePoolDaoMock.get(STORAGE_POOL_ID, getUser().getId(), getQueryParameters().isFiltered())).thenReturn(expectedResult);
    when(dcSingleMacPoolFinderMock.find(STORAGE_POOL_ID)).thenReturn(MAC_POOL_ID);
    getQuery().executeQueryCommand();
    StoragePool result = getQuery().getQueryReturnValue().getReturnValue();
    assertEquals("Wrong storage pool returned", expectedResult, result);
    assertThat(result.getMacPoolId(), is(MAC_POOL_ID));
}
Also used : StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) AbstractUserQueryTest(org.ovirt.engine.core.bll.AbstractUserQueryTest) Test(org.junit.Test)

Example 29 with StoragePool

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

the class ReconstructMasterDomainCommandTest method initializeStoragePool.

private void initializeStoragePool() {
    storagePool = new StoragePool();
    storagePool.setId(storagePoolId);
    doReturn(Arrays.asList(masterDomainIsoMap, regularDomainIsoMap)).when(storagePoolIsoMapDao).getAllForStoragePool(storagePoolId);
    doReturn(storagePool).when(cmd).getStoragePool();
}
Also used : StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool)

Example 30 with StoragePool

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

the class StoragePoolValidatorTest method setup.

@Before
public void setup() {
    storagePool = new StoragePool();
    storagePool.setStatus(StoragePoolStatus.Up);
    validator = spy(new StoragePoolValidator(storagePool));
}
Also used : StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) Before(org.junit.Before)

Aggregations

StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)239 Guid (org.ovirt.engine.core.compat.Guid)83 ArrayList (java.util.ArrayList)78 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)60 Test (org.junit.Test)59 List (java.util.List)46 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)39 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)35 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)34 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)33 VDS (org.ovirt.engine.core.common.businessentities.VDS)31 QueryType (org.ovirt.engine.core.common.queries.QueryType)31 Frontend (org.ovirt.engine.ui.frontend.Frontend)31 StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)28 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)28 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)27 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)27 Linq (org.ovirt.engine.ui.uicommonweb.Linq)26 Arrays (java.util.Arrays)25 ConfirmationModel (org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel)25