Skip to content

Commit

Permalink
guest_agent.py: Add new command 'gunetwork-get-route'
Browse files Browse the repository at this point in the history
Add a new guest agent command 'gunetwork-get-routeats' to
get route info of Guest.

Signed-off-by: Dehan Meng <demeng@redhat.com>
  • Loading branch information
6-dehan committed Aug 6, 2024
1 parent 1ac9a80 commit 804f87c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions virttest/guest_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,3 +1047,14 @@ def get_cpustats(self):
cmd = "guest-get-cpustats"
self.check_has_command(cmd)
return self.cmd(cmd)

def get_network_route(self):
"""
Get the network route of the guest by guest agent operation
:return: a list of network route info such as 'iface' and 'gateway'
'metric' and 'refcnt'...
"""
cmd = "guest-network-get-route"
self.check_has_command(cmd)
return self.cmd(cmd)

0 comments on commit 804f87c

Please sign in to comment.