def show_watch_metric(self, cnxt, metric_namespace=None, metric_name=None): """ The show_watch method returns the datapoints for a metric :param cnxt: RPC context. :param metric_namespace: Name of the namespace you want to see, or None to see all :param metric_name: Name of the metric you want to see, or None to see all """ # DB API and schema does not yet allow us to easily query by # namespace/metric, but we will want this at some point # for now, the API can query all metric data and filter locally if metric_namespace is not None or metric_name is not None: LOG.error(_("Filtering by namespace/metric not yet supported")) return try: wds = db_api.watch_data_get_all(cnxt) except Exception as ex: LOG.warn(_('show_metric (all) db error %s') % ex) return result = [api.format_watch_data(w) for w in wds] return result
def show_watch_metric(self, cnxt, metric_namespace=None, metric_name=None): """ The show_watch method returns the datapoints for a metric :param cnxt: RPC context. :param metric_namespace: Name of the namespace you want to see, or None to see all :param metric_name: Name of the metric you want to see, or None to see all """ # DB API and schema does not yet allow us to easily query by # namespace/metric, but we will want this at some point # for now, the API can query all metric data and filter locally if metric_namespace is not None or metric_name is not None: LOG.error(_("Filtering by namespace/metric not yet supported")) return try: wds = db_api.watch_data_get_all(cnxt) except Exception as ex: LOG.warn(_('show_metric (all) db error %s') % ex) return result = [api.format_watch_data(w) for w in wds] return result
def show_watch_metric(self, cnxt, metric_namespace=None, metric_name=None): ''' The show_watch method returns the datapoints for a metric arg1 -> RPC context. arg2 -> Name of the namespace you want to see, or None to see all arg3 -> Name of the metric you want to see, or None to see all ''' # DB API and schema does not yet allow us to easily query by # namespace/metric, but we will want this at some point # for now, the API can query all metric data and filter locally if metric_namespace is not None or metric_name is not None: logger.error("Filtering by namespace/metric not yet supported") return try: wds = db_api.watch_data_get_all(cnxt) except Exception as ex: logger.warn('show_metric (all) db error %s' % str(ex)) return result = [api.format_watch_data(w) for w in wds] return result
def show_watch_metric(self, cnxt, metric_namespace=None, metric_name=None): ''' The show_watch method returns the datapoints for a metric arg1 -> RPC context. arg2 -> Name of the namespace you want to see, or None to see all arg3 -> Name of the metric you want to see, or None to see all ''' # DB API and schema does not yet allow us to easily query by # namespace/metric, but we will want this at some point # for now, the API can query all metric data and filter locally if metric_namespace is not None or metric_name is not None: logger.error("Filtering by namespace/metric not yet supported") return try: wds = db_api.watch_data_get_all(cnxt) except Exception as ex: logger.warn('show_metric (all) db error %s' % str(ex)) return result = [api.format_watch_data(w) for w in wds] return result