Commit dcc2c894 authored by Stéphane Graber's avatar Stéphane Graber

lxd-bridge: Don't require a bridge name and implement support for domain name

parent 072510d7
......@@ -138,7 +138,9 @@ def bridge_to_debconf(bridge_cfg):
elif bridge_cfg.get("mode") == "new":
debconf["lxd/setup-bridge"] = "true"
debconf["lxd/bridge-name"] = bridge_cfg.get("name", "lxdbr0")
if bridge_cfg.get("name"):
debconf["lxd/bridge-name"] = bridge_cfg.get("name")
if bridge_cfg.get("ipv4_address"):
debconf["lxd/bridge-ipv4"] = "true"
debconf["lxd/bridge-ipv4-address"] = \
......@@ -163,6 +165,9 @@ def bridge_to_debconf(bridge_cfg):
debconf["lxd/bridge-ipv6-nat"] = \
bridge_cfg.get("ipv6_nat", "false")
if bridge_cfg.get("domain"):
debconf["lxd/bridge-domain"] = bridge_cfg.get("domain")
else:
raise Exception("invalid bridge mode \"%s\"" % bridge_cfg.get("mode"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment