Remove unused elevated context param from quota helper methods

The elevated context being passed to the _quota_usage_create and
_reservation_create methods is not used, so remove it from the formal
parameter list of those methods and related usage.

This is part of a larger series to refactor the quota_reserve method.

Partial-Bug: #1369605

Change-Id: I50749402177eda29ae006ec4fd11a9a8125765ec
VMware: Remove class orphaned by ESX driver removal

HostState was only used by the ESX driver, which was removed in
change I718fc0ee67dbd625af00c20fa4e34b8a35015437.

Also remove LOG, which is no longer used following previous removals.

Change-Id: I22e30c01e5b5219df858219dc1fda335a83ad225
VMware: Remove VMwareImage.file_size_in_gb

file_size_in_gb was rounding down. This is counter intuitive, as a
512MB disk is reported as 0GB. However, this rounding weirdness was
required for correctness in a way which wasn't obvious. When we test
if an image needs to be resized, we test instance.root_gb >
image.file_size_in_gb. Because file_size_in_gb was rounded down, an
image slightly smaller than 1GB will be reported as 0GB and therefore
resized.

The source of the rounding confusion is the bytes->gb conversion. To
make the code more obviously correct, I have switched it to instead
convert gb->bytes, which does not involve rounding. To ensure this
never trips anybody up, I have removed file_size_in_gb.

Change-Id: I99d20e3b1383e29cddff3d1016c4bcedc1683c4d
Remove xmlutils module

The xmlutils module is being removed from oslo-incubator as it's not
useful anymore. Various fixes have been integrated into the base XML
module provided by Python now.

See
http://lists.openstack.org/pipermail/openstack-dev/2014-September/047368.html
for details.

Change-Id: Iefa1a5a4d08a3cfc43b3c9764fc2d35c328a19e3
Remove websocketproxy workaround

Now that we require websockify >= 0.6 we can remove the workaround code
as pointed out in the TODO.

Change-Id: I05dd6edba00264f22d868b4318ad7a4fb621c996
Cleanup _convert_block_devices

_convert_block_devices was instantiating 2 objects for every 1
returned due to the _is_transformable test. This change simplifies the
code by removing the nested function, and at the same time does the
conversion in a single pass, which is more efficient.

Change-Id: Id6b583a1c08d684fcff073dd0289be8e3919ba0a
Remove indexes that are prefix subsets of other indexes

Both MySQL and PostgreSQL can efficiently optimize queries using
indexes that use the prefix columns of the index. This means that
an index that covers columns (a, b, c) can be used to optimize
a query with the statement 'WHERE a = 1 and b = 9'.

Nova has indexes which are a prefix subset of other indexes. The
database servers can use the suffix superset indexes and the prefix
subset indexes just add extra overhead to inserts and updates.

instances_host_deleted_idx (host, deleted) is a prefix subset of
instances_host_deleted_cleaned_idx (host, deleted, cleaned)

iscsi_targets_host_idx (host) is a prefix subset of
iscsi_targets_host_volume_id_deleted_idx (host, volume_id, deleted)

Change-Id: I397c7f1ba9ab95a99f13c9ec6e838ae63987870b
Add VIR_ERR_CONFIG_UNSUPPORTED to fakelibvirt

Commit 867bdedf81533f283aae4de4488d54c254bb7f07 added a test that raises
an exception using the libvirt VIR_ERR_CONFIG_UNSUPPORTED error code but
missed adding that to fakelibvirt, so the test won't work if you don't
have libvirt installed.

This simply adds the constant to fakelibvirt.

Closes-Bug: #1376363

Change-Id: I909608a7f1a8b5ee407b1d01896bc9db1adcee4e
Remove the nova-manage flavor sub-command

The nova-manage flavor sub-command was deprecated in Juno milestone-1
via commit a601556684f18059e478ba645aff8276c9c78a4a with a note that it
will be removed in Kilo.

This removes it.

Change I4e2399f2fbab2c20299dd62c104b9220c1d36fb2 is to remove the
related Tempest tests.

Change-Id: I1798c8a0697009b3dcebeb818580c8323880e395
Merge "Remove websocketproxy workaround"
Merge "Cleanup _convert_block_devices"
Destroy orig VM during resize if triggered by user

Patch I7598afbf0dc3c527471af34224003d28e64daaff introduces a
Minesweeper failure, due to the fact that it doesn't distinguish
between destroy operation triggered by the user and by the revert
resize.

This patch fixes the issue by checking the task state. If the task
state is revert_resize, the original VM doesn't get deleted.

Closes-Bug: #1376492

Change-Id: Idb9ac6c1ec5dcea52ce8e028f5cce08da1779321
Merge "Remove the nova-manage flavor sub-command"
Merge "VMware: Remove VMwareImage.file_size_in_gb"
Merge "VMware: Remove class orphaned by ESX driver removal"
Merge "Remove xmlutils module"
Merge "Remove unused elevated context param from quota helper methods"
Merge "Add VIR_ERR_CONFIG_UNSUPPORTED to fakelibvirt"
Merge "Destroy orig VM during resize if triggered by user"
Adds missing exception handling in resize and rebuild servers API

Adds handling of NoValidHost and AutoDiskConfigDisabledByImage in
resize and rebuild of the V3 servers API. This has already been
fixed in the V2 API.

Change-Id: I5a5519f87bb220d6821e959f36dc5b36ffe9cc2d