Skip to content

Commit

Permalink
Ensure nova is compatible with WebOb 1.2+
Browse files Browse the repository at this point in the history
Fixes bug 888371

Change-Id: I965c15f9f18b835b666c60b2ab1e6089c0fb4121
  • Loading branch information
Brian Lamar committed Jan 12, 2012
1 parent e068025 commit ccaf97a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nova/api/openstack/v2/contrib/floating_ip_dns.py
Expand Up @@ -113,7 +113,7 @@ def show(self, req, id):
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)
Expand Down Expand Up @@ -193,7 +193,7 @@ def update(self, req, id, body):
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)

Expand Down
1 change: 1 addition & 0 deletions nova/api/openstack/v2/extensions.py
Expand Up @@ -162,6 +162,7 @@ def process(self, req, *args, **kwargs):
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
Expand Down
4 changes: 2 additions & 2 deletions nova/api/openstack/v2/images.py
Expand Up @@ -113,11 +113,11 @@ def _get_filters(self, req):
: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)
Expand Down
2 changes: 1 addition & 1 deletion nova/objectstore/s3server.py
Expand Up @@ -136,7 +136,7 @@ def __call__(self, request):
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
Expand Down

0 comments on commit ccaf97a

Please sign in to comment.