Skip to content

Commit a3df985

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "[placement] add api-ref for GET /resource_providers"
2 parents 4613b33 + 8ab4b7a commit a3df985

File tree

3 files changed

+161
-0
lines changed

3 files changed

+161
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"resource_providers": [
3+
{
4+
"generation": 1,
5+
"uuid": "99c09379-6e52-4ef8-9a95-b9ce6f68452e",
6+
"links": [
7+
{
8+
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e",
9+
"rel": "self"
10+
},
11+
{
12+
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/aggregates",
13+
"rel": "aggregates"
14+
},
15+
{
16+
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/inventories",
17+
"rel": "inventories"
18+
},
19+
{
20+
"href": "/resource_providers/99c09379-6e52-4ef8-9a95-b9ce6f68452e/usages",
21+
"rel": "usages"
22+
}
23+
],
24+
"name": "vgr.localdomain"
25+
},
26+
{
27+
"generation": 2,
28+
"uuid": "d0b381e9-8761-42de-8e6c-bba99a96d5f5",
29+
"links": [
30+
{
31+
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5",
32+
"rel": "self"
33+
},
34+
{
35+
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/aggregates",
36+
"rel": "aggregates"
37+
},
38+
{
39+
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/inventories",
40+
"rel": "inventories"
41+
},
42+
{
43+
"href": "/resource_providers/d0b381e9-8761-42de-8e6c-bba99a96d5f5/usages",
44+
"rel": "usages"
45+
}
46+
],
47+
"name": "pony1"
48+
}
49+
]
50+
}

placement-api-ref/source/index.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,52 @@ Response Example
4444

4545
.. literalinclude:: get-root.json
4646
:language: javascript
47+
48+
==================
49+
Resource Providers
50+
==================
51+
52+
Resource providers are entities which provide consumable inventory of one or
53+
more classes of resource (such as disk or memory). They can be listed (with
54+
filters), created, updated and deleted.
55+
56+
List Resource Providers
57+
=======================
58+
59+
.. rest_method:: GET /resource_providers
60+
61+
List an optionally filtered collection of resource providers.
62+
63+
Normal Response Codes: 200
64+
65+
Request
66+
-------
67+
68+
Several query parameters are available to filter the returned list of
69+
resource providers. If multiple different parameters are provided, the results
70+
of all filters are merged with a boolean `AND`.
71+
72+
.. rest_parameters:: parameters.yaml
73+
74+
- resources: resources_query
75+
- member_of: member_of
76+
- uuid: resource_provider_uuid_query
77+
- name: resource_provider_name_query
78+
79+
Response
80+
--------
81+
82+
.. rest_parameters:: parameters.yaml
83+
84+
- resource_providers: resource_providers
85+
- generation: resource_provider_generation
86+
- uuid: resource_provider_uuid
87+
- links: resource_provider_links
88+
- name: resource_provider_name
89+
90+
91+
Response Example
92+
----------------
93+
94+
.. literalinclude:: get-resource_providers.json
95+
:language: javascript

placement-api-ref/source/parameters.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,65 @@
1+
member_of:
2+
type: string
3+
in: query
4+
required: false
5+
description: >
6+
A comma-separated list of strings representing aggregate uuids.
7+
The returned resource providers must be associated with at
8+
least one of the aggregates identified by uuid.
9+
resource_provider_name_query:
10+
type: string
11+
in: query
12+
required: false
13+
description: >
14+
The name of a resource provider to filter the list.
15+
resource_provider_uuid_query:
16+
type: string
17+
in: query
18+
required: false
19+
description: >
20+
The uuid of a resource provider to filter the list.
21+
resources_query:
22+
type: string
23+
in: query
24+
required: false
25+
description: |
26+
A comma-separated list of strings indicating an amount of
27+
resource of a specified class that a provider must have the
28+
capacity to serve::
29+
30+
resources=VCPU:4,DISK_GB:64,MEMORY_MB:2048
31+
32+
resource_provider_generation:
33+
type: integer
34+
in: body
35+
required: true
36+
description: >
37+
A consistent view marker that assists with the management of
38+
concurrent resource provider updates.
39+
resource_provider_links:
40+
type: array
41+
in: body
42+
required: true
43+
description: >
44+
A list of links associated with one resource provider.
45+
resource_provider_name:
46+
type: string
47+
in: body
48+
required: true
49+
description: >
50+
The name of one resource provider.
51+
resource_provider_uuid:
52+
type: string
53+
in: body
54+
required: true
55+
description: >
56+
The UUID for one resource provider.
57+
resource_providers:
58+
type: array
59+
in: body
60+
required: true
61+
description: >
62+
A list of ``resource_provider`` objects.
163
version_id:
264
type: string
365
in: body

0 commit comments

Comments
 (0)