fix features as int and network name
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Mathieu Broillet 2023-06-21 13:12:33 +02:00
parent eb997864e2
commit d6123581bc
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32

View File

@ -101,9 +101,8 @@ def generate_pct_command_for_lxc(lxc: LXC, create: bool = True):
] ]
# Check and include specific net0 parameters # Check and include specific net0 parameters
net0_params = [] net0_params = ["name=eth0"]
if lxc.network.get("name") and lxc.network.get("name") != "":
net0_params.append(f"name={lxc.network['name']}")
if lxc.network.get("bridge") and lxc.network.get("bridge") != "": if lxc.network.get("bridge") and lxc.network.get("bridge") != "":
net0_params.append(f"bridge={lxc.network['bridge']}") net0_params.append(f"bridge={lxc.network['bridge']}")
if lxc.network.get("firewall" and lxc.network.get("firewall") != ""): if lxc.network.get("firewall" and lxc.network.get("firewall") != ""):