Updated from global requirements

Change-Id: I5fe5a2d38871bec2796c0b42a02ecc061db9ebbd
Catch loading failures if transport_url is not set

The current implementation always tries to get a transport from
oslo.messaging assuming the transport_url option has been set. This is
done to keep backwards compatibility. However, since the default
`rpc_backend` is rabbit, it'll always try to load such driver. The
problem raises when `kombu` is not installed and the `notifier_strategy`
is set to qpid. This will make glance-api fail because it'll try to load
the rabbit driver *before* loading the qpid one.

This patch puts the first load attempt in a try / except block. The
error caught (if any) will be re-raised *just* if transport_url has been
configured, otherwise it'll move forward and try to load the notifier
driver using the old configuration options.

The patch also removes an obsolete test.

Change-Id: I00e653704463ea8245e2960050e0d5e6839f278a
Closes-bug: #1302661
(cherry picked from commit 164d1ab46f06141e2c12b944e15ae10f20dace38)
Fix Jenkins translation jobs

The -propose-translation-update and -upstream-translation-update
jobs do not update from transifex since our po files contain
duplicate entries where obsolete entries duplicate normal entries.

Remove all obsolete entries to fix the jobs.

Change-Id: Ib0fab723f245a87bb116ca21db31841574f7dc7f
Closes-Bug: #1299349
Merge "Catch loading failures if transport_url is not set" into milestone-proposed
To prevent remote code injection on Sheepdog store

Change-Id: Iae92eaf9eb023f36a1bab7c20ea41c985f2bf51b
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Update Glance configuration sample files for database options

Sample configuration files are out of date with respect to database
options. This change makes the options up-to-date.

Closes-bug: #1285617
Change-Id: I2694425a0b1610f37e77f1bc81aebed850a16348
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Fixes Glance Registry V2 client

Add an optional configuration step to glance.db.get_api().

This step is then used in glance.db.registry.api in order to ensure that
the registry client has been configured in time for the registry db
driver's use.

Closes bug: #1302345

Change-Id: Id2c52c423b411ec20bdfa76ee91837c98b1613ef
Co-Authored-By: Mark J. Washenberger <mark.washenberger@markwash.net>
Opening stable/icehouse

Bump version to next stable release on icehouse branch, and set
defaultbranch in .gitreview for convenience.

Change-Id: I238e41a54ba004ddc439813f161755b811a5e7b5
Updated from global requirements

Change-Id: I387beea3277ee93147b6526499d9c0668e86601c
Fixes installation of test-requirements

pip install fails because the "-f http...pysendfile.2.0.0.tar.gz"
returns 404. pip will install pysendfile 2.0.0 without defining
the url.

Ref: http://code.google.com/p/pysendfile/issues/detail?id=20&can=1

Closes bug 1314968

Change-Id: I15baf378b37841f8abb21294efebe2dee95077c3
(cherry picked from commit ed816a214be8acc17d75f68e6c2552fd3b1ad56f)
Merge "Updated from global requirements" into stable/icehouse
Prevent creation of http images with invalid URIs

Active images should always be ready to be downloaded, regardless
they're locally or remotely stored. This patch prevents images with
invalid location URIs from being created and entering the 'active'
state with no data. This is only for the HTTP store.

Closes-Bug: #1257273
Co-authored: Jon Bernard <jobernar@redhat.com>

Change-Id: Iffce79b654cabe8397c85b2cc50c4b7f59733ea5
(cherry picked from commit 503be24afa122eef08186001e54c1e1180114ccf)
Provide explicit image create value for test_image_paginate case

Assign an explicit created_at datetime value to image db fixtures,
it be used to fixes race condition in DB driver test_image_paginate
case.

Closes-Bug: #1282400
Change-Id: I359633af4bb25cf1866b42d6dad3df658995b7bd
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
(cherry picked from commit 1c5797d53a53a990cef3d695f0752742fd213840)
Bump stable/icehouse next version to 2014.1.2

Change-Id: Id7181755d3609c0ae91c2402b34f2de02c06a1f0
Fix lazy translation UnicodeErrors

upload_utils is concatenating str and Message objects which doesn't work
on python 2, so change the str to a unicode object.

test_quota.py was casting Message objects to str which fails for the
same reason, so rather than cast to str, cast using six.text_type.

See oslo commit 2cfc1a78d8063cf20083cf7df796d730a576551c for history and
details on why the Message object doesn't support __str__ casting.

This is a small part of a larger effort that the oslo team will be
rolling out with graduation and adoption of the oslo-i18n library.

Closes-Bug: #1334774

Conflicts:
	glance/api/v1/upload_utils.py
	glance/tests/unit/test_quota.py

Change-Id: I9d3f29c661f1afffabbbbb499f48d37ef5a8fcee
(cherry picked from commit 834e1f2150c6f2afd92036e6b7f53afee4006682)
Updated from global requirements

Change-Id: I71c6d9e38c605e0763287de143bbffcb2d90d4f6
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>