Remove unused methods

o glance/common/utils.py:
  def add_features_to_http_headers(features, headers):

  This method was removed in the following commit.

    commit 76c3620c7effb15be577450c276db1e394c2de3e
    Author: Brian Waldon <bcwaldon@gmail.com>
    Date:   Fri Sep 7 17:21:34 2012 -0700

        Drop Glance Client

  In this case, it has been used only in the following test program.

  - glance/tests/unit/common/test_utils.py

o glance/tests/functional/__init__.py:    def reload_server(self,

  This method was removed in the following commit.

    commit 866cb846f5310e1ad36181e64e7d59ba54d9fd40
    Author: John Bresnahan <jbresnah@redhat.com>
    Date:   Fri May 3 10:50:42 2013 -1000

        Remove glance-control from the test suite

The following methods are not used(w/o tests), however, it can not be
deleted, added the comment.

o glance/common/location_strategy/__init__.py:
  def verify_location_strategy(conf=None,
      strategies=_available_strategies):

Change-Id: I50e3fdb6e929337b946e3534c8e7dbff77ac7998
Fix swift functional test

The swift functional test "test_delayed_delete_with_auth" was failing
with a permission error trying to write to /var/lib/glance.

Change the test's scrubber_datadir to be /tmp which is world writable.

Fixes bug 1291512.

Change-Id: I522c95619db26d009bd2ecb12fd02cb2eca56569
To fixes import error for run_tests.sh

Change-Id: Iacce978001750c9cb8f398dba78361dee22ed2fb
Closes-bug: #1314007
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Remove duplicated is_uuid_like() function

Function is_uuid_like() declared in glance.cmd.replicator and
glance.common.utils modules. These functions are similar, so we can
use only one of them

Change-Id: If9a35df8d1189d126033404faa7167c0b0cc4d44
Bump python-swiftclient version

https://review.openstack.org/#/c/69187/ introduced SSL certificate checking
in python-swiftclient (released as v2.0). This patch ensures that the version
of swiftclient used will verify SSL certificates correctly.

This patch also documents the `swift_store_auth_insecure` configuration
option for bypassing the cert verification

DocImpact
SecurityImpact

Change-Id: I20ddab5c3359071daf7505268c72331e4c786987
make uploading an image as public admin only by default

Uploading an image with --is-public=True should by default only be allowed
by an admin tenant. Allowing anyone to upload an image as is_public is likely
a security concern. This changes the previous default behavior glance had
of allowing anyone to upload an image as is_public previously by default.

DocImpact
Closes-bug: 1317314

Change-Id: I60d2257115e9207e09b50d9f950076b7fe8237d7
replace dict.iteritems() with six.iteritems(dict)

According to https://wiki.openstack.org/wiki/Python3 dict.iteritems()
should be replaced with six.iteritems(dict).

Change-Id: Id8a87cf2ba68b37507f9238a48e8a224612a7b90
Merge "make uploading an image as public admin only by default"
Merge "replace dict.iteritems() with six.iteritems(dict)"
Add hacking checks

There have been a handful of changes recently to fix stylistic bugs
in the unit tests (example: If41a7). The changes themselves were fine,
but there are two problems:

1) The stylistic changes they made were not listed in HACKING.rst
2) They were one-time changes; the rules that were violated will
   continue to be violated.

This change updates HACKING.rst to include a few of the stylistic
rules that have been fixed recently, and adds checks to ensure that
they will be enforced going forward. This is based on nova's hacking
checks.

Change-Id: Ic115342605c472f3a5d255aa570ecb60175ca087
Add test for no_translate_debug_logs hacking check

Adds a test for this hacking check. Also update the code (G319).

Change-Id: I91996b94166f0e69ee4f5fc0b704118d59bfe841
Use df(1) in a portable way

The _get_capacity_info() method of glance.store.filesystem.Store
class calls df(1) with '--block-size' GNU-speicifc argument
to get 1 byte blocks.

To make this code more portable [1], call df(1) with '-k' argument to
get 1024 byte blocks and multiply the result by 1024.

1: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/df.html

Change-Id: I7ab2eb1c8588fec3623046ddc91615ba2eba2c13
Merge "Add hacking checks"
Merge "Add test for no_translate_debug_logs hacking check"
Merge "Remove duplicated is_uuid_like() function"
Assign local variable in api.v2.image_data

If local variable 'image' will be not initialized we get UnboundLocalError
while handle following exceptions:
exception.StorageFull
exception.StorageQuotaFull
exception.ImageSizeLimitExceeded
exception.StorageWriteDenied
webob.exc.HTTPError
ValueError

This is because not initialized variable 'image' used as argument of
method _restore. That is why we should initialize it.

Closes-Bug: #1310952

Change-Id: I3bf73ca272aad479416067495006476934a01dd9
colorizer: use staticmethod rather than classmethod

The methods are actually not class methods at all as they do not use the
class nor the instance.

Change-Id: I04721bcaef30da291389a1144bdcfe65f10753b2
notifier: simply notifier_strategy compat support

In order to handle the deprecated notifier_strategy configuration option
we just need to translate the notifier_strategy value as follows:

  default -> transport_url=None, driver='noop'
  noop -> transport_url=None, driver='noop'
  logging -> transport_url=None, driver='log'
  rabbit -> transport_url=rabbit:///, driver='messaging'
  qpid -> transport_url=qpid:///, driver='messaging'
  None -> transport_url=None, driver=None

where the last bit simply means that the user hasn't specified any
notifier_strategy and we should just have oslo.messaging load a notifier
based on oslo.messaging's config options.

It really doesn't need to be any more complicated than that, and we
certainly shouldn't need to poke at what the user may have configured
for transport_url in their config file.

The reason this is important is that CONF.transport_url is a private
configuration option which soon will not be visible to users of the
oslo.messaging API. See I9c3bf74f13a820ce295aa77a2bbcd781778b5926.

Also, simplify the testing of this stuff by mocking the oslo.messaging
APIs used and using the test scenarios outlined above. This also means
we stop poking around in oslo.messaging internals like:

       self.assertEqual(str(nfier._transport._driver._url),
                        'qpid:///')

Naughty, naughty!

Note: it's arguable we should just remove notifier_strategy in Juno
since we deprecated it in Icehouse, but this patch will be useful to
backport to stable/icehouse in any case.

Change-Id: I067248974baee50a2a0afb38bf022b65d1bea57a
notifier: remove notifier_strategy compat support

The notifier_strategy option is deprecated since we merged commit
I8cd84772bc5867e06b2a50ed7e15b9e86f0b94ad during the Icehouse cycle.

Assuming the usual single cycle deprecation period, this can now be
removed.

DocImpact: the notifier_strategy has been removed in favor of the
notification_driver and related oslo.messaging options.

Change-Id: I3ab0133b697a820536e5da84e30b078915a29f6c
sync oslo incubator code

Code was added in oslo incubator to allow configuring tcp keepalive[0]. Syncing
glance to pull in this changes so we can use that function to set keepalive

[0] https://review.openstack.org/#/c/90870/

Changes are
gettextutils.py
9912e5d Add API for creating translation functions
6cc96d0 Fix test_gettextutils on Python 3
fd33d1e Fix gettextutil.Message handling of deep copy failures
047b2e4 Change lazy translation to retain complete dict

importutils.py
885828a Deleted duplicated method in cliutils.

log.py
edd73c9  Merge "Improve help strings"

network_utils.py
e433899 Enable configuring tcp keepalive
162e850 Remove import workaround of SplitResult

timeutils.py
d815087  Merge "Fix spelling errors in comments"

Head in oslo incubator is
=================================================
commit 8ce44b1d8b57532d6178137aabaa77cbb8e1bae7
Merge: 933bf04 e53e815
Author: Jenkins <jenkins@review.openstack.org>
Merge "Add mailmap entry"
=================================================

Change-Id: Icc42b43ec6d059616bf921a56a092fae16d4a107