]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add missing conversion specifiers in exception messages.
authorAkihiro MOTOKI <motoki@da.jp.nec.com>
Fri, 17 Aug 2012 03:41:13 +0000 (12:41 +0900)
committerAkihiro MOTOKI <motoki@da.jp.nec.com>
Fri, 17 Aug 2012 03:59:26 +0000 (12:59 +0900)
Fixes bug 1037881

Change-Id: I05760707f28545d9593d30b5c5fe69a21636ba90

quantum/common/exceptions.py
quantum/plugins/cisco/common/cisco_exceptions.py

index 7e3f6377d5d52974440a166cd91755fa88248f88..241727c1b1813b85193adc4931c13025717fc28c 100644 (file)
@@ -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):
index b8d4792607275a901a81a047b7a36f104b6f78f2..dff9574f318b449edd1382ceb4580b9ae5a529b2 100644 (file)
@@ -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):