Updated openstack/openstack
Project: openstack/nova  99fa1d1d746ec85825dd2a709ad08bdb045ba9c5

libvirt: remove flawed get_num_instances method impl

The get_num_instances method impl simply asks libvirt
how many running domains there are. This is flawed for
a number of reasons.

 - It doesn't filter out 'Domain-0' on Xen
 - It doesn't count inactive instances

As a result the value is returns is inconsistent with
the number of instances shown by 'list_instances'.
This will cause the _sync_power_states method in the
compute manager to constantly try to re-sync the list
of instances.

Remove the flawed impl and just allow the base class
default impl to be used. This just does a len() call
over the return of 'list_instances'. Previously this
was quite a heavy API call, but with new enough libvirt
it can be completed in a single API call which should
be fine.

Blueprint: libvirt-domain-listing-speedup
Change-Id: I96242717afa5c928f1cfb5f307b71739f2147e69