Fix inject_files for storing binary file.

Now a nova-api server decodes injected_files by base64 after receiving
encoded files from nova-client.
And the server fails to publish run_instance because utf8 codec can't
decode due to binary data.

This patch fixes this problem, because the base64 decode is operated when
a nova-compute server receives injected_files from a nova-api server.

Fixes bug 1112134

Change-Id: I664134c74893a970de4464161071692a5b2b5ce7
Move security_groups refreshes to conductor

This moves the last bit of compute-initiated db accesses found during
test runs to conductor. The quantum API was hitting the database directly
while calling back to compute's API to trigger the refresh. This just
makes the quantum API ask conductor to do that in a similar way to the
usage notifications patch recently merged.

Related to blueprint no-db-compute

Change-Id: I44de7e1e12aec291b8319d45ec5975ad05b8e676
Cells: Add cells support to instance_usage_audit_log api extension

Adds task_log_get_all() call to HostAPI() so that we can use the local
DB when cells is disabled or proxy via cells if cells is enabled.

Adds task_log_get_all() call to cells.

Change-Id: I9e78c17fcf70f98903d0a26c1de3e2581b8977ad
Cells: Add cells support to hypervisors extension

This removes the DB calls from the extension and moves them into
HostAPI().  The cells version of HostAPI() proxies them to the
appropriate cell or cells.

Change-Id: I17ff10e62d2f10b85a557edcc1509ca3b0d15a29
Merge Libvirt....VirtualPortDriver class into LibvirtGenericVIFDriver

The LibvirtOpenVswitchVirtualPortDriver VIF driver and the
LibvirtOpenVswitchDriver VIF driver both support OpenVswitch
based guest configs. The only difference is that the former
uses libvirt's modern <network type='bridge'> with vport
profile specified, while the latter uses <network type='ethernet'>
and does all openvswitch setup itself. The reason for the latter
is to support running against libvirt versions older than 0.9.11
Rather than require the host admin to figure this out themselves,
the right behaviour can be choosen automatically based on the
libvirt connection's version number.

The LibvirtGenericVIFDriver class can use the 'vif_type' mapping
field to determine whether an OVS network configuration is
required. In combination with a check against the libvirt version
number, a dedicated driver for OVS bridge setup is no longer
required.

The LibvirtOpenVswitchVirtualPortDriver class functionality is
merged into LibvirtGenericVIFDriver. For backwards compatibility
with the Folsom release, the existing LibvirtOpenVswitchVirtualPortDriver
class is made to inherit from LibvirtGenericVIFDriver and directly
call the bridge specific setup APIs. This eases migration to
the new VIF impl during the Grizzly deployment lifecycle, with
an expectation that the LibvirtOpenVswitchVirtualPortDriver stub
will be deleted after the Havana release.

Blueprint: libvirt-vif-driver
Change-Id: I292c2fd7aa0c32b1c91d737152ed8e54ea2cf6ac
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge "Move security_groups refreshes to conductor"
Merge "Cells: Add cells support to instance_usage_audit_log api extension"
Merge "Cells: Add cells support to hypervisors extension"
Merge "Merge Libvirt....VirtualPortDriver class into LibvirtGenericVIFDriver"
Merge "Fix inject_files for storing binary file."