newTags.append(token.trim()).append(",");
}
newTags.delete(newTags.length() - 1, newTags.length());
tags = newTags.toString();
}
DiskOfferingVO diskOffering = new DiskOfferingVO(domainId, name, displayText, diskSpace, tags, false, null, null, null);
diskOffering.setUseLocalStorage(local);
Long bytesReadRate = Long.parseLong(_currentObjectParams.get("bytesReadRate"));
if (bytesReadRate != null && (bytesReadRate > 0))
diskOffering.setBytesReadRate(bytesReadRate);
Long bytesWriteRate = Long.parseLong(_currentObjectParams.get("bytesWriteRate"));
if (bytesWriteRate != null && (bytesWriteRate > 0))
diskOffering.setBytesWriteRate(bytesWriteRate);
Long iopsReadRate = Long.parseLong(_currentObjectParams.get("iopsReadRate"));
if (iopsReadRate != null && (iopsReadRate > 0))
diskOffering.setIopsReadRate(iopsReadRate);
Long iopsWriteRate = Long.parseLong(_currentObjectParams.get("iopsWriteRate"));
if (iopsWriteRate != null && (iopsWriteRate > 0))
diskOffering.setIopsWriteRate(iopsWriteRate);
DiskOfferingDaoImpl offering = ComponentContext.inject(DiskOfferingDaoImpl.class);
try {
offering.persist(diskOffering);
} catch (Exception e) {