alexrecuenco
4d3d9f64b9
Removed Python2 support
...
Closes : #6890
Some remarks,
- `# coding ... utf-8` statements are not needed
- isdigit on strings instead of a try-catch.
- Default opening mode is read, so we can do `open()` without the `'r'` everywhere
- Removed inheritinng from `object` class, it isn't necessary in python3.
- `super(ClassName, self)` can now be replaced with `super()`
- Use of itertools and `chain` on a couple places dealing with sets.
- Used the operator module instead of lambdas when warranted
`itemgetter(0)` instead of `lambda x: x[0]`
`attrgetter('name')` instead of `lambda x: x.name`
- `sorted` returns a list, so no need to use `list(sorted(...))`
- Removed `dict()` using dictionary comprehensions whenever possible
- Attempted to remove python3.2 support
Signed-off-by: alexrecuenco <alejandrogonzalezrecuenco@gmail.com>
2020-08-11 17:45:13 +07:00
Bastian Venthur
e8424d5ae0
Removed Python2 support
...
Closes : #6890
Signed-off-by: Bastian Venthur <bastian.venthur@flixbus.com>
2020-06-03 17:37:47 +02:00
Danil Kister
a5fbf91b72
Prevent KeyError when remote network labels are None.
...
Signed-off-by: Danil Kister <danil.kister@gmail.com>
2019-09-05 21:36:10 +02:00
Inconnu08
99e67d0c06
fix warning method is deprecated with tests
...
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-05-15 23:46:12 +06:00
Joffrey F
707e21183f
Fix config hash consistency with unprioritized networks
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-08-07 16:51:01 -07:00
Joffrey F
faa532c315
Merge pull request #5896 from docker/5874-legacy-proj-name
...
Retrieve objects using legacy (< 1.21) project names
2018-04-24 16:41:42 -07:00
Joffrey F
3b2ce82fa1
Use true_name for remove operation
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-24 16:19:38 -07:00
Joffrey F
c1657dc46a
Improve legacy network and volume detection
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-24 16:05:12 -07:00
Joffrey F
299ce6ad00
Incorrect key name for IPAM options check
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-23 18:16:58 -07:00
Joffrey F
4dece7fcb2
Retrieve objects using legacy (< 1.21) project names
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-23 17:30:08 -07:00
Joffrey F
344003a2f9
Ignore NotFound for external overlay networks
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-28 16:49:00 -07:00
Joffrey F
d63500a191
Move priority option to service network reference
...
Add ordering to networks.get_networks
Fix priority test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-11 18:48:56 -08:00
Zal Daroga
55ee95b6d0
Fixed network priorities. Resolves #5042
...
Signed-off-by: Zal Daroga <zaldaroga@yahoo.com>
2018-01-11 17:29:29 -08:00
Zal Daroga
f50e1a8c2d
Added prioritization of networks
...
Signed-off-by: Zal Daroga <zaldaroga@yahoo.com>
2018-01-11 17:29:29 -08:00
Joffrey F
8155ddc7ad
Add support for custom names for networks, secrets, configs
...
Finalize v3.5 schema
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-06 16:48:14 -08:00
Drew Romanyk
60f818e548
Add ipam default driver, fixes #5248
...
Signed-off-by: Drew Romanyk <drewiswaycool@gmail.com>
2017-11-30 10:59:25 -06:00
Joffrey F
f965d2b374
Add check_duplicate=True when creating network
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-16 16:30:39 -07:00
Kirin Rastogi
103f7963c4
Add exclusion for networkname
...
Signed-off-by: Kirin Rastogi <kirin.Rastogi@avg.com>
Signed-off-by: Kirin Rastogi <rastogikirin@gmail.com>
2017-07-25 14:11:54 -07:00
Joffrey F
2ba9cd73d1
Network label mismatch now prints a warning instead of raising an error
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-05-23 15:26:17 -07:00
Michael Friis
f3d09df19b
add exception for windows networking
...
Signed-off-by: Michael Friis <friism@gmail.com>
2017-05-04 18:15:37 -07:00
Joffrey F
d0acefd450
Prevent NoneType error when remote IPAM options is None
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-26 13:34:45 -07:00
Joffrey F
843a0d82a0
Add support for IPAM options in v2 format
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-10 12:24:05 -07:00
Joffrey F
963b672cbd
Ensure network config matches remote for all properties
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-13 15:48:38 -07:00
Joffrey F
ba47fb99ba
Add default labels to networks and volumes created by Compose
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-19 20:43:35 -08:00
Joffrey F
e736151ee4
Make created networks attachable for file format >=2.1
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-16 12:23:24 -08:00
Joffrey F
04e5925a23
Use docker SDK 2.0
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-14 15:36:08 -08:00
Joffrey F
7f60ff5ae6
Avoid breaking when remote driver options are null.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-15 12:00:52 -08:00
Joffrey F
4aa7d15d97
Call check_remote_network_config from Network.ensure
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-04 10:51:14 -07:00
Joffrey F
ba43d08fbd
Add whitelisted driver option added by the overlay driver to avoid breakage
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-01 11:47:12 -07:00
Joffrey F
cd94c37f5d
Fix merge error (missing Network.labels attribute)
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-18 14:09:31 -07:00
Joffrey F
14716bc2da
Merge branch 'master' of https://github.com/dbdd4us/compose into dbdd4us-master
2016-10-17 14:09:09 -07:00
dbdd
bdcce13f4a
add support for creating volume and network with label definition
...
Signed-off-by: dbdd <wangtong2712@gmail.com>
2016-10-12 10:35:14 +08:00
Joffrey F
e5ded6ff9b
Add support for enable_ipv6 in network definition.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-06 15:49:08 -07:00
Jonathan Giannuzzi
83f35e132b
Add support for creating internal networks
...
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-07-11 11:34:01 +02:00
Daniel Nephin
e5529a89e1
Make down idempotent, continue to remove resources if one is missing.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:26:29 -04:00
Matt Daue
ee136446a2
Fix #2804 : Add ipv4 and ipv6 static addressing
...
- Added ipv4_network and ipv6_network to the networks section in the
service section for each configured network
- Added feature documentation
- Added unit tests
Signed-off-by: Matt Daue <mattdaue@gmail.com>
2016-03-09 18:37:52 -05:00
Joffrey F
7152f7ea76
Handle mismatched network formats in config files
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:24:41 -08:00
Joffrey F
825a0941f0
Network aliases are now part of the network dictionary
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:23:47 -08:00
Joffrey F
2b5d3f51cb
Allow user to specify custom network aliases
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:23:46 -08:00
Daniel Nephin
e551988616
Include networks in the config_hash.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:52:03 -05:00
Daniel Nephin
0810eeba10
Don't initialize networks that aren't used by any services.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:52:03 -05:00
Daniel Nephin
8e838968fe
Refactor project network initlization.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:51:31 -05:00
Aanand Prasad
afae365050
Allow custom ipam config
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-18 18:56:18 +00:00
Aanand Prasad
53d56ea245
Quote network names in error messages
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-18 16:15:52 +00:00
Daniel Nephin
0f234154c2
Remove all non-external networks on down.
...
Also moves the shutdown test fixtures to be a more general v2-full fixture.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-14 18:28:17 -05:00
Aanand Prasad
73fbd01cfe
Support the 'external' option for networks
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 18:00:39 +00:00
Aanand Prasad
3eafdbb01b
Connect services to networks with the 'networks' key
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 17:59:37 +00:00
Aanand Prasad
69ed5f9c48
Specify networks in Compose file
...
There's not yet a proper way for services to join networks
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 17:59:36 +00:00