From 155108545fa3b2d534008e4d5bc4e160a37832f0 Mon Sep 17 00:00:00 2001 From: Akihiro MOTOKI Date: Fri, 17 Aug 2012 12:41:13 +0900 Subject: [PATCH] Add missing conversion specifiers in exception messages. Fixes bug 1037881 Change-Id: I05760707f28545d9593d30b5c5fe69a21636ba90 --- quantum/common/exceptions.py | 8 +++---- .../plugins/cisco/common/cisco_exceptions.py | 24 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/quantum/common/exceptions.py b/quantum/common/exceptions.py index 7e3f6377d..241727c1b 100644 --- a/quantum/common/exceptions.py +++ b/quantum/common/exceptions.py @@ -103,13 +103,13 @@ class MacAddressInUse(InUse): class HostRoutesExhausted(QuantumException): # NOTE(xchenum): probably make sense to use quota exceeded exception? message = _("Unable to complete operation for %(subnet_id)s. " - "The number of host routes exceeds the limit %(quota).") + "The number of host routes exceeds the limit %(quota)s.") class DNSNameServersExhausted(QuantumException): # NOTE(xchenum): probably make sense to use quota exceeded exception? message = _("Unable to complete operation for %(subnet_id)s. " - "The number of DNS nameservers exceeds the limit %(quota).") + "The number of DNS nameservers exceeds the limit %(quota)s.") class IpAddressInUse(InUse): @@ -211,8 +211,8 @@ class InvalidQuotaValue(QuantumException): class InvalidSharedSetting(QuantumException): - message = _("Unable to reconfigure sharing settings for network" - "%(network). Multiple tenants are using it") + message = _("Unable to reconfigure sharing settings for network " + "%(network)s. Multiple tenants are using it") class InvalidExtenstionEnv(QuantumException): diff --git a/quantum/plugins/cisco/common/cisco_exceptions.py b/quantum/plugins/cisco/common/cisco_exceptions.py index b8d479260..dff9574f3 100644 --- a/quantum/plugins/cisco/common/cisco_exceptions.py +++ b/quantum/plugins/cisco/common/cisco_exceptions.py @@ -76,14 +76,14 @@ class NetworkVlanBindingAlreadyExists(exceptions.QuantumException): class PortProfileAlreadyExists(exceptions.QuantumException): """Port profile cannot be created since it already exisits""" - message = _("PortProfile %(pp_name) for %(tenant_id)s " + message = _("PortProfile %(pp_name)s for %(tenant_id)s " "already exists") class PortProfileBindingAlreadyExists(exceptions.QuantumException): """Binding cannot be created, since it already exists""" message = _("PortProfileBinding for port profile %(pp_id)s to " - "port %(port_id) already exists") + "port %(port_id)s already exists") class VlanIDNotFound(exceptions.QuantumException): @@ -134,52 +134,52 @@ class CredentialAlreadyExists(exceptions.QuantumException): class NexusPortBindingNotFound(exceptions.QuantumException): """NexusPort Binding is not present""" - message = _("Nexus Port Binding %(port_id) is not present") + message = _("Nexus Port Binding %(port_id)s is not present") class NexusPortBindingAlreadyExists(exceptions.QuantumException): """NexusPort Binding alredy exists""" - message = _("Nexus Port Binding %(port_id) already exists") + message = _("Nexus Port Binding %(port_id)s already exists") class UcsmBindingNotFound(exceptions.QuantumException): """Ucsm Binding is not present""" - message = _("Ucsm Binding with ip %(ucsm_ip) is not present") + message = _("Ucsm Binding with ip %(ucsm_ip)s is not present") class UcsmBindingAlreadyExists(exceptions.QuantumException): """Ucsm Binding already exists""" - message = _("Ucsm Binding with ip %(ucsm_ip) already exists") + message = _("Ucsm Binding with ip %(ucsm_ip)s already exists") class DynamicVnicNotFound(exceptions.QuantumException): """Ucsm Binding is not present""" - message = _("Dyanmic Vnic %(vnic_id) is not present") + message = _("Dyanmic Vnic %(vnic_id)s is not present") class DynamicVnicAlreadyExists(exceptions.QuantumException): """Ucsm Binding already exists""" - message = _("Dynamic Vnic with name %(device_name) already exists") + message = _("Dynamic Vnic with name %(device_name)s already exists") class BladeNotFound(exceptions.QuantumException): """Blade is not present""" - message = _("Blade %(blade_id) is not present") + message = _("Blade %(blade_id)s is not present") class BladeAlreadyExists(exceptions.QuantumException): """Blade already exists""" - message = _("Blade with mgmt_ip %(mgmt_ip) already exists") + message = _("Blade with mgmt_ip %(mgmt_ip)s already exists") class PortVnicBindingAlreadyExists(exceptions.QuantumException): """PortVnic Binding already exists""" - message = _("PortVnic Binding %(port_id) already exists") + message = _("PortVnic Binding %(port_id)s already exists") class PortVnicNotFound(exceptions.QuantumException): """PortVnic Binding is not present""" - message = _("PortVnic Binding %(port_id) is not present") + message = _("PortVnic Binding %(port_id)s is not present") class InvalidAttach(exceptions.QuantumException): -- 2.45.2