def _get_backend(self, vim_account: dict):
try:
- ceilometer = CeilometerBackend(vim_account)
- ceilometer.client.capabilities.get()
- log.info("Using ceilometer backend to collect metric")
- return ceilometer
- except (HTTPException, EndpointNotFound):
gnocchi = GnocchiBackend(vim_account)
gnocchi.client.metric.list(limit=1)
log.info("Using gnocchi backend to collect metric")
return gnocchi
+ except (HTTPException, EndpointNotFound):
+ ceilometer = CeilometerBackend(vim_account)
+ ceilometer.client.capabilities.get()
+ log.info("Using ceilometer backend to collect metric")
+ return ceilometer
def _get_metric_type(self, metric_name: str, interface_name: str) -> MetricType:
if metric_name not in INTERFACE_METRICS: