mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
tests/functional: Add a helper function for retrieving the hostfwd port
It's just a wrapper around get_info_usernet_hostfwd_port from the qemu module that is also calling the right monitor command for retrieving the information from QEMU. Message-ID: <20241217121550.141072-2-thuth@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
a44b318fc4
commit
9fa4fc23e3
2 changed files with 10 additions and 5 deletions
|
@ -10,6 +10,13 @@
|
|||
|
||||
import os
|
||||
|
||||
from qemu.utils import get_info_usernet_hostfwd_port
|
||||
|
||||
|
||||
def get_usernet_hostfwd_port(vm):
|
||||
res = vm.cmd('human-monitor-command', command_line='info usernet')
|
||||
return get_info_usernet_hostfwd_port(res)
|
||||
|
||||
"""
|
||||
Round up to next power of 2
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue