Renamining space reporting for file storage
authorHelga Velroyen <helgav@google.com>
Wed, 12 Jun 2013 08:44:48 +0000 (10:44 +0200)
committerHelga Velroyen <helgav@google.com>
Fri, 14 Jun 2013 11:43:00 +0000 (13:43 +0200)
Before being integrated, the function for space reporting
for file storage is renamed to a more expressive name.

Signed-off-by: Helga Velroyen <helgav@google.com>
Reviewed-by: Thomas Thrainer <thomasth@google.com>

lib/storage/filestorage.py
test/py/ganeti.storage.filestorage_unittest.py

index 3e64018..9237300 100644 (file)
@@ -28,7 +28,7 @@ import os
 from ganeti import errors
 
 
-def GetSpaceInfo(path):
+def GetFileStorageSpaceInfo(path):
   """Retrieves the free and total space of the device where the file is
      located.
 
index 53e1398..f229b56 100755 (executable)
@@ -33,17 +33,17 @@ import testutils
 class TestFileStorageSpaceInfo(unittest.TestCase):
 
   def testSpaceInfoPathInvalid(self):
-    """Tests that an error is raised when the given file is not existing.
+    """Tests that an error is raised when the given path is not existing.
 
     """
-    self.assertRaises(errors.CommandError, filestorage.GetSpaceInfo,
+    self.assertRaises(errors.CommandError, filestorage.GetFileStorageSpaceInfo,
                       "/path/does/not/exist/")
 
   def testSpaceInfoPathValid(self):
-    """Tests that the 'df' command is run if the file is valid.
+    """Smoke test run on a directory that exists for sure.
 
     """
-    info = filestorage.GetSpaceInfo("/")
+    info = filestorage.GetFileStorageSpaceInfo("/")
 
 
 if __name__ == "__main__":