use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.
the class GetUnregisteredBlockStorageDomainsQueryTest method createGetStorageDomainInfoReturnValue.
private VDSReturnValue createGetStorageDomainInfoReturnValue() {
VDSReturnValue returnValue = new VDSReturnValue();
returnValue.setSucceeded(true);
StorageDomain storageDomain = new StorageDomain();
storageDomain.setId(storageDomainId);
Pair<StorageDomainStatic, Object> pair = new Pair<>(storageDomain.getStorageStaticData(), null);
returnValue.setReturnValue(pair);
return returnValue;
}
use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.
the class RefreshLunsSizeCommandTest method createStorageDomain.
private StorageDomainStatic createStorageDomain() {
StorageDomainStatic sd = new StorageDomainStatic();
sd.setId(sdId);
sd.setStorageName("newStorageDomain");
sd.setComment("a storage domain for testing");
sd.setDescription("a storage domain for testing");
sd.setStorageDomainType(StorageDomainType.Data);
sd.setStorageType(StorageType.ISCSI);
sd.setStorageFormat(StorageFormatType.V3);
sd.setStorage(STORAGE);
return sd;
}
use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.
the class UpdateStorageDomainCommandTest method setUp.
@Before
public void setUp() {
StorageDomainStatic oldSdStatic = createStorageDomain();
Guid spId = Guid.newGuid();
sd = new StorageDomain();
sd.setId(sdId);
sd.setStorageStaticData(cmd.getParameters().getStorageDomain());
sd.setStatus(StorageDomainStatus.Active);
sd.setStoragePoolId(spId);
sp = new StoragePool();
sp.setId(spId);
sp.setStatus(StoragePoolStatus.Up);
sp.setIsLocal(false);
doReturn(sd).when(cmd).getStorageDomain();
doReturn(sp).when(cmd).getStoragePool();
when(sdsDao.get(sdId)).thenReturn(oldSdStatic);
mockStorageDomainValidator();
}
use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.
the class UpdateStorageDomainCommandTest method createStorageDomain.
private StorageDomainStatic createStorageDomain() {
StorageDomainStatic sd = new StorageDomainStatic();
sd.setId(sdId);
sd.setStorageName("newStorageDomain");
sd.setComment("a storage domain for testing");
sd.setDescription("a storage domain for testing");
sd.setStorageDomainType(StorageDomainType.Data);
sd.setStorageType(StorageType.NFS);
sd.setStorageFormat(StorageFormatType.V3);
return sd;
}
use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.
the class UpdateStorageDomainCommandTest method validateChangeNameExists.
@Test
public void validateChangeNameExists() {
String newName = StringUtils.reverse(sd.getStorageName());
sd.setStorageName(newName);
doReturn(new StorageDomainStatic()).when(sdsDao).getByName(newName);
ValidateTestUtils.runAndAssertValidateFailure(cmd, EngineMessage.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST);
}
Aggregations