-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for docker.types.Placement.MaxReplicas #2741
Conversation
…ocker Swarm Service Signed-off-by: WojciechowskiPiotr <[email protected]>
docker/types/services.py
Outdated
platforms (:py:class:`list` of tuple): A list of platforms | ||
expressed as ``(arch, os)`` tuples | ||
""" | ||
def __init__(self, constraints=None, preferences=None, platforms=None): | ||
def __init__(self, constraints=None, preferences=None, maxreplicas=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the new argument at the end please? This avoids breaking calls with positional args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed as per your request, not sure why one of the tests failed this time
…ocker Swarm Service Signed-off-by: WojciechowskiPiotr <[email protected]>
Hello @WojciechowskiPiotr . Thank you for the contribution! Could you please add tests to your PR? |
Signed-off-by: WojciechowskiPiotr <[email protected]>
Hi @ulyssessouza, I've added integration and unit tests as per your request |
Hi,
Small PR adding support for Placement.MaxReplicas (new in API 1.40) in Docker Swarm Services. This was mentioned in #2528. There is also a feature request in ansible.docker community to support this feature (ansible-collections/community.docker#7).
Signed-off-by: WojciechowskiPiotr [email protected]