This file is indexed.

/usr/lib/python3/dist-packages/gnocchi/tests/functional/gabbits/history.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
#
# Test the resource history related API
#

fixtures:
    - ConfigFixture

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

tests:
    - name: create archive policy
      POST: /v1/archive_policy
      request_headers:
        # User admin
        authorization: "basic YWRtaW46"
      data:
          name: low
          definition:
              - granularity: 1 hour
      status: 201
      response_headers:
          location: $SCHEME://$NETLOC/v1/archive_policy/low

# Try creating a new generic resource

    - name: post generic resource
      POST: /v1/resource/generic
      data:
          id: f93450f2-d8a5-4d67-9985-02511241e7d1
          started_at: "2014-01-03T02:02:02.000000"
          user_id: 0fbb231484614b1a80131fc22f6afc9c
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
      status: 201
      response_headers:
          location: $SCHEME://$NETLOC/v1/resource/generic/f93450f2-d8a5-4d67-9985-02511241e7d1
          content-type: /^application\/json/
      response_json_paths:
          $.creator: foobar
          $.user_id: 0fbb231484614b1a80131fc22f6afc9c

# Update it twice
    - name: patch resource user_id
      PATCH: /v1/resource/generic/f93450f2-d8a5-4d67-9985-02511241e7d1
      data:
          user_id: f53c58a4-fdea-4c09-aac4-02135900be67
      status: 200
      response_json_paths:
          user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea

    - name: patch resource project_id
      PATCH: $LAST_URL
      data:
          project_id: fe20a931-1012-4cc6-addc-39556ec60907
          metrics:
            mymetric:
              archive_policy_name: low
      status: 200
      response_json_paths:
          user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          project_id: fe20a931-1012-4cc6-addc-39556ec60907

# List resources

    - name: list all resources without history
      GET: /v1/resource/generic
      response_json_paths:
          $[0].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[0].project_id: fe20a931-1012-4cc6-addc-39556ec60907

    - name: list all resources with history
      GET: $LAST_URL
      request_headers:
          accept: application/json; details=True; history=True
      response_json_paths:
          $.`len`: 3
          $[0].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[0].user_id: 0fbb231484614b1a80131fc22f6afc9c
          $[0].project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          $[1].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[1].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[1].project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          $[2].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[2].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[2].project_id: fe20a931-1012-4cc6-addc-39556ec60907

    - name: patch resource metrics
      PATCH: /v1/resource/generic/f93450f2-d8a5-4d67-9985-02511241e7d1
      data:
          metrics:
            foo:
              archive_policy_name: low
      status: 200

    - name: list all resources with history no change after metrics update
      GET: /v1/resource/generic
      request_headers:
          accept: application/json; details=True; history=True
      response_json_paths:
          $.`len`: 3
          $[0].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[0].user_id: 0fbb231484614b1a80131fc22f6afc9c
          $[0].project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          $[1].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[1].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[1].project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          $[2].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[2].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[2].project_id: fe20a931-1012-4cc6-addc-39556ec60907

    - name: create new metrics
      POST: /v1/resource/generic/f93450f2-d8a5-4d67-9985-02511241e7d1/metric
      data:
        foobar:
          archive_policy_name: low
      status: 200
      response_json_paths:
          $[/name][1].name: foobar
          $[/name][1].resource_id: f93450f2-d8a5-4d67-9985-02511241e7d1

    - name: list all resources with history no change after metrics creation
      GET: /v1/resource/generic
      request_headers:
          accept: application/json; details=True; history=True
      response_json_paths:
          $.`len`: 3
          $[0].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[0].user_id: 0fbb231484614b1a80131fc22f6afc9c
          $[0].project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          $[1].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[1].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[1].project_id: f3d41b770cc14f0bb94a1d5be9c0e3ea
          $[2].id: f93450f2-d8a5-4d67-9985-02511241e7d1
          $[2].user_id: f53c58a4-fdea-4c09-aac4-02135900be67
          $[2].project_id: fe20a931-1012-4cc6-addc-39556ec60907