From: Rishabh Dave Date: Tue, 10 Sep 2019 11:27:53 +0000 (+0530) Subject: qa/vstart_runner: add a method to create temporary file X-Git-Tag: v15.1.0~636^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8d7c45d3b023a46af195d871ae127db772c1c6f6;p=ceph.git qa/vstart_runner: add a method to create temporary file The method's signature is kept identical to the method in teuthology. Signed-off-by: Rishabh Dave --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index db838c6668bf..965ad9717f6e 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -272,6 +272,15 @@ class LocalRemote(object): # None return mkdtemp(suffix=suffix, prefix='', dir=parentdir) + def mktemp(self, suffix=None, parentdir=None): + """ + Make a remote temporary file + + Returns: the path of the temp file created. + """ + from tempfile import mktemp + return mktemp(suffix=suffix, dir=parentdir) + def _perform_checks_and_return_list_of_args(self, args, omit_sudo): # Since Python's shell simulation can only work when commands are # provided as a list of argumensts...