diff options
| author | lin-hua-cheng <lin-hua.cheng@hp.com> | 2013-02-13 22:52:05 -0600 |
|---|---|---|
| committer | Lin Hua Cheng <lin-hua.cheng@hp.com> | 2013-06-20 23:28:31 -0700 |
| commit | 2239c3b27c657dc0ffe2dbd0f95325e0ed7ae7c5 (patch) | |
| tree | 9972797a6e5bd27f6262d86d01f9f50d95264ff7 /tests/fakes.py | |
| parent | abe6781913a7a4e376c0798e2e962ef16e9a48e6 (diff) | |
| download | python-keystoneclient-2239c3b27c657dc0ffe2dbd0f95325e0ed7ae7c5.tar.gz | |
Implements v3 auth client.
Added support for domain scoping.
Enhancement on AccessInfo to support reading v2/v3 token information.
Enhancement on ServiceCatalog for reading/filtering v2/v3 service
catalog information.
Change-Id: Ibb678b9933d3673e37d0fba857a152a3c5d2b4f4
Diffstat (limited to 'tests/fakes.py')
| -rw-r--r-- | tests/fakes.py | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/tests/fakes.py b/tests/fakes.py index feafd52..de7ecff 100644 --- a/tests/fakes.py +++ b/tests/fakes.py @@ -65,37 +65,46 @@ class FakeClient(object): def authenticate(self, cl_obj): cl_obj.user_id = '1' cl_obj.auth_user_id = '1' - cl_obj.tenant_id = '1' + cl_obj.project_id = '1' cl_obj.auth_tenant_id = '1' - cl_obj.auth_ref = access.AccessInfo({ - "token": { - "expires": "2012-02-05T00:00:00", - "id": "887665443383838", - "tenant": { + cl_obj.auth_ref = access.AccessInfo.factory(None, { + "access": { + "token": { + "expires": "2012-02-05T00:00:00", + "id": "887665443383838", + "tenant": { + "id": "1", + "name": "customer-x" + } + }, + "serviceCatalog": [{ + "endpoints": [{ + "adminURL": "http://swift.admin-nets.local:8080/", + "region": "RegionOne", + "internalURL": "http://127.0.0.1:8080/v1/AUTH_1", + "publicURL": + "http://swift.publicinternets.com/v1/AUTH_1" + }], + "type": "object-store", + "name": "swift" + }, { + "endpoints": [{ + "adminURL": "http://cdn.admin-nets.local/v1.1/1", + "region": "RegionOne", + "internalURL": "http://127.0.0.1:7777/v1.1/1", + "publicURL": "http://cdn.publicinternets.com/v1.1/1" + }], + "type": "object-store", + "name": "cdn" + }], + "user": { "id": "1", - "name": "customer-x"}}, - "serviceCatalog": [ - {"endpoints": [ - {"adminURL": "http://swift.admin-nets.local:8080/", - "region": "RegionOne", - "internalURL": "http://127.0.0.1:8080/v1/AUTH_1", - "publicURL": - "http://swift.publicinternets.com/v1/AUTH_1"}], - "type": "object-store", - "name": "swift"}, - {"endpoints": [ - {"adminURL": "http://cdn.admin-nets.local/v1.1/1", - "region": "RegionOne", - "internalURL": "http://127.0.0.1:7777/v1.1/1", - "publicURL": "http://cdn.publicinternets.com/v1.1/1"}], - "type": "object-store", - "name": "cdn"}], - "user": { - "id": "1", - "roles": [ - {"tenantId": "1", - "id": "3", - "name": "Member"}], - "name": "joeuser"} - } - ) + "roles": [{ + "tenantId": "1", + "id": "3", + "name": "Member" + }], + "name": "joeuser" + } + } + }) |
