Skip to content

Commit

Permalink
Relax OpenStack upper capping of client versions
Browse files Browse the repository at this point in the history
- uncap keystoneclient and bump to >=0.3.0 to match requirements
- fix test case to handle change in keystoneclient where cached
values are stored as string now. Previous test passed in tuple and
new auth_token would fail when it tried to json.loads the
tuple. (see _cache_get() in keystone auth_token)

Change-Id: I568d8e0ae6586b91d5e38cb8750731f3fe6e22e7
Fixes:Bug#1200214
  • Loading branch information
Gordon Chung authored and openstack-gerrit committed Jul 26, 2013
1 parent 2f69200 commit 688c725
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -17,7 +17,7 @@ stevedore>=0.9
msgpack-python
python-glanceclient
python-novaclient>=2.6.10
python-keystoneclient>=0.2,<0.3
python-keystoneclient>=0.3.0
python-ceilometerclient>=1.0.1
python-swiftclient
lxml
Expand Down
9 changes: 5 additions & 4 deletions tests/api/v2/test_acl_scenarios.py
Expand Up @@ -18,6 +18,7 @@
"""Test ACL."""

import datetime
import json
import testscenarios

from oslo.config import cfg
Expand All @@ -44,7 +45,7 @@ def __init__(self):
def get(self, key):
if key == "tokens/%s" % VALID_TOKEN:
dt = datetime.datetime.now() + datetime.timedelta(minutes=5)
return ({'access': {
return json.dumps(({'access': {
'token': {'id': VALID_TOKEN},
'user': {
'id': 'user_id1',
Expand All @@ -54,10 +55,10 @@ def get(self, key):
'roles': [
{'name': 'admin'},
]},
}}, dt.strftime("%s"))
}}, dt.strftime("%s")))
if key == "tokens/%s" % VALID_TOKEN2:
dt = datetime.datetime.now() + datetime.timedelta(minutes=5)
return ({'access': {
return json.dumps(({'access': {
'token': {'id': VALID_TOKEN2},
'user': {
'id': 'user_id2',
Expand All @@ -67,7 +68,7 @@ def get(self, key):
'roles': [
{'name': 'Member'},
]},
}}, dt.strftime("%s"))
}}, dt.strftime("%s")))

def set(self, key, value, **kwargs):
self.set_value = value
Expand Down

0 comments on commit 688c725

Please sign in to comment.