This commit is contained in:
2025-04-09 11:21:07 +03:00
parent 3f21a89e80
commit 8a101c6fcb
115 changed files with 2342 additions and 429 deletions

View File

@@ -14,6 +14,10 @@ type CreateRequest struct {
// Required: true
Name string `url:"name" json:"name" validate:"required"`
// Description
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Name of the account
// Required: true
Username string `url:"username" json:"username" validate:"required"`
@@ -56,7 +60,7 @@ type CreateRequest struct {
UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"`
// Advanced compute features,
// one of: hugepages, numa, cpupin, vfnic
// one of: hugepages, numa, cpupin, vfnic, dpdk, changemac
// Required: false
ComputeFeatures []string `url:"computeFeatures,omitempty" json:"computeFeatures,omitempty" validate:"omitempty,computeFeatures"`
}

View File

@@ -13,6 +13,10 @@ type DisableRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
// Reason of disabling
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
// Disable disables an account

View File

@@ -12,6 +12,10 @@ type DisableAccountsRequest struct {
// IDs of accounts
// Required: true
AccountIDs []uint64 `url:"accountIds" json:"accountIds" validate:"min=1"`
// Reason of disabling
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
// DisableAccounts disables accounts

View File

@@ -170,6 +170,9 @@ type InfoAccount struct {
// Display name
DisplayName string `json:"displayname"`
// Description
Description string `json:"desc"`
// GUID
GUID uint64 `json:"guid"`
@@ -476,6 +479,9 @@ type ItemRG struct {
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// Description
Description string `json:"desc"`
// ID
ID uint64 `json:"id"`

View File

@@ -12,6 +12,10 @@ type RestoreRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
// Reason of disabling
// Required: false
Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}
// Restore restores a deleted account

View File

@@ -14,6 +14,10 @@ type UpdateRequest struct {
// Required: true
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
// Description
// Required: false
Description string `url:"desc,omitempty" json:"desc,omitempty"`
// Name of the account
// Required: false
Name string `url:"name" json:"name"`

View File

@@ -15,7 +15,7 @@ type UpdateComputeFeaturesRequest struct {
AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
// Advanced compute features,
// one of: hugepages, numa, cpupin, vfnic
// one of: hugepages, numa, cpupin, vfnic, dpdk, changemac
// Required: false
ComputeFeatures []string `url:"computeFeatures,omitempty" json:"computeFeatures,omitempty" validate:"omitempty,computeFeatures"`
}