From 9c6ab1bc280ef0947528c948db7f113cbfa8a1ab Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Fri, 24 Jun 2011 15:21:56 +0100 Subject: [PATCH] Fixing bug #798261 --- quantum/api/faults.py | 2 +- quantum/api/ports.py | 2 -- quantum/plugins/SamplePlugin.py | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/quantum/api/faults.py b/quantum/api/faults.py index 35f6c1073..ef4d50bc6 100644 --- a/quantum/api/faults.py +++ b/quantum/api/faults.py @@ -52,7 +52,7 @@ class Fault(webob.exc.HTTPException): fault_name: { 'code': code, 'message': self.wrapped_exc.explanation, - 'detail': self.wrapped_exc.detail}} + 'detail': str(self.wrapped_exc.detail)}} # 'code' is an attribute on the fault tag itself metadata = {'application/xml': {'attributes': {fault_name: 'code'}}} default_xmlns = common.XML_NS_V10 diff --git a/quantum/api/ports.py b/quantum/api/ports.py index 2a066255d..729a7182d 100644 --- a/quantum/api/ports.py +++ b/quantum/api/ports.py @@ -42,7 +42,6 @@ class Controller(common.QuantumController): "attributes": { "port": ["id", "state"], }, }, } - def __init__(self, plugin_conf_file=None): self._resource_name = 'port' super(Controller, self).__init__() @@ -142,7 +141,6 @@ class Controller(common.QuantumController): except exception.PortNotFound as e: return faults.Fault(faults.PortNotFound(e)) - def attach_resource(self, request, tenant_id, network_id, id): content_type = request.best_match_content_type() print "Content type:%s" % content_type diff --git a/quantum/plugins/SamplePlugin.py b/quantum/plugins/SamplePlugin.py index 32dc823f9..5964beffb 100644 --- a/quantum/plugins/SamplePlugin.py +++ b/quantum/plugins/SamplePlugin.py @@ -226,6 +226,7 @@ class DummyDataPlugin(object): """ print("unplug_interface() called\n") + class FakePlugin(object): """ FakePlugin is a demo plugin that provides -- 2.45.2