Use networking for version 2 Compose files
- Remove --x-networking and --x-network-driver - There's now no way to set a network driver - this will be added back with the 'networks' key Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
1a66543461
commit
a027a0079c
9 changed files with 49 additions and 36 deletions
|
|
@ -36,14 +36,21 @@ class DockerClientTestCase(unittest.TestCase):
|
|||
all=True,
|
||||
filters={'label': '%s=composetest' % LABEL_PROJECT}):
|
||||
self.client.remove_container(c['Id'], force=True)
|
||||
|
||||
for i in self.client.images(
|
||||
filters={'label': 'com.docker.compose.test_image'}):
|
||||
self.client.remove_image(i)
|
||||
|
||||
volumes = self.client.volumes().get('Volumes') or []
|
||||
for v in volumes:
|
||||
if 'composetest_' in v['Name']:
|
||||
self.client.remove_volume(v['Name'])
|
||||
|
||||
networks = self.client.networks()
|
||||
for n in networks:
|
||||
if 'composetest_' in n['Name']:
|
||||
self.client.remove_network(n['Name'])
|
||||
|
||||
def create_service(self, name, **kwargs):
|
||||
if 'image' not in kwargs and 'build' not in kwargs:
|
||||
kwargs['image'] = 'busybox:latest'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue