Skip to content
Snippets Groups Projects
Commit 5eb5b6c7a0bb authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:ambulance: fix detection and handling of the host-network flag

parent 399f89012e0c
No related branches found
No related tags found
No related merge requests found
......@@ -243,9 +243,10 @@
network_group.add_argument(
'--host-network',
help="Use host network [default: %(default)s]",
action='store_false',
action='store_true',
default=True,
)
network_group.add_argument(
'--docker-network',
help=("Use docker network (works better with"
" python-netifaces installed) [default: %(default)s]"),
......@@ -247,9 +248,11 @@
)
network_group.add_argument(
'--docker-network',
help=("Use docker network (works better with"
" python-netifaces installed) [default: %(default)s]"),
action='store_true',
action='store_false',
dest='host_network',
default=False,
)
parser.add_argument(
'--no-dev',
......@@ -323,6 +326,7 @@
db_user = nmspc.db_user
db_password = nmspc.db_password
use_host_network = nmspc.host_network
_logger.debug('Use host network: %s', str(use_host_network))
start_postgresql = nmspc.start_postgresql
run_flake8 = nmspc.flake8
run_isort = nmspc.isort
......@@ -854,6 +858,7 @@
):
_logger.debug('%s Container already running', fusion_name)
remove_and_stop(docker_client, fusion_name)
# TODO handle --host-network option
port_bindings = {8765: host_fusion_port}
host_config = docker_client.create_host_config(
binds=[],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment