bug 537 SDN-assist does not connect new instances over an existing vim network 62/6462/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 7 Sep 2018 12:05:32 +0000 (14:05 +0200)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 18 Sep 2018 14:47:01 +0000 (15:47 +0100)
Change-Id: I47115d0957cd9c64606085132fd3f7e4003e7fc2
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
openmanod
osm_ro/vim_thread.py

index 367b505..3fd1ae0 100755 (executable)
--- a/openmanod
+++ b/openmanod
@@ -48,7 +48,7 @@ import osm_ro
 
 __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes"
 __date__ = "$26-aug-2014 11:09:29$"
-__version__ = "0.5.77-r587"
+__version__ = "0.5.78-r588"
 version_date = "Sep 2018"
 database_version = 32      # expected database schema version
 
index 089e7b9..c981e31 100644 (file)
@@ -941,8 +941,9 @@ class vim_thread(threading.Thread):
         sdn_net_id = None
         with self.db_lock:
             result = self.db.get_rows(SELECT=('sdn_net_id',), FROM='instance_nets',
-                                      WHERE={'vim_net_id': vim_net_id, 'instance_scenario_id': None,
-                                             'datacenter_tenant_id': self.datacenter_tenant_id})
+                                      WHERE={'vim_net_id': vim_net_id,
+                                             'datacenter_tenant_id': self.datacenter_tenant_id},
+                                      ORDER="instance_scenario_id")
         if result:
             sdn_net_id = result[0]['sdn_net_id']