v1.13.2
This commit is contained in:
@@ -38,9 +38,8 @@ type AffinityRuleAddRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AffinityRuleAdd add affinity rule
|
||||
|
||||
@@ -38,9 +38,8 @@ type AffinityRuleRemoveRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AffinityRuleRemove remove affinity rule
|
||||
|
||||
@@ -38,9 +38,8 @@ type AntiAffinityRuleAddRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AntiAffinityRuleAdd add anti affinity rule
|
||||
|
||||
@@ -38,9 +38,8 @@ type AntiAffinityRuleRemoveRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AntiAffinityRuleRemove remove anti affinity rule
|
||||
|
||||
@@ -1237,6 +1237,9 @@ type ListInfoDisks []InfoDisk
|
||||
type InfoDisk struct {
|
||||
// ID
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
// SEP ID
|
||||
SepID int64 `json:"sepId"`
|
||||
}
|
||||
|
||||
// List information about computes
|
||||
|
||||
@@ -35,6 +35,11 @@ type Interface struct {
|
||||
// Required: false
|
||||
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
|
||||
|
||||
// Net mask
|
||||
// Used only to DPDK or VFNIC net type
|
||||
// Required: false
|
||||
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
|
||||
|
||||
// MAC address to assign to this VM when connecting to the specified network
|
||||
// Required: false
|
||||
MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -29,6 +29,9 @@ type ItemTrunk struct {
|
||||
// MAC
|
||||
MAC string `json:"mac"`
|
||||
|
||||
// MTU
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// Name of a trunk
|
||||
Name string `json:"name"`
|
||||
|
||||
|
||||
@@ -95,6 +95,15 @@ type RecordAudit struct {
|
||||
|
||||
// TTL
|
||||
TTL string `json:"_ttl"`
|
||||
|
||||
// Resgroup ID
|
||||
ResgroupID uint64 `json:"resgroup_id"`
|
||||
|
||||
// Account ID
|
||||
AccountID uint64 `json:"account_id"`
|
||||
|
||||
// Compute ID
|
||||
ComputeID uint64 `json:"compute_id"`
|
||||
}
|
||||
|
||||
// List of Linked Jobs
|
||||
|
||||
@@ -40,9 +40,8 @@ type AffinityRuleAddRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AffinityRuleAdd adds affinity rule
|
||||
|
||||
@@ -38,9 +38,8 @@ type AffinityRuleRemoveRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AffinityRuleRemove remove affinity rule
|
||||
|
||||
@@ -38,9 +38,8 @@ type AntiAffinityRuleAddRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AntiAffinityRuleAdd adds anti affinity rule
|
||||
|
||||
@@ -38,9 +38,8 @@ type AntiAffinityRuleRemoveRequest struct {
|
||||
Key string `url:"key" json:"key" validate:"required"`
|
||||
|
||||
// Value that must match the key to be taken into account when analyzing this rule
|
||||
// Required: false
|
||||
// Not required on purpose: despite required tag on platform, empty string is allowed
|
||||
Value string `url:"value" json:"value"`
|
||||
// Required: true
|
||||
Value string `url:"value" json:"value" validate:"required"`
|
||||
}
|
||||
|
||||
// AntiAffinityRuleRemove removes anti affinity rule
|
||||
|
||||
@@ -19,8 +19,8 @@ type CloneRequest struct {
|
||||
Name string `url:"name" json:"name" validate:"required"`
|
||||
|
||||
// ID of the Storage Policy
|
||||
// Required: true
|
||||
StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"`
|
||||
// Required: false
|
||||
StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id"`
|
||||
|
||||
// Timestamp of the parent's snapshot to create clone from
|
||||
// Required: false
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
type GetCloneStatusRequest struct {
|
||||
// ID of compute instance
|
||||
// Required: true
|
||||
ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"`
|
||||
ComputeID string `url:"compute_id" json:"compute_id" validate:"required"`
|
||||
}
|
||||
|
||||
// GetCloneStatus gets information about compute clone status as a RecordCloneStatus struct
|
||||
|
||||
@@ -841,7 +841,7 @@ type InfoCompute struct {
|
||||
SnapSets ListSnapshots `json:"snapSets"`
|
||||
|
||||
// Node ID
|
||||
NodeID uint64 `json:"nodeId"`
|
||||
NodeID uint64 `json:"node_id"`
|
||||
|
||||
// Node name
|
||||
NodeName string `json:"nodeName"`
|
||||
@@ -1171,6 +1171,9 @@ type RecordCompute struct {
|
||||
|
||||
// Zone ID
|
||||
ZoneID uint64 `json:"zoneId"`
|
||||
|
||||
//todo
|
||||
_ uint64 `json:"nodeId"`
|
||||
}
|
||||
|
||||
type LoaderMetaIso struct {
|
||||
@@ -1280,6 +1283,9 @@ type ItemDeletedCompute struct {
|
||||
type InfoDisk struct {
|
||||
// ID
|
||||
ID uint64 `json:"id"`
|
||||
|
||||
// SEP ID
|
||||
SepID int64 `json:"sepId"`
|
||||
}
|
||||
|
||||
// List computes
|
||||
|
||||
@@ -45,6 +45,11 @@ type NetAttachRequest struct {
|
||||
// Required: false
|
||||
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty" validate:"omitempty,mtu"`
|
||||
|
||||
// Net mask
|
||||
// Used only to DPDK or VFNIC net type
|
||||
// Required: false
|
||||
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
|
||||
|
||||
// Unique identifier of logical port on SDN side
|
||||
// Required: false
|
||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty" validate:"omitempty"`
|
||||
|
||||
@@ -20,7 +20,7 @@ type StartRequest struct {
|
||||
|
||||
// ID of node to start compute
|
||||
// Required: false
|
||||
NodeID uint64 `url:"nodeId,omitempty" json:"nodeId,omitempty"`
|
||||
NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"`
|
||||
}
|
||||
|
||||
// Start starts compute
|
||||
|
||||
@@ -37,6 +37,11 @@ type Interface struct {
|
||||
// Required: false
|
||||
MAC string `url:"mac,omitempty" json:"mac,omitempty" validate:"omitempty"`
|
||||
|
||||
// Net mask
|
||||
// Used only to DPDK or VFNIC net type
|
||||
// Required: false
|
||||
NetMask uint64 `url:"netMask,omitempty" json:"netMask,omitempty"`
|
||||
|
||||
// SDN interface id
|
||||
// Required: false
|
||||
SDNInterfaceID string `url:"sdn_interface_id,omitempty" json:"sdn_interface_id,omitempty"`
|
||||
|
||||
@@ -5,13 +5,14 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/constants"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/internal/validators"
|
||||
)
|
||||
|
||||
type VFParam struct {
|
||||
// Number of VF to assign
|
||||
// ID of the FN
|
||||
// Required: true
|
||||
VFNum uint64 `url:"vfNum" json:"vfNum" validate:"required"`
|
||||
FNID uint64 `url:"fnId" json:"fnId" validate:"required"`
|
||||
|
||||
// Trust
|
||||
// Required: true
|
||||
@@ -46,7 +47,7 @@ func (n Node) SetVFsParams(ctx context.Context, req SetVFsParamsRequest) (bool,
|
||||
|
||||
url := "/cloudbroker/node/setVFsParams"
|
||||
|
||||
res, err := n.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
res, err := n.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req)
|
||||
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
||||
@@ -42,6 +42,9 @@ type ListRequest struct {
|
||||
// Required: false
|
||||
SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"`
|
||||
|
||||
// Sort by SEP IDs
|
||||
SepIDs []uint64 `url:"sep_ids,omitempty" json:"sep_ids,omitempty"`
|
||||
|
||||
// Page size
|
||||
// Required: false
|
||||
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -33,6 +33,11 @@ type CreateRequest struct {
|
||||
// Native VLAN ID
|
||||
// Required: false
|
||||
NativeVLANID uint64 `url:"native_vlan_id,omitempty" json:"native_vlan_id,omitempty"`
|
||||
|
||||
// MTU
|
||||
// Default value: 1500
|
||||
// Required: false
|
||||
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty"`
|
||||
}
|
||||
|
||||
// Create creates a user.
|
||||
|
||||
@@ -29,6 +29,9 @@ type ItemTrunk struct {
|
||||
// MAC
|
||||
MAC string `json:"mac"`
|
||||
|
||||
// MTU
|
||||
MTU uint64 `json:"mtu"`
|
||||
|
||||
// Name of a trunk
|
||||
Name string `json:"name"`
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ type UpdateRequest struct {
|
||||
// New native VLAN ID
|
||||
// Required: false
|
||||
NativeVLANID uint64 `url:"native_vlan_id,omitempty" json:"native_vlan_id,omitempty"`
|
||||
|
||||
// MTU
|
||||
// Default value: 1500
|
||||
// Required: false
|
||||
MTU uint64 `url:"mtu,omitempty" json:"mtu,omitempty"`
|
||||
}
|
||||
|
||||
// Update updates a trunk
|
||||
|
||||
Reference in New Issue
Block a user