v1.16.1
v1.16.1
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
@@ -14,10 +15,6 @@ type CreateRequest struct {
|
||||
// Required: true
|
||||
NodeID uint64 `url:"node_id" json:"node_id" validate:"required"`
|
||||
|
||||
// Resource group ID
|
||||
// Required: true
|
||||
RGID uint64 `url:"rgId" json:"rgId" validate:"required"`
|
||||
|
||||
// Name of device
|
||||
// Required: true
|
||||
Name string `url:"name" json:"name" validate:"required"`
|
||||
@@ -30,6 +27,10 @@ type CreateRequest struct {
|
||||
// Description, just for information
|
||||
// Required: false
|
||||
Description string `url:"description,omitempty" json:"description,omitempty"`
|
||||
|
||||
// Account IDs
|
||||
// Required: false
|
||||
AccountIDs []uint64 `url:"account_ids,omitempty" json:"account_ids,omitempty"`
|
||||
}
|
||||
|
||||
// Create creates PCI Device
|
||||
@@ -41,7 +42,7 @@ func (p PCIDevice) Create(ctx context.Context, req CreateRequest) (uint64, error
|
||||
|
||||
url := "/cloudbroker/pcidevice/create"
|
||||
|
||||
res, err := p.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
res, err := p.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user