Merge "Hide the Button of delete aggregate if a host in the aggregate"
This commit is contained in:
commit
3f71f171e0
|
@ -37,6 +37,11 @@ class DeleteAggregateAction(tables.DeleteAction):
|
|||
count
|
||||
)
|
||||
|
||||
def allowed(self, request, aggregate):
|
||||
if aggregate and aggregate.hosts:
|
||||
return False
|
||||
return True
|
||||
|
||||
def delete(self, request, obj_id):
|
||||
api.nova.aggregate_delete(request, obj_id)
|
||||
|
||||
|
|
Loading…
Reference in New Issue