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
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 "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
Merge "sync oslo incubator code"
Merge "To fixes import error for run_tests.sh"
Move `location`'s domain code out of glance.store

This patch moves the location domain's specific code out of
glance.store. Since this code is Glance specific, it's necessary to move
it out of the store package so that we can then remove it all together
and use the `glance.store` library.

Partially-Implements blueprint: create-store-package

Change-Id: I7dc3d5d211054cabc2adc2b9b689cda11bce2190
Merge "Bump python-swiftclient version"
Merge "Move `location`'s domain code out of glance.store"
Do not call configure several times at startup

At startup, Glance first creates the stores and then verifies
the default store. Each of these operations will indirectly
trigger the creation of store objects which is triggering configure
and configure_add calls.
configure and configure_add can potentially contain remote calls
going through the network: we should avoid having these methods
called two times for nothing.

This patch adds a parameter in the store init method to specify
if the configuration of the store should happen. In case of verify
default store, the configuration should not happen.

Closes-Bug: #1315237

Change-Id: I329730a3351cd7b78de27a88a7f669ae32b2f100
Update documentation surrounding the api and registry servers

Change-Id: I24e288eae841190e0776623b29da0bf8b9b9d34c
Fixes v2 return status on unauthorized download

If a user is not allowed to download an image because of a policy,
glance v2 API responds with a  HTTP 200 status and no data instead
of HTTP 403 for no cache only.
The problem is that get_data implementation for notification
proxy is a generator, this situation delays the other proxies
get_data calls (including the policy proxy) for the first time
data is retrieved.
Hence, there is a delay in enforcing policy, so 200 is sent before
the API gets the chance to catch the policy exception.

DocImpact
Closes-Bug: #1326781
Change-Id: I1e50a069a6b7f9eed7160cd5908a5fa30274e227