Commit Graph

27 Commits

Author SHA1 Message Date
Aarni Koskela d50cc429c2 Enable Ruff I (import sort), autofix
Signed-off-by: Aarni Koskela <akx@iki.fi>
2024-01-03 21:28:56 +02:00
Milas Bowman 8b9ad7807f Merge branch 'ruffify'
Manually merging #3126.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-08-15 09:58:21 -04:00
Aarni Koskela 0566f1260c Fix missing asserts or assignments
Signed-off-by: Aarni Koskela <akx@iki.fi>
2023-08-15 13:36:53 +03:00
Chris Hand fc86ab0d85
swarm: add support for DataPathPort on init (#2987)
Adds support for setting the UDP port used for VXLAN traffic between
swarm nodes

Signed-off-by: Chris Hand <dexteradeus@users.noreply.github.com>
2022-08-12 09:58:57 -04:00
Anthony Sottile 5fcc293ba2 use python3.6+ constructs
Signed-off-by: Anthony Sottile <asottile@umich.edu>
2021-07-05 18:30:07 -04:00
Sebastiaan van Stijn 1126ea9d6f
xfail test_init_swarm_data_path_addr
This test can fail if `eth0` has multiple IP addresses;

   E   docker.errors.APIError: 400 Client Error: Bad Request ("interface eth0 has more than one IPv6 address (2001:db8:1::242:ac11:2 and fe80::42:acff:fe11:2)")

Which is not a failiure, but depends on the environment that
the test is run in.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-12 22:50:35 +02:00
Hannes Ljungberg 532c62ee51 Add support for rotate_manager_unlock_key
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 11:45:20 +02:00
Joffrey F 4d62dd0a64
Merge pull request #2296 from hannseman/swarm-init-response
Return node id on swarm init
2019-05-01 02:29:30 -07:00
Hannes Ljungberg c7b9cae0a0 Add swarm support for data_addr_path
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 10:24:50 +02:00
Hannes Ljungberg acd7a8f430 Return node id on swarm init
Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
2019-05-01 10:24:02 +02:00
Barry Shapira d6cc972cd9 Split monolithic integration tests into individual tests.
The integration tests require restarting the swarm once for each
test.  I had done so manually with self.init_swarm(force_new_cluster=True)
but that wasn't resetting the swarm state correctly.  The usual
test teardown procedure cleans up correctly.

Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
2019-03-22 10:40:27 +01:00
Barry Shapira 781dc30ad4 Check API version before setting swarm addr pool.
Also corrected a documentation error: the default API version from
constants is currently 1.35, not 1.30 as was sometimes listed.

Signed-off-by: Barry Shapira <barry@whiterabbit.ai>

Removed accidental whitespace.

Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
2019-03-22 10:40:27 +01:00
Barry Shapira 5d69a0a62e Added arguments to creeate a swarm with a custom address pool and subnet size.
Signed-off-by: Barry Shapira <barry@whiterabbit.ai>
2019-03-22 10:38:13 +01:00
Joffrey F 94aa9a89f7 Update tests to properly dispose of client instances in tearDown
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-01 15:24:22 -07:00
Joffrey F 58c02ca963
Merge pull request #1798 from docker/unlock_swarm_support
Unlock swarm support
2017-11-20 16:58:17 -08:00
Sebastiaan van Stijn e6cc3c1540
Remove test_update_swarm_name
Docker currently only supports the "default" cluster
in Swarm-mode, and an upcoming SwarmKit release
will produce an error if the name of the cluster
is updated, causing the test to fail.

Given that renaming the cluster is not supported,
this patch removes the test

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-11-14 02:47:49 +01:00
Joffrey F 3bd053a4b7 Add unlock methods to Swarm model
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:44:54 -08:00
Joffrey F aa3c4f026d Add unlock_swarm and get_unlock_key to APIClient
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:19:07 -08:00
Joffrey F ecca6e0740 Update SwarmSpec to include new parameters
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-07 15:18:26 -08:00
Joffrey F 11a260225c Update SwarmSpec to include new parameters
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-03 16:01:33 -07:00
allencloud 41aae65ab2 update swarm remove test status code from 500 to >= 400
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-05-18 10:06:58 +08:00
allencloud 717459db0e update docker-py test status code from 500 to 400
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-05-13 09:31:42 +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 48c5cd82fc Prevent Swarm address conflicts
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-08 14:50:05 -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
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 9daa320454
Rename Client to APIClient
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 17:03:03 +00:00