This commit is contained in:
stSolo
2023-03-01 19:05:53 +03:00
parent de12bc2acc
commit 42800ac4fe
573 changed files with 2077 additions and 1844 deletions

View File

@@ -11,12 +11,12 @@ import (
type AccessGrantRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Account ID to grant access to the specified SEP. If 0,
// the SEP will be available for all accounts with no exceptions
// Required: true
AccountID uint64 `url:"account_id"`
AccountID uint64 `url:"account_id" json:"account_id"`
}
func (srq AccessGrantRequest) validate() error {

View File

@@ -11,19 +11,19 @@ import (
type AccessGrantToPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: true
PoolName string `url:"pool_name"`
PoolName string `url:"pool_name" json:"pool_name"`
// Account ID to grant access to the specified pool SEP
// Required: false
AccountID uint64 `url:"account_id,omitempty"`
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
// Resource group to grant access to the specified pool SEP
// Required: false
RGID uint64 `url:"resgroup_id,omitempty"`
RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"`
}
func (srq AccessGrantToPoolRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type AccessRevokeRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Account ID to revoke access to the specified SEP
// Required: true
AccountID uint64 `url:"account_id"`
AccountID uint64 `url:"account_id" json:"account_id"`
}
func (srq AccessRevokeRequest) validate() error {

View File

@@ -11,19 +11,19 @@ import (
type AccessRevokeToPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: true
PoolName string `url:"pool_name"`
PoolName string `url:"pool_name" json:"pool_name"`
// Account ID to grant access to the specified pool SEP
// Required: false
AccountID uint64 `url:"account_id,omitempty"`
AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"`
// Resource group ID to grant access to the specified pool SEP
// Required: false
RGID uint64 `url:"resgroup_id,omitempty"`
RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"`
}
func (srq AccessRevokeToPoolRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type AddConsumerNodesRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// List of nodes IDs
// Required: true
ConsumerNIDs []uint64 `url:"consumer_nids"`
ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids"`
}
func (srq AddConsumerNodesRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type AddProviderNodesRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// List of node IDs
// Required: true
ProviderNIDs []uint64 `url:"provider_nids"`
ProviderNIDs []uint64 `url:"provider_nids" json:"provider_nids"`
}
func (srq AddProviderNodesRequest) validate() error {

View File

@@ -13,15 +13,15 @@ import (
type ConfigFieldEditRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Field name
// Required: true
FieldName string `url:"field_name"`
FieldName string `url:"field_name" json:"field_name"`
// Field value
// Required: true
FieldValue string `url:"field_value"`
FieldValue string `url:"field_value" json:"field_value"`
// Field type
// Should be one of:
@@ -31,7 +31,7 @@ type ConfigFieldEditRequest struct {
// - list
// - dict
// Required: true
FieldType string `url:"field_type"`
FieldType string `url:"field_type" json:"field_type"`
}
func (srq ConfigFieldEditRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type ConfigInsertRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Storage provider config
// Required: true
Config string `url:"config"`
Config string `url:"config" json:"config"`
}
func (srq ConfigInsertRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type ConfigValidateRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Storage provider config
// Required: true
Config string `url:"config"`
Config string `url:"config" json:"config"`
}
func (srq ConfigValidateRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type ConsumptionRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq ConsumptionRequest) validate() error {

View File

@@ -11,35 +11,35 @@ import (
type CreateRequest struct {
// Grid ID
// Required: true
GID uint64 `url:"gid"`
GID uint64 `url:"gid" json:"gid"`
// SEP name
// Required: true
Name string `url:"name"`
Name string `url:"name" json:"name"`
// Type of storage
// Required: true
SEPType string `url:"sep_type"`
SEPType string `url:"sep_type" json:"sep_type"`
// Description
// Required: false
Description string `url:"description,omitempty"`
Description string `url:"description,omitempty" json:"description,omitempty"`
// SEP config
// Required: false
Config string `url:"config,omitempty"`
Config string `url:"config,omitempty" json:"config,omitempty"`
// List of provider node IDs
// Required: false
ProviderNIDs []uint64 `url:"provider_nids,omitempty"`
ProviderNIDs []uint64 `url:"provider_nids,omitempty" json:"provider_nids,omitempty"`
// List of consumer node IDs
// Required: false
ConsumerNIDs []uint64 `url:"consumer_nids,omitempty"`
ConsumerNIDs []uint64 `url:"consumer_nids,omitempty" json:"consumer_nids,omitempty"`
// Enable SEP after creation
// Required: false
Enable bool `url:"enable,omitempty"`
Enable bool `url:"enable,omitempty" json:"enable,omitempty"`
}
func (srq CreateRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DecommissionRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Clear disks and images physically
// Required: false
ClearPhisically bool `url:"clear_physically,omitempty"`
ClearPhisically bool `url:"clear_physically,omitempty" json:"clear_physically,omitempty"`
}
func (srq DecommissionRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DelConsumerNodesRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// List of consumer node IDs
// Required: true
ConsumerNIDs []uint64 `url:"consumer_nids"`
ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids"`
}
func (srq DelConsumerNodesRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type DeleteRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq DeleteRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type DisableRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq DisableRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type DiskListRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: false
PoolName string `url:"pool_name,omitempty"`
PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"`
}
func (srq DiskListRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type EnableRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq EnableRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq GetRequest) validate() error {

View File

@@ -11,7 +11,7 @@ import (
type GetConfigRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq GetConfigRequest) validate() error {

View File

@@ -11,11 +11,11 @@ import (
type GetPoolRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
// Pool name
// Required: true
PoolName string `url:"pool_name"`
PoolName string `url:"pool_name" json:"pool_name"`
}
func (srq GetPoolRequest) validate() error {

View File

@@ -10,11 +10,11 @@ import (
type ListRequest struct {
// Page size
// Required: false
Size uint64 `url:"size,omitempty"`
Size uint64 `url:"size,omitempty" json:"size,omitempty"`
// Page number
// Required: false
Page uint64 `url:"page,omitempty"`
Page uint64 `url:"page,omitempty" json:"page,omitempty"`
}
// List gets list of SEPs

View File

@@ -11,7 +11,7 @@ import (
type UpdateCapacityLimitRequest struct {
// Storage endpoint provider ID
// Required: true
SEPID uint64 `url:"sep_id"`
SEPID uint64 `url:"sep_id" json:"sep_id"`
}
func (srq UpdateCapacityLimitRequest) validate() error {