v1.6.7
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
// Request struct for redeploy
|
||||
// RedeployRequest struct to redeploy
|
||||
type RedeployRequest struct {
|
||||
// ID of compute instance
|
||||
// Required: true
|
||||
@@ -27,7 +27,7 @@ type RedeployRequest struct {
|
||||
// Required: false
|
||||
DataDisks string `url:"dataDisks,omitempty" json:"dataDisks,omitempty"`
|
||||
|
||||
// Should the compute be restarted upon successful redeploy
|
||||
// Should compute be restarted upon successful redeploy
|
||||
// Required: false
|
||||
AutoStart bool `url:"autoStart,omitempty" json:"autoStart,omitempty"`
|
||||
|
||||
@@ -36,13 +36,11 @@ type RedeployRequest struct {
|
||||
ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"`
|
||||
}
|
||||
|
||||
// Redeploy redeploy compute
|
||||
// Redeploy redeploys compute
|
||||
func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error) {
|
||||
err := validators.ValidateRequest(req)
|
||||
if err != nil {
|
||||
for _, validationError := range validators.GetErrors(err) {
|
||||
return false, validators.ValidationError(validationError)
|
||||
}
|
||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
||||
}
|
||||
|
||||
url := "/cloudapi/compute/redeploy"
|
||||
|
||||
Reference in New Issue
Block a user