Fix bug 1402: sdn infra collector names changed to match RO names
[osm/MON.git] / osm_mon / collector / service.py
index f329918..eecad4d 100644 (file)
@@ -49,7 +49,8 @@ VIM_INFRA_COLLECTORS = {
     "vio": VIOInfraCollector
 }
 SDN_INFRA_COLLECTORS = {
-    "onos": OnosInfraCollector
+    "onosof": OnosInfraCollector,
+    "onos_vpls": OnosInfraCollector
 }
 
 
@@ -127,7 +128,10 @@ class CollectorService:
             processes.append(p)
             p.start()
         for process in processes:
-            process.join(timeout=10)
+            process.join(timeout=20)
+        for process in processes:
+            if process.is_alive():
+                process.terminate()
         metrics = []
         while not self.queue.empty():
             metrics.append(self.queue.get())
@@ -139,4 +143,6 @@ class CollectorService:
         vim_type = vim_account['vim_type']
         if 'config' in vim_account and 'vim_type' in vim_account['config']:
             vim_type = vim_account['config']['vim_type'].lower()
+            if vim_type == 'vio' and 'vrops_site' not in vim_account['config']:
+                vim_type = 'openstack'
         return vim_type