Skip to content

Commit

Permalink
utils_net:Add ip cmd option to get_remote_host_net_ifs
Browse files Browse the repository at this point in the history
Signed-off-by: Haijiao Zhao <[email protected]>
  • Loading branch information
chloerh committed Nov 22, 2024
1 parent 02c3e87 commit 76877df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virttest/utils_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ def get_sorted_net_if():
return (phy_interfaces, vir_interfaces)


def get_remote_host_net_ifs(session, state=None):
def get_remote_host_net_ifs(session, state=None, ip_options=""):
"""
Get all network interfaces of remote host and sort them as physical
and virtual interfaces.
Expand All @@ -1476,7 +1476,7 @@ def get_remote_host_net_ifs(session, state=None):
"""
phy_interfaces = []
vir_interfaces = []
cmd = "ip link"
cmd = f"ip {ip_options} link"
if not state:
state = ".*"
cmd_output = session.cmd_status_output(cmd)
Expand Down

0 comments on commit 76877df

Please sign in to comment.