Skip to content

Commit

Permalink
Also allow not setting bridge parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Mar 8, 2024
1 parent 0fb6b40 commit 6d8c1da
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions koan/virtinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ def _sanitize_nics(nics, bridge, profile_bridge, network_count):
if not bridge:
intf_bridge = intf["virt_bridge"]
if intf_bridge == "":
if profile_bridge == "":
raise InfoException("virt-bridge setting is not defined in cobbler")
intf_bridge = profile_bridge
if profile_bridge != "":
intf_bridge = profile_bridge

else:
if bridge.find(",") == -1:
Expand All @@ -157,7 +156,8 @@ def _sanitize_nics(nics, bridge, profile_bridge, network_count):
bridges = bridge.split(",")
intf_bridge = bridges[counter]

ret.append((intf_bridge, mac))
if intf_bridge != "":
ret.append((intf_bridge, mac))

return ret

Expand Down Expand Up @@ -308,8 +308,9 @@ def build_commandline(
bridge = profile_data["virt_bridge"]

if bridge == "":
raise InfoException("virt-bridge setting is not defined in cobbler")
nics = [(bridge, None)]
nics = [('none', None)]
else:
nics = [(bridge, None)]

kernel = profile_data.get("kernel_local")
initrd = profile_data.get("initrd_local")
Expand Down

0 comments on commit 6d8c1da

Please sign in to comment.