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

Add service capability #2809

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Conversation

feliperuhland
Copy link
Contributor

ContainerSpec

Docker Engine v1.41 added CapAdd and CapDrop as part of the
ContainerSpec, and docker-py should do the same.

GET /services now returns CapAdd and CapDrop as part of the ContainerSpec.
GET /services/{id} now returns CapAdd and CapDrop as part of the ContainerSpec.
POST /services/create now accepts CapAdd and CapDrop as part of the ContainerSpec.
POST /services/{id}/update now accepts CapAdd and CapDrop as part of the ContainerSpec.
GET /tasks now returns CapAdd and CapDrop as part of the ContainerSpec.
GET /tasks/{id} now returns CapAdd and CapDrop as part of the ContainerSpec.

I added capabilities on docstrings, service.create init method and
create tests for that.

That change was mention in issue #2802.

The Makefile and `docker/constants.py` were with old versions, so I
updated them to the current one

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
ContainerSpec

Docker Engine v1.41 added `CapAdd` and `CapDrop` as part of the
ContainerSpec, and `docker-py` should do the same.

```
GET /services now returns CapAdd and CapDrop as part of the ContainerSpec.
GET /services/{id} now returns CapAdd and CapDrop as part of the ContainerSpec.
POST /services/create now accepts CapAdd and CapDrop as part of the ContainerSpec.
POST /services/{id}/update now accepts CapAdd and CapDrop as part of the ContainerSpec.
GET /tasks now returns CapAdd and CapDrop as part of the ContainerSpec.
GET /tasks/{id} now returns CapAdd and CapDrop as part of the ContainerSpec.
```

I added capabilities on docstrings, `service.create` init method and
create tests for that.

That change was mention in issue docker#2802.

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
@matusnovak
Copy link

Is there any update on this? It would be really nice to have this merged.

@fopina
Copy link

fopina commented Aug 2, 2021

As PRs are not quickly merged into this project, if anyone else wants to use this without using a complete fork of docker-py (as it could miss update/fixes in main package), I'm currently using the contents of this PR with monkey patching

Thanks @feliperuhland 🎊 the changes work pretty well!

Copy link
Collaborator

@aiordache aiordache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@aiordache aiordache merged commit 7779b84 into docker:master Oct 7, 2021
@aiordache aiordache added this to the 5.0.3 milestone Oct 7, 2021
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.

None yet

4 participants