This file is indexed.

/usr/lib/python3/dist-packages/gnocchi/tests/functional/gabbits/metric-list.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
fixtures:
    - ConfigFixture

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

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

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

    - name: create metric 1
      POST: /v1/metric
      data:
          name: "disk.io.rate"
          unit: "B/s"
          archive_policy_name: first_archive
      status: 201
      response_json_paths:
          $.archive_policy_name: first_archive
          $.name: disk.io.rate
          $.unit: B/s

    - name: create metric 2
      POST: /v1/metric
      request_headers:
        # User foobaz
        authorization: "basic Zm9vYmF6Og=="
      data:
          name: "disk.io.rate"
          unit: "B/s"
          archive_policy_name: first_archive
      status: 201
      response_json_paths:
          $.archive_policy_name: first_archive
          $.name: disk.io.rate
          $.unit: B/s

    - name: create metric 3
      POST: /v1/metric
      request_headers:
        # User jd
        authorization: "basic amQ6"
      data:
          name: "cpu_util"
          unit: "%"
          archive_policy_name: first_archive
      status: 201
      response_json_paths:
          $.archive_policy_name: first_archive
          $.name: cpu_util
          $.unit: "%"

    - name: create metric 4
      POST: /v1/metric
      data:
          name: "cpu"
          unit: "ns"
          archive_policy_name: second_archive
      status: 201
      response_json_paths:
          $.archive_policy_name: second_archive
          $.name: cpu
          $.unit: ns

    - name: list metrics
      GET: /v1/metric
      response_json_paths:
          $.`len`: 4

    - name: list metrics by id
      GET: /v1/metric?id=$HISTORY['create metric 1'].$RESPONSE['id']
      response_json_paths:
          $.`len`: 1
          $[0].name: disk.io.rate
          $[0].archive_policy.name: first_archive

    - name: list metrics by name
      GET: /v1/metric?name=disk.io.rate
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      response_json_paths:
          $.`len`: 2
          $[0].name: disk.io.rate
          $[1].name: disk.io.rate
          $[0].archive_policy.name: first_archive
          $[1].archive_policy.name: first_archive

    - name: list metrics by unit
      GET: /v1/metric?unit=ns
      response_json_paths:
          $.`len`: 1
          $[0].name: cpu
          $[0].archive_policy.name: second_archive

    - name: list metrics by archive_policy
      GET: /v1/metric?archive_policy_name=first_archive&sort=name:desc
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      response_json_paths:
          $.`len`: 3
          $[0].name: disk.io.rate
          $[1].name: disk.io.rate
          $[2].name: cpu_util
          $[0].archive_policy.name: first_archive
          $[1].archive_policy.name: first_archive
          $[2].archive_policy.name: first_archive

    - name: list metrics by archive_policy with limit and pagination links page 1
      GET: /v1/metric?archive_policy_name=first_archive&sort=name:desc&limit=2
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      response_headers:
          Link: "<$SCHEME://$NETLOC/v1/metric?archive_policy_name=first_archive&limit=2&marker=$RESPONSE['$[1].id']&sort=name%3Adesc>; rel=\"next\""
      response_json_paths:
          $.`len`: 2
          $[0].name: disk.io.rate
          $[1].name: disk.io.rate
          $[0].archive_policy.name: first_archive
          $[1].archive_policy.name: first_archive

    - name: list metrics by archive_policy with limit and pagination links page 2
      GET: /v1/metric?archive_policy_name=first_archive&limit=2&marker=$RESPONSE['$[1].id']&sort=name:desc
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      response_json_paths:
          $.`len`: 1
          $[0].name: cpu_util
          $[0].archive_policy.name: first_archive

    - name: list metrics ensure no Link header
      GET: /v1/metric?archive_policy_name=first_archive&sort=name:desc
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      xfail: true
      response_headers:
          Link: whatever

    - name: list metrics by creator jd
      GET: /v1/metric?creator=jd
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      response_json_paths:
          $.`len`: 1

    - name: list metrics by creator foobaz
      GET: /v1/metric?creator=foobaz
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      response_json_paths:
          $.`len`: 1