+ def _collect_vim_infra_metrics(self, vim_account_id: str):
+ database_manager = DatabaseManager(self.conf)
+ vim_type = database_manager.get_vim_type(vim_account_id)
+ if vim_type in VIM_INFRA_COLLECTORS:
+ collector = VIM_INFRA_COLLECTORS[vim_type](self.conf, vim_account_id)
+ metrics = collector.collect()
+ for metric in metrics:
+ self.queue.put(metric)
+ else:
+ log.debug("vimtype %s is not supported.", vim_type)
+
+ def _collect_sdnc_infra_metrics(self, sdnc_id: str):
+ common_db = CommonDbClient(self.conf)
+ sdn_type = common_db.get_sdnc(sdnc_id)['type']
+ if sdn_type in SDN_INFRA_COLLECTORS:
+ collector = SDN_INFRA_COLLECTORS[sdn_type](self.conf, sdnc_id)
+ metrics = collector.collect()
+ for metric in metrics:
+ self.queue.put(metric)
+ else:
+ log.debug("sdn_type %s is not supported.", sdn_type)
+