volume upload: Use volume/template UUID instead of ID in UploadStatusCommand

This commit is contained in:
Koushik Das 2015-02-04 18:35:12 +05:30 committed by Rajani Karuturi
parent 58f2fb1bb1
commit d19ea5226a
2 changed files with 7 additions and 7 deletions

View File

@ -26,19 +26,19 @@ public class UploadStatusCommand extends Command {
Volume,
Template
}
private long entityId;
private String entityUuid;
private EntityType entityType;
protected UploadStatusCommand() {
}
public UploadStatusCommand(long entityId, EntityType entityType) {
this.entityId = entityId;
public UploadStatusCommand(String entityUuid, EntityType entityType) {
this.entityUuid = entityUuid;
this.entityType = entityType;
}
public long getEntityId() {
return entityId;
public String getEntityUuid() {
return entityUuid;
}
public EntityType getEntityType() {

View File

@ -190,7 +190,7 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto
continue;
}
Host host = _hostDao.findById(ep.getId());
UploadStatusCommand cmd = new UploadStatusCommand(volume.getId(), EntityType.Volume);
UploadStatusCommand cmd = new UploadStatusCommand(volume.getUuid(), EntityType.Volume);
if (host != null && host.getManagementServerId() != null) {
if (_nodeId == host.getManagementServerId().longValue()) {
Answer answer = null;
@ -227,7 +227,7 @@ public class ImageStoreUploadMonitorImpl extends ManagerBase implements ImageSto
continue;
}
Host host = _hostDao.findById(ep.getId());
UploadStatusCommand cmd = new UploadStatusCommand(template.getId(), EntityType.Template);
UploadStatusCommand cmd = new UploadStatusCommand(template.getUuid(), EntityType.Template);
if (host != null && host.getManagementServerId() != null) {
if (_nodeId == host.getManagementServerId().longValue()) {
Answer answer = null;