mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-01 04:58:27 +03:00
virtinst: log libvirt version numbers after connecting
The various version numbers reported by libvirt are all relevant pieces of information when debugging problem reports. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
01ff867f56
commit
92ba8e5d35
@ -214,10 +214,21 @@ def getConnection(uri, conn=None):
|
||||
# preopened connection passed in via test suite
|
||||
return conn
|
||||
|
||||
def format_version(num):
|
||||
log.debug(num)
|
||||
maj = int(num / 1000000)
|
||||
min = int(num / 1000) % 1000
|
||||
mic = num % 1000
|
||||
return "%s.%s.%s" % (maj, min, mic)
|
||||
|
||||
log.debug("Requesting libvirt URI %s", (uri or "default"))
|
||||
conn = VirtinstConnection(uri)
|
||||
conn.open(_openauth_cb, None)
|
||||
log.debug("Received libvirt URI %s", conn.uri)
|
||||
log.debug("Received libvirt URI %s versions library=%s driver=%s hypervisor=%s",
|
||||
conn.uri,
|
||||
format_version(libvirt.getVersion()),
|
||||
format_version(conn.getLibVersion()),
|
||||
format_version(conn.getVersion()))
|
||||
|
||||
return conn
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user