This file is indexed.

/usr/lib/python3/dist-packages/gnocchi/tests/functional/gabbits/transformedids.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
#
# Test the resource API to achieve coverage of just the
# ResourcesController and ResourceController class code.
#

fixtures:
    - ConfigFixture

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

tests:

# We will need an archive for use in later tests so we create it
# here. This could be done in a fixture but since the API allows it
# may as well use it.

    - name: create archive policy
      desc: for later use
      POST: /v1/archive_policy
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      data:
          name: medium
          definition:
              - granularity: 1 second
      status: 201
# Check transformed uuids across the URL hierarchy

    - name: post new resource non uuid for duplication test
      POST: /v1/resource/generic
      data:
          id: generic zero
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          metrics:
              cpu.util:
                  archive_policy_name: medium
      status: 201
      response_json_paths:
          creator: foobar
      response_headers:
          # is a UUID
          location: /v1/resource/generic/[a-f0-9-]{36}/

    - name: post new resource non uuid duplication
      POST: /v1/resource/generic
      data:
          id: generic zero
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          metrics:
              cpu.util:
                  archive_policy_name: medium
      status: 409

    - name: post new resource with invalid uuid
      POST: /v1/resource/generic
      data:
          id: 'id-with-/'
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
      status: 400
      response_strings:
        - "'/' is not supported in resource id"


    - name: post new resource non uuid again different user
      POST: /v1/resource/generic
      request_headers:
        authorization: "basic cGFzdGE6"
      data:
          id: generic zero
          metrics:
              cpu.util:
                  archive_policy_name: medium
      status: 201
      response_json_paths:
          creator: pasta
      response_headers:
          # is a UUID
          location: /v1/resource/generic/[a-f0-9-]{36}/

    - name: post new resource non uuid
      POST: /v1/resource/generic
      data:
          id: generic one
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          metrics:
              cpu.util:
                  archive_policy_name: medium
      status: 201
      response_json_paths:
        creator: foobar
      response_headers:
          # is a UUID
          location: /v1/resource/generic/[a-f0-9-]{36}/

    - name: get new non uuid resource by external id
      GET: /v1/resource/generic/generic%20one
      response_json_paths:
          $.id: $RESPONSE['$.id']

    - name: get new non uuid resource by internal id
      GET: /v1/resource/generic/$RESPONSE['$.id']
      response_json_paths:
          $.id: $RESPONSE['$.id']

    - name: patch by external id
      PATCH: /v1/resource/generic/generic%20one
      data:
          metrics:
              cattle:
                  archive_policy_name: medium
      status: 200
      response_strings:
          - '"cattle"'

    - name: list metric by external resource id
      GET: /v1/resource/generic/generic%20one/metric
      response_json_paths:
          $[0].name: cattle

    - name: list empty measures by external resource id
      GET: /v1/resource/generic/generic%20one/metric/cattle/measures
      response_json_paths:
          $: []

    - name: post measures by external resource id
      POST: /v1/resource/generic/generic%20one/metric/cattle/measures
      data:
          - timestamp: "2015-03-06T14:33:57"
            value: 43.1
          - timestamp: "2015-03-06T14:34:12"
            value: 12
      status: 202

    - name: list two measures by external resource id
      GET: $LAST_URL
      poll:
          count: 10
          delay: 1
      response_json_paths:
          $[0][2]: 43.1
          $[1][2]: 12

    - name: delete the resource by external id
      DELETE: /v1/resource/generic/generic%20one
      status: 204

# Check length handling

    - name: fail to post too long non uuid resource id
      POST: /v1/resource/generic
      data:
          id: four score and seven years ago we the people of the United States of America i have a dream it is the courage to continue that counts four score and seven years ago we the people of the United States of America i have a dream it is the courage to continue that counts four score and seven years ago we the people of the United States of America i have a dream it is the courage to continue that counts
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          metrics:
              cpu.util:
                  archive_policy_name: medium
      status: 400
      response_strings:
        - transformable resource id >255 max allowed characters for dictionary value

    - name: post long non uuid resource id
      POST: $LAST_URL
      data:
          # 255 char string
          id: four score and seven years ago we the people of the United States of America i have a dream it is the courage to continue that counts four score and seven years ago we the people of the United States of America i have a dream it is the courage to continue
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          metrics:
              cpu.util:
                  archive_policy_name: medium
      status: 201