Interactions with other components — osc-placement — branch stable/2026.2
Branch
stable/2026.2@402610a21872— repository https://opendev.org/openstack/osc-placement — analysed on 2026-10-28
A command-line process: no database, no bus, no cache. Two outbound exchanges.
| System | Protocol | Library | Purpose |
|---|---|---|---|
| Keystone | HTTP | keystoneauth1 (session opened by openstackclient) | authentication (--os-auth-type, password or token) and catalog: lookup of the placement endpoint by service_type, region_name and interface (osc_placement/plugin.py:36-43) |
| Placement | HTTP/JSON | keystoneauth1 Session.request with endpoint_filter | every command (osc_placement/http.py:55-67) |
Requests sent to Placement
- Headers:
OpenStack-API-Version: placement <version>andAccept: application/json(osc_placement/http.py:57-61);X-Auth-Token(session);Content-Type: application/jsonon bodies (keystoneauthjson=).
- Query strings: built by
urlencode(osc_placement/resources/common.py:29-38) orparams=. Repeated keys (severalrequired, severalmember_of) are sent as several parameters. - Write sequences (read-modify-write) that rely on Placement's generations:
allocation set(1.28+):GET /allocations/{c}→PUT /allocations/{c}withconsumer_generation→GET /allocations/{c};inventory set --amend:GET …/inventories→PUT …/inventorieswithresource_provider_generationfrom the GET;trait set,inventory class set:GET /resource_providers/{uuid}to readgeneration→PUT;resource provider create:POST→GET <Location>.- No retry on 409: the error is shown to the user.
Sample frame (recorded; the path is shown relative to the Placement endpoint): openstack --os-placement-api-version 1.21 allocation candidate list --resource MEMORY_MB=1024 --member-of <agg1>,<agg2>
GET /allocation_candidates?resources=MEMORY_MB%3A1024&member_of=in%3Ae53de0d4-945b-4f79-9656-04adca52a66c%2C2fd705f2-fe20-40c1-a9e6-0daf87a5222e HTTP/1.1
OpenStack-API-Version: placement 1.21
Accept: application/json
X-Auth-Token: …
All the requests observed (1,381), command by command, are in _rewrite/exchanges_stable-2026.2.json, and their summary in _rewrite/client-contract_stable-2026.2.md.
Source: reverse-spec-osc-placement/03-interactions_stable-2026.2.md. The _rewrite/ and _inventory/ files are not published on the site.