Skip to content
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

Merged
merged 3 commits into from
Feb 10, 2021
Merged

Support for docker.types.Placement.MaxReplicas #2741

merged 3 commits into from
Feb 10, 2021

Conversation

WojciechowskiPiotr
Copy link
Contributor

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]

…ocker Swarm Service

Signed-off-by: WojciechowskiPiotr <[email protected]>
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,
Copy link
Contributor

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.

Copy link
Contributor Author

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]>
@ulyssessouza
Copy link
Contributor

Hello @WojciechowskiPiotr .

Thank you for the contribution! Could you please add tests to your PR?

Signed-off-by: WojciechowskiPiotr <[email protected]>
@WojciechowskiPiotr
Copy link
Contributor Author

Hello @WojciechowskiPiotr .

Thank you for the contribution! Could you please add tests to your PR?

Hi @ulyssessouza,

I've added integration and unit tests as per your request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants