Sync oslo cache with oslo-incubator

Due to removal of py3kcompat we need to sync with
oslo-incubator in order to use six package directly.

Related-Bug: #1276440
Change-Id: Ib3d1c9e09497f7ecd7495ef0f70c6105c14a9783
This commit is contained in:
Jakub Libosvar 2014-02-24 09:37:11 +01:00
parent 8a70bfd97a
commit cd6e9ad2c1

View File

@ -20,10 +20,9 @@ Supported configuration options:
`key_namespace`: Namespace under which keys will be created.
"""
from six.moves.urllib import parse
from stevedore import driver
from neutron.openstack.common.py3kcompat import urlutils
def _get_olso_configs():
"""Returns the oslo.config options to register."""
@ -58,7 +57,7 @@ def get_cache(url='memory://'):
:param conf: Configuration instance to use
"""
parsed = urlutils.urlparse(url)
parsed = parse.urlparse(url)
backend = parsed.scheme
query = parsed.query
@ -69,7 +68,7 @@ def get_cache(url='memory://'):
# http://hg.python.org/cpython/rev/79e6ff3d9afd
if not query and '?' in parsed.path:
query = parsed.path.split('?', 1)[-1]
parameters = urlutils.parse_qsl(query)
parameters = parse.parse_qsl(query)
kwargs = {'options': dict(parameters)}
mgr = driver.DriverManager('neutron.openstack.common.cache.backends', backend,