Skip to content

Commit

Permalink
Merge pull request #6002 from smitterl/iface_bridge
Browse files Browse the repository at this point in the history
iface_bridge: make host interface configurable
  • Loading branch information
chloerh authored Dec 12, 2024
2 parents 76614d5 + ab182c3 commit 5a18980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions libvirt/tests/cfg/virtual_network/iface_bridge.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
vms = avocado-vt-vm1 vm2
bridge_name = "test_br0"
netdst_nic1 = ${bridge_name}
host_iface =
# Replace remote_ip by a actual IP address
remote_ip = "www.google.com"
ping_count = 3
Expand Down
4 changes: 3 additions & 1 deletion libvirt/tests/src/virtual_network/iface_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ def check_net_functions(guest_ip, ping_count, ping_timeout, guest_session, host_
filter_name = params.get("filter_name", "vdsm-no-mac-spoofing")
ping_count = params.get("ping_count", "5")
ping_timeout = float(params.get("ping_timeout", "10"))
iface_name = utils_net.get_net_if(state="UP")[0]
host_iface = params.get("host_iface")
iface_name = host_iface if host_iface else utils_net.get_default_gateway(
iface_name=True, force_dhcp=True).split()[0]
bridge_script = NETWORK_SCRIPT + bridge_name
iface_script = NETWORK_SCRIPT + iface_name
iface_script_bk = os.path.join(data_dir.get_tmp_dir(), "iface-%s.bk" % iface_name)
Expand Down

0 comments on commit 5a18980

Please sign in to comment.