Rewrite Swift store functional tests

The existing functional tests for the Swift store depend on
spinning up a full system. We really just want to test that
our store interface is good, so this patch adds tests for
just that.

Prevent swift store from prepending 'http[s]://' to auth url
if it is already there. This should be broken into a different patch.

Running the tests works the same way, just define a local config
with the necessary swift_* options. Set the GLANCE_TEST_SWIFT_CONF
environment variable to the location of that config.

The old full-stack tests have been removed.

Change-Id: I506993ce44354950534443c2101f8417a2a918e0
Separate glance cache client from main client

This is relocating the necessary functionality for the glance
cache management tool into a new client class.

Related to bp separate-client

Change-Id: Ib89db1245aca5032a8d93876e07c562cb1fb5d4d
Set new version to open Grizzly development

Set version to 2013.1 on master to open Grizzly development.

Change-Id: Iab3d2fd0c3844504ad545774374d89a32e5ac11c
Update v2.0 API version to CURRENT

The v2.0 API is stable, so we need to communicate this fact to the
consumers of Glance. This updates the status of the v2.0 version
entity in responses from / and those that result in a 300 Multiple
Choices status code from 'EXPERIMENTAL' to 'CURRENT.'

Change-Id: I9e4514025904d7be2e947c6d14ccb90b6b066f8c
Update openstack-common log and setup code

Pull in changes up to commit 95cd3a7fad2d0335c65394379c35a798df9d25b4

Change-Id: I628f15aa6367ab2af7912f1b5324055a0fc3c20a
Merge "Update v2.0 API version to CURRENT"
Merge "Update openstack-common log and setup code"
Merge "Rewrite Swift store functional tests"
Merge "Separate glance cache client from main client"
Add region configuration for swift

Addresses bug 1050034

Change-Id: Ib83f5dbb2c1fbeacd741e0cb92b619e67b2243c7
Add filesystem store driver to new func testing

This also fixes bug 1050098. In order to match the existing functional
store test, the filesystem backend needed to be returning the actual
image size.

Change-Id: If202a52a6d303ca2d07fd3abb7f9ac7fe009690e
Generalize remote image functional test

All backends should be able to read any arbitrary image from
a supported backend. This pulls out swifts test_get_remote_image
test so it can be used by the filesystem tests. In its place is
a new store-specific test helper called stash_image - this should
be implemented for each store test to help store aritrary image
data.

Change-Id: I05317216f21bb52ad1fea107c6192bf9a9f9cae3
Add functional tests for the HTTP store

This spins up a local HTTP server on an arbitrary port that returns
a specific set of image data. The store tests then make the necessary
HTTP request to said server.

Change-Id: I8bdebd3d61073fb909728127083831704fc1dd29
Add unit tests for size_checked_iter

Change-Id: I3822d093571b02b2bb9a7d0b7d6cb4c1a0b9e812
Don't WARN if trying to add a scheme which exists.

Updates the register_scheme_map function in store/location.py so that
it registers new scheme maps only if they don't already exist.
Also, removes the warning message that was previously logged if
a duplicate entry was found. Since both Glance v1 and v2 controllers
attempt to register scheme's this seems reasonable and shouldn't cause
any problems with how things work.

This fixes an issue where Glance API logs always had warning messages
stating it was 'Overwriting scheme' information even though everything
is configured correctly.

Fixes LP Bug #1050711.

Change-Id: Ief539187f9c64a3b2de6d431b1e2ffc9e07e5c90
Change qpid_heartbeat default.

The default value of qpid_heartbeat of 5 seconds is unnecessarily
aggressive.  Change it to 60 seconds to reduce the possibility of
getting disconnected from qpidd under normal circumstances.

Fix bug 1050661.

Change-Id: I9525e74f96314c2c9183d6b10cf503936c81f589
Expand cache middleware unit tests

This adds some unit tests to exercise the image cache
middleware. Two new functions were also created in the
cache middleware itself to make it more testable.

Change-Id: Iea67119622461f1e8116b2a6913f94ca4eb22607
Merge "Add filesystem store driver to new func testing"
Clean up pep8 E502, E711 violations

Updated pep8 version requirement to 1.3.3.
Fixed E502 and E711 errors.
E711 is ignored because of sqlalchemy statements.
All ignores are to be removed in the next sequence of patches.

Change-Id: I27155166a60be14521d958e1cc7c06ebcc90f1fd
Fix scrubber start & not scrubbing when not daemon

1) Scrubber not starting
When the scrubber is run from the command line or via cron, it would try
to call it's app object which resulted in a TypeError.

2) Scrubber not scrubbing
In the same usage scenario as above, the delete jobs added to the
starmap are never started.  A slight delay is enough to start these.

Also add a functional test designed to excercise the scrubber when run
in "regular mode", which covers both these cases.  I've run the test
successfully with 1000 images, which should be enough to prove the
sleep(0.1) does the trick.

Fixes bug 1052537.

Change-Id: If29704d8a425194085b59b7dfd265ffaef16302c