This is an initial patch series to move utility functions into separate files.
The “utils.py” module grew over time and functions have many
inter-dependencies. Before continuing with untangling them, I'd like to get a
review for the following patches:

Michael Hanselmann (9):
  utils: Move to separate module
  utils: Split algorithms into separate file
  utils: Split Retry & co. into separate file
  utils: Move text-related functions into separate file
  utils: Move Mlockall into separate file
  utils: Move logging-related code into separate file
  utils: Rename _CloseFDNoErr to CloseFdNoError
  utils: Move hashing-related code into separate file
  utils: Remove unused variables

 Makefile.am                                        |   19 +-
 lib/{utils.py => utils/__init__.py}                |  946 +-------------------
 lib/utils/algo.py                                  |  113 +++
 lib/utils/hash.py                                  |  112 +++
 lib/utils/log.py                                   |  155 ++++
 lib/utils/mlock.py                                 |   73 ++
 lib/utils/retry.py                                 |  184 ++++
 lib/utils/text.py                                  |  444 +++++++++
 test/ganeti.utils.algo_unittest.py                 |  223 +++++
 test/ganeti.utils.hash_unittest.py                 |  113 +++
 ..._unittest.py => ganeti.utils.mlock_unittest.py} |    6 +-
 test/ganeti.utils.retry_unittest.py                |  117 +++
 test/ganeti.utils.text_unittest.py                 |  426 +++++++++
 test/ganeti.utils_unittest.py                      |  729 +---------------
 14 files changed, 2004 insertions(+), 1656 deletions(-)
 rename lib/{utils.py => utils/__init__.py} (77%)
 create mode 100644 lib/utils/algo.py
 create mode 100644 lib/utils/hash.py
 create mode 100644 lib/utils/log.py
 create mode 100644 lib/utils/mlock.py
 create mode 100644 lib/utils/retry.py
 create mode 100644 lib/utils/text.py
 create mode 100755 test/ganeti.utils.algo_unittest.py
 create mode 100755 test/ganeti.utils.hash_unittest.py
 rename test/{ganeti.utils_mlockall_unittest.py => 
ganeti.utils.mlock_unittest.py} (90%)
 create mode 100755 test/ganeti.utils.retry_unittest.py
 create mode 100755 test/ganeti.utils.text_unittest.py

-- 
1.7.3.1

Reply via email to