mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	VM Snapshot Usage for DATA disk is reported as the size of the DATA disk instead of the actual snapshot size.
This closes #485
This commit is contained in:
		
							parent
							
								
									92a9ee097d
								
							
						
					
					
						commit
						9044a02d9a
					
				@ -3162,6 +3162,15 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public long getVMSnapshotChainSize(final Connection conn, final VolumeObjectTO volumeTo, final String vmName) throws BadServerResponse, XenAPIException, XmlRpcException {
 | 
			
		||||
        if (volumeTo.getVolumeType() == Volume.Type.DATADISK) {
 | 
			
		||||
            VDI dataDisk = VDI.getByUuid(conn, volumeTo.getPath());
 | 
			
		||||
            if (dataDisk != null) {
 | 
			
		||||
                String dataDiskName = dataDisk.getNameLabel(conn);
 | 
			
		||||
                if (dataDiskName != null && !dataDiskName.isEmpty()) {
 | 
			
		||||
                    volumeTo.setName(dataDiskName);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        final Set<VDI> allvolumeVDIs = VDI.getByNameLabel(conn, volumeTo.getName());
 | 
			
		||||
        long size = 0;
 | 
			
		||||
        for (final VDI vdi : allvolumeVDIs) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user