Updated openstack/openstack
Project: openstack/nova  3955d1811a5dfa5bbe5a27d37d8eaf4c5e307f04

libvirt: fix recent test changes to work on libvirt < 0.9.13

The newly used 'listAllDomains' method was only introduced in
libvirt 0.9.13. Although the driver code was written to cope
with older libvirt, the test suite code itself would fail
when faced with such an old libvirt because it was trying to
mock out methods which did not exist.

The fix here recognises that since '_list_instance_domains_fast'
and '_list_instance_domains_slow' both have explicit test cases,
there is no point in mocking out the low level 'listAllDomains'
method in all the other test cases. Instead we can mock out
the much higher level '_list_instance_domains' which means we
avoid any interaction with libvirt in these test cases. The
opportunity is taken to convert the tests in question to use
'mock' instead of 'mox' since it also simplifies the code.

Finally in the test for '_list_instance_domains_fast' simply
skip the test if libvirt is too old to have the required
constants defined.

Closes-bug: 1341729
Change-Id: I554352ea14e6b3306176e7524502e005cebd8c16
Updated openstack/openstack
Project: openstack/oslo.db  935df6f0d27541a6d9bf9ac6384ec120db5dd04f

Move all db exception to exception.py

Moving InvalidSortKey, ColumnError  from oslo/db/sqlalchemy/utils.py to
oslo/db/exception.py for ease of use.
Add references in utils.py to exception py for backwards compatibility.

Change-Id: I38595d6bcceee84ef0ca7d88dae5617c006ba8c1