Prevent E500 when listing with null values

An image may have NULL values for 'name', 'disk_format' and
'container_format'.

Various image list operations which used a marker could return
an E500 because:

* sqlalchemy db: an illegal statement would be formed
* simple db: the sort function would error when it hit a null

To prevent this we change the behaviour so that when a NULL
is encountered we treat it as an emptry string ('') for the
purposes of sorting. This is consistent with the behaviour
for listing the db contents using 'sql order by'.

It is safe to provide the default empty string in all cases
since only string based 'sort_key' values can be NULL in the
database, eg 'size' (not a string) cannot be NULL.

Fixes bug 1183860.

Change-Id: I2187c41a3fab8b5813ba3a5e0f3249ee5dd981ed
Add a policy layer for membership APIs

Added a policy layer for the membership APIs of the domain
model.

Added following policies for membership APIs:

v1: 'get_members', 'delete_member' and 'modify_member'.

v2: 'add_member', 'get_member', 'modify_member',
'get_members' and 'delete_member'.

Implements blueprint membership-policy

Change-Id: I0d5782d1d9b7b8a563a689fcb192958ab3fea0f4
python3: Introduce py33 to tox.ini

Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: Iddb14c65c0bf44612bdf8e301e31ab71ea432f29
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Remove routes collection mappings

When using the routes mapper's collection to map from URLs to
python functions several additional URIs are created by
default: 'new', 'format' and 'edit', eg this URI

/v1/images/new

was accessible and would return a '500'.

/v1/images/detail.xxx

was accessible and a 'GET' to it would create a file called 'detail.xxx'
in the image cache directory (where 'xxx' is an arbitrary string).

Similar resources for image memberships existed.

Other collection URIs (for both the API and Registry) would return
unexpected behaviour.

Use explicit mappings rather than a 'collection' to remove
the superfluous resources.

Fixes bug 1185828.

Change-Id: I2f451f0208d43cdc83dcf58a41ea31359b18fcf2
Pass configure_via_auth down to auth plugin

Pass down the configure_via_auth value to the auth plugin to say whether or not
it should look in the service catalog for the glance registry endpoint. This
stops authentication by glance registry client from needlessly looking for an
"image" service endpoint when the user may not have it in their service catalog.

Fixes bug 1187888

Change-Id: I1c4a726ff0d6a345a27446500135f4f27cea5e39
Patch changes Fedora 16 to 18 on install page.

Change-Id: Ia38ae70cb64462460c3ee64a05cf19b6a819f54b
Merge "Prevent E500 when listing with null values"
Merge "Patch changes Fedora 16 to 18 on install page."
Replace openstack-common with oslo in HACKING.rst

Change-Id: I211d128dce385a173cac5fec9df413b813bc4626
Prevent '500' error when admin uses private marker

A 500 error was being raised when an admin tried to use the
id of a private image owned by another user as a marker.

Do not return 500 in these cases.

Also added appropriate test coverage.

Fixes bug 1172719.

Change-Id: If77d45c684dd7d4dda9eefd519fc3d36fc57e07a
Sql query optimization for image detail

Current the image detail call uses left outer joins
for its queries, which makes it neglect the index on the
images table. The approach used in this patch, splits up
the querying into two parts and then does the join,
so that we can make use of the index

Change-Id: I65df0be5f156959c1e70ad9cb1a8b7eceebb4d8a
Merge "Pass configure_via_auth down to auth plugin"
Merge "python3: Introduce py33 to tox.ini"
Add missing Keystone settings to scrubber conf

The provided conf file for glance-scrubber was missing the auth settings
stanza required to make it work 'out of the box' in a Keystone environment
such as Devstack.

Also add the "Security Options" line just below for consistency with the
other configs.

Change-Id: I1182fd3a7a79c0f6aeb601d65c31e462fb3610bb
Merge "Sql query optimization for image detail"
Remove explicit distribute depend.

Causes issues with the recent re-merge with setuptools. Advice from
upstream is to stop doing explicit depends.

Change-Id: Ie875bbaae191cd0719db76cc375cd97d5bf90de7
Merge "Add missing Keystone settings to scrubber conf"
Merge "Prevent '500' error when admin uses private marker"
Merge "Remove routes collection mappings"
Use Python 3.x compatible octal literals

Python 3.x deprecated octal literals in the form
0755. Use 0o755  instead which works at least
with Python 2.6 and newer.

Change-Id: I3474f601dab0e2e1fbed8ef6f7472e3e453b94fb