Skip to content

Commit 873d0fc

Browse files
committed
Revert "Support appending custom query suffix"
This reverts commit a74847a.
1 parent a74847a commit 873d0fc

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

cloudkitty/collector/prometheus.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
from oslo_config import cfg
2020
from oslo_log import log
21-
from voluptuous import All
2221
from voluptuous import In
2322
from voluptuous import Optional
2423
from voluptuous import Required
@@ -84,8 +83,7 @@
8483
'changes', 'delta', 'deriv',
8584
'idelta', 'irange', 'irate',
8685
'rate'
87-
]),
88-
Optional('query_suffix', default=''): All(str),
86+
])
8987
}
9088
}
9189

@@ -161,7 +159,6 @@ def fetch_all(self, metric_name, start, end, scope_id, q_filter=None):
161159
'range_function')
162160
groupby = self.conf[metric_name].get('groupby', [])
163161
metadata = self.conf[metric_name].get('metadata', [])
164-
query_suffix = self.conf[metric_name]['extra_args']['query_suffix']
165162
period = tzutils.diff_seconds(end, start)
166163
time = end
167164

@@ -201,10 +198,6 @@ def fetch_all(self, metric_name, start, end, scope_id, q_filter=None):
201198
', '.join(groupby + metadata)
202199
)
203200

204-
# Append custom query suffix
205-
if query_suffix:
206-
query = "{0} {1}".format(query, query_suffix)
207-
208201
LOG.debug("Calling Prometheus with query: %s", query)
209202

210203
try:

0 commit comments

Comments
 (0)