private void checkServiceOffering(ServiceOffering offering) { assertNotNull(offering.getId()); assertEquals(offering.getCpuNumber(), 2); assertEquals(offering.getCpuSpeed(), 1024); assertEquals(offering.getMemory(), 2048); assertTrue(offering.supportsHA()); assertEquals(offering.getStorageType(), StorageType.LOCAL); }
public T fromServiceOffering(ServiceOffering in) { return this.id(in.getId()) .name(in.getName()) .displayText(in.getDisplayText()) .created(in.getCreated()) .domain(in.getDomain()) .domainId(in.getDomainId()) .cpuNumber(in.getCpuNumber()) .cpuSpeed(in.getCpuSpeed()) .memory(in.getMemory()) .supportsHA(in.supportsHA()) .storageType(in.getStorageType()) .tags(in.getTags()) .defaultUse(in.isDefaultUse()) .systemOffering(in.isSystemOffering()) .cpuUseLimited(in.isCpuUseLimited()) .networkRate(in.getNetworkRate()) .systemVmType(in.isSystemVmType()); }