Skip to content

Commit d19ea52

Browse files
koushik-daskaruturi
authored andcommitted
volume upload: Use volume/template UUID instead of ID in UploadStatusCommand
1 parent 58f2fb1 commit d19ea52

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎core/src/org/apache/cloudstack/storage/command/UploadStatusCommand.java‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ public enum EntityType {
2626
Volume,
2727
Template
2828
}
29-
private long entityId;
29+
private String entityUuid;
3030
private EntityType entityType;
3131

3232
protected UploadStatusCommand() {
3333
}
3434

35-
public UploadStatusCommand(long entityId, EntityType entityType) {
36-
this.entityId = entityId;
35+
public UploadStatusCommand(String entityUuid, EntityType entityType) {
36+
this.entityUuid = entityUuid;
3737
this.entityType = entityType;
3838
}
3939

40-
public long getEntityId() {
41-
return entityId;
40+
public String getEntityUuid() {
41+
return entityUuid;
4242
}
4343

4444
public EntityType getEntityType() {

‎server/src/com/cloud/storage/ImageStoreUploadMonitorImpl.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ protected void runInContext() {
190190
continue;
191191
}
192192
Host host = _hostDao.findById(ep.getId());
193-
UploadStatusCommand cmd = new UploadStatusCommand(volume.getId(), EntityType.Volume);
193+
UploadStatusCommand cmd = new UploadStatusCommand(volume.getUuid(), EntityType.Volume);
194194
if (host != null && host.getManagementServerId() != null) {
195195
if (_nodeId == host.getManagementServerId().longValue()) {
196196
Answer answer = null;
@@ -227,7 +227,7 @@ protected void runInContext() {
227227
continue;
228228
}
229229
Host host = _hostDao.findById(ep.getId());
230-
UploadStatusCommand cmd = new UploadStatusCommand(template.getId(), EntityType.Template);
230+
UploadStatusCommand cmd = new UploadStatusCommand(template.getUuid(), EntityType.Template);
231231
if (host != null && host.getManagementServerId() != null) {
232232
if (_nodeId == host.getManagementServerId().longValue()) {
233233
Answer answer = null;

0 commit comments

Comments
 (0)