dockercloud
This commit is contained in:
parent
86f4a232ff
commit
2d9586a8a1
41 changed files with 2701 additions and 2 deletions
23
dockercloud/api/action.py
Normal file
23
dockercloud/api/action.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
from .base import Immutable, StreamingLog
|
||||
|
||||
|
||||
class Action(Immutable):
|
||||
subsystem = 'audit'
|
||||
endpoint = "/action"
|
||||
|
||||
@classmethod
|
||||
def _pk_key(cls):
|
||||
return 'uuid'
|
||||
|
||||
def logs(self, tail, follow, log_handler=StreamingLog.default_log_handler):
|
||||
logs = StreamingLog(self.subsystem, self.endpoint, self.pk, tail, follow)
|
||||
logs.on_message(log_handler)
|
||||
logs.run_forever()
|
||||
|
||||
def cancel(self):
|
||||
return self._perform_action("cancel")
|
||||
|
||||
def retry(self):
|
||||
return self._perform_action("retry")
|
||||
Loading…
Add table
Add a link
Reference in a new issue