fix side effects from seekability test on input file

Fixes Bug #1007093

Mixing use of os.lseek(fileno, 0, os.SEEK_SET) with
file.seek seems to cause problems when reading data
with file.read

Change-Id: Ia96ce9bbdc93a1a8c6169d85b99187f8cd7b2fdc
Fix typo in doc

metdata -> metadata

Change-Id: I44e5e73946e9d1a37b8e3a5974083e3fbea33d2d
Clean up a few ugly bits from the testing patch.

The pep8 runner in run_tests.sh was still referencing run_tests.py
which no longer exists. Replaced that section with one that runs
pep8 the same way as tox.

Additionally, the first attempt at getting the test runner to do the
same thing with debug logging as run_tests.sh was doing became a bit
spammy. For now, actually have logging write out the log file in the
first place. Eventually, it would be nice to get this to properly
get spit out in such a way that nosetests would grab it and include
it in the failed test case output.

Change-Id: Ib5222a0c3507d5d7ede4d303c98323a622705301
Merge "fix side effects from seekability test on input file"
Glance should use openstack.common.timeutils

Implements blueprint use-common-timeutils

1. Edit openstack-common.conf and import glance/openstack/common/timeutils.py
2. Replace datetime.utcnow with timeutils.utcnow
3. Replace utils.isotime with timeutils.isotime
4. Replace utils.parse_isotime with timeutils.parse_isotime
5. Replace utils.normalize_time with timeutils.normalize_time
6. Remove datetime related functions and datetime related unittests

Change-Id: I014548848f738b00c670be3d372b16f47f6dee96
Merge "Clean up a few ugly bits from the testing patch."
Create 'simple' db driver

Move the core of glance.tests.unit.utils:FakeDB to glance.db.simple.
This 'simple' driver is an alternative to the traditional sqlalchemy
driver. Additionally, the sqlalchemy driver has been moved from
glance.db to glance.db.sqlalchemy. The simple db driver is only
available to be used by tests for now.

Related to bp refactor-db-layer

Change-Id: I9d33a433c0c03e53fb5a3491076086427ae694b3
Merge "Fix typo in doc"
Implements cleaner fake_request.

Implements the fake request to be more flexible.
Changes the fake request calls in the tests.
fixes bug 1010191

Change-Id: Ic8199b1f8f479ffb3667cead2576c03591e30e43
Merge "Create 'simple' db driver"
Re-add migrate.cfg to tarball.

Fixes LP Bug #1010284.

Change-Id: Ic19a5ef16e7e2237c4becfbca9a608ef932fc973
Use openstack-common's policy module

Reworks glance to use the new policy module in openstack-common.

Change-Id: I6012c71a16d83762535e7490d8f5bc5102160fc0
Made changes to adhere to HACKING.rst specifications

Change-Id: I6a6fe0c2db55f57a74b5968224571c2c1440696c
Port remaining code to global conf object

Implements blueprint cfg-global-object

This iteration fixes up the remaining places where we're passing a
conf object around.

Change-Id: I3b627d093a6b7afeee129ab66b377a3b0af5439b
Remove the conf passing PasteDeploy factories

Implements blueprint cfg-global-object

In glance.common.wsgi we have a paste_deploy_app() API which allows
a ConfigOpts instance to be passed the the applications and filters
constructed by PasteDeploy.

Now that we're using a global object, we don't need this anymore

Change-Id: I222d3c58308bc2f504cd802c0c8405d3baa2e49a
Update default values for known_stores config.

Updates the default value for the 'known_stores' config
variable to include the full list of storage classes
supported in Glance.

Also, removes the known_stores config section from the
example config file since it is arguably an advanced config
that won't get used by most users. Removing this config avoids
the overhead of maintaining internal class names in config files.

Fixes LP Bug #1008698.

Change-Id: I0117376aa4de3103410ecb1a36df6998fcd0d5b5
Merge "Port remaining code to global conf object"
Merge "Update default values for known_stores config."
Merge "Use openstack-common's policy module"
Add tests and simplify GlanceExceptions.

This also fixes some incorrect use of GlanceException parameters.

Fixes bug: 1009122
Fixes bug: 1010140

Change-Id: Ic77856686a0259da2318e05b15f3d382508c00b9