summaryrefslogtreecommitdiff
path: root/nova/tests/functional/api/openstack/placement/gabbits/usage.yaml
blob: dbe3a767e3ce57ac201e8f288169ab5a78d38ca0 (plain)
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
# More interesting tests for usages are in with_allocations

fixtures:
    - APIFixture

defaults:
    request_headers:
        accept: application/json
        x-auth-token: admin

tests:

- name: fail to get usages for missing provider
  GET: /resource_providers/fae14fa3-4b43-498c-a33c-4a1d00edb577/usages
  status: 404
  response_strings:
      - No resource provider with uuid fae14fa3-4b43-498c-a33c-4a1d00edb577 found
  response_json_paths:
      $.errors[0].title: Not Found

- name: create provider
  POST: /resource_providers
  request_headers:
      content-type: application/json
  data:
      name: a name
  status: 201

- name: check provider exists
  GET: $LOCATION
  response_json_paths:
      name: a name

- name: get empty usages
  GET: $LAST_URL/usages
  request_headers:
      content-type: application/json
  response_json_paths:
      usages: {}