Skip to content

Placement compatibility expansion#12

Draft
JSYoo5B wants to merge 11 commits into
codex/10-glance-compatibility-expansionfrom
codex/11-placement-compatibility-expansion
Draft

Placement compatibility expansion#12
JSYoo5B wants to merge 11 commits into
codex/10-glance-compatibility-expansionfrom
codex/11-placement-compatibility-expansion

Conversation

@JSYoo5B

@JSYoo5B JSYoo5B commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds Placement-compatible APIs for resource providers, inventories, traits, aggregates, usage, allocations, allocation candidates, resource classes, and trait catalog behavior.
  • Splits placement service methods by resource and groups service repositories.

Main Review Points

  • Placement resource and inventory modeling.
  • Allocation and candidate response shape.
  • Service/repository grouping after the Placement surface grows.

Verification

  • go test ./...
  • Checked each commit from this slice onward with go test ./...

idGen idgen.Generator
}

type Repositories struct {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placement has enough repositories that grouping them into a struct improves service construction readability. This is the same explicit dependency approach as compute, just packaged for a wider surface.

return candidates
}

for _, provider := range s.resourceProviderRepository.List() {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allocation candidates are intentionally computed from current providers, inventories, and usages rather than stored as their own resource. This is the key semantic endpoint in the Placement slice.

return resources
}

func capacity(inventory Inventory, used int) int {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capacity follows the simple Placement formula used by this MVP: total minus reserved, multiplied by allocation ratio, then reduced by usage. Nested providers or sharing providers would need a more advanced model later.

@JSYoo5B JSYoo5B marked this pull request as draft July 2, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant