From 258fd15ca87dc957de786465dc4527e37e517447 Mon Sep 17 00:00:00 2001 From: Abhishek Chanda Date: Tue, 7 Oct 2014 13:54:58 -0700 Subject: [PATCH] Use keystonemiddleware in place of keystoneclient keystoneclient.middleware has been deprecated in favor of keystonemiddleware Change-Id: I8bb2e8ae453027334ea7303ba87cbf8000b27994 Closes-Bug: #1377822 --- mistral/api/access_control.py | 2 +- mistral/tests/unit/api/test_auth.py | 4 ++-- requirements.txt | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mistral/api/access_control.py b/mistral/api/access_control.py index 250f3dac..c2cd3a7a 100644 --- a/mistral/api/access_control.py +++ b/mistral/api/access_control.py @@ -16,7 +16,7 @@ """Access Control API server.""" -from keystoneclient.middleware import auth_token +from keystonemiddleware import auth_token from oslo.config import cfg diff --git a/mistral/tests/unit/api/test_auth.py b/mistral/tests/unit/api/test_auth.py index b4384257..ad83b8e1 100644 --- a/mistral/tests/unit/api/test_auth.py +++ b/mistral/tests/unit/api/test_auth.py @@ -15,7 +15,7 @@ import datetime import uuid -from keystoneclient.middleware import auth_token +from keystonemiddleware import auth_token import mock from oslo.config import cfg import pecan @@ -88,7 +88,7 @@ class TestKeystoneMiddleware(base.FunctionalTest): auth_token.AuthProtocol, '_get_user_token_from_header', mock.MagicMock(return_value='')) @mock.patch.object( - auth_token.AuthProtocol, '_validate_user_token', + auth_token.AuthProtocol, '_validate_token', mock.MagicMock(return_value=PKI_TOKEN_VERIFIED)) @mock.patch.object( db_api, "workbook_get", diff --git a/requirements.txt b/requirements.txt index 29b717e8..b461c974 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,3 +27,4 @@ stevedore>=1.0.0 # Apache-2.0 yaql==0.2.1 # This is not in global requirements jsonschema>=2.0.0,<3.0.0 mock>=1.0 +keystonemiddleware>=1.0.0