50c9ca1572
In a few places err_msg was passed to NvpPluginException though that expected err_desc. This patch makes NvpPluginException take err_msg instead and updates err_desc to err_msg when calling NvpPluginException Fixes bug 1098351 Change-Id: I10eca5f2b98ce8faa81ad7c7687902b6f08752c1
43 lines
1.4 KiB
Python
43 lines
1.4 KiB
Python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
|
|
# Copyright 2012 Nicira Networks, Inc
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
""" NVP Plugin exceptions """
|
|
|
|
from quantum.common import exceptions as q_exc
|
|
|
|
|
|
class NvpPluginException(q_exc.QuantumException):
|
|
message = _("An unexpected error occurred in the NVP Plugin:%(err_msg)s")
|
|
|
|
|
|
class NvpInvalidConnection(NvpPluginException):
|
|
message = _("Invalid NVP connection parameters: %(conn_params)s")
|
|
|
|
|
|
class NvpInvalidNovaZone(NvpPluginException):
|
|
message = _("Unable to find cluster config entry "
|
|
"for nova zone: %(nova_zone)s")
|
|
|
|
|
|
class NvpNoMorePortsException(NvpPluginException):
|
|
message = _("Unable to create port on network %(network)s. "
|
|
"Maximum number of ports reached")
|
|
|
|
|
|
class NvpOutOfSyncException(NvpPluginException):
|
|
message = _("Quantum state has diverged from the networking backend!")
|