]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
cleanup temporary files at the end of the test 995/head
authorVasu Kulkarni <vasu@redhat.com>
Tue, 20 Dec 2016 20:39:25 +0000 (12:39 -0800)
committerVasu Kulkarni <vasu@redhat.com>
Tue, 20 Dec 2016 22:42:58 +0000 (14:42 -0800)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
teuthology/task/ceph_ansible.py

index 0d8c7c663a38e8f49d420c16d4fad99b1c69658c..c303f1876d261369010c5688b3b7d48d88ba86c6 100644 (file)
@@ -205,6 +205,12 @@ class CephAnsible(Task):
         hosts_file.flush()
         return hosts_file.name
 
+    def teardown(self):
+        log.info("Cleaning up temporary files")
+        os.remove(self.inventory)
+        os.remove(self.playbook_file)
+        os.remove(self.extra_vars_file)
+
     def wait_for_ceph_health(self):
         with contextutil.safe_while(sleep=15, tries=6,
                                     action='check health') as proceed: