Change useexisting to extend_existing to fix deprecation warnings.

This squelches a deprecation warning during installation.

We're already using extend_existing in other places, so I don't
think this causes any new version compatibility issues.

Fixes bug 925609.  (Already marked fixed, but this hits more cases.)

Includes some merges with a whitespace-cleanup fix.

Change-Id: Ia166e9184ed3e13753c5669a1006a3711738319a
Fix scrubber not scrubbing with swift backend

It seems the fix for bug #1052537 was incomplete, as I have found
glance-scrubber is still not completing it's work when run against a
swift backend.

With more investigation it seems the proper way to execute a
starmap/imap is to consume it within a loop. This can be replicated by
taking the simple web crawler example from http://eventlet.net/doc/ and
removing the for loop from around the imap call.

Also:
* Add new test to check this failure against Swift (respects the
  GLANCE_TEST_SWIFT_CONF environment variable).

Fixes bug 1056127

Change-Id: I2d289666b99f3216a6d424dbbacbd2d10899263d
SSL functional tests always omitted

Fixes LP bug #1063829

This change fixes the path to the cert and key files for
SSL tests such that the tests aren't always skipped.
In addition, it fixes up the existing tests to complete.

Change-Id: I4705a568918b29a877151ebfed43200ef4e993f7
Merge "Change useexisting to extend_existing to fix deprecation warnings."
Merge in update openstack-common policy code

Updates Glance-specific policy glue code to eliminate deprecated
openstack-common policy interfaces.  Also cleans up policy code
to allow for returning fine-grained policy values.

Change-Id: I2951a0de3751bd2ec868e7a661070fed624e4af2
Merge "Fix scrubber not scrubbing with swift backend"
Merge "Merge in update openstack-common policy code"
Clean up is_public filtering in image_get_all

Prior to this patch, is_public filtering was applied in a
counterintuitive and potentially dangerous manner. In particular,
is_public=True would return images where is_public=False. Also, in a
variety of cases (that weren't exposed in the http api) users could list
private images that they do not own. This patch fixes those problems by
making is_public filtering work the same as any other filter and adding
separate visibility restrictions that always apply to list queries. To
preserve the existing behavior of the v1 api where admins by default do
not see all private images, admin contexts are deescalated to normal
contexts in certain situations.

With this change, pep8 ignores E712 because it is normal to use
"column == True" in sqlalchemy.

Fixes bug 1060481.
Fixes bug 1061331.

Change-Id: I086bd9273e337ebe184902b6f12bc8c9a7fc5867
Disallow admin updating deleted images in v2 api

Returns a 403 Forbidden error when an admin user tries to update a
deleted image in v2 api.

Fixes bug 1069940

Change-Id: Icfc599320564524e69bc7c77f1c3d668631786f5
add command "status" to "glance-control"

fixes Bug #955457

The status command displays whether or not a service is running.

Change-Id: Ib4be08a182465d94f33d6ec64d0c089ddc411e3f
Merge "SSL functional tests always omitted"
Merge "Disallow admin updating deleted images in v2 api"
implements selecting version in db sync

Fixes Bug #993284

db_sync compares the current version with the specified version
and upgrades or downgrades accordingly.

Change-Id: If0e0608ac04c264df7964f8cf6a46e9b156eee49
Merge "add command "status" to "glance-control""
Update common to 18 October 2012.

Update glance's cache of openstack-common code to commit
9a8c1d7e1a537e6580be2be1630baefc910de1de. policy.py updates will be
merged separately.

Change-Id: I954c6d27c3f5967f2f1c00e9023333a13c87c247
Return HTTP 404 for deleted images in v2

For admin contexts, the db api will return deleted images. This patch
manually checks for deleted images in the v2 controller code to treat
these cases as if the images didn't exist.

Fixes bug 1071446

Change-Id: I33075f94e9d560a279085e2afd18c8052f57d60b
Fixes deletion of invalid image member

This fixes the 500 error on deleting an invalid/non-member tenant of an image.

Fixes LP: #1060868

Change-Id: I5a2dc56690d7525127be1a8843004d075a3fe5bb
Pull in a versioning fix from openstack-common.

Fixes bug 1059634. Related to I6cff4ee7f6c1dc970397b66fd2d15fa22b0a63a3

Change-Id: I4c8daa8bf4a57849bd8d1e512a388d982f79b7d5
Merge "implements selecting version in db sync"
Return 403 when admin deletes a deleted image

1. Returned a 403 Forbidden error when an admin user tries to delete a deleted
image.
2. Added unit test coverage.

Fixes LP: #1060944

Change-Id: I1a5c4ca18e2e70d8a614b3132bfcea1f56c5f59c