This commit is contained in:
asteam
2025-09-27 01:06:15 +03:00
parent 1ccc37a104
commit cf584c8123
1175 changed files with 11022 additions and 1832 deletions

View File

@@ -0,0 +1,37 @@
package compute
import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v12/internal/constants"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v12/internal/validators"
)
// StopMigrationOutRequest struct to stop compute for external migration out
type StopMigrationOutRequest struct {
// ID of compute instance
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
// Identifier of the agent-side external migration (LibvirtMigrateToURI3Request) job
// Required: false
MigrateToURI3JobID string `url:"migrate_to_uri3_job_id,omitempty" json:"migrate_to_uri3_job_id,omitempty"`
}
// StopMigrationOut stops compute for external migration out
func (c Compute) StopMigrationOut(ctx context.Context, req StopMigrationOutRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/compute/stop_migration_out"
res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
if err != nil {
return "", err
}
return string(res), nil
}