From 3f02e6e3a3341f06588ea44dd2c85c47e3027352 Mon Sep 17 00:00:00 2001
From: Thibault VINCENT <thibault.vincent@smartjog.com>
Date: Wed, 22 Dec 2010 11:00:15 +0100
Subject: [PATCH] storage: do not convert libvirt values from bytes to
 gigabytes

---
 ccnode/interface.py      | 12 ++++++------
 ccnode/libvirtwrapper.py | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ccnode/interface.py b/ccnode/interface.py
index 503a9ba..7e37d68 100644
--- a/ccnode/interface.py
+++ b/ccnode/interface.py
@@ -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):
diff --git a/ccnode/libvirtwrapper.py b/ccnode/libvirtwrapper.py
index 26119c9..18c438e 100644
--- a/ccnode/libvirtwrapper.py
+++ b/ccnode/libvirtwrapper.py
@@ -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]
-- 
GitLab