Commit a4ccecf6 authored by Michael Hanselmann's avatar Michael Hanselmann

utils: Move process-related code into separate file

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 44c9b4fe
......@@ -220,6 +220,7 @@ utils_PYTHON = \
lib/utils/log.py \
lib/utils/mlock.py \
lib/utils/nodesetup.py \
lib/utils/process.py \
lib/utils/retry.py \
lib/utils/text.py \
lib/utils/wrapper.py \
......@@ -495,6 +496,7 @@ python_tests = \
test/ganeti.utils.io_unittest.py \
test/ganeti.utils.mlock_unittest.py \
test/ganeti.utils.nodesetup_unittest.py \
test/ganeti.utils.process_unittest.py \
test/ganeti.utils.retry_unittest.py \
test/ganeti.utils.text_unittest.py \
test/ganeti.utils.wrapper_unittest.py \
......
......@@ -106,7 +106,7 @@ class SshRunner:
@param quiet: whether to enable -q to ssh
@rtype: list
@return: the list of options ready to use in L{utils.RunCmd}
@return: the list of options ready to use in L{utils.process.RunCmd}
"""
options = [
......@@ -194,8 +194,8 @@ class SshRunner:
Args: see SshRunner.BuildCmd.
@rtype: L{utils.RunResult}
@return: the result as from L{utils.RunCmd()}
@rtype: L{utils.process.RunResult}
@return: the result as from L{utils.process.RunCmd()}
"""
return utils.RunCmd(self.BuildCmd(*args, **kwargs))
......
This diff is collapsed.
......@@ -569,7 +569,7 @@ def ReadPidFile(pidfile):
def ReadLockedPidFile(path):
"""Reads a locked PID file.
This can be used together with L{utils.StartDaemon}.
This can be used together with L{utils.process.StartDaemon}.
@type path: string
@param path: Path to PID file
......
This diff is collapsed.
......@@ -53,7 +53,7 @@ class TestConsole(unittest.TestCase):
self.assertTrue(isinstance(cmd, list))
self._cmds.append(cmd)
return utils.RunResult(self._next_cmd_exitcode, None, "", "", "cmd",
utils._TIMEOUT_NONE, 5)
utils.process._TIMEOUT_NONE, 5)
def testMessage(self):
cons = objects.InstanceConsole(instance="inst98.example.com",
......
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