'Copies src volume to dest volume.'

def _copy_volume_high_priority_readonly(self, src_vol, dst_vol):

    LOG.info('Copying    src    vol    %(src)s    to    dest    vol    %(dst)s.', {'src': src_vol['label'], 'dst': dst_vol['label']})
    job = None
    try:
        job = self._client.create_volume_copy_job(src_vol['id'], dst_vol['volumeRef'])
        def wait_for_copy():
            j_st = self._client.list_vol_copy_job(job['volcopyRef'])
            if (j_st['status'] in ['inProgress', 'pending', 'unknown']):
                return
            if ((j_st['status'] == 'failed') or (j_st['status'] == 'halted')):
                LOG.error('Vol    copy    job    status    %s.', j_st['status'])
                raise exception.NetAppDriverException((_('Vol    copy    job    for    dest    %s    failed.') % dst_vol['label']))
            LOG.info('Vol    copy    job    completed    for    dest    %s.', dst_vol['label'])
            raise loopingcall.LoopingCallDone()
        checker = loopingcall.FixedIntervalLoopingCall(wait_for_copy)
        checker.start(interval=self.SLEEP_SECS, initial_delay=self.SLEEP_SECS, stop_on_exception=True).wait()
    finally:
        if job:
            try:
                self._client.delete_vol_copy_job(job['volcopyRef'])
            except exception.NetAppDriverException:
                LOG.warning('Failure    deleting    job    %s.', job['volcopyRef'])
        else:
            LOG.warning('Volume    copy    job    for    src    vol    %s    not    found.', src_vol['id'])
    LOG.info('Copy    job    to    dest    vol    %s    completed.', dst_vol['label'])
