Ensure that headers are utf8, not unicode

Although the api.openstack.wsgi.ResponseObject converted the headers to
utf8 strings to comply with RFC for HTTP this was not enough, since some
responses that contained unicode strings were returned, causing an error
when running nova behind an http server like Apache. This change ensures
that headers are always an utf8 encoded string.

Closes-Bug: 1254017

Change-Id: I980326f1f15907bf57060acdd132011254289079
Allow run_image_cache_manager_pass to hit db slave

Deployments that have a slave_connection configured can offload
read queries there. For deployments with no slave behavior
remains the same.

Change-Id: Ic443913883d80bdbc95385f8d3e21c0d855bb7db
Partially-implements: blueprint periodic-tasks-to-db-slave
Define "supported_instances" for fake compute

Allow fake computes to deploy images with hypervisor_type
defined and set to "fake" and by extension to be used in
multi hypervisor_type deployments.
Mixing fake and "real" computes on the same OpenStack
deployment allows to create many fake instances and some
working instances for testing applications on top of
OpenStack (ie: fake instances for stress tests, working
ones for functional tests).

Closes-bug: #1260771
Change-Id: Idc337c4a7ed024f236ca2b60d91e2c30f7d54536
Remove copyright from empty files in nova

Sync I9043bf2f646de880afccbb64e47b257aba3ca599 to nova

According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.

Change-Id: Id194e118dfdd140fda4fd00d2398d7818d590257
Partial-Bug: #1262424
Use block_device_info at post_live_migration_at_destination

post_live_migration_at_destination make libvirt.xml to destination
host. when execute (live) block migration for vm made by bootable
volume, method post_live_migration_at_destination write a
libvirt.xml in destination host.
but it missed block disk information so moved libvirt.xml always
has a wrong disk information.
I add block_device_info in blockinfo.get_disk_info at
post_live_migration_at_destination.
This change will make libvirt.xml with valid block disk information.

Change-Id: I31b3f2ef5f03f9ef61524bdb7ae089b18e4cd254
Closes-Bug: 1271780
VMware: Only include connected hosts in cluster stats

Currently the driver includes all hosts connected to VC
(including disconnected hosts) when calculating available
vcpus. The patch enforces that the reported available stats
only include resources of hosts that are connected to the
VC.

Note: A host can be connected to a VC, but have a disconnected
host state

Change-Id: Iba9d80f894cc2b7471a7f9c87b7367fd93bacb48
Closes-Bug: 1257998
Remove trace XML from unittests

Removes some trace bits of XML test classes
from the unitests

Part of blueprint remove-v3-xml-api

Change-Id: I8d87cc1e3331c5ea135702ae4e03788ff2841642
Remove V3 API XML entry points

Removes the entry points defined in setup.cfg for
the V3 API XML. These are no longer called.

Partially implements blueprint remove-v3-xml-api

Change-Id: I1fd516b5a01f1ce2b4d42320594616a49b66952d
Adds lock server extension for V3 API

Moves the lock/unlock server functionality out of admin_actions into
its own extension. This part of the larger
blueprint v3-api-admin-actions-split allows more selective enablement of
features contained in the admin actions extension.

Some setup work is done in the tests directory with an
admin_only_action_common.py file. This allows tests which are
split out from test_admin_actions (as their corresponding features
are separated from the admin_actions extension) can continue to
share code.

Note that XML api samples are no longer generated because
bp remove-v3-xml-api has been approved.

Partially implements bp v3-api-admin-actions-split
DocImpact: Adds os-lock-server extension and moves lock/unlock
functionality out of os-admin-actions into this new extension

Change-Id: Ie4b6e856c2f5c33de5575aa8666e0b2784b58d05
Revert "Allow deleting instances while uuid lock is held"

This reverts commit 05f4f7170ab67c20e7f7b3f9f304ccc7ca163490.

We're seeing a huge increase in the occurrence of bug 1258848 since
this patch merged.  This patch effectively allows a delete to occur,
even if the creation hasn't finished yet, which would explain the race
we're seeing leading to the new flood of these errors.

Related-bug: #1258848
Change-Id: I6e44ac788426ba41f1674a5df3d04300eb7c05cc
Merge "Remove copyright from empty files in nova"
Merge "Revert "Allow deleting instances while uuid lock is held""
Merge "VMware: Only include connected hosts in cluster stats"
Merge "Ensure that headers are utf8, not unicode"
Merge "Allow run_image_cache_manager_pass to hit db slave"
Merge "Define "supported_instances" for fake compute"
Merge "Remove V3 API XML entry points"
Merge "Remove trace XML from unittests"
Merge "Use block_device_info at post_live_migration_at_destination"
Merge "Adds lock server extension for V3 API"