From 52fef00aefb7c7c48714e0c125aed342dbda7c07 Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Wed, 10 Aug 2016 15:42:39 +0300 Subject: [PATCH] Update requirements This patch synchronizes our-requirements with gr. Note: rally dependency of keystoneclient is defferent than ge due too bug in keystoneclient < 2.0.0 . Change-Id: I654fe51df1ffab7966aa770275c459b9252b7bb4 --- rally/osclients.py | 12 ++++++++++-- requirements.txt | 16 ++++++++-------- tests/unit/test_osclients.py | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/rally/osclients.py b/rally/osclients.py index 85edcf4806..8459f056f2 100644 --- a/rally/osclients.py +++ b/rally/osclients.py @@ -273,6 +273,7 @@ class Keystone(OSClient): If this object was constructed with a version in the api_info then that will be used unless the version parameter is passed. """ + import keystoneclient from keystoneclient import client # Use the version in the api_info if provided, otherwise fall @@ -295,8 +296,15 @@ class Keystone(OSClient): # list which is why we need to ensure service_catalog is still # present. auth_ref = plugin.get_access(sess) - ks = client.Client(version=version, session=sess, - timeout=CONF.openstack_client_http_timeout) + kw = {"version": version, "session": sess, + "timeout": CONF.openstack_client_http_timeout} + if keystoneclient.__version__[0] == "1": + # NOTE(andreykurilin): let's leave this hack for envs which uses + # old(<2.0.0) keystoneclient version. Upstream fix: + # https://github.com/openstack/python-keystoneclient/commit/d9031c252848d89270a543b67109a46f9c505c86 + from keystoneclient import base + kw["auth_url"] = sess.get_endpoint(interface=base.AUTH_INTERFACE) + ks = client.Client(**kw) ks.auth_ref = auth_ref return ks diff --git a/requirements.txt b/requirements.txt index 1a32dce5a4..3b62500b16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,12 +8,12 @@ Jinja2>=2.8 # BSD # [constant-upper-limit] jsonschema!=2.5.0,>=2.0.0,<3.0.0 # MIT netaddr!=0.7.16,>=0.7.12 # BSD -oslo.config>=3.12.0 # Apache Software License +oslo.config>=3.14.0 # Apache Software License oslo.db>=4.1.0 # Apache Software License oslo.i18n>=2.1.0 # Apache Software License oslo.log>=1.14.0 # Apache Software License oslo.serialization>=1.10.0 # Apache Software License -oslo.utils>=3.15.0 # Apache Software License +oslo.utils>=3.16.0 # Apache Software License paramiko>=2.0 # LGPL pbr>=1.6 # Apache Software License # [constant-upper-limit] @@ -21,17 +21,17 @@ PrettyTable>=0.7,<0.8 # BSD PyYAML>=3.1.0 # MIT python-designateclient>=1.5.0 # Apache License, Version 2.0 python-glanceclient>=2.0.0 # Apache License, Version 2.0 -python-keystoneclient!=1.8.0,!=2.1.0,>=1.7.0 # Apache Software License -keystoneauth1>=2.7.0 # Apache Software License +python-keystoneclient!=2.1.0,>=2.0.0 # Apache Software License +keystoneauth1>=2.10.0 # Apache Software License python-novaclient!=2.33.0,>=2.29.0 # Apache License, Version 2.0 python-neutronclient>=4.2.0 # Apache Software License python-cinderclient!=1.7.0,!=1.7.1,>=1.6.0 # Apache Software License python-manilaclient>=1.10.0 # Apache Software License -python-monascaclient>=1.2.0 # Apache Software License +python-monascaclient>=1.1.0 # Apache Software License python-heatclient>=1.1.0 # Apache Software License -python-ceilometerclient>=2.2.1 # Apache Software License -python-ironicclient>=1.1.0 # Apache Software License -python-saharaclient>=0.13.0 # Apache License, Version 2.0 +python-ceilometerclient>=2.5.0 # Apache Software License +python-ironicclient>=1.6.0 # Apache Software License +python-saharaclient>=0.16.0 # Apache License, Version 2.0 python-troveclient>=2.2.0 # Apache Software License python-zaqarclient>=1.0.0 # Apache Software License python-swiftclient>=2.2.0 # Apache Software License diff --git a/tests/unit/test_osclients.py b/tests/unit/test_osclients.py index 90c0963fa4..1ece38fe3f 100644 --- a/tests/unit/test_osclients.py +++ b/tests/unit/test_osclients.py @@ -35,7 +35,7 @@ class DummyClient(osclients.OSClient): class OSClientTestCaseUtils(object): def set_up_keystone_mocks(self): - self.ksc_module = mock.MagicMock() + self.ksc_module = mock.MagicMock(__version__="2.0.0") self.ksc_client = mock.MagicMock() self.ksc_identity = mock.MagicMock() self.ksc_identity_plugin = mock.MagicMock()