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

Reverse-spec · Clients

osc-placement — Scenarios

End-to-end scenarios — osc-placement — branch stable/2026.2

Branch stable/2026.2 @ 402610a21872 — repository https://opendev.org/openstack/osc-placement — analysed on 2026-10-28

1. Microversion negotiation (default --os-placement-api-version 1)

sequenceDiagram
  autonumber
  participant U as Operator
  participant C as openstack CLI + osc-placement
  participant K as Keystone
  participant P as Placement
  U->>C: openstack resource provider list
  C->>K: POST /v3/auth/tokens, then catalog → placement endpoint
  C->>P: GET /  OpenStack-API-Version: placement 1.29
  alt server ≥ 1.29
    P-->>C: 200 → the client keeps 1.29
  else older server
    P-->>C: 406 {"errors":[{"max_version":"1.X",…}]}
    Note over C: api_version = max_version
  end
  C->>P: GET /resource_providers  OpenStack-API-Version: placement 1.29
  P-->>C: 200 {"resource_providers":[…]}
  C-->>U: table

Source: osc_placement/http.py:69-86. The negotiation is never above 1.29, even against a 1.39 server.

2. Setting allocations (1.28+): read-modify-write on the consumer generation

sequenceDiagram
  autonumber
  participant U as Operator
  participant C as CLI
  participant P as Placement
  U->>C: resource provider allocation set <consumer> --allocation rp=<uuid>,VCPU=2 --project-id … --user-id …
  C->>C: parse --allocation (ValueError / CommandError if malformed)
  C->>P: GET /allocations/<consumer>
  P-->>C: 200 {"allocations":{…}, "consumer_generation": g or null}
  C->>P: PUT /allocations/<consumer> {allocations, consumer_generation: g, project_id, user_id[, consumer_type 1.38]}
  alt consumer changed meanwhile / capacity exceeded
    P-->>C: 409 → Conflict(last line of detail), exit ≠ 0
  else
    P-->>C: 204
    C->>P: GET /allocations/<consumer>
    C-->>U: table per provider
  end

Source: osc_placement/resources/allocation.py:115-176.

3. Inventory on a whole aggregate (inventory set --aggregate, 1.3+)

sequenceDiagram
  autonumber
  participant C as CLI
  participant P as Placement
  C->>P: GET /resource_providers?member_of=<agg>
  alt no provider
    C-->>C: CommandError "No resource providers found in aggregate …"
  end
  loop each provider
    C->>P: [--amend] GET /resource_providers/<rp>/inventories
    C->>P: PUT /resource_providers/<rp>/inventories {resource_provider_generation, inventories}
    alt 409 / 400
      P-->>C: error → LOG.error, continue with the next one
    end
  end
  C-->>C: if failures: CommandError "Failed to set inventory for N of M resource providers."

Source: osc_placement/resources/inventory.py:166-224. The batch is not atomic: the providers updated before a failure stay updated.

4. Searching for allocation candidates with groups

sequenceDiagram
  autonumber
  participant U as Operator
  participant C as CLI
  participant P as Placement
  U->>C: allocation candidate list --resource VCPU=1 --group 1 --resource SRIOV_NET_VF=1 --required CUSTOM_PHYSNET1 --group-policy isolate
  C->>C: version checks (1.25 groups, 1.17 required, 1.39 if A,B)
  C->>P: GET /allocation_candidates?resources=VCPU:1&resources1=SRIOV_NET_VF:1&required1=CUSTOM_PHYSNET1&group_policy=isolate
  P-->>C: 200 {allocation_requests, provider_summaries}
  C-->>U: one row per (candidate, provider), with usage/capacity and traits (1.17+)

Source: osc_placement/resources/allocation_candidate.py:179-288.

Source: reverse-spec-osc-placement/04-scenarios_stable-2026.2.md. The _rewrite/ and _inventory/ files are not published on the site.