Commit Graph

38 Commits

Author SHA1 Message Date
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 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 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 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
Joffrey F f9a540aa77 Merge branch 'pytest' of https://github.com/aanand/docker-py into aanand-pytest 2015-08-25 16:10:47 -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
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
Joffrey F 595965ebc4 Adapt tests to new create_host_config usage 2015-08-24 16:25:18 -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
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
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
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
smothiki ef452ed4c1 make memory units compatible with native docker cli
Signed-off-by: sivaram mothiki <smothiki@engineyard.com>
2015-05-07 20:05:32 -06:00
Joffrey F c7948436e5 Added tests for log_config param 2015-04-24 15:10:51 -07:00
Joffrey F d71bfb1b3d Improved ulimit tests 2015-04-22 15:45:49 -07:00
Joffrey F 803b37bc2e assertRaises 2.6 compat 2015-04-22 15:19:01 -07:00
Joffrey F 84fdd2925d Add tests for ulimits 2015-04-22 15:13:38 -07:00
Yuval Kohavi 605fc7e04f line length
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-04-11 07:20:43 -05:00
Yuval Kohavi b33052b393 python 2.6 compatible
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-04-11 07:17:28 -05:00
Yuval Kohavi 278e801b89 Adding port utils to split port ranges
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-04-03 17:23:50 +03:00
Aanand Prasad b1a858a14d Update resolve_authconfig to bring it in line with Docker client
Instead of expanding the registry name we're looking for to a full URL,
strip entries in the authconfig down to just the hostname.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-02-27 13:10:20 +00:00
Joffrey F 40770878ad Additional tests and small improvement to auth.resolve_authconfig 2015-02-01 15:36:56 -08:00
Joffrey F 2218dbaa67 Use create_host_config in start (unifying parameter processing) 2014-12-18 18:03:27 -08:00
Joffrey F e992a8127d assertEquals -> assertEqual 2014-12-17 11:44:51 -08:00
Joffrey F ba7fab1709 Changed assertIn to assertTrue(... in ...) (2.6 support) 2014-11-03 20:49:44 +01:00
Joffrey F c4bb57286a Merge branch 'filters' of github.com:irachex/docker-py into irachex-filters
Conflicts:
	docker/utils/__init__.py
	docker/utils/utils.py
	tests/utils_test.py
2014-11-03 20:07:04 +01:00
Johan Euphrosine 74e7a67898 utils: add kwargs_from_env 2014-10-29 10:05:49 -07:00
Huayi Zhang 589e7006d5 Add support for filtering images and containers
[`filters` is a json encoded value of the filters (a map[string][string]) to process on the images list. ][1]
The tricky thing is that we must convert boolean value to string and any filter value to list to make a `map[string][string]` json format

[1]: https://docs.docker.com/reference/api/docker_remote_api_v1.14/#list-images
2014-10-05 23:18:48 +08:00
Joffrey F cf050d28a0 Implemented complete parse_host method to handle all accepted values of Client's base_url. Unit tests 2014-07-03 04:11:34 +02:00
Joffrey F de066a1ae6 Python, not Go 2014-06-17 03:21:42 +02:00
Luka Stojanovic 74499e21e4 make flake happy 2014-03-24 16:10:31 +01:00
Luka Stojanovic 030516eb29 parse_repository_tag function and accompanying test 2014-03-24 16:10:31 +01:00