Merge "Remove check_{attach,detach} from volumes API"
This commit is contained in:
commit
89e92c6bb1
@ -20,8 +20,6 @@
|
|||||||
"volume:unreserve_volume": [],
|
"volume:unreserve_volume": [],
|
||||||
"volume:begin_detaching": [],
|
"volume:begin_detaching": [],
|
||||||
"volume:roll_detaching": [],
|
"volume:roll_detaching": [],
|
||||||
"volume:check_attach": [],
|
|
||||||
"volume:check_detach": [],
|
|
||||||
"volume:initialize_connection": [],
|
"volume:initialize_connection": [],
|
||||||
"volume:terminate_connection": [],
|
"volume:terminate_connection": [],
|
||||||
"volume:create_snapshot": [],
|
"volume:create_snapshot": [],
|
||||||
|
@ -350,23 +350,6 @@ class API(base.Base):
|
|||||||
snapshots = results
|
snapshots = results
|
||||||
return snapshots
|
return snapshots
|
||||||
|
|
||||||
@wrap_check_policy
|
|
||||||
def check_attach(self, volume):
|
|
||||||
# TODO(vish): abstract status checking?
|
|
||||||
if volume['status'] != "available":
|
|
||||||
msg = _("status must be available")
|
|
||||||
raise exception.InvalidVolume(reason=msg)
|
|
||||||
if volume['attach_status'] == "attached":
|
|
||||||
msg = _("already attached")
|
|
||||||
raise exception.InvalidVolume(reason=msg)
|
|
||||||
|
|
||||||
@wrap_check_policy
|
|
||||||
def check_detach(self, volume):
|
|
||||||
# TODO(vish): abstract status checking?
|
|
||||||
if volume['status'] != "in-use":
|
|
||||||
msg = _("status must be in-use to detach")
|
|
||||||
raise exception.InvalidVolume(reason=msg)
|
|
||||||
|
|
||||||
@wrap_check_policy
|
@wrap_check_policy
|
||||||
def reserve_volume(self, context, volume):
|
def reserve_volume(self, context, volume):
|
||||||
#NOTE(jdg): check for Race condition bug 1096983
|
#NOTE(jdg): check for Race condition bug 1096983
|
||||||
|
Loading…
Reference in New Issue
Block a user