Implement extends
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
5dca6c232e
commit
4c582e4352
11 changed files with 421 additions and 28 deletions
|
|
@ -3,7 +3,7 @@ from __future__ import absolute_import
|
|||
import logging
|
||||
|
||||
from functools import reduce
|
||||
from .config import ConfigurationError
|
||||
from .config import get_service_name_from_net, ConfigurationError
|
||||
from .service import Service
|
||||
from .container import Container
|
||||
from docker.errors import APIError
|
||||
|
|
@ -11,17 +11,6 @@ from docker.errors import APIError
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_service_name_from_net(net_config):
|
||||
if not net_config:
|
||||
return
|
||||
|
||||
if not net_config.startswith('container:'):
|
||||
return
|
||||
|
||||
_, net_name = net_config.split(':', 1)
|
||||
return net_name
|
||||
|
||||
|
||||
def sort_service_dicts(services):
|
||||
# Topological sort (Cormen/Tarjan algorithm).
|
||||
unmarked = services[:]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue