'Test volume can be created from a source volume.'

def test_create_volume_from_sourcevol(self):

    def fake_create_cloned_volume(volume, src_vref):
        pass
    self.mock_object(self.volume.driver, 'create_cloned_volume', fake_create_cloned_volume)
    volume_src = tests_utils.create_volume(self.context, **self.volume_params)
    self.volume.create_volume(self.context, volume_src)
    volume_dst = tests_utils.create_volume(self.context, source_volid=volume_src['id'], **self.volume_params)
    self.volume.create_volume(self.context, volume_dst)
    volume_dst.refresh()
    self.assertEqual('available', volume_dst.status)
    self.volume.delete_volume(self.context, volume_dst)
    self.volume.delete_volume(self.context, volume_src)
