diff options
author | Jamie Lennox <jlennox@redhat.com> | 2013-06-26 09:45:58 +1000 |
---|---|---|
committer | Jamie Lennox <jlennox@redhat.com> | 2013-06-26 09:45:58 +1000 |
commit | 3bc661a8a79c2d86c83b8a74184bb8dc62b2aa40 (patch) | |
tree | 4d68eef3907943f0012da429c996b69ffac59fc9 /keystone/middleware | |
parent | 31863d1b4124e703905bb85d767fd0200e20c25e (diff) | |
download | keystone-3bc661a8a79c2d86c83b8a74184bb8dc62b2aa40.tar.gz keystone-3bc661a8a79c2d86c83b8a74184bb8dc62b2aa40.tar.xz keystone-3bc661a8a79c2d86c83b8a74184bb8dc62b2aa40.zip |
Revert environment module usage in middleware.
Devstack is pulling s3_token into the swift pipeline and so depending on
keystone.environment is breaking devstack installs.
Fixes bug 1193112
Change-Id: Ifd89e542f79a2bee00113e7df676d30da0f05e59
Diffstat (limited to 'keystone/middleware')
-rw-r--r-- | keystone/middleware/ec2_token.py | 6 | ||||
-rw-r--r-- | keystone/middleware/s3_token.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/keystone/middleware/ec2_token.py b/keystone/middleware/ec2_token.py index 265ccaa6..7cd007c7 100644 --- a/keystone/middleware/ec2_token.py +++ b/keystone/middleware/ec2_token.py @@ -24,6 +24,7 @@ Starting point for routing EC2 requests. import urlparse +from eventlet.green import httplib import webob.dec import webob.exc @@ -31,7 +32,6 @@ from nova import flags from nova import utils from nova import wsgi -from keystone.common import environment FLAGS = flags.FLAGS flags.DEFINE_string('keystone_ec2_url', @@ -75,9 +75,9 @@ class EC2Token(wsgi.Middleware): # pylint: disable-msg=E1101 o = urlparse.urlparse(FLAGS.keystone_ec2_url) if o.scheme == 'http': - conn = environment.httplib.HTTPConnection(o.netloc) + conn = httplib.HTTPConnection(o.netloc) else: - conn = environment.httplib.HTTPSConnection(o.netloc) + conn = httplib.HTTPSConnection(o.netloc) conn.request('POST', o.path, body=creds_json, headers=headers) response = conn.getresponse().read() conn.close() diff --git a/keystone/middleware/s3_token.py b/keystone/middleware/s3_token.py index a5eff289..2b7f99a0 100644 --- a/keystone/middleware/s3_token.py +++ b/keystone/middleware/s3_token.py @@ -33,11 +33,11 @@ This WSGI component: """ +import httplib import webob from swift.common import utils as swift_utils -from keystone.common import environment from keystone.openstack.common import jsonutils @@ -62,9 +62,9 @@ class S3Token(object): self.auth_port = int(conf.get('auth_port', 35357)) self.auth_protocol = conf.get('auth_protocol', 'https') if self.auth_protocol == 'http': - self.http_client_class = environment.httplib.HTTPConnection + self.http_client_class = httplib.HTTPConnection else: - self.http_client_class = environment.httplib.HTTPSConnection + self.http_client_class = httplib.HTTPSConnection # SSL self.cert_file = conf.get('certfile') self.key_file = conf.get('keyfile') |