This file is indexed.

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

defaults:
  request_headers:
    # 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: low
        definition:
          - granularity: 1 second
          - granularity: 300 seconds
      status: 201

    - name: create resource 1
      POST: /v1/resource/generic
      data:
        id: 4ed9c196-4c9f-4ba8-a5be-c9a71a82aac4
        user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
        project_id: c7f32f1f-c5ef-427a-8ecd-915b219c66e8
        metrics:
          cpu.util:
            archive_policy_name: low
      status: 201

    - name: post cpuutil measures 1
      POST: /v1/resource/generic/4ed9c196-4c9f-4ba8-a5be-c9a71a82aac4/metric/cpu.util/measures
      data:
        - timestamp: "2015-03-06T14:33:57"
          value: 43.1
        - timestamp: "2015-03-06T14:34:12"
          value: 12
      status: 202

    - name: get aggregation with no data
      desc: https://github.com/gnocchixyz/gnocchi/issues/69
      POST: /v1/aggregation/resource/generic/metric/cpu.util?stop=2012-03-06T00:00:00&fill=0&granularity=300&resample=3600
      request_headers:
        x-user-id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
        x-project-id: c7f32f1f-c5ef-427a-8ecd-915b219c66e8
        content-type: application/json
      data:
        =:
          id: 4ed9c196-4c9f-4ba8-a5be-c9a71a82aac4
      poll:
        count: 10
        delay: 1
      response_json_paths:
        $: []

    - name: create resource 2
      POST: /v1/resource/generic
      data:
        id: 1447CD7E-48A6-4C50-A991-6677CC0D00E6
        user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
        project_id: c7f32f1f-c5ef-427a-8ecd-915b219c66e8
        metrics:
          cpu.util:
            archive_policy_name: low
      status: 201

    - name: post cpuutil measures 2
      POST: /v1/resource/generic/1447CD7E-48A6-4C50-A991-6677CC0D00E6/metric/cpu.util/measures
      data:
        - timestamp: "2015-03-06T14:33:57"
          value: 23
        - timestamp: "2015-03-06T14:34:12"
          value: 8
      status: 202

    - name: create resource 3
      POST: /v1/resource/generic
      data:
        id: 33333BC5-5948-4F29-B7DF-7DE607660452
        user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
        project_id: ee4cfc41-1cdc-4d2f-9a08-f94111d80171
        metrics:
          cpu.util:
            archive_policy_name: low
      status: 201

    - name: post cpuutil measures 3
      POST: /v1/resource/generic/33333BC5-5948-4F29-B7DF-7DE607660452/metric/cpu.util/measures
      data:
        - timestamp: "2015-03-06T14:33:57"
          value: 230
        - timestamp: "2015-03-06T14:34:12"
          value: 45.41
      status: 202

    - name: aggregate metric with groupby on project_id
      POST: /v1/aggregation/resource/generic/metric/cpu.util?groupby=project_id
      data:
        =:
          user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
      poll:
        count: 10
        delay: 1
      response_json_paths:
        $:
          - measures:
            - ["2015-03-06T14:30:00+00:00", 300.0, 21.525]
            - ["2015-03-06T14:33:57+00:00", 1.0, 33.05]
            - ["2015-03-06T14:34:12+00:00", 1.0, 10.0]
            group:
              project_id: c7f32f1f-c5ef-427a-8ecd-915b219c66e8
          - measures:
            - ["2015-03-06T14:30:00+00:00", 300.0, 137.70499999999998]
            - ["2015-03-06T14:33:57+00:00", 1.0, 230.0]
            - ["2015-03-06T14:34:12+00:00", 1.0, 45.41]
            group:
              project_id: ee4cfc41-1cdc-4d2f-9a08-f94111d80171

    - name: aggregate metric with groupby on project_id and invalid group
      POST: /v1/aggregation/resource/generic/metric/cpu.util?groupby=project_id&groupby=thisisdumb
      data:
        =:
          user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
      status: 400
      response_strings:
        - Invalid groupby attribute

    - name: aggregate metric with groupby on project_id and user_id
      POST: /v1/aggregation/resource/generic/metric/cpu.util?groupby=project_id&groupby=user_id
      data:
        =:
          user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
      poll:
        count: 10
        delay: 1
      response_json_paths:
        $:
          - measures:
            - ['2015-03-06T14:30:00+00:00', 300.0, 21.525]
            - ['2015-03-06T14:33:57+00:00', 1.0, 33.05]
            - ['2015-03-06T14:34:12+00:00', 1.0, 10.0]
            group:
              user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
              project_id: c7f32f1f-c5ef-427a-8ecd-915b219c66e8
          - measures:
            - ['2015-03-06T14:30:00+00:00', 300.0, 137.70499999999998]
            - ['2015-03-06T14:33:57+00:00', 1.0, 230.0]
            - ['2015-03-06T14:34:12+00:00', 1.0, 45.41]
            group:
              user_id: 6c865dd0-7945-4e08-8b27-d0d7f1c2b667
              project_id: ee4cfc41-1cdc-4d2f-9a08-f94111d80171