mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8167: publish volume uuid on event bus in create snapshot cmd
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
5f117e6be9
commit
f6564b0b03
|
|
@ -100,6 +100,14 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
|
|||
return volumeId;
|
||||
}
|
||||
|
||||
public String getVolumeUuid() {
|
||||
Volume volume = (Volume)this._entityMgr.findById(Volume.class, getVolumeId());
|
||||
if (volume == null) {
|
||||
throw new InvalidParameterValueException("Unable to find volume's UUID");
|
||||
}
|
||||
return volume.getUuid();
|
||||
}
|
||||
|
||||
public Long getPolicyId() {
|
||||
if (policyId != null) {
|
||||
return policyId;
|
||||
|
|
@ -159,7 +167,7 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
|
|||
|
||||
@Override
|
||||
public String getEventDescription() {
|
||||
return "creating snapshot for volume: " + getVolumeId();
|
||||
return "creating snapshot for volume: " + getVolumeUuid();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -181,7 +189,7 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd {
|
|||
@Override
|
||||
public void execute() {
|
||||
s_logger.info("VOLSS: createSnapshotCmd starts:" + System.currentTimeMillis());
|
||||
CallContext.current().setEventDetails("Volume Id: " + getVolumeId());
|
||||
CallContext.current().setEventDetails("Volume Id: " + getVolumeUuid());
|
||||
Snapshot snapshot;
|
||||
try {
|
||||
snapshot =
|
||||
|
|
|
|||
Loading…
Reference in New Issue