summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-03-30 10:41:22 -0700
committerJustin Santa Barbara <justin@fathomdb.com>2011-03-30 10:41:22 -0700
commitee709d39e6c66ec4aad722fb20951ae9d714f259 (patch)
tree0862c0735ad24eb1a5a61cfcd92d91f01691a1fe /nova/api
parent12505c6bae61e72b6c75ac647323c3ec15997df1 (diff)
Some tests actually tested for the lack of a namespace :-)
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/extensions.py3
-rw-r--r--nova/api/openstack/faults.py5
-rw-r--r--nova/api/openstack/images.py3
3 files changed, 5 insertions, 6 deletions
diff --git a/nova/api/openstack/extensions.py b/nova/api/openstack/extensions.py
index 75f369cac..7ea7afef6 100644
--- a/nova/api/openstack/extensions.py
+++ b/nova/api/openstack/extensions.py
@@ -156,7 +156,8 @@ class ResponseExtensionController(common.OpenstackController):
body = res.body
headers = res.headers
except AttributeError:
- body = self._serialize(res, content_type)
+ default_xmlns = None
+ body = self._serialize(res, content_type, default_xmlns)
headers = {"Content-Type": content_type}
res = webob.Response()
res.body = body
diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py
index 0e9c4b26f..a05e97021 100644
--- a/nova/api/openstack/faults.py
+++ b/nova/api/openstack/faults.py
@@ -20,10 +20,10 @@ import webob.dec
import webob.exc
from nova import wsgi
+from nova.api.openstack import common
class Fault(webob.exc.HTTPException):
-
"""An RS API fault response."""
_fault_names = {
@@ -57,7 +57,8 @@ class Fault(webob.exc.HTTPException):
fault_data[fault_name]['retryAfter'] = retry
# 'code' is an attribute on the fault tag itself
metadata = {'application/xml': {'attributes': {fault_name: 'code'}}}
- serializer = wsgi.Serializer(metadata)
+ default_xmlns = common.XML_NS_V10
+ serializer = wsgi.Serializer(metadata, default_xmlns)
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/images.py b/nova/api/openstack/images.py
index 5550ee532..77baf5947 100644
--- a/nova/api/openstack/images.py
+++ b/nova/api/openstack/images.py
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import datetime
-
import webob.exc
from nova import compute
@@ -22,7 +20,6 @@ from nova import exception
from nova import flags
from nova import log
from nova import utils
-from nova import wsgi
from nova.api.openstack import common
from nova.api.openstack import faults
from nova.api.openstack.views import images as images_view