Move parsing of volumes_from to the last step of config parsing.

Includes creating a new compose.config.types module for all the domain objects.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-11-13 18:20:09 -05:00
commit 068edfa313
9 changed files with 74 additions and 45 deletions

View file

@ -1,4 +1,5 @@
from .. import unittest
from compose.config.types import VolumeFromSpec
from compose.project import DependencyError
from compose.project import sort_service_dicts
@ -73,7 +74,7 @@ class SortServiceTest(unittest.TestCase):
},
{
'name': 'parent',
'volumes_from': ['child']
'volumes_from': [VolumeFromSpec('child', 'rw')]
},
{
'links': ['parent'],
@ -116,7 +117,7 @@ class SortServiceTest(unittest.TestCase):
},
{
'name': 'parent',
'volumes_from': ['child']
'volumes_from': [VolumeFromSpec('child', 'ro')]
},
{
'name': 'child'
@ -141,7 +142,7 @@ class SortServiceTest(unittest.TestCase):
},
{
'name': 'two',
'volumes_from': ['one']
'volumes_from': [VolumeFromSpec('one', 'rw')]
},
{
'name': 'one'