v1.6.7
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// Request for allocating VGPU
|
||||
// AllocateRequest struct for allocating VGPU
|
||||
type AllocateRequest struct {
|
||||
// Virtual GPU ID
|
||||
// Required: true
|
||||
@@ -18,9 +18,7 @@ type AllocateRequest struct {
|
||||
func (v VGPU) Allocate(ctx context.Context, req AllocateRequest) (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 := "/cloudbroker/vgpu/allocate"
|
||||
|
||||
Reference in New Issue
Block a user