Skip to content

Commit

Permalink
Disallow Resize Volume If Status Is Shutdown
Browse files Browse the repository at this point in the history
if the status of a database instance is 'shutdown', a resize-volume
operation should not be allowed.

Change-Id: I3eda2915a0167b35a19831b96d9cbcfe8075bdf7
Closes-Bug: #1382914
  • Loading branch information
amcrn committed Oct 21, 2014
1 parent d57bea4 commit 055a87d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions openstack_dashboard/dashboards/project/databases/tables.py
Expand Up @@ -166,8 +166,7 @@ class ResizeVolume(tables.LinkAction):
classes = ("ajax-modal", "btn-resize")

def allowed(self, request, instance=None):
return ((instance.status in ACTIVE_STATES
or instance.status == 'SHUTDOWN'))
return instance.status in ACTIVE_STATES

def get_link_url(self, datum):
instance_id = self.table.get_object_id(datum)
Expand Down

0 comments on commit 055a87d

Please sign in to comment.