Joffrey F
fa52824363
Merge pull request #1481 from shin-/system_df
...
Add df method
2017-03-06 11:08:41 -08:00
Joffrey F
11873993eb
Merge pull request #1480 from shin-/bump-default-api-version
...
Bump default API version to 1.26
2017-03-06 11:08:16 -08:00
Tomasz Madycki
8c6534d7be
Add init_path parameter to container HostConfig
...
Signed-off-by: Tomasz Madycki <tomasz.madycki@gmail.com>
2017-03-01 14:02:35 -08:00
Tomasz Madycki
13b5f785a7
Add init parameter to container HostConfig
...
Signed-off-by: Tomasz Madycki <tomasz.madycki@gmail.com>
2017-03-01 14:02:35 -08:00
Joffrey F
d59b6b99cc
Merge pull request #1479 from shin-/plugin-upgrade
...
Add upgrade_plugin method
2017-03-01 13:52:46 -08:00
Joffrey F
4273d3f63d
Bump default API version to 1.26
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-01 13:52:07 -08:00
Joffrey F
cfb14fa78f
Add df method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-01 13:51:39 -08:00
Boaz Shuster
5dced6579a
Update assert in test_create_with_restart_policy
...
In https://github.com/docker/docker/pull/30870 a new
error message is displayed if the container is restarting.
To make "test_create_with_restart_policy" pass against the
above change, the test checks that the error message contains
"You cannot remove " instead of
"You cannot remove a running container"
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-03-01 15:36:32 +02:00
Joffrey F
48ac772994
Add upgrade_plugin method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-23 17:27:04 -08:00
Joffrey F
f387ae46d7
Merge pull request #1467 from crierr/master
...
Allow port range like 8000-8010:80
2017-02-22 15:27:42 -08:00
Joffrey F
f9f77c4c2f
Merge pull request #1473 from Anvil/event-http-headers
...
Allow events daemon command to read config.json
2017-02-21 12:11:58 -08:00
Damien Nadé
f36ef399ad
Fixed events command related unit tests by passing a timeout value
...
Signed-off-by: Damien Nadé <github@livna.org>
2017-02-21 18:21:10 +01:00
crierr
cfc11515bc
Allow port range like 8000-8010:80
...
Signed-off-by: SeungJin Oh <crierr@naver.com>
2017-02-20 02:09:33 +09:00
Nils Krabshuis
44c31e47e0
Add ability to set 'Hostname' on a Service.
...
Signed-off-by: Nils Krabshuis <nils.krabshuis@redwood.com>
2017-02-19 06:18:26 +01:00
Joffrey F
e0b6cdfcf6
Merge pull request #1460 from shin-/fix-cache-from
...
Rename cachefrom -> cache_from
2017-02-16 13:35:58 -08:00
Joffrey F
0a97df1abc
Rename cachefrom -> cache_from
...
Fix cache_from integration test
Fix image ID detection in ImageCollection.build
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-15 19:13:24 -08:00
Joffrey F
3a9c83509c
Add xfail mark to storageopt test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-15 19:02:31 -08:00
Joffrey F
4a50784ad4
Merge pull request #1459 from shin-/1300-storageopts
...
Add support for storage_opt in host_config
2017-02-15 18:12:31 -08:00
Joffrey F
afcbeb5e4f
Merge pull request #1449 from shin-/secrets-api
...
Implement secrets API
2017-02-15 18:08:25 -08:00
Joffrey F
ece3b19782
Add support for storage_opt in host_config
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-15 17:43:24 -08:00
Joffrey F
20c6fe31e0
Add support for recursive wildcard pattern in .dockerignore
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-14 18:29:37 -08:00
Joffrey F
e8a86e40cc
Add tests for secret API implementation
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-13 17:06:25 -08:00
Joffrey F
35f37a0936
Merge pull request #1432 from shin-/plugins
...
Plugins API
2017-02-13 13:20:53 -08:00
Joffrey F
e1ad3186ef
Add create_plugin implementation
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-09 17:58:05 -08:00
Ben Firshman
f83993de0a
Fix passing volumes to run with no host path
...
Technically we shouldn't be passing them as binds, but the daemon
doesn't seem to mind.
Fixes #1380
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2017-02-07 19:22:36 +01:00
Ben Firshman
956fe1cac1
Fix volume path passed by run to create_container
...
Seems like this is pretty much ignored by Docker, so it wasn't
causing any visible issues, except when a volume name was used
instead of a path.
Also, added integration tests.
Ref #1380
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2017-02-07 19:22:35 +01:00
Joffrey F
42b9358458
Merge pull request #1425 from shin-/prunes
...
Prunes
2017-02-03 19:49:54 -08:00
Joffrey F
9296971e4c
APIClient implementation of plugin methods
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-03 19:45:59 -08:00
Joffrey F
b3ea1fb942
Merge pull request #1429 from shin-/fix_remove_network_test
...
Improve robustness of remove_network integration test
2017-01-30 19:13:22 -08:00
Joffrey F
83b45b7d54
Add prune_networks method
...
Ensure all integration tests use the same version of the busybox image
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-30 18:54:18 -08:00
Joffrey F
89d3803344
Add prune_volumes method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-30 18:53:46 -08:00
Joffrey F
7f0c2e7531
Add prune_images method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-30 18:53:46 -08:00
Joffrey F
f2a867f04b
Add prune_containers method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-30 18:53:46 -08:00
Joffrey F
bf41c7fa67
Improve robustness of remove_network integration test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-30 18:52:11 -08:00
Joffrey F
08aac9d571
Merge pull request #1341 from pacoxu/patch-1
...
Scope is added in volume after docker 1.12
2017-01-30 11:59:00 -08:00
Joffrey F
d22e2fec6f
Add support for force_update in TaskTemplate
...
Add min version checks in create_service and update_service
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-27 17:19:18 -08:00
Joffrey F
fc5cd1a914
Add support for max_failure_ratio and monitor in UpdateConfig
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-27 16:40:05 -08:00
Joffrey F
847f209865
Add stop_timeout to create_container
...
Fix requires_api_version test decorator
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-27 16:00:18 -08:00
Joffrey F
0186456f3c
Merge pull request #1413 from docker/force_remove_volume
...
Add 'force' parameter in remove_volume
2017-01-26 14:40:00 -08:00
Joffrey F
2d93674903
Merge pull request #1419 from docker/remove_obsolete_search_test
...
Remove integration test for APIClient.search method
2017-01-26 14:34:10 -08:00
Joffrey F
a24b114af3
Add 'force' parameter in remove_volume
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-26 14:24:52 -08:00
Joffrey F
64519a2b20
Merge pull request #1415 from docker/autoremove_support
...
Add support for auto_remove in HostConfig
2017-01-26 14:24:23 -08:00
Joffrey F
62c94f9634
Remove integration test for APIClient.search method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-26 14:07:41 -08:00
Thomas Schaaf
686d8e9536
Implement cachefrom
...
Signed-off-by: Thomas Schaaf <schaaf@komola.de>
2017-01-26 11:20:01 +00: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
848b7aa6a4
Add support for auto_remove in HostConfig
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-25 16:45:59 -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
e87ed38f69
Ignore socket files in utils.tar
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-24 18:00:42 -08:00
Joffrey F
06e8081799
Convert mode argument to valid structure in create_service
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 16:23:32 -08:00
Joffrey F
bb665257ed
Merge pull request #1393 from aebm/master
...
Fix #1351
2017-01-19 11:55:14 -08:00
Ben Firshman
468bb1c545
Merge pull request #1347 from fcurella/hash
...
Make resources hashable, so that they can be added to `set`s
2017-01-18 16:49:35 +01:00
Alejandro E. Brito Monedero
95b6fddd14
Fix #1351
...
* Fix TypeError when getting the tags property from an image that has
no tags. Ex: An image pulled by cryptohash. It is handled like when
the image doesn't have defined the RepoTags member.
Signed-off-by: Alejandro E. Brito Monedero <alejandro.monedero@gmail.com>
2017-01-16 08:48:41 +01:00
Joffrey F
40089a781c
Detect mount type in parse_mount_string
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-09 15:13:09 -08:00
Joffrey F
a960731999
Additional parse_mount_string tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-09 14:33:58 -08:00
Joffrey F
155b95d143
Merge branch 'dz-fix-mount_options' of https://github.com/dzimine/docker-py into dzimine-dz-fix-mount_options
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-09 14:19:25 -08:00
Joffrey F
9450442c8c
Accept / as a path separator in dockerignore patterns on all platforms
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-06 16:37:15 -08:00
Dmitri
59ccd8a782
Fix readonly in mounts.
...
Signed-off-by: Dmitri Zimine dz@stackstorm.com
2016-12-28 23:43:15 -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
Flavio Curella
6f239fbf29
Make resources hashable, so that they can be added to `set`s
...
Signed-off-by: Flavio Curella <flavio.curella@gmail.com>
2016-12-08 12:19:30 -06:00
徐俊杰
b9c48dca2c
Scope is added in volume after docker 1.12
...
Signed-off-by: pacoxu <paco.xu@daocloud.io>
add ut test for volume scope and no specified name create
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
try to fix ut failure of volume creation
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
try to fix ut failure of volume creation
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
Scope is added in volume after docker 1.12
Signed-off-by: pacoxu <paco.xu@daocloud.io>
Scope is added in volume after docker 1.12
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2016-12-08 10:31:44 +08:00
Joffrey F
d024b1bd78
Merge pull request #1338 from docker/remove_node
...
Implement swarm node removal
2016-12-07 15:37:17 -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
Joffrey F
c239e40504
Implement swarm node removal
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-07 12:24:18 -08:00
Joffrey F
b71f34e948
Fix typo in create_network
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-06 11:26:53 -08:00
Daniel Nephin
2b85fbf120
Add attachable.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-12-05 17:54:18 -05:00
Ben Firshman
dd8ad21c88
Merge pull request #1272 from TomasTomecek/1271-fix-detach-in-exec-start
...
exec: fix running with detach=True
2016-12-05 11:00:10 +00:00
Joffrey F
c02493cf18
Merge pull request #1331 from aanand/fix-auth-config-path-windows
...
Fix auth config path on Windows
2016-12-02 18:07:08 -08:00
Joffrey F
d56b2d3dc8
Merge pull request #1315 from bfirsh/rename-docker-py-to-docker-sdk-python
...
Start to rename docker-py to docker-sdk-python
2016-12-02 15:20:34 -08:00
Joffrey F
32cd0161b6
Merge pull request #1330 from docker/walkerlee-master
...
Add options to IPAMConfig
2016-12-02 15:18:41 -08:00
Joffrey F
fd4c01aa99
Merge branch 'master' of https://github.com/walkerlee/docker-py into walkerlee-master
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-02 14:57:57 -08:00
Joffrey F
88b733b0f4
Merge branch 'patch-1' of https://github.com/manics/docker-py into manics-patch-1
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-02 14:50:40 -08:00
Aanand Prasad
fb4969f744
Fix auth config path on Windows
...
The Engine client looks *only* at the USERPROFILE environment variable
on Windows, so we should do that too.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-12-02 18:02:09 +00:00
Ben Firshman
dfa4b76989
Merge pull request #1328 from docker/ssladapter_transport_module
...
Move ssladapter to transport module
2016-12-02 14:44:03 +00:00
Joffrey F
4539644667
Move ssladapter to transport module
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-01 18:04:40 -08:00
Joffrey F
01c33c0f68
Client -> DockerClient
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-01 18:02:16 -08:00
Joffrey F
993f298e85
Move config type creation from docker.utils functions to classes in
...
docker.types
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-01 16:06:41 -08:00
Ben Firshman
e7d78d10f6
Merge pull request #1303 from aanand/helpful-containers-warning
...
Show a helpful warning when people try to call `client.containers()`
2016-12-01 11:11:46 +00:00
Joffrey F
239673a51c
Merge pull request #1308 from docker/docker_client
...
Rename Client -> DockerClient
2016-11-30 15:30:40 -08:00
Tomas Tomecek
515db1f6fd
exec: fix running with detach=True
...
Fixes #1271
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-11-29 16:04:52 +01:00
Ben Firshman
6a16edee3e
Merge pull request #1277 from bodnarbm/do-not-traverse-ignored-directories-with-no-potential-exceptions
...
Do not traverse excluded directories that are not prefixes of dockerignore exceptions.
2016-11-29 10:09:43 +00:00
Joffrey F
f5ac10c469
Rename Client -> DockerClient
...
Replace references to old Client with APIClient
Moved contents of services.md to appropriate locations
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-28 15:28:04 -08:00
Joffrey F
9643253c50
Merge pull request #1297 from docker/stepanstipl-allow_custom_pid_mode
...
Allow custom pid mode
2016-11-28 14:00:07 -08:00
Joffrey F
75e9d357f7
Merge pull request #1309 from bfirsh/remove-maintainer-from-dockerfiles
...
Remove MAINTAINER from Dockerfiles
2016-11-28 13:14:40 -08:00
Joffrey F
4e08a5cb9e
Merge pull request #1317 from bfirsh/fix-environment-variable-file-with-new-lines
...
Fix parsing for an environment file with newlines
2016-11-28 12:06:38 -08:00
Joffrey F
44e57fb95d
Re-enable pid_mode checks for API < 1.24
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-28 12:01:25 -08:00
Aanand Prasad
8c27dd5233
Show a helpful warning when people try to call `client.containers()`
...
People upgrading to docker-py 2.0 without being aware of the new client
API will likely try to call the old `containers()` method. This adds a
helpful warning telling them to use APIClient to get the old API.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-28 19:43:49 +00:00
Stepan Stipl
7ef48c3769
Allow custom PID mode for the container
...
Docker added support for sharing PID namespaces with other containers
since version 1.12 (see https://github.com/docker/docker/pull/22481 ).
Signed-off-by: Stepan Stipl <stepan@stipl.net>
2016-11-28 11:42:00 -08:00
Jon Cotton
4a7c772daf
Fix parsing for an environment file with newlines
...
Fixes the new, purposely broken test added in the previous commit.
Signed-off-by: Jon Cotton <jc@finaltransfer.net>
2016-11-28 19:41:13 +00:00
Joffrey F
5eacb986d7
Remove support for host_config in Client.start
...
Any additional arguments passed to start will raise a
DeprecatedMethod (DockerException) exception.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-28 18:34:09 +00:00
Ben Firshman
94083f25ac
Start to rename docker-py to docker-sdk-python
...
Pretty much everything except renaming the GitHub repo and
documentation, which is not actually done yet. Nearer the release
we can do a search/replace for all that stuff.
Ref #1310
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-28 16:45:59 +00:00
Brandon Bodnar
9fc8b3a730
Add unit tests for should_check_directory.
...
Signed-off-by: Brandon Bodnar <bodnarbm@gmail.com>
2016-11-26 21:36:54 -05:00
Ben Firshman
b4c02393b2
Remove MAINTAINER from Dockerfiles
...
It was deprecated in https://github.com/docker/docker/pull/25466
(Sorry @shin- ;)
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-24 13:32:20 +00:00
Ben Firshman
b5f7d380d0
Add helpful error for APIClient methods on Client
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:05:43 +00: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
Ben Firshman
d98a879016
Add random_name test helper
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman
6334312e47
Split out base integration test for APIClient
...
So the cleanup stuff can be reused for model tests.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman
39900c558c
Move APIClient tests into single file
...
For some reason this was spread across two files.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman
e055a1c813
Rename DockerClientTest to BaseAPIClientTest
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:04 +00:00
Ben Firshman
9daa320454
Rename Client to APIClient
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
c7903f084e
Remove AutoVersionClient
...
Just do Client(version='auto').
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
d5bc7dc99a
Drop support for Python 2.6
...
Because it's ancient. If you're still using it, you can use an old
version of docker-py.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
19eefcf705
Make docker.ssladaptor a single file
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Ben Firshman
2c9d1110f0
Make docker.auth a single file
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00
Joffrey F
f12b618ee9
Merge pull request #1236 from docker/host_config_isolation
...
Add support for isolation param in host config
2016-11-17 17:42:57 -08:00
Aanand Prasad
e4b6d0dca6
Convert dicts to Healthcheck objects, string commands to CMD-SHELL lists
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-16 16:04:17 +00:00
Aanand Prasad
6bb7844ab3
Rework healthcheck integration test
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-16 16:04:17 +00:00
Jamie Greeff
b4f2b5fa70
Add support for passing healthcheck to create_container
...
Signed-off-by: Jamie Greeff <jamie@greeff.me>
2016-11-16 16:04:17 +00:00
Joffrey F
f262dd6da9
Merge pull request #1281 from TomasTomecek/1265-ssl-test-no-sslX-support-in-openssl
...
ssl,test: OpenSSL may not support ssl2
2016-11-14 12:02:55 -08:00
Aanand Prasad
c66c2d6fa5
Fix linting error
...
This seems to have been ignored by older versions of flake8, and fixed
in version 3.1.0 or 3.1.1.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-14 18:20:13 +00:00
Tomas Tomecek
9a485b30ee
ssl,test: OpenSSL may not support ssl2
...
Fixes #1265
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-11-14 09:05:26 +01:00
Simon Li
cb967ef682
Add test for creating service with env
...
Signed-off-by: Simon Li <orpheus+devel@gmail.com>
2016-11-11 16:29:43 +00:00
Ryan Belgrave
98e2e1fcd6
Add labels and shmsize arguments to the image build
...
Signed-off-by: Ryan Belgrave <Ryan.Belgrave@target.com>
2016-11-08 09:45:32 -06:00
Ben Firshman
3c7c231983
Fix broken unit test
...
Introduced by https://github.com/docker/docker-py/pull/1230
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-07 12:20:20 -08:00
Joffrey F
f745c8e7c5
Merge pull request #1230 from LabattFoodService/updateNode
...
enable setting of node labels #1225
2016-11-07 10:47:55 -08:00
Joffrey F
be2ae8df36
WIP
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-04 15:10:12 -07:00
Alessandro Boch
54586053b1
Changes for service tests to pass in docker master
...
- update config structure has new members
- service name update is no longer supported
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-01 16:56:37 -07:00
Walker Lee
a3981f891d
Add docker network IPAM options parameter
...
Signed-off-by: Walker Lee <walkerlee.tw@gmail.com>
2016-10-27 00:17:05 +08:00
Joffrey F
9b35c74f0e
Fix dockerignore exclusion logic on Windows
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-14 16:02:28 -07:00
Joffrey F
cec3fe7c31
Update tests to avoid failures on Windows platforms
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-14 16:02:28 -07:00
Joffrey F
14634fb50a
Merge pull request #1256 from docker/format_env_unicode_bug
...
Do not break when calling format_environment with unicode values
2016-10-13 12:39:47 -07:00
Joffrey F
059f61bf5a
Do not break when calling format_environment with unicode values
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-12 17:52:43 -07:00
Joffrey F
05f1060824
Remove trailing slashes in result of utils.parse_host
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-12 16:06:43 -07:00
Ben Firshman
69e992ec48
Move requires_api_version to helpers
...
Because it's a helper, not a base thing. In preparation for
moving/deleting the unit test base classes.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-10-03 11:58:08 +01:00
Ben Firshman
7339d77043
Move BaseTestCase to BaseIntegrationTest
...
Because two things called `BaseTestCase` is quite confusing.
I haven't bothered refactoring the other `BaseTestCase` because
that disappears anyway when we drop Python 2.6 support.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-10-03 11:58:08 +01:00
Joffrey F
49997d040b
Add support for isolation param in host config
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-29 16:34:36 -07:00
Joffrey F
2b34e0b8e4
Merge pull request #1224 from mferon/addRestartPolicyUpdateSupport
...
Add support for restart policy update
2016-09-29 14:53:53 -07:00
Alessandro Boch
a864059b83
Adjust test_create_network_with_ipam_config
...
- to account for API change: IPAM class will now
also include a Data class, besides Config.
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-09-29 09:49:58 -07:00
Maxime Feron
a665c8c443
Add support for restart policy update
...
Signed-off-by: Maxime Feron <maxime.feron@corp.ovh.com>
2016-09-28 10:21:59 +02:00
Nathan Shirlberg
6ef14932d0
enable setting of node labels #1225
...
Added update_node function to enable setting labels on nodes. This
exposes the Update a Node function from the Docker API and should
enable promoting/demoting manager nodes inside a swarm.
Signed-off-by: Nathan Shirlberg <nshirlberg@labattfood.com>
2016-09-27 11:26:26 -05:00
Joffrey F
1e939be5fb
Merge pull request #1210 from docker/identity-token-support
...
Add support for identity tokens in config file
2016-09-16 11:47:48 -07:00
Joffrey F
d731a4315c
Add support for identity tokens in config file.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:28:09 -07:00
Joffrey F
9141e9496d
Merge pull request #1215 from bfirsh/autopep8
...
Fix a few pep8 issues
2016-09-14 14:08:13 -07:00
Joffrey F
89afee94fd
Merge pull request #1213 from bfirsh/parse-json-errors
...
Parse JSON API errors
2016-09-14 11:09:55 -07:00
Ben Firshman
6220636536
Fix a few pep8 issues
...
autopep8 --in-place --recursive --experimental -aaa --ignore E309 .
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-14 16:54:54 +01:00
Ben Firshman
ca51ad29a5
Ignore not in swarm error when force leaving
...
Real errors were getting swallowed in these tests, producing
other confusing cascading errors. This makes it much easier to
make sure a node is not in a Swarm, while also handling other
errors correctly.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-14 16:00:03 +01:00
Ben Firshman
dcd01f0f48
Parse JSON API errors
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-14 14:54:40 +01:00
Ben Firshman
0cdf737625
Fix unit test which doesn't do anything
...
It also overrode the fake API inspect endpoint with a broken
response.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-07 11:40:19 +02:00
Joffrey F
75497e0752
Add test for import_image with changes param
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-06 15:38:44 -07:00
Ben Firshman
3769c089e8
Fix licenses
...
* Complete main LICENSE
* Remove unnecessary licenses from individual files
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-09-05 17:48:09 +02:00
Joffrey F
6552076856
Add support for force disconnect
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-31 18:44:36 -07:00
Joffrey F
a665dfb375
Add support for labels and enable_ipv6 in create_network
...
Tests + docs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-31 18:26:16 -07:00
Joffrey F
24bfb99e05
Merge pull request #1167 from docker/1075-from-env-version
...
Support version parameter in `Client.from_env`
2016-08-25 14:59:46 -07:00
Joffrey F
764d7b38c4
Support version parameter in `Client.from_env`
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-25 14:44:13 -07:00
Joffrey F
2ef02df2f0
Merge pull request #1168 from docker/aiden0z-master
...
Support pids_limit in HostConfig
2016-08-25 14:38:22 -07:00
fermayo
5bedd32a69
Fix creating containers with env vars with unicode characters
...
Signed-off-by: Fernando Mayo <fernando@docker.com>
2016-08-25 13:36:02 +02:00
Joffrey F
902c7a76cc
Docs and tests for pids_limit.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-23 17:05:08 -07:00
Joffrey F
fb41965272
Merge pull request #1082 from masci/fix_stream_helper
...
Invoke self._result passing `json=True` when `decode=True`
2016-08-23 15:34:35 -07:00
Kay Yan
fc72ac66e9
support MemoryReservation and KernelMemory
...
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
2016-08-23 15:32:06 -07:00
Joffrey F
797f1edc20
Merge branch 'master' of https://github.com/srikalyan/docker-py into srikalyan-master
2016-08-23 15:16:15 -07:00
Joffrey F
0e4314a872
Merge branch 'jp-cpushares' of https://github.com/joshpurvis/docker-py into joshpurvis-jp-cpushares
2016-08-23 15:12:30 -07:00
Joffrey F
0acdd19665
Merge pull request #1131 from Knetic/dnsopts
...
Implemented dns_opt support (from api 1.21)
2016-08-23 15:04:25 -07:00
Joffrey F
775b581c04
Private images support in create_service / update_service
...
Refactor auth header computation
Add tasks methods and documentation.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-23 14:52:07 -07:00
Joffrey F
7d5a1eeb7a
Add services documentation
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-22 17:45:10 -07:00
Joffrey F
97094e4ea3
New docker.types subpackage containing advanced config dictionary types
...
Tests and docs updated to match
docker.utils.types has been moved to docker.types
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-19 16:51:13 -07:00
Joffrey F
02e99e4967
Service API integration tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-17 18:42:52 -07:00
Brian Goff
0f47db7fcc
Remove references to "ExecutionDriver"
...
Docker no longer has an `ExecutionDriver` as of Docker 1.11.
The field in the `docker info` API will not be present in 1.13.
Found this while working on docker/docker#25721
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-17 12:20:13 -07:00
Tomas Tomecek
3062ae4348
docker client consistency: don't quote ':/'
...
E.g.
docker client
`/v1.21/images/localhost:5000/busybox/push?tag=`
docker-py
`/v1.21/images/localhost%3A5000%2Fbusybox/push`
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-08-17 12:20:13 -07:00
Josh Purvis
7d147c8ca1
Move cpu_shares and cpuset_cpu to HostConfig when API >= 1.18
...
Signed-off-by: Josh Purvis <joshua.purvis@gmail.com>
2016-08-15 16:33:58 -04:00
Joffrey F
a75553b3ca
Add `nodes` and `inspect_node` methods
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-11 17:47:02 -07:00
Tomas Tomecek
08b284ab39
docker client consistency: don't quote ':/'
...
E.g.
docker client
`/v1.21/images/localhost:5000/busybox/push?tag=`
docker-py
`/v1.21/images/localhost%3A5000%2Fbusybox/push`
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-08-10 09:30:19 +02:00
George Lester
93b4b4134e
Implemented dns_opt support (from api 1.21)
...
Signed-off-by: George Lester <glester491@gmail.com>
2016-08-07 14:23:22 -07:00
Joffrey F
0f70b6a38b
Add support for custom name in SwarmSpec
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-04 16:48:21 -07:00
Joffrey F
25db440c96
Update arguments for several Swarm API methods
...
Add Client.update_swarm method
Add test for Client.update_swarm
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-04 15:11:13 -07:00
Joffrey F
1f055796a8
Add new init_swarm test with custom spec
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-03 18:00:29 -07:00
Joffrey F
07563cfe3f
Update swarm methods to include newly added parameters
...
Rename swarm methods to be more explicit
Utility methods / types to create swarm spec objects
Integration tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-03 16:58:26 -07:00
Joffrey F
9d48b4f603
Test fixes and updated Makefile for 1.12 testing
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-03 16:48:41 -07:00
Joffrey F
ae7cb4b99f
Avoid crashing in update_headers decorator when headers kwarg is None
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-02 17:25:50 -07:00
Jari Takkala
dec29e1c10
Add support for sysctl when creating container
...
Closes #1144
Signed-off-by: Jari Takkala <jtakkala@gmail.com>
2016-08-01 23:43:52 +01:00
Joffrey F
723d144db5
Add support for IPv6 docker host connections.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-27 18:42:14 -07:00
Aanand Prasad
0e68b0a429
Default to npipe address on Windows
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-26 11:39:09 +01:00
Joffrey F
cea7376086
Send LinkLocalIPs as part of IPAMConfig dictionary
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-25 15:04:04 -07:00
Keerthan Reddy Mala
1294d3c410
Add unit tests
...
Signed-off-by: Keerthan Reddy Mala <kmala@deis.com>
2016-07-22 10:04:32 -06:00
Ben Firshman
bd73225e14
Set custom user agent on client
...
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-07-20 15:04:54 -07:00
Aanand Prasad
267021e453
Rename read methods for clarity
...
read_socket() is now just read(), because its behaviour is consistent
with `os.read` et al.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-13 18:58:57 -04:00
Aanand Prasad
9fb2caecb9
Rename next_packet_size to next_frame_size
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-13 17:08:17 -04:00
Aanand Prasad
73f06e3335
Move socket-reading test helpers into docker.utils.socket
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-13 17:08:17 -04:00
Joffrey F
e64ba8f2b9
Mock read_from_socket method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-13 17:08:17 -04:00
Joffrey F
76ed9c37cd
Read from socket after sending TCP upgrade headers.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-13 17:08:17 -04:00
David Gageot
5464cf2bea
Add hijack hints for non-detached exec api calls
...
Signed-off-by: David Gageot <david@gageot.net>
2016-07-13 17:08:17 -04:00
Tomas Tomecek
8f8a3d0ed2
volumes,create: support adding labels
...
Fixes #1102
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-07-13 08:41:45 +02:00
Justin Michalicek
e8ea79dfdb
Change double underscore in test case names for _set_auth_headers
...
* Change test__set_auth_headers_* methods to test_set_auth_headers_*
Signed-off-by: Justin Michalicek <jmichalicek@gmail.com>
2016-07-12 10:06:34 -04:00
Justin Michalicek
f7807bdb52
Update build unit tests
...
* Test that the request from build when the client has
auth configs contains the correct X-Registry-Config header
* Test that BuildApiMixin._set_auth_headers() updates the passed
in headers dict with auth data from the client
* Test that BuildApiMixin._set_auth_headers() leaves headers dict intact
when there is no _auth_config on the client.
Signed-off-by: Justin Michalicek <jmichalicek@gmail.com>
2016-07-12 10:06:34 -04:00
Srikalyan Swayampakula
b5d3556bce
Added support for user namespace.
...
Signed-off-by: Srikalyan Swayampakula <srikalyansswayam@gmail.com>
2016-06-30 15:25:17 -07:00
Joffrey F
d96d848bb4
Add integration tests for different types of kill signals
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-28 12:03:44 -07:00
Joffrey F
1132368be1
Fix network aliases test with Engine 1.12
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-28 11:05:01 -07:00
Joffrey F
538a1db9dd
Merge pull request #1066 from yunzhu-li/blkio-control
...
Add support for Block IO constraints in HostConfig
2016-06-15 14:26:49 -07:00
Joffrey F
787f3f5a16
Merge pull request #1079 from docker/1024-npipe-support
...
npipe support
2016-06-14 12:05:35 -07:00
Joffrey F
b6fa986293
Add ipv[46]_address params to create_endpoint_config.
...
Update networks documentation with exhaustive API docs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-13 17:58:10 -07:00
Massimiliano Pippi
86d1b8fb83
invoke self._result with json=True if decode=True
...
Signed-off-by: Massimiliano Pippi <massi@datadoghq.com>
2016-06-07 10:32:02 -04:00
yunzhu-li
896d36ea1d
Add support for Block IO constraints in HostConfig
...
This adds support for Block IO constraint options:
- blkio-weight
- blkio-weight-device
- device-read-bps
- device-write-bps
- device-read-iops
- device-write-iops
Signed-off-by: yunzhu-li <contact@yunzhu.li>
2016-06-05 23:30:44 -04:00
Joffrey F
0176fa171f
Update parse_host and tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-02 18:21:29 -07:00
Thomas Grainger
e0b9cb2a8c
support Python 3.5
...
Signed-off-by: Thomas Grainger <tom.grainger@procensus.com>
2016-05-19 17:59:34 +01:00
Jonathan Giannuzzi
98b41fee3c
Add support for creating internal networks
...
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-05-18 16:25:43 +02:00
Aanand Prasad
5ebf4b8ec7
Resolve path traversal in .dockerignore patterns
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-05-16 15:55:06 +01:00
Kevin Frommelt
2826dd51e7
Don't set socket timeout if it's already disabled when streaming
...
Signed-off-by: Kevin Frommelt <kevin.frommelt@gmail.com>
2016-05-10 10:23:14 -05:00
Joffrey F
3c02fc4cc7
Merge pull request #1004 from klj613/allow-equals-character-in-env-file
...
makes it possible to have '=' in the env file
2016-04-27 16:27:28 -07:00
Felix Yan
9da5493135
Use backports.ssl_match_hostname
...
The py2-ipaddress module unfortunately conflicts with the pypi:ipaddress module, which is in the dependency tree of widely used pyOpenSSL. I think it would be a good idea to use a well maintained backport of the Python 3.5 implementation of match_hostname() instead of duplicating the effort and maintain another.
All tests are passing here.
Signed-off-by: Felix Yan <felixonmars@archlinux.org>
2016-04-08 00:36:46 +08:00
Joffrey F
541edd7ffb
Don't raise InvalidConfigError when auth dict doesn't have an 'auth' key
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-04-05 14:05:33 -07:00
Joffrey F
c5a92e0822
Tests for match_hostname backport
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-29 17:09:26 -07:00
Joffrey F
cf83119882
Test commit changes param
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-23 12:17:22 -07:00
Joffrey F
9505b3e8b5
Merge branch 'master' of https://github.com/dimaspivak/docker-py into dimaspivak-master
2016-03-23 12:04:09 -07:00
Joffrey F
14cc5806c5
Merge branch 'gferon-master'
2016-03-23 12:02:31 -07:00
Joffrey F
7b17cfaa46
check_duplicate test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-23 12:01:56 -07:00
Joffrey F
ec05d5d2c0
gzip build test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-23 11:23:05 -07:00
Joffrey F
c3f76e6e8f
Merge branch 'from_env' of https://github.com/bfirsh/docker-py into bfirsh-from_env
2016-03-22 17:09:24 -07:00
Aditya Marella
7a0e19766b
Support OomScoreAdj in host configuration
...
Signed-off-by: Aditya Marella <aditya.marella@gmail.com>
2016-03-22 10:54:59 -07:00
Kristian Lewis Jones
6eaf8ce721
makes it possible to have '=' in the env file
...
note that the docker command line flag --env-file also allows '=' in the env file
Signed-off-by: Kristian Lewis Jones <klj613@kristianlewisjones.com>
2016-03-22 10:00:47 +00:00
Joffrey F
3fe08cbfe5
Support passing an alternate environment dict to kwargs_from_env
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-21 18:17:27 -07:00
Dima Spivak
99b6ec1180
Add support for changes param to ContainerApiMixin.commit
...
docker commit --changes was added to Docker in 1.6.0.
Signed-off-by: Dima Spivak <dima@spivak.ch>
2016-03-21 11:37:14 -07:00
wenchma
6fa76e01a4
Remove the network mode to support linkable cantainers check
...
Partially related to issue #21080
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2016-03-21 10:25:08 +08:00
Joffrey F
3168149cbf
If tcp host is provided while TLS is enabled, convert to https
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-17 16:18:37 -07:00
Joffrey F
41acd70fd4
Merge pull request #995 from docker/default-version-1.22
...
Update default API version to 1.22
2016-03-16 19:55:42 -07:00
Joffrey F
5ace6204b4
Update default API version to 1.22
...
Update engine version used for integration tests
IP address configuration tests needed tweaking
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-16 17:52:39 -07:00
Aanand Prasad
7417bc2cce
Don't support tmpfs in API version < 1.22
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-16 17:37:54 +00:00
Aanand Prasad
4ffa1be825
Add tmpfs integration test
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-16 17:28:10 +00:00
Jan Losinski
72446b47c0
Add unittest for the Tmpfs Hostconfig option
...
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2016-03-16 14:47:40 +00:00
Ben Firshman
8991ba7cce
Add docker.from_env() shortcut
...
A much neater way of getting started with docker-py.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-03-15 11:24:25 -07:00
Joffrey F
8e93abf271
Merge branch 'master' into tls-fixes
2016-03-15 10:35:53 -07:00
Joffrey F
d4c17859a3
Invalid log driver error raised during create_container step
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-14 15:05:47 -07:00
Joffrey F
ad480ff0b1
Fix enable_tls issue #984
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-11 12:27:24 -08:00
Matt Daue
d4a5bc4a86
Add ip4&ip6 ( #935 ) support, network/id/connect
...
Signed-off-by: Matt Daue <mattdaue@gmail.com>
- Implement check to validate API ver is >= 1.22 for new feature
- Includes patch @elchris82: Changed network in data dict to IPAMConfig as needed from the API. See https://github.com/docker/docker/issues/20732
- Update unit test for container attach to net
- Update integration tests
- Add integration test for IP setting
Signed-off-by: Matt Daue <mattdaue@gmail.com>
2016-03-02 20:38:37 -05:00
Joffrey F
81d8caaf36
Merge pull request #916 from docker/container_update_feature
...
Support for container limits update
2016-02-24 18:00:06 -08:00
Joffrey F
cdf6dc8c3c
Merge pull request #942 from seguins/934-separate-stream-follow-logs
...
Separate params stream and follow for logs.
2016-02-24 16:04:42 -08:00
Daniel Nephin
3bad04649d
Fix env vars with empty values.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-02-24 15:36:21 -08:00
Daniel Nephin
d9d84ce8d1
Format environment variables to match docker-cli.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2016-02-23 16:30:26 -08:00
Joffrey F
7440603d98
Improve parse_bytes util method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-23 16:18:45 -08:00
Joffrey F
a710fbf60a
Unit test for Client.update_container method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-23 16:18:36 -08:00
Joffrey F
c3ba50c98d
New `update_container` method
...
Allows user to update container limits in-flight.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-23 16:18:36 -08:00
Aanand Prasad
9ba0ddf267
Fix TLS regressions
...
- Set `verify` to the CA cert path if one has been specified, rather
than `True`
- Don't set `assert_fingerprint`
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-02-23 14:29:52 -08:00
Stéphane Seguin
71fafd3209
Separate params stream and follow for logs.
...
Closes #934
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2016-02-16 18:51:55 +01:00
Joffrey F
c3a66cc599
Merge pull request #928 from docker/926-ignored_dockerfiles
...
Never exclude Dockerfile from the build context.
2016-02-09 12:52:04 -08:00
Joffrey F
90760cfe1d
Never exclude Dockerfile from the build context.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-09 12:11:30 -08:00
Joffrey F
dc198be26c
Don't break when parsing unknown config keys
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-09 12:08:34 -08:00
Joffrey F
fea32eb983
Merge branch 'VolumeBind' of https://github.com/keloyang/docker-py into keloyang-VolumeBind
2016-02-08 11:36:09 -08:00
Joffrey F
8bdaffc2e7
Merge pull request #920 from docker/ssl_version_simpler
...
Remove obsolete SSL version computation
2016-02-05 12:41:02 -08:00
Mike Dougherty
387db11009
Re-write kwargs_from_env to handle TLS options better
...
This more closely matches the way the docker client interprets the
relevant environment variables. Among other things, it's now possible to
set DOCKER_TLS_VERIFY=false.
Signed-off-by: Mike Dougherty <mike.dougherty@docker.com>
2016-02-04 17:13:09 -08:00
Spencer Rinehart
fca622cad7
Add support for shm_size.
...
--shm-size was added to Docker in 1.10 via docker/docker#16168 . See
docker/compose#2823 for more details.
Signed-off-by: Spencer Rinehart <anubis@overthemonkey.com>
2016-02-04 12:33:05 -06:00
yangshukui
f4b3a1bddd
create tempfile in VolumeBindTest for non-auto-creating of docker
...
Signed-off-by: yangshukui <yangshukui@huawei.com>
2016-02-04 15:49:15 +08:00
Joffrey F
b808cc45b4
Remove obsolete SSL version computation
...
Recent versions of urllib3 (including the one packaged by requests)
will automatically reject SSLv2/3.
Additional test to check urllib3's behavior (mostly for release/packaging)
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-03 17:50:52 -08:00
Joffrey F
bb94fe7a8c
Support unspecified protocol in base_url when using TLS
...
(assume HTTPS)
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-28 16:25:23 -08:00
Aanand Prasad
403d271cc2
Raise exceptions for API errors on network connect/disconnect
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-25 18:19:32 +00:00
Aanand Prasad
01a754a7f7
Support links when creating containers or connecting to networks
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-20 17:47:45 +00:00
Joffrey F
eb1f24a1fc
Merge pull request #880 from docker/813-parse-float-bytes
...
Handle 64-bit integer values in parse_bytes
2016-01-18 14:37:34 -08:00
Pavel Kravchenko
84a72f49e9
Add HttpHeaders support in load_config
...
Signed-off-by: Pavel Kravchenko <kpavel@il.ibm.com>
2016-01-18 14:29:31 -08:00
Joffrey F
cd66f6c6cd
parse_bytes: Add ability to handle 64-bit integers in py2
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-18 13:53:52 -08:00
Joffrey F
f9b04c1026
Improve host devices support
...
Add unit tests for utils.parse_devices
Rewrite documentation
Support dict and string format for device declaration
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-18 11:38:32 -08:00
Aanand Prasad
21a5a0a049
Normalise/fix networking API JSON keys
...
- Use CamelCase
- `auxaddresses` -> `AuxiliaryAddresses`
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-18 18:41:18 +00:00
Aanand Prasad
d00a5bb086
Implement support for network-scoped aliases
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 18:19:35 +00:00
Aanand Prasad
62d9964cc1
Merge pull request #818 from rmb938/patch-1
...
allow custom ipam options when creating networks
2016-01-05 12:55:45 +00:00
Ryan Belgrave
67a29441c4
allow custom ipam options when creating networks
...
Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
2016-01-04 18:57:11 -05:00
wenchma
c424148853
Update docker network inspect test
...
This is based on https://github.com/docker/docker/pull/18928
Related to docker/docker#18626
Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
2015-12-30 10:43:02 +08:00
Joffrey F
8b322aea2b
Don't expect non-zero exit code when stopping a container
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-12-23 13:01:05 -08:00
Aanand Prasad
9deffc45a1
Merge pull request #863 from thomasboyt/fast-exclude-paths
...
Don't descend into ignored directories when building context
2015-12-16 16:59:12 +00:00
Aanand Prasad
25b188440a
Treat 'index.docker.io' repo names as 'docker.io'
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-12-10 12:42:54 +00:00
Aanand Prasad
9b890c4540
Refactor resolve_authconfig tests
...
The structure of the fake config dictionary was not reflective of what
actual parsed config looks like.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-12-10 12:42:54 +00:00
Sumit Sahrawat
2981d013a5
Fix remove_volume return value
...
Signed-off-by: Sumit Sahrawat <sumit.sahrawat.apm13@iitbhu.ac.in>
2015-12-10 10:29:11 +05:30
Sumit Sahrawat
bd948be7d9
Allow providing options when creating networks
...
Following the spec:
http://docs.docker.com/engine/reference/api/docker_remote_api_v1.21/#create-a-network
I have added an Options argument to create_network.
This opens up the possibility of creating isolated containers with no
internet access programmatically. We require such facilities in
https://github.com/jupyter/tmpnb/issues/187 .
Signed-off-by: Sumit Sahrawat <sumit.sahrawat.apm13@iitbhu.ac.in>
2015-12-10 10:29:11 +05:30
Joffrey F
0f091747ec
Merge pull request #868 from jstewmon/config-stop-signal
...
added stop_signal to create container config
2015-12-08 12:47:31 -08:00
Thomas Boyt
a49166abf2
Improve get_paths performance by not descending into ignored directories
...
Signed-off-by: Thomas Boyt <thomas@ledgerx.com>
2015-12-08 11:26:25 -05:00
Dustin Falgout
e0c6ec0343
incorporate feedback
...
Signed-off-by: Dustin Falgout <dustin@falgout.us>
2015-12-04 01:27:44 -06:00
Dustin Falgout
e0365fcbfb
Use new methods to raise exceptions in create_host_config.
...
Added tests for the new methods.
Closes #840
Signed-off-by: Dustin Falgout <dustin@falgout.us>
2015-12-03 17:19:59 -06:00
Jonathan Stewmon
31b1b53f7f
added stop_signal to create container config
...
Signed-off-by: Jonathan Stewmon <jstewmon@rmn.com>
2015-12-03 14:31:51 -06:00
Tomas Tomecek
a9a538abaf
allow interactive exec
...
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2015-12-03 11:07:11 +01:00
Tomas Tomecek
55b67acb5b
tests,integration: ensure container is removed if start fails
...
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2015-12-02 09:46:02 +01:00
Nicolas Delaby
05fd8dfb41
fix typo filter param for `volumes`
...
https://docs.docker.com/engine/reference/api/docker_remote_api_v1.21/#list-volumes
Signed-off-by: Nicolas Delaby <nicolas.delaby@lock8.me>
2015-12-01 15:06:01 +01:00
Joffrey F
00c0baf40f
Add tests for new cases covered by parse_repository_tag
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-24 12:16:00 -08:00
Joffrey F
6d0e2d69d5
Update auth.resolve_repository_name
...
More relaxed version that matches the constraints imposed by the
current version of the docker daemon.
Few unit tests to verify the new cases.
Client.pull was trying to set the tag value when it wasn't supposed
to, fixed now.
utils.parse_repository_tag is simpler and supports @sha... notation
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-23 18:43:02 -08:00
Joffrey F
73b51400a1
Fix integration-dind-ssl make task
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-18 15:41:32 -08:00
Joffrey F
de617375f1
Move methods/classes used by all integration tests to helpers.py
...
Ensure setup_module is called at session level, making the test
suite not order dependent. Test files can be invoked independently.
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-18 15:40:54 -08:00
Joffrey F
64eac0b71c
Wrong key name in stats test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-18 14:47:48 -08:00
Joffrey F
dfcc1d87bf
Merge branch 'oom-kill-disable-pr' of https://github.com/schu/docker-py into schu-oom-kill-disable-pr
2015-11-18 14:35:54 -08:00
Joffrey F
9ed721957a
Merge pull request #832 from aebm/master
...
Fix #627
2015-11-18 14:29:00 -08:00
Daniel Nephin
0284eadaff
Merge pull request #805 from sourcelair/enhancement/stats-no-stream
...
Add support for non-stream stats of containers
2015-11-17 10:47:28 -05:00
Daniel Nephin
4e441b2a6b
Merge pull request #834 from lots0logs/814-host-config-mem-swap
...
Add support for MemorySwappiness to client.create_host_config()
2015-11-16 11:37:15 -05:00
Joffrey F
ac148393b1
Merge pull request #851 from docker/remove-ci-transition-files
...
Remove unused files
2015-11-12 11:51:32 -08:00
Joffrey F
c3197dcce7
Merge pull request #850 from docker/mnowster-test-no-log-driver-specified
...
Rebased #798
2015-11-12 11:23:16 -08:00
Joffrey F
c622ff64b9
Remove unused files
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-12 11:21:37 -08:00
Joffrey F
b0bb4ff3a4
Merge branch 'test-no-log-driver-specified' of https://github.com/mnowster/docker-py into mnowster-test-no-log-driver-specified
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-12 11:11:51 -08:00
Daniel Nephin
6e73f04acc
Merge pull request #796 from v-boyko/feature/logs_since
...
Support the 'since' option in the 'containers/<id>/logs' endpoint (API upgrade)
2015-11-12 14:07:54 -05:00
Joffrey F
c89d366827
Merge pull request #848 from docker/845-fix
...
Client.logs(tail=0) now shows no past logs (expected behavior)
2015-11-12 10:54:51 -08:00
Joffrey F
0e13a0d7fd
Client.logs(tail=0) now shows no past logs (expected behavior)
...
Add test confirming the new behavior.
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-12 10:50:01 -08:00
Joffrey F
fe858f5ecc
Add build integration test checking stderr shows up in stream
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-11 17:14:03 -08:00
Joffrey F
cefad9e23b
Update buildargs test to avoid race condition
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-10 17:47:05 -08:00
Michael Schubert
8924319631
create_host_config: allow setting oom_kill_disable
...
Signed-off-by: Michael Schubert <schu@schu.io>
2015-11-10 11:08:24 +01:00
Leonty
5571d1af76
Support 'buildargs' parameter for docker 1.9.
...
Signed-off-by: Leonty Balovnev <tigreavecdesailes@gmail.com>
2015-11-10 00:23:16 +03:00
Viacheslav Boiko
3330569772
Merge upstream branch 'master' into feature/logs_since
...
Signed-off-by: Viacheslav Boiko <v.e.boyko@gmail.com>
2015-11-05 11:56:06 +01:00
Dustin Falgout
01353c11ca
Dont include mem_swappiness when testing use of str values
...
Signed-off-by: Dustin Falgout <dustin@falgout.us>
2015-11-05 02:52:18 -06:00
Dustin Falgout
c07dd53a2a
Incorporates feedback from and closes #814
...
Signed-off-by: Dustin Falgout <dustin@falgout.us>
2015-11-05 02:20:53 -06:00
Joffrey F
4f1304c108
Bump default API version to 1.21
...
Update Makefile to run tests against dind 1.9.0
Update network tests to account for latest API changes
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-04 19:32:22 +01:00
Alejandro Brito Monedero
a695f0ca5a
Fix #627
...
Docker-py couldn't pull private images if the account have non ascii chars
in either user or password. It that case an exception ending with no auth
credentials.
Instead docker client (golang) don't suffer this issue.
Also add a test to check the login or password even with non ascii char have
a valid auth dictionary
Signed-off-by: Alejandro Brito Monedero <abrito@alea-soluciones.com>
2015-10-29 16:12:30 +01:00
Joffrey F
47ab89ec2b
Merge pull request #830 from docker/fix-links-create-test
...
Use network_mode=bridge when testing links
2015-10-28 16:36:34 +01:00
Joffrey F
aaeb6c1087
Use network_mode=bridge when testing links
...
Links are only compatible with network mode bridge.
New versions of docker only create env entries when network mode
is properly set.
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-28 14:52:17 +01:00
Joffrey F
f4c881f37d
Merge pull request #827 from coreypobrien/lessbinding
...
Move container volume bind tests to their own class
2015-10-28 11:07:35 +01:00
Corey O'Brien
a2184def6e
Move container volume bind tests to their own class
...
Signed-off-by: Corey O'Brien <coreypobrien@gmail.com>
2015-10-27 16:08:58 -05:00
Joffrey F
a610a1be0e
Fix py3.2 test failure and unicode behavior
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-27 18:01:19 +01:00
Joffrey F
311ae711d4
Merge pull request #825 from aebm/master
...
Fix auth.load_config bug calling parse_auth
2015-10-27 15:57:00 +01:00
Alejandro Brito Monedero
22da6ace7a
Fix auth.load_config bug calling parse_auth
...
When load_config found and auths section it didn't call parse_auth only with
the auths section. Instead it called parse_auth with all the configuration.
There is also a test to check this case
Signed-off-by: Alejandro Brito Monedero <alejandro.monedero@gmail.com>
2015-10-27 09:03:28 +01:00
Daniel Nephin
417c80057b
Support unicode commands.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-10-26 17:22:14 -04:00
Antonis Kalipetis
5cfd2da448
Add test for streaming stats
...
Also, fix typo in non-streaming stats.
Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2015-10-22 14:05:55 +00:00
Antonis Kalipetis
192391a5a8
Add integration test for stats no-stream
...
Signed-off-by: Antonis Kalipetis <akalipetis@gmail.com>
2015-10-22 10:28:04 +00:00
Joffrey F
93a296fb04
Reorganize test directories
...
More clearly separate unit and integration tests
Allow splitting into multiple files
Cleaner
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-21 16:02:09 -07:00
Joffrey F
0258c6e622
Update `Client.create_volume` to use new endpoint
...
New API endpoint is POST /volumes/create (previously just /volumes)
Since the feature is yet unreleased (RC), no fallback strategy is
implemented.
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-21 13:51:09 -07:00
Joffrey F
51d2125c59
Pull correct version of busybox in integration tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-14 17:37:45 -07:00
Stephen Moore
7f3692ceed
Fix attach method over SSL connections
...
Signed-off-by: Stephen Moore <stephen@delfick.com>
2015-10-14 17:29:31 -07:00
Joffrey F
b1f25317de
Use DOCKER_CONFIG environment variable to look up auth config
...
When provided, default paths are ignored.
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-14 17:26:50 -07:00
Joffrey F
a3a345e2f6
Use url-safe base64 when encoding auth header
...
+ regression test
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-14 17:26:50 -07:00
Joffrey F
147df4d21f
put/get archive implementation
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-14 17:26:50 -07:00
Joffrey F
55a0783f4b
Fix tests
...
Skips were masking some errors / compatibility issues
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-14 17:26:50 -07:00
Aanand Prasad
53589e5f0a
Implement methods for managing networks
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-10-14 17:26:50 -07:00
Joffrey F
a1393ee8ac
Don't break when volume binds contain unicode characters
...
Also includes a few unit tests for utils.convert_volume_binds
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-14 17:26:50 -07:00
Viacheslav Boiko
4a2db828b4
Support the 'since' option in the 'containers/<id>/logs' endpoint
...
Signed-off-by: Viacheslav Boiko <v.e.boyko@gmail.com>
2015-10-02 06:19:06 +00:00
Mazz Mosley
7ed8eb5da9
Remove skip test
...
It has been reported that the bug in docker has now been fixed so we can
re-instate this test.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-01 14:19:34 +01:00
Paul Bellamy
19291ee20d
Fix race condition in integration regression tests
...
`docker port` and inspect do not return ports for containers which are
not running. Because the container command is `true`, sometimes that
exits before the inspect is called.
Signed-off-by: Paul Bellamy <paul.a.bellamy@gmail.com>
2015-10-01 14:05:50 +01:00
Joffrey F
7884ab9fe2
Merge pull request #789 from PierreF/top_ps_args
...
Allow to specify ps_args when listing processes
2015-09-28 14:36:08 -07:00
Joffrey F
d0ccc2e261
Support explicit protocol in Client.port
...
User can now specify a protocol in Client.port using the port/proto
syntax. Default port is now TCP instead of UDP (to match the
behavior of `docker port`) when no proto is specified.
Regression test
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-28 12:06:10 -07:00
Pierre Fersing
c1577606be
Added test for "top" function
...
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2015-09-28 11:59:25 +02:00
Aanand Prasad
29b12cf007
_url can take arbitrarily many arguments
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-09-25 14:25:00 -07:00
Joffrey F
d89b2a01f0
cpu_quota and cpu_period unit tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-24 10:08:02 -07:00
Joffrey F
48d72f6703
Bump default API version
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-23 11:35:57 -07:00
Joffrey F
da2b797323
Improve volume bindings integration test
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-22 14:30:03 -07:00
Joffrey F
d6a86e1d69
Fix volumes tests for API version >= 1.20
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-22 14:17:19 -07:00
Aanand Prasad
eec0465832
Make volume binds tests work on any host
...
Instead of creating the test directory directly on the host, create it
by starting a container with the directory bind-mounted, so that it
doesn't matter whether the daemon is local, in a VM or remote.
This removes the need to make /tmp a volume in the test container, and
to share it with the dind container.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-09-22 11:34:49 -07:00
Aanand Prasad
3d6c91b469
Only pull busybox in integration tests if we don't already have it
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-09-22 14:25:28 +02:00
Joffrey F
ef0c373f14
Pin busybox version to use in integration tests
...
Removed obsolete non-streaming build test
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-21 15:34:10 -07:00
Joffrey F
8d32631635
Improve volume cleanup logic
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-16 12:55:49 -07:00
Joffrey F
acd5e634ff
Generic skip decorator for low API version accessible to all tests
...
Add simpler version comparison functions
Add decorator to enforce minimum version in API methods
Fix utils imports
Add minimum_version decorators on API methods that needed it
GroupAdd test requires API version >= 1.20
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-16 12:55:13 -07:00
Joffrey F
05267f63d3
Modify unit tests suite to allow mock routes to optionally be method-aware
...
Added mock API routes for volumes API
Add unit tests and integration tests for volume API
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-16 12:54:26 -07:00
Joffrey F
1b798a2901
GroupAdd tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-15 01:58:06 +02:00
Maxime Petazzoni
e5fbc42dcb
Merge pull request #763 from docker/api_splitup
...
API splitup
2015-09-13 08:47:07 -07:00
Joffrey F
c735cc69a0
Split different APIs into several mixins for clarity / easier maintenance
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-11 16:19:29 -07:00
Joffrey F
7e3cdfb3b1
Fixed regression test in py3 environments
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-10 11:37:51 -07:00
Joffrey F
de5aab87b4
Merge pull request #753 from docker/715-user-int-uid
...
Always send a string for the user param in create_container
2015-09-10 10:37:05 -07:00
Joffrey F
b1c2475698
Add hello-world to temp images in pull tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-09 17:10:04 -07:00
Joffrey F
1fb2db4951
Make integration tests more CI-friendly.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-09-09 17:06:34 -07:00
Joffrey F
fa3082b6cd
Update integration-dind task
2015-09-09 14:49:58 -07:00
Joffrey F
abaf346b49
Make running integration tests with dind possible
2015-09-09 14:49:36 -07:00
Joffrey F
7dce129180
Merge pull request #754 from aanand/default-to-tcp-url-on-windows
...
Default to 127.0.0.1:2375 on Windows
2015-09-01 16:36:32 -07:00
Aanand Prasad
1362938f03
Default to 127.0.0.1:2375 on Windows
...
Following the logic of the Docker client.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-09-01 16:28:05 -07:00
Joffrey F
1e916a1e83
Test UID validity
2015-08-31 18:35:32 -07:00
Joffrey F
09defa66ba
Always send a string for the user param in create_container
2015-08-31 16:06:52 -07:00
Joffrey F
3d884f9a3c
Test URL construction
2015-08-31 15:01:40 -07:00
Joffrey F
33acb9d2e0
Test has been fixed, remove skip decorator
2015-08-31 13:13:46 -07:00
Joffrey F
ad608baaaf
Merge pull request #747 from aanand/integration-test-fixes
...
Integration test improvements
2015-08-31 13:07:02 -07:00
Aanand Prasad
6c0f7187a8
Integration test improvements
...
- Fix the setup step (the process has changed now that we're using
pytest)
- Skip tests that are unstable
- Make better use of build caching
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-31 12:06:41 -07:00
Joffrey F
9b37120167
Merge pull request #742 from aanand/fix-dockerignore-integration-test
...
Fix .dockerignore integration test
2015-08-27 11:01:47 -07:00
Joffrey F
63df0b9ab3
Merge branch 'master' of github.com:docker/docker-py
2015-08-26 17:02:55 -07:00
Joffrey F
c56c9faacd
Merge branch 'default-cert-path' of https://github.com/aanand/docker-py into aanand-default-cert-path
...
Conflicts:
tests/utils_test.py
2015-08-26 17:00:33 -07:00
Joffrey F
db1a93fd27
Merge pull request #662 from stevenewey/exec_create_user
...
Exec create user
2015-08-26 15:36:47 -07:00
Joffrey F
ddf879cc4c
Merge pull request #721 from aanand/pathspec
...
Better support for .dockerignore
2015-08-26 14:25:09 -07:00
Joffrey F
e7a9ae097c
Don't remove LogConfig.types shortcut
2015-08-26 11:51:08 -07:00
Aanand Prasad
20e142fe78
Better support for .dockerignore
...
- Support all basic pattern forms: file, directory, *, ?, !
- Fix handling of wildcard patterns and subdirectories - `*/a.py` should
match `foo/a.py`, but not `foo/bar/a.py`
- Fix handling of directory patterns with a trailing slash - make sure
they're handled equivalently to those without one
- Fix handling of custom Dockerfiles - make sure they go in the tarball
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-26 19:14:09 +01:00
Mazz Mosley
9937a31a88
Test valid no args for log config
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-26 16:10:28 +01:00
Aanand Prasad
ced9b0094f
Fix .dockerignore integration test
...
- There was a typo (".dockerginore"), which meant that the exclusion of
the .dockerignore file itself wasn't being tested.
- Some of the file names were non-descriptive.
- The test was inspecting the output of the build process, rather than
running 'ls' in a new container, which meant it was full of extra
output, and would fail when there was a cache hit.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-26 16:03:21 +01:00
Mazz Mosley
35b30e69df
Remove validation of supported log drivers
...
By having this hardcoded list of log drivers, it is a bottleneck
to us supporting more log drivers.
The daemon already validates if a log driver is valid or not, so rather
than duplicating that validation, let's pass the log_driver along.
This allows support for new/more log drivers as they become supported
in docker without having to wait for both docker-py and docker-compose
to support them.
Keeping the current list of log driver types for backwards compatibility.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-26 16:02:03 +01:00
Mazz Mosley
90538cf0a3
Fix log driver integration test
...
By using `json-file` as the use case we can run this without needing
to be on a machine with syslog installed.
Even if syslog was installed, this test was still failing as the
`log_opt` of 'key1' is an invalid option.
This test is slightly different style to the others, it hopefully
includes an example of how to space out tests for increased readability,
we construct our tests in 3 phases(generally) and include a space imbetween
them:
- setup
- perform action
- assertions
Expanded variable names is important for readability/clarity. Also
reduced the number of assertions to focus on the logic we're testing.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-26 15:58:57 +01:00
Joffrey F
b5f1e64e8f
Ensure Makefile still run tests properly / tests are run in container as expected
2015-08-25 16:58:01 -07:00
Joffrey F
f9a540aa77
Merge branch 'pytest' of https://github.com/aanand/docker-py into aanand-pytest
2015-08-25 16:10:47 -07:00
Joffrey F
47e0ad6959
Merge pull request #735 from aanand/test-network-mode-version
...
Explicitly test NetworkMode logic in create_host_config
2015-08-25 14:57:59 -07:00
Joffrey F
1308049d2f
Merge pull request #736 from aanand/propagate-exceptions-in-tests
...
Stop catching Exception in tests where it isn't expected
2015-08-25 14:56:49 -07:00
Aanand Prasad
d5bcdaf2f8
Use pytest helpers to assert exceptions and deprecated warnings
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-25 16:34:33 +01:00
Aanand Prasad
6e27c2a3d0
Run tests with pytest
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-25 16:34:33 +01:00
Bryan Boreham
4e4c342582
Call Client.create_host_config because the old call is deprecated
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2015-08-25 16:19:51 +01:00
Aanand Prasad
36424ca001
Stop catching Exception in tests where it isn't expected
...
The test runner will report on the exception anyway, so it's redundant.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-25 16:00:42 +01:00
Aanand Prasad
41c21676a2
Explicitly test NetworkMode logic in create_host_config
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-25 14:11:21 +01:00
Aanand Prasad
d9a149f327
Merge pull request #732 from docker/version-dependent-hostconfig
...
Version dependent hostconfig
2015-08-25 14:03:51 +01:00
Colin Huang
edebf3756a
Split the entrypoint string to shell-like syntax.
2015-08-25 09:44:47 +08:00
Joffrey F
595965ebc4
Adapt tests to new create_host_config usage
2015-08-24 16:25:18 -07:00
Mohit Soni
3caaa0050b
Added support for cgroup parent
...
Clean up cgroup_parent usage
2015-08-24 14:43:05 -07:00
Mark Adams
b7aa1d76eb
Fixed #726 issue where split_port was checking `len(None)`
...
- Fixed #726 by adding a check for None in split_port
- Also switched to using a _raise_invalid_port() function to replace
multiple slightly differing ValueErrors for invalid port
2015-08-19 22:01:44 -05:00
Joffrey F
adb2d01861
Added full path parse_host unit test
2015-08-17 14:45:35 -07:00
Stephen Newey
1c1d7eee5a
Merge branch 'master' into exec_create_user
2015-08-12 18:12:56 +01:00
Joffrey F
139850f3f3
Merge pull request #698 from docker/jhowardmsft-14530-netmode
...
`network_mode` now necessary in `host_config`
2015-08-10 10:53:57 -07:00
Viktor Petersson
d400717ff8
Squashed commit of the following:
...
commit 4f053a06c1e9e3f63fd5afde60322f676acbdf45
Merge: 9177380 07a99ea
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Thu Jul 30 14:37:16 2015 +0100
Merge branch 'master' into fixes
commit 9177380ae9abf4ca01cf7a2a8b7de6640ed5f5d5
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Thu Jul 30 14:00:51 2015 +0100
Tweaks exception message.
commit 6a5832e2f6655835a6b87897d7ec82d6ef5faa50
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Thu Jul 30 13:17:32 2015 +0100
Simplifies logic as per feedback.
commit f750eddc34e5356dcfb53c16a7f98a99e817fa53
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Thu Jul 30 11:09:14 2015 +0100
Move return from list to dict. Adds exception handling.
commit 8e50f57cceb6370b7f7b41624f50d5a6835301a0
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Thu Jul 30 10:15:58 2015 +0100
Reverts change to .gitignore.
commit 5ba2c1b29706ddb74bef9c24c2a6e64bb369db22
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 21:15:21 2015 +0100
Fixes feedback. Adds three unittests.
commit e1c719e61993fdaec0f22ba0de706af80587dc16
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 17:00:16 2015 +0100
WIP Adds test for parse_env_file
commit 4448ae72e55d889d9d194a2c0303d182cb157d4c
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 16:42:49 2015 +0100
Excludes coverage files.
commit 19a5d01615dd9b7ee939f54f256e5bae89a94ee1
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 16:42:42 2015 +0100
Switch fixes logic.
commit a8094c63a9f4351ae71393ea5603aa11c5c5bc94
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 11:45:56 2015 +0100
Implements logic for envfile parsing from Docker-cli
Ref: https://github.com/docker/docker/blob/master/opts/envfile.go#L19-L51
commit ea9bfd95dfafe4023c58ab37f990158f73eb2e0d
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 11:41:23 2015 +0100
Replaces CSV module with manual splitting.
commit a001d28ff48309d2b2338aaf27253fdfaa0f6c4b
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Wed Jul 29 11:35:37 2015 +0100
Removes isinstance on filename.
commit 419d5961f6103df9166be3a9baa549276c12223d
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Tue Jul 28 22:39:33 2015 +0100
Reflects @aanand's feedback.
commit e81e3c8ed797ff939843d2485bf15525e85e890d
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Tue Jul 28 15:43:32 2015 +0100
Typo fix.
commit 2898389cada2bfca64bdfa71359aebeb3b5b6d1b
Author: Viktor Petersson <vpetersson@wireload.net>
Date: Tue Jul 28 15:41:08 2015 +0100
Refs #565 . Adds minimal implementation of env_file client-side support.
2015-07-30 14:39:37 +01:00
Joffrey F
2b7c31e0f7
Fixed empty_host_config test
2015-07-29 14:23:10 -07:00
Joffrey F
daea185a23
nit: parenthesis alignment
2015-07-29 12:43:39 -07:00
John Howard
8f1a82faeb
Add netmode (required by docker)
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-28 15:18:12 -07:00
Joffrey F
8a87001d09
Merge pull request #685 from paulbellamy/master
...
Fix integration tests
2015-07-21 11:01:11 -07:00
Joffrey F
42b712d100
Merge pull request #680 from aanand/fix-timestamp-conversion
...
Enforce UTC datetimes in arguments to `events()`
2015-07-21 10:45:29 -07:00
Aanand Prasad
75cc50f0ad
Default to ~/.docker if DOCKER_CERT_PATH is empty
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-21 16:50:44 +01:00
Paul Bellamy
7de1605e9a
Fix integration tests.
...
Forgot to update them in 33e1a58
Signed-off-by: Paul Bellamy <paul.a.bellamy@gmail.com>
2015-07-21 12:07:22 +01:00
Aanand Prasad
2c08ad21dd
Merge pull request #674 from estesp/use-docker-host-in-tests
...
Update all client instances in integration tests to use DOCKER_HOST
2015-07-21 11:09:22 +01:00
Aanand Prasad
657420a4d3
Enforce UTC datetimes in arguments to `events()`
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-21 10:49:27 +01:00
Aanand Prasad
33e1a58b60
Stop pinging registries from the client
...
The daemon already pings the registry, so doing it on our end is
redundant and error-prone.
The `insecure_registry` argument to `push()`, `pull()` and `login()` has
been deprecated - in the latter case, it wasn't being used anyway.
The `insecure` argument to `docker.auth.resolve_repository_name()` has
also been deprecated.
`docker.utils.ping_registry()` has been deprecated.
`docker.auth.expand_registry_url()` has been removed.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-20 19:50:18 +01:00
Phil Estes
f321eef031
Update all client instances in integration tests to use DOCKER_HOST
...
In testing Docker master with the latest docker-py release, a few new
tests exist which don't set the base_url, which is not the default unix
socket location when Docker's integration tests are running.
Also, there is no guarantee syslog can be reached from a test container
so I wrapped that test with the NOT_ON_HOST skip logic.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-07-14 13:00:35 -04:00
Dan O'Reilly
70b921f8a3
Fix handling output from tty-enabled containers.
...
Treat output from TTY-enabled containers as raw streams, rather than
as multiplexed streams. The docker API docs specify that tty-enabled
containers don't multiplex. Also update tests to pass with these
changes, and changed the code used to read raw streams to not
read line-by-line, and to not skip empty lines.
Addresses issue #630
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-07-06 18:20:41 -04:00
Stephen Newey
7bbec93f64
Add test for root user as default exec_create behaviour
2015-07-02 13:24:51 +01:00
Joffrey F
2d7f1cfa1e
Merge pull request #651 from docker/fix_647
...
Fix adapter bug + regression test
2015-06-30 15:19:14 -07:00
Joffrey F
ac90a874be
Merge pull request #644 from docker/memory-memswap-hostconfig
...
memory / memswap in hostconfig
2015-06-30 15:06:32 -07:00
Joffrey F
9e87884ba8
Fix Unix socket adapter bug with double slash in path + regression test
2015-06-30 23:59:03 +02:00
Stephen Newey
6a5a256509
Add support for user on exec_create.
2015-06-30 13:23:42 +01:00
Joffrey F
237ce20013
Merge branch 'id-resolution-in-check-resource' of https://github.com/posita/docker-py into posita-id-resolution-in-check-resource
2015-06-30 01:46:22 +02:00
Joffrey F
30fac5b879
Fix stop timeout bug
2015-06-24 22:58:56 +02:00
Joffrey F
a12ba1a96f
Updated tests for mem_limit changes
2015-06-19 02:13:12 +02:00
Joffrey F
e05d06bcf2
Merge branch 'allow-any-mode' of https://github.com/aanand/docker-py into aanand-allow-any-mode
2015-06-18 21:10:13 +02:00
Joffrey F
6fd391840e
Bumped default API version == 1.19
2015-06-18 20:38:52 +02:00
Luke Marsden
5fa7576e8c
Add volume_driver param to client.create_container
...
- Add appropriate test which also asserts that volume names can be passed through to drivers.
- Add new param to docs.
Signed-off-by: Luke Marsden <luke@clusterhq.com>
2015-06-18 20:38:21 +02:00
Joffrey F
6b9ea106d7
Fixed integration test
2015-06-18 19:58:01 +02:00
Aanand Prasad
1446b8c5ee
Allow binds to be specified as a list of strings
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-12 12:36:59 -04:00
Aanand Prasad
7dd7625391
Allow any mode string to be passed into a volume bind
...
Volume binds now take a "mode" key, whose value can be any string.
"ro" is still supported. It is an error to specify both "ro" and "mode".
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-05 13:25:59 +01:00
Matt Bogosian
947febcbd8
Move image/container ID resolution to @check_resource decorator.
2015-05-20 15:37:40 -07:00