This commit is contained in:
dayterr
2025-12-23 17:39:58 +03:00
parent 055b256d6b
commit f111bf25fc
35 changed files with 251 additions and 111 deletions

View File

@@ -56,6 +56,10 @@ type ListRequest struct {
// Search by pool name
// Required: false
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
// Filter SEP's by tech status (ENABLED, DISABLED)
// Required: false
SepTechStatus string `url:"sep_tech_status,omitempty" json:"sep_tech_status,omitempty" validate:"omitempty,sepTechStatus"`
}
// List gets list of storage policies as a ListStoragePolicies struct

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"net/http"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
)
@@ -13,6 +14,10 @@ type UpdateRequest struct {
// Required: true
StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"`
// List of storage endpoint access objects
// Required: true
AccessSEPsPools []AccessSEPsPool `url:"access_seps_pools" json:"access_seps_pools" validate:"required"`
// New name for the storage policy
// Required: false
Name string `url:"name,omitempty" json:"name,omitempty"`
@@ -51,6 +56,6 @@ func (sp StPolicy) UpdateRaw(ctx context.Context, req UpdateRequest) ([]byte, er
url := "/cloudbroker/storage_policy/update"
res, err := sp.client.DecortApiCall(ctx, http.MethodPost, url, req)
res, err := sp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
return res, err
}