minor error at exception launch when no port mapping found at ovim new_external_port 77/1377/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 27 Mar 2017 14:48:32 +0000 (16:48 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Mon, 27 Mar 2017 15:48:13 +0000 (16:48 +0100)
Change-Id: Ica397ec68c2907dc0475f921c78b3cf27dedb304
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
ovim.py

diff --git a/ovim.py b/ovim.py
index 5b36b73..15bde75 100644 (file)
--- a/ovim.py
+++ b/ovim.py
@@ -872,8 +872,7 @@ class ovim():
         port_mapping_data = self.get_of_port_mappings(columns, db_filter)
 
         if not len(port_mapping_data):
-            raise ovimException("No port mapping founded for region='{}', compute id='{}' and pci='{}'".
-                                format(db_filter['region'], db_filter['compute_node'], db_filter['pci']),
+            raise ovimException("No port mapping founded for '{}'".format(str(db_filter)),
                                 HTTP_Not_Found)
         elif len(port_mapping_data) > 1:
             raise ovimException("Wrong port data was given, please check pci, region & compute id data",