OpenKeel: the sovereign French Cloud solution of the inherent group, with a European reach Discover inherent

Reverse-spec · Clients

osc-placement — Interactions

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.

SystemProtocolLibraryPurpose
KeystoneHTTPkeystoneauth1 (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)
PlacementHTTP/JSONkeystoneauth1 Session.request with endpoint_filterevery command (osc_placement/http.py:55-67)

Requests sent to Placement

  • Headers:
    • OpenStack-API-Version: placement <version> and Accept: application/json (osc_placement/http.py:57-61);
    • X-Auth-Token (session);
    • Content-Type: application/json on bodies (keystoneauth json=).
  • Query strings: built by urlencode (osc_placement/resources/common.py:29-38) or params=. Repeated keys (several required, several member_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} with consumer_generation → GET /allocations/{c};
    • inventory set --amend: GET …/inventories → PUT …/inventories with resource_provider_generation from the GET;
    • trait set, inventory class set: GET /resource_providers/{uuid} to read generation → 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.