feat(rest-api): add disable/enable action endpoints for hosts#9532
Merged
Conversation
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
766eb31 to
c56d7a4
Compare
pierrebrunet289
approved these changes
Mar 3, 2026
MathieuRA
requested changes
Mar 4, 2026
c56d7a4 to
f749d30
Compare
f749d30 to
c909a19
Compare
MathieuRA
requested changes
Mar 10, 2026
c909a19 to
ab5c532
Compare
MathieuRA
requested changes
Mar 11, 2026
ab5c532 to
e385e48
Compare
MathieuRA
requested changes
Mar 12, 2026
e385e48 to
1a02d1d
Compare
MathieuRA
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add REST API endpoints to disable and enable hosts, aligned with XAPI native vocabulary (
host.disable/host.enable).POST /hosts/{id}/actions/disable— disables the host and, by default, evacuates all running VMs to other hosts in the pool.evacuate(boolean, defaultfalse): set totrueto evacuate VMs.force(boolean): ignore evacuation errors.vmIdsToForceMigrate(string[]): unblock VMs whose migration is blocked bypool_migrateormigrate_sendoperations.forceandvmIdsToForceMigrateare only used when evacuating.POST /hosts/{id}/actions/enable— re-enables the host.Both endpoints support async (202 + task) and sync (
?sync=true, 204) modes viacreateAction, following the established action pattern (VM start/pause, Pool rolling_reboot, etc.).Also adds missing
clearHost,enableHost, andgetRecordByUuidmethod signatures to theXapiinterface in@vates/types.See XO-1800
Checklist
See XO-1800)CHANGELOG.unreleased.mdReview process
If you are an external contributor, you can skip this part. Simply create the pull request, and we'll get back to you as soon as possible.
Notes: