From: Ying Liu Date: Tue, 30 Aug 2011 23:09:51 +0000 (-0700) Subject: add multiport resource X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d73c08564cddcfbe371e66ae6860de9ca4e1bdbc;p=openstack-build%2Fneutron-build.git add multiport resource --- diff --git a/quantum/plugins/cisco/common/cisco_exceptions.py b/quantum/plugins/cisco/common/cisco_exceptions.py index f8440a61b..5decb9792 100644 --- a/quantum/plugins/cisco/common/cisco_exceptions.py +++ b/quantum/plugins/cisco/common/cisco_exceptions.py @@ -55,6 +55,12 @@ class PortProfileNotFound(exceptions.QuantumException): "for tenant %(tenant_id)s") +class MultiportNotFound(exceptions.QuantumException): + """Multiport cannot be found""" + message = _("Multiports %(port_id)s could not be found " \ + "for tenant %(tenant_id)s") + + class PortProfileInvalidDelete(exceptions.QuantumException): """Port profile cannot be deleted since its being used""" message = _("Port profile %(profile_id)s could not be deleted " \ diff --git a/quantum/plugins/cisco/common/cisco_faults.py b/quantum/plugins/cisco/common/cisco_faults.py index ed50ed65a..0df223c8f 100644 --- a/quantum/plugins/cisco/common/cisco_faults.py +++ b/quantum/plugins/cisco/common/cisco_faults.py @@ -34,6 +34,7 @@ class Fault(webob.exc.HTTPException): 451: "CredentialNotFound", 452: "QoSNotFound", 453: "NovatenantNotFound", + 454: "MultiportNotFound", 470: "serviceUnavailable", 471: "pluginFault"} @@ -96,7 +97,7 @@ class CredentialNotFound(webob.exc.HTTPClientError): This indicates that the server did not find the Credential specified in the HTTP request - code: 460, title: Credential not Found + code: 451, title: Credential not Found """ code = 451 title = 'Credential Not Found' @@ -111,7 +112,7 @@ class QosNotFound(webob.exc.HTTPClientError): This indicates that the server did not find the QoS specified in the HTTP request - code: 480, title: QoS not Found + code: 452, title: QoS not Found """ code = 452 title = 'QoS Not Found' @@ -126,7 +127,7 @@ class NovatenantNotFound(webob.exc.HTTPClientError): This indicates that the server did not find the Novatenant specified in the HTTP request - code: 480, title: Nova tenant not Found + code: 453, title: Nova tenant not Found """ code = 453 title = 'Nova tenant Not Found' @@ -134,6 +135,21 @@ class NovatenantNotFound(webob.exc.HTTPClientError): + ' the specified identifier.') +class MultiportNotFound(webob.exc.HTTPClientError): + """ + subclass of :class:`~HTTPClientError` + + This indicates that the server did not find the Multiport specified + in the HTTP request + + code: 454, title: Multiport not Found + """ + code = 454 + title = 'Multiport Not Found' + explanation = ('Unable to find Multiport with' + + ' the specified identifier.') + + class RequestedStateInvalid(webob.exc.HTTPClientError): """ subclass of :class:`~HTTPClientError`