summaryrefslogtreecommitdiff
path: root/docker/api/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/api/service.py')
-rw-r--r--docker/api/service.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/docker/api/service.py b/docker/api/service.py
index 08e2591..372dd10 100644
--- a/docker/api/service.py
+++ b/docker/api/service.py
@@ -88,6 +88,10 @@ def _check_api_features(version, task_template, update_config, endpoint_spec,
if container_spec.get('Isolation') is not None:
raise_version_error('ContainerSpec.isolation', '1.35')
+ if utils.version_lt(version, '1.38'):
+ if container_spec.get('Init') is not None:
+ raise_version_error('ContainerSpec.init', '1.38')
+
if task_template.get('Resources'):
if utils.version_lt(version, '1.32'):
if task_template['Resources'].get('GenericResources'):
@@ -387,7 +391,7 @@ class ServiceApiMixin(object):
current specification of the service. Default: ``False``
Returns:
- ``True`` if successful.
+ A dictionary containing a ``Warnings`` key.
Raises:
:py:class:`docker.errors.APIError`
@@ -471,5 +475,4 @@ class ServiceApiMixin(object):
resp = self._post_json(
url, data=data, params={'version': version}, headers=headers
)
- self._raise_for_status(resp)
- return True
+ return self._result(resp, json=True)