コード例 #1
0
    def delete(self, request):
        """Delete one or more Containers by id.

        Returns HTTP 204 (no content) on successful deletion.
        """
        for id in request.DATA:
            client.container_delete(request, id)
コード例 #2
0
ファイル: rest_api.py プロジェクト: shu-mutou/zun-ui
    def delete(self, request):
        """Delete one or more Containers by id.

        Returns HTTP 204 (no content) on successful deletion.
        """
        for id in request.DATA:
            client.container_delete(request, id)
コード例 #3
0
    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)
コード例 #4
0
    def delete(self, request, id):
        """Delete single Container forcely by id.

        Returns HTTP 204 (no content) on successful deletion.
        """
        return client.container_delete(request, id, force=True)