def METHOD_NAME(self):
    """Keeps pinging vdsm for operations that need it"""
    def ping():
        while not done:
            # TODO: ping is deprecated, use confirmConnectivity instead
            self.vdscli.ping()
            time.sleep(1)
    try:
        done = False
        pinger_thread = threading.Thread(target=ping)
        pinger_thread.start()
        yield
    except Exception:
        raise
    finally:
        done = True