Network aliases are now part of the network dictionary

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-02-18 12:04:07 -08:00 • committed by Daniel Nephin
commit e5689afe4c
7 changed files with 54 additions and 82 deletions

View file

@ -5,13 +5,11 @@ services:
image: busybox
command: top
networks:
- front
- back
network_aliases:
front:
- forward_facing
- ahead
aliases:
- forward_facing
- ahead
back:
networks:
front: {}

View file

@ -543,27 +543,6 @@ class ConfigTest(unittest.TestCase):
assert services[1]['name'] == 'db'
assert services[2]['name'] == 'web'
def test_invalid_network_alias(self):
config_details = build_config_details({
'version': '2',
'services': {
'web': {
'image': 'busybox',
'networks': ['hello'],
'network_aliases': {
'world': ['planet', 'universe']
}
}
},
'networks': {
'hello': {},
'world': {}
}
})
with pytest.raises(ConfigurationError) as exc:
config.load(config_details)
assert 'not declared in the networks list' in exc.exconly()
def test_config_build_configuration(self):
service = config.load(
build_config_details(