@Override public storage_domains getStorageDomain() { storage_domains sd = new storage_domains(); sd.setstatus(StorageDomainStatus.Active); sd.setavailable_disk_size(10); return sd; }
@Override public StorageDomainDAO getStorageDomainDAO() { final storage_domains sd = new storage_domains(); sd.setstorage_domain_type(StorageDomainType.ImportExport); sd.setstatus(StorageDomainStatus.Active); final StorageDomainDAO d = mock(StorageDomainDAO.class); when(d.getForStoragePool(any(Guid.class), any(Guid.class))).thenReturn(sd); return d; }
private void setStorageDomainStatus(StorageDomainStatus status) { storage_domains domain = new storage_domains(); domain.setstatus(status); when(cmd.getStorageDomain()).thenReturn(domain); }