Commit 3865ca48 authored by Michael Hanselmann's avatar Michael Hanselmann

utils: Move I/O-related code into separate file

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 9d1b963f
...@@ -216,6 +216,7 @@ utils_PYTHON = \ ...@@ -216,6 +216,7 @@ utils_PYTHON = \
lib/utils/algo.py \ lib/utils/algo.py \
lib/utils/filelock.py \ lib/utils/filelock.py \
lib/utils/hash.py \ lib/utils/hash.py \
lib/utils/io.py \
lib/utils/log.py \ lib/utils/log.py \
lib/utils/mlock.py \ lib/utils/mlock.py \
lib/utils/retry.py \ lib/utils/retry.py \
...@@ -489,6 +490,7 @@ python_tests = \ ...@@ -489,6 +490,7 @@ python_tests = \
test/ganeti.utils.algo_unittest.py \ test/ganeti.utils.algo_unittest.py \
test/ganeti.utils.filelock_unittest.py \ test/ganeti.utils.filelock_unittest.py \
test/ganeti.utils.hash_unittest.py \ test/ganeti.utils.hash_unittest.py \
test/ganeti.utils.io_unittest.py \
test/ganeti.utils.mlock_unittest.py \ test/ganeti.utils.mlock_unittest.py \
test/ganeti.utils.retry_unittest.py \ test/ganeti.utils.retry_unittest.py \
test/ganeti.utils.text_unittest.py \ test/ganeti.utils.text_unittest.py \
......
...@@ -2512,7 +2512,7 @@ def _EnsureJobQueueFile(file_name): ...@@ -2512,7 +2512,7 @@ def _EnsureJobQueueFile(file_name):
def JobQueueUpdate(file_name, content): def JobQueueUpdate(file_name, content):
"""Updates a file in the queue directory. """Updates a file in the queue directory.
This is just a wrapper over L{utils.WriteFile}, with proper This is just a wrapper over L{utils.io.WriteFile}, with proper
checking. checking.
@type file_name: str @type file_name: str
...@@ -3399,7 +3399,7 @@ class DevCacheManager(object): ...@@ -3399,7 +3399,7 @@ class DevCacheManager(object):
def RemoveCache(cls, dev_path): def RemoveCache(cls, dev_path):
"""Remove data for a dev_path. """Remove data for a dev_path.
This is just a wrapper over L{utils.RemoveFile} with a converted This is just a wrapper over L{utils.io.RemoveFile} with a converted
path name and logging. path name and logging.
@type dev_path: str @type dev_path: str
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment