]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/vstart_runner: add a method to create temporary file
authorRishabh Dave <ridave@redhat.com>
Tue, 10 Sep 2019 11:27:53 +0000 (16:57 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 6 Dec 2019 03:24:05 +0000 (08:54 +0530)
The method's signature is kept identical to the method in teuthology.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/vstart_runner.py

index db838c6668bf9e52ed027a532a1e4a0bfa3bce1c..965ad9717f6e3d72b37d40faa71cd4a0125c3b92 100644 (file)
@@ -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...