This file is indexed.

/usr/lib/python3/dist-packages/gnocchi/tests/functional/gabbits/batch-measures.yaml is in python3-gnocchi 4.2.0-0ubuntu5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
fixtures:
    - ConfigFixture

defaults:
  request_headers:
    content-type: application/json
    # User foobar
    authorization: "basic Zm9vYmFyOg=="
    content-type: application/json

tests:
    - name: create archive policy
      desc: for later use
      POST: /v1/archive_policy
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      data:
          name: simple
          definition:
              - granularity: 1 second
      status: 201

    - name: create metric
      POST: /v1/metric
      data:
          archive_policy_name: simple
      status: 201

    - name: push measurements to metric
      POST: /v1/batch/metrics/measures
      data:
        $RESPONSE['$.id']:
          - timestamp: "2015-03-06T14:33:57"
            value: 43.1
          - timestamp: "2015-03-06T14:34:12"
            value: 12
      status: 202
      response_headers:
        content-length: 0

    - name: push measurements to unknown metrics
      POST: /v1/batch/metrics/measures
      data:
        37AEC8B7-C0D9-445B-8AB9-D3C6312DCF5C:
          - timestamp: "2015-03-06T14:33:57"
            value: 43.1
          - timestamp: "2015-03-06T14:34:12"
            value: 12
        37AEC8B7-C0D9-445B-8AB9-D3C6312DCF5D:
          - timestamp: "2015-03-06T14:33:57"
            value: 43.1
          - timestamp: "2015-03-06T14:34:12"
            value: 12
      status: 400
      response_strings:
        - "Unknown metrics: 37aec8b7-c0d9-445b-8ab9-d3c6312dcf5c, 37aec8b7-c0d9-445b-8ab9-d3c6312dcf5d"

    - name: push measurements to unknown named metrics
      POST: /v1/batch/resources/metrics/measures
      data:
        37AEC8B7-C0D9-445B-8AB9-D3C6312DCF5D:
          cpu_util:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
        46c9418d-d63b-4cdd-be89-8f57ffc5952e:
          disk.iops:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
      status: 400
      response_strings:
          - "Unknown metrics: 37aec8b7-c0d9-445b-8ab9-d3c6312dcf5d/cpu_util, 46c9418d-d63b-4cdd-be89-8f57ffc5952e/disk.iops"

    - name: create second metric
      POST: /v1/metric
      data:
          archive_policy_name: simple
      status: 201

    - name: post a resource
      POST: /v1/resource/generic
      data:
          id: 46c9418d-d63b-4cdd-be89-8f57ffc5952e
          user_id: 0fbb2314-8461-4b1a-8013-1fc22f6afc9c
          project_id: f3d41b77-0cc1-4f0b-b94a-1d5be9c0e3ea
          metrics:
              disk.iops:
                  archive_policy_name: simple
              cpu_util:
                  archive_policy_name: simple
      status: 201

    - name: post a second resource
      POST: /v1/resource/generic
      data:
          id: f0f6038f-f82c-4f30-8d81-65db8be249fe
          user_id: 0fbb2314-8461-4b1a-8013-1fc22f6afc9c
          project_id: f3d41b77-0cc1-4f0b-b94a-1d5be9c0e3ea
          metrics:
              net.speed:
                  archive_policy_name: simple
              mem_usage:
                  archive_policy_name: simple
      status: 201

    - name: list metrics
      GET: /v1/metric

    - name: push measurements to two metrics
      POST: /v1/batch/metrics/measures
      data:
        $RESPONSE['$[0].id']:
          - timestamp: "2015-03-06T14:33:57"
            value: 43.1
          - timestamp: "2015-03-06T14:34:12"
            value: 12
        $RESPONSE['$[1].id']:
          - timestamp: "2015-03-06T14:33:57"
            value: 43.1
          - timestamp: "2015-03-06T14:34:12"
            value: 12
      status: 202
      response_headers:
        content-length: 0

    - name: push measurements to two named metrics
      POST: /v1/batch/resources/metrics/measures
      data:
        46c9418d-d63b-4cdd-be89-8f57ffc5952e:
          disk.iops:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
          cpu_util:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
        f0f6038f-f82c-4f30-8d81-65db8be249fe:
          mem_usage:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
          net.speed:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
      status: 202
      response_headers:
        content-length: 0

    - name: create archive policy rule for auto
      POST: /v1/archive_policy_rule
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      data:
        name: rule_auto
        metric_pattern: "auto.*"
        archive_policy_name: simple
      status: 201

    - name: push measurements to unknown named metrics and create it
      POST: /v1/batch/resources/metrics/measures?create_metrics=true
      data:
        46c9418d-d63b-4cdd-be89-8f57ffc5952e:
          auto.test:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
      status: 202
      response_headers:
        content-length: 0

    - name: push measurements to unknown named metrics and create it with new format
      POST: /v1/batch/resources/metrics/measures?create_metrics=true
      data:
        46c9418d-d63b-4cdd-be89-8f57ffc5952e:
          newformat:
            archive_policy_name: simple
            unit: "ks"
            measures:
              - timestamp: "2015-03-06T14:33:57"
                value: 43.1
              - timestamp: "2015-03-06T14:34:12"
                value: 42
          auto.newformat:
            measures:
              - timestamp: "2015-03-06T14:33:57"
                value: 43.1
              - timestamp: "2015-03-06T14:34:12"
                value: 24
          auto.test:
            measures:
              - timestamp: "2015-03-06T14:33:57"
                value: 43.1
              - timestamp: "2015-03-06T14:35:12"
                value: 24
      status: 202
      response_headers:
        content-length: 0

    - name: get created metric to check creation
      GET: /v1/resource/generic/46c9418d-d63b-4cdd-be89-8f57ffc5952e/metric/auto.test

    - name: ensure measure have been posted
      GET: /v1/resource/generic/46c9418d-d63b-4cdd-be89-8f57ffc5952e/metric/auto.test/measures?refresh=true&start=2015-03-06T14:34
      response_json_paths:
        $:
          - ["2015-03-06T14:34:12+00:00", 1.0, 12.0]
          - ["2015-03-06T14:35:12+00:00", 1.0, 24.0]

    - name: get created metric to check creation with newformat
      GET: /v1/resource/generic/46c9418d-d63b-4cdd-be89-8f57ffc5952e/metric/newformat

    - name: get created metric to check creation with newformat2
      GET: /v1/resource/generic/46c9418d-d63b-4cdd-be89-8f57ffc5952e/metric/auto.newformat

    - name: ensure measure have been posted with newformat
      GET: /v1/resource/generic/46c9418d-d63b-4cdd-be89-8f57ffc5952e/metric/newformat/measures?refresh=true&start=2015-03-06T14:34
      response_json_paths:
        $:
          - ["2015-03-06T14:34:12+00:00", 1.0, 42.0]

    - name: ensure measure have been posted with newformat2
      GET: /v1/resource/generic/46c9418d-d63b-4cdd-be89-8f57ffc5952e/metric/auto.newformat/measures?refresh=true&start=2015-03-06T14:34
      response_json_paths:
        $:
          - ["2015-03-06T14:34:12+00:00", 1.0, 24.0]

    - name: push measurements to unknown named metrics and resource with create_metrics with uuid resource id
      POST: /v1/batch/resources/metrics/measures?create_metrics=true
      request_headers:
        accept: application/json
      data:
        aaaaaaaa-d63b-4cdd-be89-111111111111:
          auto.test:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
        bbbbbbbb-d63b-4cdd-be89-111111111111:
          auto.test:
            measures:
              - timestamp: "2015-03-06T14:33:57"
                value: 43.1
              - timestamp: "2015-03-06T14:34:12"
                value: 12
      status: 400
      response_json_paths:
          $.description.cause: "Unknown resources"
          $.description.detail[/original_resource_id]:
            - original_resource_id: "aaaaaaaa-d63b-4cdd-be89-111111111111"
              resource_id: "aaaaaaaa-d63b-4cdd-be89-111111111111"
            - original_resource_id: "bbbbbbbb-d63b-4cdd-be89-111111111111"
              resource_id: "bbbbbbbb-d63b-4cdd-be89-111111111111"

    - name: push measurements to unknown named metrics and resource with create_metrics with uuid resource id where resources is several times listed
      POST: /v1/batch/resources/metrics/measures?create_metrics=true
      request_headers:
        accept: application/json
      data:
        aaaaaaaa-d63b-4cdd-be89-111111111111:
          auto.test:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
          auto.test2:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
        bbbbbbbb-d63b-4cdd-be89-111111111111:
          auto.test:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
      status: 400
      response_json_paths:
          $.description.cause: "Unknown resources"
          $.description.detail[/original_resource_id]:
            - original_resource_id: "aaaaaaaa-d63b-4cdd-be89-111111111111"
              resource_id: "aaaaaaaa-d63b-4cdd-be89-111111111111"
            - original_resource_id: "bbbbbbbb-d63b-4cdd-be89-111111111111"
              resource_id: "bbbbbbbb-d63b-4cdd-be89-111111111111"

    - name: push measurements to unknown named metrics and resource with create_metrics with non uuid resource id
      POST: /v1/batch/resources/metrics/measures?create_metrics=true
      request_headers:
        accept: application/json
      data:
        foobar:
          auto.test:
            - timestamp: "2015-03-06T14:33:57"
              value: 43.1
            - timestamp: "2015-03-06T14:34:12"
              value: 12
      status: 400
      response_json_paths:
          $.description.cause: "Unknown resources"
          $.description.detail:
            - resource_id: "2fbfbb20-8d56-5e1e-afb9-b3007da11fdf"
              original_resource_id: "foobar"

    - name: push measurements to named metrics and resource with create_metrics with wrong measure objects
      POST: /v1/batch/resources/metrics/measures?create_metrics=true
      request_headers:
        accept: application/json
      data:
        46c9418d-d63b-4cdd-be89-8f57ffc5952e:
          auto.test:
            - [ "2015-03-06T14:33:57", 43.1]
            - [ "2015-03-06T14:34:12", 12]
      status: 400
      response_strings:
        - "unexpected measures format"