- def _collect_vim_metrics(self, vnfr: dict, vim_account_id: str):
- # TODO(diazb) Add support for vrops and aws
- database_manager = DatabaseManager(self.conf)
- vim_type = database_manager.get_vim_type(vim_account_id)
- if vim_type in VIM_COLLECTORS:
- collector = VIM_COLLECTORS[vim_type](self.conf, vim_account_id)
- metrics = collector.collect(vnfr)
- for metric in metrics:
- self.queue.put(metric)
- else:
- log.debug("vimtype %s is not supported.", vim_type)
-
- 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_vca_metrics(self, vnfr: dict):
- log.debug('_collect_vca_metrics')
- log.debug('vnfr: %s', vnfr)
- vca_collector = VCACollector(self.conf)
- metrics = vca_collector.collect(vnfr)
- for metric in metrics:
- self.queue.put(metric)
-