mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	volume upload: Use volume/template UUID instead of ID in UploadStatusCommand
This commit is contained in:
		
							parent
							
								
									58f2fb1bb1
								
							
						
					
					
						commit
						d19ea5226a
					
				@ -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() {
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user