Don't initialize networks that aren't used by any services.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-01-29 16:00:50 -05:00 committed by Aanand Prasad
commit 3e8a4a5dc3
5 changed files with 31 additions and 18 deletions

View file

@ -565,6 +565,7 @@ class ProjectTest(DockerClientTestCase):
'name': 'web',
'image': 'busybox:latest',
'command': 'top',
'networks': ['foo', 'bar', 'baz'],
}],
volumes={},
networks={
@ -594,7 +595,11 @@ class ProjectTest(DockerClientTestCase):
def test_up_with_ipam_config(self):
config_data = config.Config(
version=V2_0,
services=[],
services=[{
'name': 'web',
'image': 'busybox:latest',
'networks': ['front'],
}],
volumes={},
networks={
'front': {