Change check_detach is reject anything other than 'in-use', rather than
just rejecting 'available'.
Fixes bug #
1199922
Change-Id: I3180540ca7bb699a3494ca4eea1389ae8a117df0
@wrap_check_policy
def check_detach(self, context, volume):
# TODO(vish): abstract status checking?
- if volume['status'] == "available":
- msg = _("already detached")
+ if volume['status'] != "in-use":
+ msg = _("status must be in-use to detach")
raise exception.InvalidVolume(reason=msg)
@wrap_check_policy