fix bug 555 Change extended pci validation schema for sdn port mapping
[osm/RO.git] / osm_ro / vim_thread.py
index 089e7b9..7e31f09 100644 (file)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 
 ##
-# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
+# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U.
 # This file is part of openvim
 # All Rights Reserved.
 #
@@ -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']