Check to make sure the incomplete file exists before moving it during
rollback. Fixes bug #888241.

Change-Id: I98bca574a26f9ab7173ac593d3b32b68d78d2360
Casting foreign_keys to a list in order to index into it.

Fixes bug 888839

Change-Id: I66307cb355120b992913c8a1d8d5855b30f70504
Fixes LP Bug#837817 - bin/glance cache disabled

This patch removes the cache management commands
from the main bin/glance client and puts them in
a bin/glance-cache-manage program. It also adds
a number of cache management calls to manage the
cache queue via the HTTP API.

The reason I moved the cache management commands
into a separate utility is that I'm thinking towards
the future, where we have a separate admin API, and
having a separate management utility seemed like the
best way to go.

Change-Id: Ic916a72f39516a06be27ea6c8ef69eb9e1a70936
Merge "Casting foreign_keys to a list in order to index into it."
Fix bug 891738

Compute image size for the registry in the case where none is specified.

Change-Id: Ic21adf4865d0f481db9bd362cfaeeebd0942c974
Adds option to set custom data buffer dir

Implements blueprint custom-disk-buffer

When pushing an image large enough to be chunked into either a Swift
or S3 backend, the chunks are buffered to /tmp.

This change allows a user to define an alternate directory via the
configuration files.

Change-Id: I2660b6e5a76cbfd43834384b129550b66bb9afce
Bug#894027: use correct module when building docs

Currently the wrong directory is searched for the
glance module, requiring glance to be installed
in the default system path, for docs to be buildable.
Also the path was appended, so the default system version
which may be completely different is referenced.
This ensures that only local glance files are referenced.

Change-Id: Ia226c90bbd24d7804401a7c9e444387c78a0f542
Merge "Fixes LP Bug#837817 - bin/glance cache disabled"
Merge "Check to make sure the incomplete file exists before moving it during rollback. Fixes bug #888241."
Merge "Bug#894027: use correct module when building docs"
Added some examples for "glance add"

Fixed some warnings.

Change-Id: I9658c7458f3073b4bab93d0105d6ba174a4d0ca1
Fixes LP Bug#861650 - Glance client deps

This patch addresses the dependency proliferation in
the glance client stuff. It removes references to modules
that contain non-client-necessary libraries (like
eventlet, xattr, sqlalchemy-migrate and sqlalchemy)
by restructuring the modules slightly.

Note that the additional httplib2 dependency is because
that is used in the authentication strategy stuff in
glance.common.auth. This could be rewritten to use httplib
instead, further reducing the dependencies of the client lib.

IMPORTANT NOTE: This patch changes the default entrypoint
for the Images API router application, and therefore this
should be merged along with the packaging changes in this
branch:

https://code.launchpad.net/~jaypipes/glance/ubuntu/+merge/82318

Change-Id: I5dbc8584fb77e3e011fb6ff3532f792f5103e242
Fixes LP Bug#850377

Reworks Keystone functional tests to not depend on
a local Keystone (or Glance client) installation path.

Adds deps to tools/pip-requires with comments on
why they are needed for installing Keystone via pip.

Change-Id: I17c92e8ab37ef116d13e7b87719af4c0988450f9
Add --url option to glance cli.

Adds ability to select between http/https protocols.

Fixes bug 898097.

Change-Id: I1d20f314fb7dd8c5462c1f1ff22161ab59c35016
Merge "Add --url option to glance cli."
Fix for bug 900258 -- add documentation for '--url' glance cli option.

Change-Id: If6e72c159209c073a4941b90c4a31fa054c84cd2
Rename .glance-venv to .venv.

This simplifies a number of Jenkins jobs which currently, other
than directory names, could be the same for all OpenStack
projects.  By renaming the virtualenv directory, the redundant
Jenkins virtualenv build and copy jobs can be eliminated.

Change-Id: I7916783d863e5184bad8293c3aed5ba119e374a9
Secondary iteration of fix for bug 891738

A problem exists that images larger than large_object_size without a
known image_size will fail to be segmented and hence fail to be added
to swift.

This patch alters the chunking process slightly:

- Instead of reading min(large_object_chunk_size, bytes_left) from the
  stream, simply read large_object_chunk_size until we reach EOL(None).
  This works even when there is less than large_object_chunk_size bytes
  amount available.

- The image_size can be determined from the combined length of each
  chunk read. If we are passed an unknown image_size this value can be
  used for the registry.

Test Changes:

- Fixed bug in fake_put_object which was highlighted by Jay when
  reviewing this changeset.
  The put of the manifest object needed to be moved inside the
  check for previous existence of a key.

- Added test_add_large_object_zero_size to
  glance.tests.unit.test_swift_store:TestStore.

  This unit test demonstrates the bug and will test for regressions. It
  mirrors test_add_large_object but specifies an image_size of 0 to
  excercise the new code path.

Change-Id: Ic8b78be5dce2281c80372ed446499f6d0bc07f40
Merge "Rename .glance-venv to .venv."
Add generic PasteDeploy app and filter factories

These generic factories allow us to dump the copied and pasted
app_factory and filter_factory methods in the codebase.

The main difference is the paste configuration changes from:

  [app:apiv1app]
  paste.app_factory = glance.api.v1:app_factory
  ...
  [filter:cache]
  paste.filter_factory = glance.api.middleware.cache:filter_factory

to this:

  [app:apiv1app]
  paste.app_factory = glance.common.wsgi:app_factory
  glance.app_factory = glance.api.v1:API
  ...
  [filter:cache]
  paste.filter_factory = glance.common.wsgi:filter_factory
  glance.filter_factory = glance.api.middleware.cache:CacheFilter

Apart from reducing code duplication, this will also allow us to have
the generic factories inject other data into the apps and filters.

Change-Id: I1d2be5630ab61d29b8948ff88d58e6e1b11c2e5f