'Tests a negative scenario where the instance is shelved offloaded
so there is no host to cast to for the guest-assisted snapshot delete.'

@mock.patch.object(objects.BlockDeviceMapping, 'get_by_volume', return_value=objects.BlockDeviceMapping(instance=objects.Instance(launched_at=timeutils.utcnow(), uuid=uuids.instance_uuid, vm_state=vm_states.SHELVED_OFFLOADED, task_state=None, host=None)))
def test_volume_snapshot_delete_shelved_offloaded(self, bdm_get_by_volume):

    self.assertRaises(exception.InstanceNotReady, self.compute_api.volume_snapshot_delete, self.context, mock.sentinel.volume_id, mock.sentinel.snapshot_id, mock.sentinel.delete_info)
