Commit 3f02e6e3 authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

storage: do not convert libvirt values from bytes to gigabytes

parent c2d1901c
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -254,29 +254,29 @@ class HVStorage(object):

    def get_pool_total_space(self, pool):
        '''
        Returns the storage capacity of this pool in gigabytes
        Returns the storage capacity of this pool in bytes
        
        :param pool: the pool to get information from
        :type pool: :class:`virStoragePool`
        :return: :class:`int` of capacity in gigabytes
        :return: :class:`int` of capacity in bytes
        '''
        
    def get_pool_available_space(self, pool):
        '''
        Returns available space of this storage pool in gigabytes
        Returns available space of this storage pool in bytes
        
        :param pool: the pool to get information from
        :type pool: :class:`virStoragePool`
        :return: :class:`int` of available free space in gigabytes
        :return: :class:`int` of available free space in bytes
        '''
        
    def get_pool_used_space(self, pool):
        '''
        Returns current storage pool usage in gigabytes
        Returns current storage pool usage in bytes
        
        :param pool: the pool to get information from
        :type pool: :class:`virStoragePool`
        :return: :class:`int` of used space in gigabytes
        :return: :class:`int` of used space in bytes
        '''
        
    def get_volume_path(self, pool, vol_name):
+6 −6
Original line number Diff line number Diff line
@@ -448,11 +448,11 @@ class LibvirtHVStorage(HVStorage):
    
    def get_pool_total_space(self, pool):
        '''
        Returns the storage capacity of this pool in gigabytes
        Returns the storage capacity of this pool in bytes
        
        :param pool: the pool to get information from
        :type pool: :class:`virStoragePool`
        :return: :class:`int` of capacity in gigabytes
        :return: :class:`int` of capacity in bytes
        '''
        try:
            return pool.info()[1]
@@ -461,11 +461,11 @@ class LibvirtHVStorage(HVStorage):
    
    def get_pool_available_space(self, pool):
        '''
        Returns available space of this storage pool in gigabytes
        Returns available space of this storage pool in bytes
        
        :param pool: the pool to get information from
        :type pool: :class:`virStoragePool`
        :return: :class:`int` of available free space in gigabytes
        :return: :class:`int` of available free space in bytes
        '''
        try:
            return pool.info()[2]
@@ -474,11 +474,11 @@ class LibvirtHVStorage(HVStorage):
    
    def get_pool_used_space(self, pool):
        '''
        Returns current storage pool usage in gigabytes
        Returns current storage pool usage in bytes
        
        :param pool: the pool to get information from
        :type pool: :class:`virStoragePool`
        :return: :class:`int` of used space in gigabytes
        :return: :class:`int` of used space in bytes
        '''
        try:
            return pool.info()[3]