'Copy a linear or virtual volume.'

def copy_volume(self, src_name, dest_name, dest_bknd_name, backend_type='virtual'):

    if (backend_type == 'linear'):
        return self.linear_copy_volume(src_name, dest_name, dest_bknd_name)
    self._request('/copy/volume', src_name, name=dest_name)
    LOG.debug('Volume    copy    of    source_volume:    %(src_name)s    to    destination_volume:    %(dest_name)s    started.', {'src_name': src_name, 'dest_name': dest_name})
    while self.volume_copy_in_progress(src_name):
        time.sleep(5)
    self._request('/show/volumes', dest_name)
    LOG.debug('Volume    copy    of    source_volume:    %(src_name)s    to    destination_volume:    %(dest_name)s    completed.', {'src_name': src_name, 'dest_name': dest_name})
