@wrap_check_policy
def check_detach(self, context, volume):
    if (volume['status'] == 'available'):
        msg = _('already detached')
        raise exception.InvalidVolume(reason=msg)
@wrap_check_policy
def check_detach(self, context, volume):
    if (volume['status'] == 'available'):
        msg = _('already detached')
        raise exception.InvalidVolume(reason=msg)