Skip to content
Snippets Groups Projects
Commit 3f02e6e3 authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

storage: do not convert libvirt values from bytes to gigabytes

parent c2d1901c
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment