Fixed bug 912701

Add an check to the list_instances method so that the domains whose ID
is 0 are not listed, since this is reserved in libvirt for hypervisors.

Refers to https://lists.launchpad.net/openstack/msg06699.html

Change-Id: I55f6f370cbaf8bd2254e08afad8b36d833726817
This commit is contained in:
Alvaro Lopez Garcia
2012-01-16 17:12:35 +01:00
parent 58a1c4d6fb
commit 4b0a0e76d0
2 changed files with 15 additions and 1 deletions

View File

@@ -433,7 +433,7 @@ class Connection(object):
self._uri = uri
self._vms = {}
self._running_vms = {}
self._id_counter = 0
self._id_counter = 1 # libvirt reserves 0 for the hypervisor.
self._nwfilters = {}
def _add_filter(self, nwfilter):