Fix the error on 'stop and delete container'
Change-Id: I0bb027d175c752a9a0980f4cbf2ebd688e7e2977 Closes-Bug: #1762068
This commit is contained in:
@@ -91,6 +91,19 @@ class ContainerActions(generic.View):
|
||||
elif action == 'network_detach':
|
||||
return client.container_network_detach(request, id)
|
||||
|
||||
@rest_utils.ajax(data_required=True)
|
||||
def delete(self, request, id, action):
|
||||
"""Delete specified Container with option.
|
||||
|
||||
Returns HTTP 204 (no content) on successful deletion.
|
||||
"""
|
||||
opts = {'id': id}
|
||||
if action == 'force':
|
||||
opts['force'] = True
|
||||
elif action == 'stop':
|
||||
opts['stop'] = True
|
||||
return client.container_delete(request, **opts)
|
||||
|
||||
|
||||
@urls.register
|
||||
class Containers(generic.View):
|
||||
|
||||
Reference in New Issue
Block a user