summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Lamar <brian.lamar@rackspace.com>2012-01-04 18:54:45 -0500
committerBrian Lamar <brian.lamar@rackspace.com>2012-01-12 13:30:55 -0500
commitccaf97a5544ca0660cb46d9743ffa06470e5c37a (patch)
tree700154bb9aa1189d45e66acd610ce4f8afb87552
parente0680250c052fd3eaccd821eaf584b7a15c4c656 (diff)
downloadnova-ccaf97a5544ca0660cb46d9743ffa06470e5c37a.tar.gz
nova-ccaf97a5544ca0660cb46d9743ffa06470e5c37a.tar.xz
nova-ccaf97a5544ca0660cb46d9743ffa06470e5c37a.zip
Ensure nova is compatible with WebOb 1.2+
Fixes bug 888371 Change-Id: I965c15f9f18b835b666c60b2ab1e6089c0fb4121
-rw-r--r--nova/api/openstack/v2/contrib/floating_ip_dns.py4
-rw-r--r--nova/api/openstack/v2/extensions.py1
-rw-r--r--nova/api/openstack/v2/images.py4
-rw-r--r--nova/objectstore/s3server.py2
4 files changed, 6 insertions, 5 deletions
diff --git a/nova/api/openstack/v2/contrib/floating_ip_dns.py b/nova/api/openstack/v2/contrib/floating_ip_dns.py
index 1f1cf824c..de1a0a27e 100644
--- a/nova/api/openstack/v2/contrib/floating_ip_dns.py
+++ b/nova/api/openstack/v2/contrib/floating_ip_dns.py
@@ -113,7 +113,7 @@ class FloatingIPDNSController(object):
names. if name is specified, query for ips.
Quoted domain (aka 'zone') specified as id."""
context = req.environ['nova.context']
- params = req.str_GET
+ params = req.GET
floating_ip = params['ip'] if 'ip' in params else ""
name = params['name'] if 'name' in params else ""
zone = _unquote_zone(id)
@@ -193,7 +193,7 @@ class FloatingIPDNSController(object):
def delete(self, req, id):
"""Delete the entry identified by req and id. """
context = req.environ['nova.context']
- params = req.str_GET
+ params = req.GET
name = params['name'] if 'name' in params else ""
zone = _unquote_zone(id)
diff --git a/nova/api/openstack/v2/extensions.py b/nova/api/openstack/v2/extensions.py
index a69d5f7df..0aa3146a9 100644
--- a/nova/api/openstack/v2/extensions.py
+++ b/nova/api/openstack/v2/extensions.py
@@ -162,6 +162,7 @@ class RequestExtensionController(object):
pre_handler(req)
res = req.get_response(self.application)
+ res.environ = req.environ
# Don't call extensions if the main application returned an
# unsuccessful status
diff --git a/nova/api/openstack/v2/images.py b/nova/api/openstack/v2/images.py
index a07753729..96a2275e6 100644
--- a/nova/api/openstack/v2/images.py
+++ b/nova/api/openstack/v2/images.py
@@ -113,11 +113,11 @@ class Controller(wsgi.Controller):
:retval a dict of key/value filters
"""
filters = {}
- for param in req.str_params:
+ for param in req.params:
if param in SUPPORTED_FILTERS or param.startswith('property-'):
# map filter name or carry through if property-*
filter_name = SUPPORTED_FILTERS.get(param, param)
- filters[filter_name] = req.str_params.get(param)
+ filters[filter_name] = req.params.get(param)
return filters
@wsgi.serializers(xml=ImageTemplate)
diff --git a/nova/objectstore/s3server.py b/nova/objectstore/s3server.py
index 485cc3cde..678a2219b 100644
--- a/nova/objectstore/s3server.py
+++ b/nova/objectstore/s3server.py
@@ -136,7 +136,7 @@ class BaseRequestHandler(object):
return self.response
def get_argument(self, arg, default):
- return self.request.str_params.get(arg, default)
+ return self.request.params.get(arg, default)
def set_header(self, header, value):
self.response.headers[header] = value