This commit is contained in:
asteam
2025-12-08 16:16:35 +03:00
parent a267d35ddf
commit f0dee6360a
89 changed files with 455 additions and 1067 deletions

View File

@@ -15,9 +15,9 @@ type MigrateRequest struct {
// Required: true
ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"`
// Particular Stack ID to migrate this compute to
// Particular Node ID to migrate this compute to
// Required: false
TargetStackID uint64 `url:"targetStackId,omitempty" json:"targetStackId,omitempty"`
TargetNodeID uint64 `url:"targetNodeId,omitempty" json:"targetNodeId,omitempty"`
// If live migration fails, destroy compute
// on source node and recreate on the target
@@ -30,7 +30,7 @@ type AsyncWrapperMigrateRequest struct {
SyncMode bool `url:"sync"`
}
// Migrate migrates compute to another stack
// Migrate migrates compute to another node
func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error) {
err := validators.ValidateRequest(req)
if err != nil {
@@ -54,7 +54,7 @@ func (c Compute) Migrate(ctx context.Context, req MigrateRequest) (bool, error)
return result, nil
}
// AsyncMigrate migrates compute to another stack in async mode
// AsyncMigrate migrates compute to another node in async mode
func (c Compute) AsyncMigrate(ctx context.Context, req MigrateRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {