|
18 | 18 |
|
19 | 19 | from oslo_config import cfg |
20 | 20 | from oslo_log import log |
21 | | -from voluptuous import All |
22 | 21 | from voluptuous import In |
23 | 22 | from voluptuous import Optional |
24 | 23 | from voluptuous import Required |
|
84 | 83 | 'changes', 'delta', 'deriv', |
85 | 84 | 'idelta', 'irange', 'irate', |
86 | 85 | 'rate' |
87 | | - ]), |
88 | | - Optional('query_suffix', default=''): All(str), |
| 86 | + ]) |
89 | 87 | } |
90 | 88 | } |
91 | 89 |
|
@@ -161,7 +159,6 @@ def fetch_all(self, metric_name, start, end, scope_id, q_filter=None): |
161 | 159 | 'range_function') |
162 | 160 | groupby = self.conf[metric_name].get('groupby', []) |
163 | 161 | metadata = self.conf[metric_name].get('metadata', []) |
164 | | - query_suffix = self.conf[metric_name]['extra_args']['query_suffix'] |
165 | 162 | period = tzutils.diff_seconds(end, start) |
166 | 163 | time = end |
167 | 164 |
|
@@ -201,10 +198,6 @@ def fetch_all(self, metric_name, start, end, scope_id, q_filter=None): |
201 | 198 | ', '.join(groupby + metadata) |
202 | 199 | ) |
203 | 200 |
|
204 | | - # Append custom query suffix |
205 | | - if query_suffix: |
206 | | - query = "{0} {1}".format(query, query_suffix) |
207 | | - |
208 | 201 | LOG.debug("Calling Prometheus with query: %s", query) |
209 | 202 |
|
210 | 203 | try: |
|
0 commit comments