Set python hash seed to 0 in tox.ini

New tox (>=1.7.0) sets a random python hash seed by default. This is
generally good for testing because it will help keep projects working
regardless of the hash seed, but glance unittests don't currently pass
with a random hash seed so set it to the python default seed.

This change will allow us to use new tox again and remove the
restriction on tox<=1.6.1 to run unittests.

Redundant setenvs for specific test envs are removed to prevent them
from overriding the PYTHONHASHSEED value.

Note this change will need to be backported to the stable branches to
keep unittests there working with new tox as well.

Change-Id: Id0175b7a95c0ad07798b4603b5d1dd8e6d414561
(cherry picked from commit 90c07019350adc301fa5d91239ebfb16fcac775f)
Bump stable/icehouse next version to 2014.1.3

Bump stable/icehouse next version to 2014.1.3

Change-Id: I6353a6751b20db64a322b512271c9a8d6a1c412d
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Fix image killed after deletion

If an image upload fails after the image was deleted during
the upload, the image status currently gets set to 'deleted'
then 'killed' once the upload fails. This patch fixes this so
that if the image was deleted it stays in 'deleted' state.

Permitted from_states for transitioning to 'killed' are
'queued' and 'saving'. We now enforce this transition and
raise an exception if it is violated.

Closes-Bug: 1236868
Co-authored-by: Hirofumi Ichihara <ichihara.hirofumi@lab.ntt.co.jp>
Co-authored-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
(cherry picked from commit 345d8f7766aa06fa6654382efc480da493a3f2c8)

Conflicts:

	glance/api/v1/images.py
	glance/api/v1/upload_utils.py

Change-Id: I5552220ce264c0d09780bbd0eb7610e7cff0b820
Enforce image_size_cap on v2 upload

image_size_cap should be checked and enforced on upload

Enforcement is in two places:
- on image metadata save
- during image save to backend store

(cherry picked from commit 92ab00fca6926eaf3f7f92a955a5e07140063718)
Conflicts:
	glance/location.py
	glance/tests/functional/v2/test_images.py

Closes-Bug: 1315321
Change-Id: I45bfb360703617bc394e9e27fe17adf43b09c0e1
Co-Author: Manuel Desbonnet <manuel.desbonnet@hp.com>
Merge "Set python hash seed to 0 in tox.ini" into stable/icehouse
Merge "Bump stable/icehouse next version to 2014.1.3" into stable/icehouse
Fix collection order issues and unit test failures

A randomized PYTHONHASHSEED caused the glance API to return certain data
in a nondeterministic order, breaking some tests. This patch sorts the
returned data before testing against a pre-sorted expected values.

This patch also fixes some unit test failures with the new version of
testtools (0.9.36) and directly calling setUp(). This was added to this
patch to avoid blocking more Glance tests.

Co-authored-by: Fei Long Wang <flwang@catalyst.net.nz>
Co-authored-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>

Conflicts:
	glance/tests/unit/common/test_wsgi.py

Partial-bug: #1348818
Change-Id: Ie92c6bb5663826713ca99e8f2f7d70f3faef6675
Check on schemes not stores

Since the `_upload` method loads the store based on the scheme, we need
to check whether the scheme exists in the known schemes instead of
checking in the list of known stores. Without this fix, stores with a
scheme name different than the store itself will not be usable through
the `x-image-meta-store` header.

Conflicts:
	glance/api/v1/images.py

Closes-bug: #1357462
(cherry picked from commit 4502759243c0f363545f4236b41abaf8bcf9a37b)
Change-Id: Ia33afc1629cb47a31982df7932ac0d9aeb201b4f
Block sqlalchemy-migrate 0.9.2

Breaks unit tests.

Closes-Bug: #1368391
(cherry picked from commit a8e54eccbb11ccdff2ac336514e669bc9218b5c9)

Change-Id: I347a20fd35ae20f1de5db7f2608090b08af6c0ff
Updated from global requirements

Change-Id: If61894a686135bff3188ca43e8b0f3a748adc391
Merge "Updated from global requirements" into stable/icehouse
Merge "Fix image killed after deletion" into stable/icehouse
Remove runtime dep on python pbr
Don't access the net while building docs

(Note this hasn't been submitted upstream)

Change-Id: I42c6e3a5062db209a0abe00cebc04d383c79cbcb
(cherry picked from commit f2b4bb4e45afcc178200966193a7b87401c534d7)
avoid unsupported storage drivers
notify calling process we are ready to serve

Systemd notification should be sent in-process, otherwise systemd might
miss the subprocess sending notification.
See systemd bug https://bugzilla.redhat.com/show_bug.cgi?id=820448

Taken from keystone project commit
abc06716d027d68f0da3b0f559fa7c85a21804d5

Improvements from Keystone version:

    * add unset_environment parameter
    New parameter unset_environment was added to sd_notify
    http://www.freedesktop.org/software/systemd/man/sd_notify.html
    to ensure service readiness is sent only once.

    * add onready() method to simulate systemd environment
    For testing purposes and optional use with SysV initscripts.

    * unit test added

    * docstrings for notification methods

Patch includes deployment in openstack.common.service.
It does not have an effect when running the service outside
the systemd environment.

Implements: blueprint service-readiness
Change-Id: I80f325c9be9c171c2dc8d5526570bf64f0f87c78