mirror of https://github.com/docker/docker-py.git
Revert "Support for docker.types.Placement.MaxReplicas (new in API 1.40) in Docker Swarm Service"
This reverts commit b701d5c999
.
This commit is contained in:
parent
aa2ea7f7d5
commit
93e02ab207
|
@ -157,8 +157,6 @@ class ServiceCollection(Collection):
|
|||
constraints.
|
||||
preferences (list of tuple): :py:class:`~docker.types.Placement`
|
||||
preferences.
|
||||
maxreplicas (int): :py:class:`~docker.types.Placement` maxreplicas
|
||||
or (int) representing maximum number of replicas per node.
|
||||
platforms (list of tuple): A list of platform constraints
|
||||
expressed as ``(arch, os)`` tuples.
|
||||
container_labels (dict): Labels to apply to the container.
|
||||
|
@ -321,7 +319,6 @@ PLACEMENT_KWARGS = [
|
|||
'constraints',
|
||||
'preferences',
|
||||
'platforms',
|
||||
'maxreplicas',
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -659,12 +659,10 @@ class Placement(dict):
|
|||
are provided in order from highest to lowest precedence and
|
||||
are expressed as ``(strategy, descriptor)`` tuples. See
|
||||
:py:class:`PlacementPreference` for details.
|
||||
maxreplicas (int): Maximum number of replicas per node
|
||||
platforms (:py:class:`list` of tuple): A list of platforms
|
||||
expressed as ``(arch, os)`` tuples
|
||||
"""
|
||||
def __init__(self, constraints=None, preferences=None, maxreplicas=None,
|
||||
platforms=None):
|
||||
def __init__(self, constraints=None, preferences=None, platforms=None):
|
||||
if constraints is not None:
|
||||
self['Constraints'] = constraints
|
||||
if preferences is not None:
|
||||
|
@ -673,8 +671,6 @@ class Placement(dict):
|
|||
if isinstance(pref, tuple):
|
||||
pref = PlacementPreference(*pref)
|
||||
self['Preferences'].append(pref)
|
||||
if maxreplicas is not None:
|
||||
self['MaxReplicas'] = maxreplicas
|
||||
if platforms:
|
||||
self['Platforms'] = []
|
||||
for plat in platforms:
|
||||
|
|
Loading…
Reference in New Issue