Support driver_opts for networks

This commit is contained in:
Gagootron 2022-04-29 10:36:22 +02:00 committed by Muayyad Alsadi
parent 606b9d94c8
commit 814bd2a31a

View File

@ -718,6 +718,9 @@ def assert_cnt_nets(compose, cnt):
driver = net_desc.get("driver", None)
if driver:
args.extend(("--driver", driver))
driver_opts = net_desc.get("driver_opts", None) or {}
for key,value in driver_opts.items():
args.extend(("--opt",f"{key}={value}"))
ipam_config_ls = (net_desc.get("ipam", None) or {}).get(
"config", None
) or []