Commit Graph

20 Commits

Author SHA1 Message Date
ercildoune 26753c81de
api: add rollback_config to service create (#2917)
`rollback_config` was not in the list of `CREATE_SERVICE_KWARGS`
which prevented it from being an argument when creating services.
It has now been added and the problem fixed, allowing services to
have a rollback_config during creation and updating.

Fixes #2832.

Signed-off-by: Fraser Patten <pattenf00@gmail.com>
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Co-authored-by: Milas Bowman <milas.bowman@docker.com>
2022-07-29 14:54:55 -04:00
Felipe Ruhland 7ac8b56730 Add `CapabilityAdd` and `CapabilityDrop` to
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.

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2021-04-07 22:11:52 +02:00
Viktor Adam e54e8f4199 Shorthand method for service.force_update()
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2018-02-21 19:55:17 +00:00
Joffrey F 17aa31456d Properly support pulling all tags in DockerClient.images.pull
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 16:47:04 -08:00
Joffrey F 3422211309 Use pytest asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-30 14:26:24 -08:00
Joffrey F abd60aedc7 Bump default API version to 1.35
Add ContainerSpec.isolation support
Add until support in logs
Add condition support in wait
Add workdir support in exec_create

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-26 13:56:01 -08:00
Joffrey F 4590e2a816
Merge pull request #1846 from feliperuhland/issue-1734-scale-method
Added scale method to the Service model.
2018-01-24 18:08:35 -08:00
Viktor Adam e75a03fd6d Fix regression on API < 1.25
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2018-01-12 22:18:53 +00:00
Felipe Ruhland 663c6089e9 Fix test to make sure the initial mode is replicated
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2018-01-03 00:21:56 -02:00
Felipe Ruhland 0e0a852680 Ensure that global containers are not scaled
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2017-12-26 18:30:28 -02:00
Felipe Ruhland edb9e3c2ae Added scale method to the Service model.
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
2017-12-21 23:13:18 -02:00
Viktor Adam 828b865bd7 Fix resetting ContainerSpec properties to None
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-15 18:30:05 +00:00
Viktor Adam c78e73bf7a Attempting to make service update tests less flaky
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-15 08:17:16 +00:00
Viktor Adam b2d08e64bc Service model update changes
Signed-off-by: Viktor Adam <rycus86@gmail.com>
2017-11-14 23:32:19 +00:00
Joffrey F 303b303855 Use unambiguous advertise-addr when initializing a swarm
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F a1d550a14c Allow configuring API version for integration test with env var
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-25 16:52:26 -08:00
Joffrey F 3e5bb7b0e6 Fix Swarm model init to correctly pass arguments through to init_swarm
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-25 15:28:43 -08:00
Joffrey F 48c5cd82fc Prevent Swarm address conflicts
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-08 14:50:05 -08:00
Joffrey F 738cfdcdf9 Update code and tests for Engine 1.13 compatibility
Makefile now runs tests against Docker 1.13 RC

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-07 14:51:14 -08:00
Ben Firshman 1984f68730
Add new user-focused API
See #1086

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:05:43 +00:00