mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 17:57:34 +03:00
connection: Explicitly error if domain listing APIs are not supported
This will be more important when we drop old domain polling APIs, because it will be more likely we encounter an old libvirt or weird connection without the expected API support Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
1aff5a611e
commit
4147f760e8
@ -950,6 +950,10 @@ class vmmConnection(vmmGObject):
|
||||
log.debug("conn version=%s", self._backend.conn_version())
|
||||
log.debug("%s capabilities:\n%s", self.get_uri(), self.caps.get_xml())
|
||||
|
||||
if not self.support.conn_domain():
|
||||
raise RuntimeError("Connection does not support required "
|
||||
"domain listing APIs")
|
||||
|
||||
if not self.support.conn_storage():
|
||||
log.debug("Connection doesn't seem to support storage APIs.")
|
||||
if not self.support.conn_network():
|
||||
|
@ -227,13 +227,17 @@ class SupportCache:
|
||||
self._cache = {}
|
||||
self._virtconn = virtconn
|
||||
|
||||
conn_domain = _make(
|
||||
function="virConnect.listDomainsID", run_args=())
|
||||
conn_storage = _make(
|
||||
function="virConnect.listStoragePools", run_args=())
|
||||
conn_nodedev = _make(
|
||||
function="virConnect.listDevices", run_args=(None, 0))
|
||||
conn_network = _make(function="virConnect.listNetworks", run_args=())
|
||||
conn_network = _make(
|
||||
function="virConnect.listNetworks", run_args=())
|
||||
conn_interface = _make(
|
||||
function="virConnect.listInterfaces", run_args=())
|
||||
|
||||
conn_stream = _make(function="virConnect.newStream", run_args=(0,))
|
||||
conn_listalldomains = _make(
|
||||
function="virConnect.listAllDomains", run_args=())
|
||||
|
Loading…
x
Reference in New Issue
Block a user