Merge lp:~soren/nova/libvirt-reconnect into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: Soren Hansen
Approved revision: 260
Merged at revision: 264
Proposed branch: lp:~soren/nova/libvirt-reconnect
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
nova/virt/libvirt_conn.py (+1/-1)
To merge this branch: bzr merge lp:~soren/nova/libvirt-reconnect
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Jay Pipes (community) Approve
Review via email: mp+34171@code.launchpad.net

Commit message

Call getInfo() instead of getVersion() on the libvirt connection object. virConnectGetVersion was not exposed properly in the python bindings until quite recently, so this makes us rather more backwards compatible.

Description of the change

getInfo() turns out to be a better (as in more backwards compatible) ping than getVersion().

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

lgtm.

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/virt/libvirt_conn.py'
2--- nova/virt/libvirt_conn.py 2010-08-30 12:50:50 +0000
3+++ nova/virt/libvirt_conn.py 2010-08-31 08:18:41 +0000
4@@ -91,7 +91,7 @@
5
6 def _test_connection(self):
7 try:
8- self._wrapped_conn.getVersion()
9+ self._wrapped_conn.getInfo()
10 return True
11 except libvirt.libvirtError as e:
12 if e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR and \