summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorBrian Waldon <brian.waldon@rackspace.com>2011-03-09 15:08:11 -0500
committerBrian Waldon <brian.waldon@rackspace.com>2011-03-09 15:08:11 -0500
commit3f723bcf54b4d779c66373dc8f69f43923dd586a (patch)
treec0a7b3873359750fc8bf02bf9d0b12ee2b813f05 /nova/api
parent5cd52711c869c9a743157b5fb19bb9e445576fa7 (diff)
renaming wsgi.Request.best_match to best_match_content_type; correcting calls to that function in code from trunk
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/direct.py2
-rw-r--r--nova/api/openstack/__init__.py2
-rw-r--r--nova/api/openstack/faults.py2
-rw-r--r--nova/api/openstack/servers.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/nova/api/direct.py b/nova/api/direct.py
index 1d699f947..dfca250e0 100644
--- a/nova/api/direct.py
+++ b/nova/api/direct.py
@@ -206,7 +206,7 @@ class ServiceWrapper(wsgi.Controller):
params = dict([(str(k), v) for (k, v) in params.iteritems()])
result = method(context, **params)
if type(result) is dict or type(result) is list:
- return self._serialize(result, req.best_match())
+ return self._serialize(result, req.best_match_content_type())
else:
return result
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py
index 6e1a2a06c..197fcc619 100644
--- a/nova/api/openstack/__init__.py
+++ b/nova/api/openstack/__init__.py
@@ -125,5 +125,5 @@ class Versions(wsgi.Application):
"application/xml": {
"attributes": dict(version=["status", "id"])}}
- content_type = req.best_match()
+ content_type = req.best_match_content_type()
return wsgi.Serializer(metadata).serialize(response, content_type)
diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py
index 075fdb997..2fd733299 100644
--- a/nova/api/openstack/faults.py
+++ b/nova/api/openstack/faults.py
@@ -58,6 +58,6 @@ class Fault(webob.exc.HTTPException):
# 'code' is an attribute on the fault tag itself
metadata = {'application/xml': {'attributes': {fault_name: 'code'}}}
serializer = wsgi.Serializer(metadata)
- content_type = req.best_match()
+ content_type = req.best_match_content_type()
self.wrapped_exc.body = serializer.serialize(fault_data, content_type)
return self.wrapped_exc
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 8dd078a31..25c667532 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -217,7 +217,7 @@ class Controller(wsgi.Controller):
'rebuild': self._action_rebuild,
}
- input_dict = self._deserialize(req.body, req)
+ input_dict = self._deserialize(req.body, req.get_content_type())
for key in actions.keys():
if key in input_dict:
return actions[key](input_dict, req, id)