Skip to content

Commit

Permalink
libvirt: fix parsing libvirt version
Browse files Browse the repository at this point in the history
Properly parse libvirt version and return only the version information.

Signed-off-by: Praveen K Paladugu <[email protected]>
  • Loading branch information
praveen-pk committed Dec 20, 2024
1 parent d82157c commit 80b3f90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lisa/sut_orchestrator/libvirt/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,9 @@ def _get_libvirt_version(self) -> str:
if self.host_node:
result = self.host_node.execute("libvirtd --version", shell=True).stdout
result = filter_ansi_escape(result)
# Libvirtd returns version info as "libvirtd (libvirt) 10.8.0"
# From the return value, only return the version info
result = result.split()[-1]
return result

def _get_vmm_version(self) -> str:
Expand Down

0 comments on commit 80b3f90

Please sign in to comment.