Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bc264c4d90 | |||
| d137c7507a | |||
| 55027a1605 | |||
| de9cca4053 | |||
| 83bf1fb1fa | |||
| 16cad7a3e7 |
@@ -1,5 +1,4 @@
|
|||||||
## Version 1.7.4
|
## Version 1.7.7
|
||||||
|
|
||||||
## Bugfix
|
### Bugfix
|
||||||
|
- Fix url for Disable method in cloudapi/bservice
|
||||||
- Remove tag "required" from field Value in AffinityRuleAddRequest, AntiAffinityRuleAddRequest, AffinityRuleRemoveRequest AntiAffinityRuleRemoveRequest in cloudapi/compute and cloudbroker/compute
|
|
||||||
@@ -39,7 +39,7 @@ var (
|
|||||||
|
|
||||||
sepFieldTypeValues = []string{"int", "str", "bool", "list", "dict"}
|
sepFieldTypeValues = []string{"int", "str", "bool", "list", "dict"}
|
||||||
|
|
||||||
networkPluginValues = []string{"flannel", "weawenet", "calico"}
|
networkPluginValues = []string{"flannel", "weavenet", "calico"}
|
||||||
|
|
||||||
strictLooseValues = []string{"strict", "loose"}
|
strictLooseValues = []string{"strict", "loose"}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ func (b BService) Disable(ctx context.Context, req DisableRequest) (bool, error)
|
|||||||
return false, validators.ValidationErrors(validators.GetErrors(err))
|
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)
|
res, err := b.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ type RecordBasicService struct {
|
|||||||
// Main information about Compute
|
// Main information about Compute
|
||||||
type ItemCompute struct {
|
type ItemCompute struct {
|
||||||
// Account ID
|
// Account ID
|
||||||
AccountID uint64
|
AccountID uint64 `json:"accountId"`
|
||||||
|
|
||||||
// Architecture
|
// Architecture
|
||||||
Architecture string `json:"arch"`
|
Architecture string `json:"arch"`
|
||||||
|
|||||||
@@ -380,6 +380,9 @@ type RecordCompute struct {
|
|||||||
// Name
|
// Name
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
|
// NeedReboot
|
||||||
|
NeedReboot bool `json:"needReboot"`
|
||||||
|
|
||||||
// Natable VINS ID
|
// Natable VINS ID
|
||||||
NatableVINSID uint64 `json:"natableVinsId"`
|
NatableVINSID uint64 `json:"natableVinsId"`
|
||||||
|
|
||||||
@@ -857,6 +860,9 @@ type ItemCompute struct {
|
|||||||
// Name
|
// Name
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
|
// NeedReboot
|
||||||
|
NeedReboot bool `json:"needReboot"`
|
||||||
|
|
||||||
// Pinned or not
|
// Pinned or not
|
||||||
Pinned bool `json:"pinned"`
|
Pinned bool `json:"pinned"`
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type GetRequest struct {
|
|||||||
|
|
||||||
// If set to False returns only images in status CREATED
|
// If set to False returns only images in status CREATED
|
||||||
// Required: false
|
// Required: false
|
||||||
ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"`
|
ShowAll bool `url:"showAll,omitempty" json:"showAll,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get gets image by ID.
|
// Get gets image by ID.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
type ListRequest struct {
|
type ListRequest struct {
|
||||||
// Find by ID
|
// Find by ID
|
||||||
// Required: false
|
// Required: false
|
||||||
ByID uint64 `url:"id,omitempty" json:"id,omitempty"`
|
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||||
|
|
||||||
// Find by name
|
// Find by name
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ type CreateRequest struct {
|
|||||||
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required,workerGroupName"`
|
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required,workerGroupName"`
|
||||||
|
|
||||||
// Network plugin
|
// Network plugin
|
||||||
// Must be one of these values: flannel, weawenet, calico
|
// Must be one of these values: flannel, weavenet, calico
|
||||||
// Required: true
|
// Required: true
|
||||||
NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`
|
NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ type ListRequest struct {
|
|||||||
|
|
||||||
// Find by account ID
|
// Find by account ID
|
||||||
// Required: false
|
// Required: false
|
||||||
AccountID uint64 `url:"accountID,omitempty" json:"accountID,omitempty"`
|
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||||
|
|
||||||
// Find by resource group ID
|
// Find by resource group ID
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ type RestartRequest struct {
|
|||||||
// ID of the load balancer instance to restart
|
// ID of the load balancer instance to restart
|
||||||
// Required: true
|
// Required: true
|
||||||
LBID uint64 `url:"lbId" json:"lbId" validate:"required"`
|
LBID uint64 `url:"lbId" json:"lbId" validate:"required"`
|
||||||
|
|
||||||
|
// restart secondary and primary nodes sequentially in HA mode
|
||||||
|
// Default is true
|
||||||
|
// Required: false
|
||||||
|
Safe bool `url:"safe" json:"safe"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restart restarts specified load balancer instance
|
// Restart restarts specified load balancer instance
|
||||||
|
|||||||
@@ -55,10 +55,12 @@ func (lrc ListResourceConsumption) IDs() []uint64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// IDs gets array of ResourceGroupIDs from ListAffinityGroup struct
|
// IDs gets array of ResourceGroupIDs from ListAffinityGroup struct
|
||||||
func (lag ListAffinityGroup) IDs() []uint64 {
|
func (lag ListAffinityGroups) IDs() []uint64 {
|
||||||
res := make([]uint64, 0, len(lag))
|
res := make([]uint64, 0, len(lag.Data))
|
||||||
for _, ag := range lag {
|
for _, ag := range lag.Data {
|
||||||
res = append(res, ag.ID)
|
for _, v := range ag {
|
||||||
|
res = append(res, v...)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -331,19 +331,10 @@ type ItemAffinityGroupComputes struct {
|
|||||||
// List of affinity groups
|
// List of affinity groups
|
||||||
type ListAffinityGroupsComputes []ItemAffinityGroupComputes
|
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
|
// List of affinity groups
|
||||||
type ListAffinityGroups struct {
|
type ListAffinityGroups struct {
|
||||||
// Data
|
// Data
|
||||||
Data []map[string]ListAffinityGroup `json:"data"`
|
Data []map[string][]uint64 `json:"data"`
|
||||||
|
|
||||||
// Entry count
|
// Entry count
|
||||||
EntryCount uint64 `json:"entryCount"`
|
EntryCount uint64 `json:"entryCount"`
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ type CreateInRGRequest struct {
|
|||||||
|
|
||||||
// External network ID
|
// External network ID
|
||||||
// Required: false
|
// Required: false
|
||||||
ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"`
|
// -1 - not connect to extnet, 0 - auto select, 1+ - extnet ID
|
||||||
|
ExtNetID int64 `url:"extNetId" json:"extNetId"`
|
||||||
|
|
||||||
// External IP, related only for extNetId >= 0
|
// External IP, related only for extNetId >= 0
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ type Audit struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Builder for audit endpoint
|
// Builder for audit endpoint
|
||||||
func New(client interfaces.Caller) *Audit{
|
func New(client interfaces.Caller) *Audit {
|
||||||
return &Audit{
|
return &Audit{
|
||||||
client: client,
|
client: client,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,4 +43,4 @@ func (a Audit) GetRawLinkedJobs(ctx context.Context, req LinkedJobsRequest) ([]b
|
|||||||
|
|
||||||
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ type AccessAddRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add accountId to sharedWith access list for k8ci.
|
// 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)
|
err := validators.ValidateRequest(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", validators.ValidationErrors(validators.GetErrors(err))
|
return "", validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ type AccessRemoveRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove accountId from sharedWith access list for k8ci.
|
// 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)
|
err := validators.ValidateRequest(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", validators.ValidationErrors(validators.GetErrors(err))
|
return "", validators.ValidationErrors(validators.GetErrors(err))
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ type CreateRequest struct {
|
|||||||
MaxWorkerCount uint64 `url:"maxWorkerCount" json:"maxWorkerCount" validate:"required"`
|
MaxWorkerCount uint64 `url:"maxWorkerCount" json:"maxWorkerCount" validate:"required"`
|
||||||
|
|
||||||
// Network plugins
|
// Network plugins
|
||||||
// Values of slice must be flannel, weawenet or calico
|
// Values of slice must be flannel, weavenet or calico
|
||||||
//Required: true
|
//Required: true
|
||||||
NetworkPlugins []string `url:"networkPlugins" json:"networkPlugins" validate:"required,networkPlugins"`
|
NetworkPlugins []string `url:"networkPlugins" json:"networkPlugins" validate:"required,networkPlugins"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type DeleteRequest struct {
|
|||||||
|
|
||||||
// Delete permanently or not
|
// Delete permanently or not
|
||||||
// Required: false
|
// Required: false
|
||||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete deletes K8CI by ID
|
// Delete deletes K8CI by ID
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ type CreateRequest struct {
|
|||||||
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required,workerGroupName"`
|
WorkerGroupName string `url:"workerGroupName" json:"workerGroupName" validate:"required,workerGroupName"`
|
||||||
|
|
||||||
// Network plugin
|
// Network plugin
|
||||||
// Must be one of these values: flunnel, weawenet, calico
|
// Must be one of these values: flunnel, weavenet, calico
|
||||||
// Required: true
|
// Required: true
|
||||||
NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`
|
NetworkPlugin string `url:"networkPlugin" json:"networkPlugin" validate:"required,networkPlugin"`
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ type CreateInRGRequest struct {
|
|||||||
|
|
||||||
// External network ID
|
// External network ID
|
||||||
// Required: false
|
// Required: false
|
||||||
ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"`
|
// -1 - not connect to extnet, 0 - auto select, 1+ - extnet ID
|
||||||
|
ExtNetID int64 `url:"extNetId" json:"extNetId"`
|
||||||
|
|
||||||
// External IP, related only for extNetId >= 0
|
// External IP, related only for extNetId >= 0
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
Reference in New Issue
Block a user