Skip to content

Add scheduler hint sample#436

Merged
k0ka merged 2 commits intomasterfrom
server_os_scheduler_hints
Mar 8, 2026
Merged

Add scheduler hint sample#436
k0ka merged 2 commits intomasterfrom
server_os_scheduler_hints

Conversation

@k0ka
Copy link
Member

@k0ka k0ka commented Mar 8, 2026

for #434

add scheduler hints for server

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support and documentation for Nova server-create scheduler hints (specifically for placing servers into an existing server group) in the Compute v2 SDK workflow.

Changes:

  • Add schedulerHints request option for createServer, serialized as top-level os:scheduler_hints alongside the server object.
  • Update Compute v2 API server-create request shaping to nest only server fields under server.* while allowing top-level siblings (like scheduler hints).
  • Add sample + docs + sample test coverage for creating a server in a server group; improve sample cleanup reliability when deleting servers/networks.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/Compute/v2/ServiceTest.php Adds unit coverage asserting os:scheduler_hints is sent alongside server on create.
tests/sample/Compute/v2/TestCase.php Ensures server addresses are retrieved before deletion so dependent network cleanup can run after delete.
tests/sample/Compute/v2/ServerGroupTest.php Adds an integration/sample test demonstrating server creation inside a server group via scheduler hints.
src/Compute/v2/Params.php Introduces schedulerHints parameter schema (sent as os:scheduler_hints).
src/Compute/v2/Api.php Refactors postServer JSON shaping to use per-param JSON paths under server, enabling top-level scheduler hints.
samples/Compute/v2/server_groups/create_server.php New executable sample showing schedulerHints.group usage on server create.
doc/services/compute/v2/server-groups.rst Documents the new “Create a server in a group” workflow and links the sample.
AGENTS.md Adds guidance for reusing resources in sample tests via @depends patterns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@k0ka k0ka merged commit a88b4e4 into master Mar 8, 2026
24 checks passed
@k0ka k0ka deleted the server_os_scheduler_hints branch March 8, 2026 18:13
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.

2 participants