Compare commits

...

5 Commits

Author SHA1 Message Date
bc264c4d90 v1.7.7 2024-03-14 14:58:32 +03:00
d137c7507a v1.7.6 2024-03-14 14:52:56 +03:00
55027a1605 v1.6.13 2024-03-14 10:17:08 +03:00
de9cca4053 v1.7.6 2024-03-06 17:02:50 +03:00
83bf1fb1fa v1.6.12 2024-03-06 16:50:27 +03:00
13 changed files with 20 additions and 35 deletions

View File

@@ -1,12 +1,4 @@
## Version 1.7.5
## Version 1.7.7
### Bugfix
- Add json tag to a field AccountID in ItemCompute in cloudapi/bservice
- Add boolean field NeedReboot in RecordCompute and ItemCompute in cloudapi/compute
- Change json and url tags for field ShowAll in GetRequest in cloudapi/image
- Change json and url tags for field ByID in ListRequest in cloudapi/k8ci
- Change json and url tags for field AccountID in ListRequest in cloudapi/lb
- Add boolean field Safe in RestartRequest in cloudapi/lb
- Remove omitempty from json and url tags in ExtNetID in CreateInRGRequest in cloudapi/vins and cloudbroker/vins
- Change type of field ExtNetID from uint64 to int64 in CreateInRGRequest in cloudapi/vins and cloudbroker/vins
- Fix url for Disable method in cloudapi/bservice

View File

@@ -39,7 +39,7 @@ var (
sepFieldTypeValues = []string{"int", "str", "bool", "list", "dict"}
networkPluginValues = []string{"flannel", "weawenet", "calico"}
networkPluginValues = []string{"flannel", "weavenet", "calico"}
strictLooseValues = []string{"strict", "loose"}

View File

@@ -24,7 +24,7 @@ func (b BService) Disable(ctx context.Context, req DisableRequest) (bool, error)
return false, validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudapi/bservice/delete"
url := "/cloudapi/bservice/disable"
res, err := b.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {

View File

@@ -29,7 +29,7 @@ type CreateRequest struct {
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required,workerGroupName"`
// Network plugin
// Must be one of these values: flannel, weawenet, calico
// Must be one of these values: flannel, weavenet, calico
// Required: true
NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`

View File

@@ -55,10 +55,12 @@ func (lrc ListResourceConsumption) IDs() []uint64 {
}
// IDs gets array of ResourceGroupIDs from ListAffinityGroup struct
func (lag ListAffinityGroup) IDs() []uint64 {
res := make([]uint64, 0, len(lag))
for _, ag := range lag {
res = append(res, ag.ID)
func (lag ListAffinityGroups) IDs() []uint64 {
res := make([]uint64, 0, len(lag.Data))
for _, ag := range lag.Data {
for _, v := range ag {
res = append(res, v...)
}
}
return res
}

View File

@@ -331,19 +331,10 @@ type ItemAffinityGroupComputes struct {
// List of affinity groups
type ListAffinityGroupsComputes []ItemAffinityGroupComputes
// Main information about
type ItemAffinityGroup struct {
ID uint64 `json:"id"`
NodeID uint64 `json:"node_id"`
}
// List of affinity group
type ListAffinityGroup []ItemAffinityGroup
// List of affinity groups
type ListAffinityGroups struct {
// Data
Data []map[string]ListAffinityGroup `json:"data"`
Data []map[string][]uint64 `json:"data"`
// Entry count
EntryCount uint64 `json:"entryCount"`

View File

@@ -8,8 +8,8 @@ type Audit struct {
}
// Builder for audit endpoint
func New(client interfaces.Caller) *Audit{
func New(client interfaces.Caller) *Audit {
return &Audit{
client: client,
}
}
}

View File

@@ -43,4 +43,4 @@ func (a Audit) GetRawLinkedJobs(ctx context.Context, req LinkedJobsRequest) ([]b
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
return res, err
}
}

View File

@@ -19,7 +19,7 @@ type AccessAddRequest struct {
}
// Add accountId to sharedWith access list for k8ci.
func (k K8CI) AccessAdd (ctx context.Context, req AccessAddRequest) (string, error) {
func (k K8CI) AccessAdd(ctx context.Context, req AccessAddRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))

View File

@@ -19,7 +19,7 @@ type AccessRemoveRequest struct {
}
// Remove accountId from sharedWith access list for k8ci.
func (k K8CI) AccessRemove (ctx context.Context, req AccessRemoveRequest) (string, error) {
func (k K8CI) AccessRemove(ctx context.Context, req AccessRemoveRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return "", validators.ValidationErrors(validators.GetErrors(err))

View File

@@ -60,7 +60,7 @@ type CreateRequest struct {
MaxWorkerCount uint64 `url:"maxWorkerCount" json:"maxWorkerCount" validate:"required"`
// Network plugins
// Values of slice must be flannel, weawenet or calico
// Values of slice must be flannel, weavenet or calico
//Required: true
NetworkPlugins []string `url:"networkPlugins" json:"networkPlugins" validate:"required,networkPlugins"`
}

View File

@@ -16,7 +16,7 @@ type DeleteRequest struct {
// Delete permanently or not
// Required: false
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
Permanently bool `url:"permanently" json:"permanently"`
}
// Delete deletes K8CI by ID

View File

@@ -29,7 +29,7 @@ type CreateRequest struct {
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required,workerGroupName"`
// Network plugin
// Must be one of these values: flunnel, weawenet, calico
// Must be one of these values: flunnel, weavenet, calico
// Required: true
NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`