Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions virttest/libvirt_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
test_setup,
utils_logfile,
utils_misc,
utils_net,
utils_package,
utils_selinux,
virsh,
Expand Down Expand Up @@ -939,7 +940,12 @@ def add_nic(help_text, nic_params):
else:
# newer libvirt (--network=mynet,model=virtio,mac=00:11)
if nettype != "user":
br_name = utils_net.find_bridge_manager(netdst)
if br_name is None:
raise exceptions.TestError(f"Bridge '{netdst}' does not exist")
result += "=%s" % netdst
if "OpenVSwitch" in br_name.__class__.__name__:
result += ",virtualport_type=openvswitch"
if nettype and nic_model: # only supported along with nettype
result += ",model=%s" % nic_model
if nettype and mac:
Expand Down
Loading