@wrap_check_policy
def delete_snapshot(self, context, snapshot):
    if (snapshot['status'] not in ['available', 'error']):
        msg = _('Volume Snapshot status must be available or error')
        raise exception.InvalidVolume(reason=msg)
    self.db.snapshot_update(context, snapshot['id'], {'status': 'deleting'})
    volume = self.db.volume_get(context, snapshot['volume_id'])
    host = volume['host']
    rpc.cast(context, rpc.queue_get_for(context, FLAGS.volume_topic, host), {'method': 'delete_snapshot', 'args': {'snapshot_id': snapshot['id']}})
@wrap_check_policy
def delete_snapshot(self, context, snapshot):
    if (snapshot['status'] not in ['available', 'error']):
        msg = _('Volume Snapshot status must be available or error')
        raise exception.InvalidVolume(reason=msg)
    self.db.snapshot_update(context, snapshot['id'], {'status': 'deleting'})
    volume = self.db.volume_get(context, snapshot['volume_id'])
    host = volume['host']
    rpc.cast(context, rpc.queue_get_for(context, FLAGS.volume_topic, host), {'method': 'delete_snapshot', 'args': {'snapshot_id': snapshot['id']}})