mprokopchuk commented on code in PR #6939:
URL: https://github.com/apache/cloudstack/pull/6939#discussion_r1041490373
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -1006,6 +1024,14 @@ public List<DiskProfile> allocateTemplatedVolumes(Type
type, String name, DiskOf
profiles.add(diskProfile);
}
+ // Set context information for VOLUME.CREATE event for ROOT disk.
+ CallContext volumeContext = CallContext.current();
+ if (type == Type.ROOT && volumeContext != null &&
volumeContext.getEventResourceType() == ApiCommandResourceType.Volume) {
+ String volumeIds = profiles.stream().map(diskProfile ->
this._uuidMgr.getUuid(Volume.class,
diskProfile.getVolumeId())).collect(Collectors.joining(", "));
+ volumeContext.setEventDetails("Volume Id: " + volumeIds + " Vm Id:
" + this._uuidMgr.getUuid(VirtualMachine.class, vm.getId()));
+
volumeContext.setEventResourceId(profiles.stream().findFirst().map(DiskProfile::getVolumeId).orElse(null));
+ }
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]