Minor changes in ovim.py for SDN controllers functionality 11/1211/2
authorPablo Montes Moreno <pablo.montesmoreno@telefonica.com>
Thu, 2 Mar 2017 15:18:36 +0000 (16:18 +0100)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Thu, 2 Mar 2017 15:21:56 +0000 (16:21 +0100)
Change-Id: I0111cd8ac9efe8eb992cc47f6f38b83a5b647cdf
Signed-off-by: Pablo Montes Moreno <pablo.montesmoreno@telefonica.com>
ovim.py

diff --git a/ovim.py b/ovim.py
index be7ef04..fc8b126 100644 (file)
--- a/ovim.py
+++ b/ovim.py
@@ -807,7 +807,7 @@ class ovim():
         :return:
         """
 
-        result, content = self.db.delete_row_by_key("ofcs", "uuid", of_id)
+        result, content = self.db.delete_row("ofcs", of_id)
         if result < 0:
             raise ovimException("Cannot delete ofc from database: {}".format(content), http_code=-result)
         elif result == 0:
@@ -829,7 +829,7 @@ class ovim():
         elif result < 0:
             raise ovimException("Openflow controller with uuid '{}' error".format(uuid),
                                 http_code=HTTP_Internal_Server_Error)
-        return content
+        return content[0]
 
     def get_of_controllers(self, columns=None, db_filter={}, limit=None):
         """