def _cleanup(self, instance): target = os.path.join(FLAGS.instances_path, instance['name']) instance_name = instance['name'] LOG.info(_('instance %(instance_name)s: deleting instance files' ' %(target)s') % locals()) if FLAGS.baremetal_type == 'lxc': disk.destroy_container(self.container) if os.path.exists(target): shutil.rmtree(target)