Remove separate check for Xen
Module checked for Xen-based system, however since 'xen:///' URI support exists in 'libvirt', we should use it explicitly instead.
This commit is contained in:
parent
1fd1460d2f
commit
055a31ba07
1 changed files with 1 additions and 7 deletions
|
@ -202,13 +202,7 @@ class LibvirtConnection(object):
|
||||||
|
|
||||||
self.module = module
|
self.module = module
|
||||||
|
|
||||||
cmd = "uname -r"
|
conn = libvirt.open(uri)
|
||||||
rc, stdout, stderr = self.module.run_command(cmd)
|
|
||||||
|
|
||||||
if "xen" in stdout:
|
|
||||||
conn = libvirt.open(None)
|
|
||||||
else:
|
|
||||||
conn = libvirt.open(uri)
|
|
||||||
|
|
||||||
if not conn:
|
if not conn:
|
||||||
raise Exception("hypervisor connection failure")
|
raise Exception("hypervisor connection failure")
|
||||||
|
|
Loading…
Reference in a new issue