'Wait until the S-VOL status changes to the specified status.'

def wait_thin_copy(self, ldev, status, **kwargs):

    interval = kwargs.pop('interval', self.conf.vsp_copy_check_interval)
    def _wait_for_thin_copy_status(start_time, ldev, status, **kwargs):
        'Raise    True    if    the    S-VOL    is    in    the    specified    status.'
        timeout = kwargs.pop('timeout', utils.DEFAULT_PROCESS_WAITTIME)
        if (self._get_thin_copy_svol_status(ldev) == status):
            raise loopingcall.LoopingCallDone()
        if utils.check_timeout(start_time, timeout):
            raise loopingcall.LoopingCallDone(False)
    loop = loopingcall.FixedIntervalLoopingCall(_wait_for_thin_copy_status, timeutils.utcnow(), ldev, status, **kwargs)
    if (not loop.start(interval=interval).wait()):
        msg = utils.output_log(MSG.TI_PAIR_STATUS_WAIT_TIMEOUT, svol=ldev)
        raise exception.VSPError(msg)
