v1.6.12
This commit is contained in:
@@ -93,7 +93,7 @@ type RecordBasicService struct {
|
||||
// Main information about Compute
|
||||
type ItemCompute struct {
|
||||
// Account ID
|
||||
AccountID uint64 `json:"accountId"`
|
||||
AccountID uint64
|
||||
|
||||
// Architecture
|
||||
Architecture string `json:"arch"`
|
||||
@@ -168,9 +168,6 @@ type ItemSnapshot struct {
|
||||
Valid bool `json:"valid"`
|
||||
}
|
||||
|
||||
// List of Snapshot
|
||||
type ListSnapshots []ItemSnapshot
|
||||
|
||||
// List of Snapshots
|
||||
type ListInfoSnapshots struct {
|
||||
// Data
|
||||
@@ -180,6 +177,9 @@ type ListInfoSnapshots struct {
|
||||
EntryCount uint64 `json:"entryCount"`
|
||||
}
|
||||
|
||||
// List of Snapshots inside RecordBasicService
|
||||
type ListSnapshots []ItemSnapshot
|
||||
|
||||
// Main information about Group
|
||||
type RecordGroup struct {
|
||||
// Account ID
|
||||
|
||||
@@ -380,9 +380,6 @@ type RecordCompute struct {
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
// NeedReboot
|
||||
NeedReboot bool `json:"needReboot"`
|
||||
|
||||
// Natable VINS ID
|
||||
NatableVINSID uint64 `json:"natableVinsId"`
|
||||
|
||||
@@ -860,9 +857,6 @@ type ItemCompute struct {
|
||||
// Name
|
||||
Name string `json:"name"`
|
||||
|
||||
// NeedReboot
|
||||
NeedReboot bool `json:"needReboot"`
|
||||
|
||||
// Pinned or not
|
||||
Pinned bool `json:"pinned"`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ type GetRequest struct {
|
||||
|
||||
// If set to False returns only images in status CREATED
|
||||
// Required: false
|
||||
ShowAll bool `url:"showAll,omitempty" json:"showAll,omitempty"`
|
||||
ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"`
|
||||
}
|
||||
|
||||
// Get gets image by ID.
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
type ListRequest struct {
|
||||
// Find by ID
|
||||
// Required: false
|
||||
ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`
|
||||
ByID uint64 `url:"id,omitempty" json:"id,omitempty"`
|
||||
|
||||
// Find by name
|
||||
// Required: false
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -202,7 +202,7 @@ func (k8s K8S) Create(ctx context.Context, req CreateRequest) (string, error) {
|
||||
|
||||
url := "/cloudapi/k8s/create"
|
||||
|
||||
res, err := k8s.client.DecortApiCallMP(ctx, http.MethodPost, url, req)
|
||||
res, err := k8s.client.DecortApiCall(ctx, http.MethodPost, url, req)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ type DeleteRequest struct {
|
||||
// True if cluster is destroyed permanently.
|
||||
// Otherwise it can be restored from Recycle Bin
|
||||
// Required: true
|
||||
Permanently bool `url:"permanently" json:"permanently"`
|
||||
Permanently bool `url:"permanently" json:"permanently" validate:"required"`
|
||||
}
|
||||
|
||||
// Delete deletes kubernetes cluster
|
||||
|
||||
@@ -18,7 +18,7 @@ type ListRequest struct {
|
||||
|
||||
// Find by account ID
|
||||
// Required: false
|
||||
AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"`
|
||||
AccountID uint64 `url:"accountID,omitempty" json:"accountID,omitempty"`
|
||||
|
||||
// Find by resource group ID
|
||||
// Required: false
|
||||
|
||||
@@ -13,11 +13,6 @@ type RestartRequest struct {
|
||||
// ID of the load balancer instance to restart
|
||||
// Required: true
|
||||
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
|
||||
|
||||
@@ -2,9 +2,6 @@ package locations
|
||||
|
||||
// Main information about locations
|
||||
type ItemLocation struct {
|
||||
// AuthBroker
|
||||
AuthBroker []string `json:"authBroker"`
|
||||
|
||||
// Grid ID
|
||||
GID uint64 `json:"gid"`
|
||||
|
||||
|
||||
@@ -53,12 +53,3 @@ func (lrc ListResourceConsumption) IDs() []uint64 {
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
@@ -340,7 +340,6 @@ type ItemAffinityGroup struct {
|
||||
// List of affinity group
|
||||
type ListAffinityGroup []ItemAffinityGroup
|
||||
|
||||
// List of affinity groups
|
||||
type ListAffinityGroups struct {
|
||||
// Data
|
||||
Data []map[string]ListAffinityGroup `json:"data"`
|
||||
@@ -486,9 +485,6 @@ type RecordLoadBalancer struct {
|
||||
// Access Control List
|
||||
ACL interface{} `json:"acl"`
|
||||
|
||||
// BackendHAIP
|
||||
BackendHAIP string `json:"backendHAIP"`
|
||||
|
||||
// List of Backends
|
||||
Backends ListBackends `json:"backends"`
|
||||
|
||||
@@ -513,9 +509,6 @@ type RecordLoadBalancer struct {
|
||||
// External network ID
|
||||
ExtNetID uint64 `json:"extnetId"`
|
||||
|
||||
// FrontendHAIP
|
||||
FrontendHAIP string `json:"frontendHAIP"`
|
||||
|
||||
// List of frontends
|
||||
Frontends ListFrontends `json:"frontends"`
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@ type CreateInRGRequest struct {
|
||||
|
||||
// External network ID
|
||||
// Required: false
|
||||
// -1 - not connect to extnet, 0 - auto select, 1+ - extnet ID
|
||||
ExtNetID int64 `url:"extNetId" json:"extNetId"`
|
||||
ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"`
|
||||
|
||||
// External IP, related only for extNetId >= 0
|
||||
// Required: false
|
||||
|
||||
Reference in New Issue
Block a user