diff options
author | Nikolay Murga <work@murga.kiev.ua> | 2018-07-20 12:53:44 +0300 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2018-08-09 17:11:47 -0700 |
commit | 185f72723ab8bac589e73e58be64f1665472762e (patch) | |
tree | d721a6a7068fabcf0f28a562bac80f4555115055 | |
parent | d4345b5824a23d088bf9c44d9fb87382f159a43a (diff) | |
download | docker-py-185f72723ab8bac589e73e58be64f1665472762e.tar.gz |
Add 'rollback' command as allowed for failure_action
Signed-off-by: Nikolay Murga <work@murga.kiev.ua>
-rw-r--r-- | docker/types/services.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/types/services.py b/docker/types/services.py index 31f4750..a914cef 100644 --- a/docker/types/services.py +++ b/docker/types/services.py @@ -371,7 +371,7 @@ class UpdateConfig(dict): delay (int): Amount of time between updates. failure_action (string): Action to take if an updated task fails to run, or stops running during the update. Acceptable values are - ``continue`` and ``pause``. Default: ``continue`` + ``continue``, ``rollback`` and ``pause``. Default: ``continue`` monitor (int): Amount of time to monitor each updated task for failures, in nanoseconds. max_failure_ratio (float): The fraction of tasks that may fail during @@ -385,7 +385,7 @@ class UpdateConfig(dict): self['Parallelism'] = parallelism if delay is not None: self['Delay'] = delay - if failure_action not in ('pause', 'continue'): + if failure_action not in ('pause', 'continue', 'rollback'): raise errors.InvalidArgument( 'failure_action must be either `pause` or `continue`.' ) |