Speed up creating floating ips.

Previously, we would make two separate DB calls for each floating ip
we created in floating_ip_bulk_create. This was just a little slow
(several hours to create a /16). This patch speeds up floating ip
creation just a little:

$ time bin/nova-manage floating create --ip_range=10.250.0.0/16

real	0m48.766s
user	0m34.342s
sys	0m1.984s

Resolves bug 1023560.

Change-Id: Ie3663440d414b102111178899db0c571769edba8
Allow admins to de-allocate any floating IPs

Fix bug 1045508

Change-Id: Ie5be3748c16a592209934cc85777f534e84842bc
Escape ec2 XML error responses

Fixes bug 978439

XML error responses to ec2 calls include user supplied data that is not
escaped. This could result in returning invalid XML.

This is addressed by using utils.xhtml_escape() on purposeful eC2 error
responses and when handling webob.exc.HTTPException.

Extended the tests for utils.xhtml_escape() to cover '&', '>', '<' and a tag
look-alike. These conversions are implicit to saxutils.escape().

Change-Id: Icb3e861c6c06c0d9c3b9e2ab1a658581a0fb39c6
Fix simple_tenant_usage's handing of future end times

Fixes bug #1043999

simple_tenant_usage returns the usage in the range between the supplied
start and end query parameters. The _hours_for() method calculates the
number of hours the instance was running in this range, even if the end time
is in the future.

By default, python-novaclient requests usage between 4 weeks ago and tomorrow.
This means we a report which accounts for 24 hours of extra running time for
each currently running instance. Fix this by clamping the period of the
returned report at the current time.

Change-Id: I61c211fd85b729aaeaac6ef24644ee19eb5bb6b0
Add scope to extra_specs entries

Do to conflicts between different scheduler filters it is necessary
to allow an optional scope for the different keys.  This scope is a
leading string followed by a ':' character, e.g.:

        foo:bar

is the `bar' entry with scope `foo'.

The Trusted filter will now use the scope `trust' and the
AggregateInstanceExtraSpecs and ComputeCapabilities filters will
check against any unscoped keys in the `extra_specs' table.
Any new filters that utilize the `extra_specs' table will need to
use a unique scope string for any keys they require.

Resolves bug 1039386

Change-Id: I2466dc3d4de8e9aeb76b294eeda1c939c0413366
Signed-off-by: Don Dugger <donald.d.dugger@intel.com
Merge "Add scope to extra_specs entries"
Fix typo in simple_tenant_usage tests

Simple s/futrue/future/ typo fix

Change-Id: I110205c2392075ac8b7f7e423e466e1a6fbfab64
Merge "Allow admins to de-allocate any floating IPs"
Merge "Escape ec2 XML error responses"
Merge "Speed up creating floating ips."
Merge "Fix simple_tenant_usage's handing of future end times"
Use lvs instead of os.listdir in _cleanup_lvm

Compute user may not have permission to list /dev/<VolGroup>
directory. This results in error during instance cleanup and not
deleted lvm images, if libvirt driver use lvm images backend.
To prevent this, _cleanup_lvm use lvs command instead of os.listdir.

This fixes bug 1042710

Change-Id: I82ab4ca5ba3320f50c84e23839fcf6ed8f02be8c
Merge "Fix typo in simple_tenant_usage tests"
Merge "Use lvs instead of os.listdir in _cleanup_lvm"