Prevent nova services' coverage data from combining into nova-api's

Now if combining a coverage report once, nova services' coverage
data are combined into nova-api's.
This renames nova-api coverage datafile to .nova-coverage.api and
creates a new coverage instance to combine when reporting.

Fixes bug: 1152475

Change-Id: I90b6535d490cf0123a127f8752986edd782ef37e
Add CRUD methods for tags to the EC2 API.

This is an incomplete implementation of the EC2 tags API.  In EC2, most
resources are able to be tagged.  See
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html

In openstack, the only currently 'taggable' resource is an instance, as
it has an instance_metadata table associated.  So far, only instance
tagging has been implemented, but it is relatively simple to extend this
to other resource types by creating the associated model and api calls.

Additionally, in EC2 searches, shell-style globs are allowed, eg:
fo* will match fo, foo, foobar
fo? will match foo

This has been left to do at a later date.

DocImpact: Adds new API calls: CreateTags, DeleteTags, DescribeTags
See:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateTags.html
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DeleteTags.html
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeTags.html

Fixes: bug #1096821
Implements: blueprint ec2-tags-api

Change-Id: Idf1108f6a3476cabdbdb32ff41c00aa4bc2d9ffe
Signed-off-by: Stephen Gran <stephen.gran@guardian.co.uk>
Remove print statements

Change-Id: I40a805bee3f10d5989188971423cbb6c07f740c8
baremetal: Drop unused columns in bm_nodes

Drop these two columns:
* bm_nodes.prov_vlan_id
* bm_nodes.registration_status

And update related code, tests and api_samples.

Change-Id: Iadefc83a00ad9ae5a3bb39f357080299875bdf09
Update latest oslo.setup.

Change-Id: If3d397a1a33e14912abb1f7c94790640fe255d3a
Add unit tests for nova.volume.cinder.API

Fixes bug 1042215

Change-Id: I281f56c5a247b4af4e91182be13f5fcd6772917c
Merge "Remove print statements"
Merge "Prevent nova services' coverage data from combining into nova-api's"
Merge "Add unit tests for nova.volume.cinder.API"
Merge "baremetal: Drop unused columns in bm_nodes"
Raise rather than generating millions of IPs.

Fixes bug #1163394

Formerly if we tried to create many millions of floating IPs with a
range like "192.168.2.224/2", address_to_hosts would happily iterate
over all of them (which would take a long time) and then nova-manage
would eventually crash with an OutOfMemoryError when we tried putting
all of them in a list.  Or, if the initial list wasn't quite big
enough to use all memory, it would blow up later (even more slowly)
when we tried to put them in the database via SQLAlchemy.

Now, raise exception.InvalidInput if the number of IPs is a million
or more.  (A million is erring on the side of caution.)

Change-Id: Ifc6b6a8faadc2e97e09f9f6c975e52229f705789
Merge "Raise rather than generating millions of IPs."
Fix _error_out_instance exception handler

Since Eventlet clears exceptions between greenthread switching, we need
to save that exception so it can be re-raised.

The _error_out_instance event handler did not wrap the quotas call with
the save_and_reraise_exception, so the original exception was lost.

Fixes bug 1163552

Change-Id: I69d28917aae1d787351cd800f8996532e5485eb2
Limit the checks for block device becoming available.

Instead of previously looping potentially forever for a block
device mapping to become created from the volume api, basically
blocking a greenthread until this happens we now will have a number
of attempts (defaulting to 10) that we will wait for the volume api
to create said block device mapping (or error out).

Fixes bug 1162064

Change-Id: I6ff0b42aad48df735d09f91a0a9fe98e6abcf2eb
Guard against content being None

`content` can be passed in as None, so we need to set it to the empty
list if that occurs.

This also fixes the bad-practice of using a mutable data-type as a
default argument.

Fixes bug 1163598

Change-Id: Ie991c9452a21cfb036d3955a094ec345805d63d1
libvirt: Get driver type from base image type.

If we are using the raw backend (no cow), we should set the driver
type based on the type of the source image instead of always
using raw.

Calls to to_xml were moved after _create_image so that the image
type could be determined when creating the xml for libvirt.

Fixes bug 1163009

Change-Id: Ic8d5f0ab83d868a42f834d39c0afb64818d7e027
Explain why the give methods are whitelisted.

In order to aid mine (and likely others) understanding of this
code it seems to make sense to document what these special whitelisted
attributes are.

Change-Id: I1c11484fc74e898df5d25ab94ed0cdb288accd67
Grab instance for migration before updating usage

Updates _update_usage_from_migrations so that it grabs the instance
associated with a migration before updating usage.

Bug 1163622

Change-Id: I64acef912ae71ea5c7fb66e9fcaafe5750c63eaf
Merge "Fix _error_out_instance exception handler"
Merge "Limit the checks for block device becoming available."