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);
}
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;
}
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));
}
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();
}
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));
}
Aggregations