mirror of https://github.com/apache/cloudstack.git
bug 6195,6255,5891: Only ROOT volumes will have templateId. offeringId will be diskOfferingId for DATA volumes and serviceOfferingId for ROOT volume
status 6195,6255,5891: resolved fixed
This commit is contained in:
parent
0669c2c1d4
commit
85964511b2
|
|
@ -929,11 +929,15 @@ public class StorageManagerImpl implements StorageManager {
|
|||
s_logger.warn("Error updating the attached value for volume "+v.getId()+":"+e);
|
||||
}
|
||||
|
||||
long templateId = -1;
|
||||
if(v.getVolumeType() == VolumeType.ROOT && Storage.ImageFormat.ISO != template.getFormat()){
|
||||
templateId = template.getId();
|
||||
}
|
||||
|
||||
long volumeId = v.getId();
|
||||
// Create an event
|
||||
long sizeMB = v.getSize() / (1024 * 1024);
|
||||
String diskOfferingIdentifier = (diskOffering != null) ? String.valueOf(diskOffering.getId()) : "-1";
|
||||
String eventParams = "id=" + volumeId + "\ndoId=" + diskOfferingIdentifier + "\ntId=" + template.getId() + "\ndcId=" + dc.getId() + "\nsize=" + sizeMB;
|
||||
long sizeMB = v.getSize() / (1024 * 1024);
|
||||
String eventParams = "id=" + volumeId + "\ndoId=" + v.getDiskOfferingId() + "\ntId=" + templateId + "\ndcId=" + dc.getId() + "\nsize=" + sizeMB;
|
||||
EventVO event = new EventVO();
|
||||
event.setAccountId(account.getId());
|
||||
event.setUserId(1L);
|
||||
|
|
|
|||
Loading…
Reference in New Issue