Compare commits
2 Commits
v1.6.11
...
gos_tech_1
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a813abfcb | |||
| e7b30fb686 |
@@ -1,4 +1,5 @@
|
|||||||
## Version 1.6.11
|
## Version 1.6.14
|
||||||
|
|
||||||
## Bugfix
|
### Bugfix
|
||||||
- Remove tag "required" from field Value in AffinityRuleAddRequest, AntiAffinityRuleAddRequest, AffinityRuleRemoveRequest AntiAffinityRuleRemoveRequest in cloudapi/compute and cloudbroker/compute
|
- Delete tag required from DeleteRequest field Permanently in cloudapi/k8s
|
||||||
|
- Delete tag omitempty from DeleteDisksRequest and DisksDeleteRequest field Permanently in cloudapi/disks and cloudbroker/disks
|
||||||
@@ -174,7 +174,6 @@ func (dc *DecortClient) do(req *http.Request, ctype string) ([]byte, error) {
|
|||||||
func createK8sCloudApi(req k8s_ca.CreateRequest) (*bytes.Buffer, string) {
|
func createK8sCloudApi(req k8s_ca.CreateRequest) (*bytes.Buffer, string) {
|
||||||
reqBody := &bytes.Buffer{}
|
reqBody := &bytes.Buffer{}
|
||||||
writer := multipart.NewWriter(reqBody)
|
writer := multipart.NewWriter(reqBody)
|
||||||
defer writer.Close()
|
|
||||||
if req.OidcCertificate != "" {
|
if req.OidcCertificate != "" {
|
||||||
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
||||||
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
||||||
@@ -281,13 +280,14 @@ func createK8sCloudApi(req k8s_ca.CreateRequest) (*bytes.Buffer, string) {
|
|||||||
_ = writer.WriteField("extnetOnly", strconv.FormatBool(req.ExtNetOnly))
|
_ = writer.WriteField("extnetOnly", strconv.FormatBool(req.ExtNetOnly))
|
||||||
|
|
||||||
ct := writer.FormDataContentType()
|
ct := writer.FormDataContentType()
|
||||||
|
writer.Close()
|
||||||
|
|
||||||
return reqBody, ct
|
return reqBody, ct
|
||||||
}
|
}
|
||||||
|
|
||||||
func createK8sCloudBroker(req k8s_cb.CreateRequest) (*bytes.Buffer, string) {
|
func createK8sCloudBroker(req k8s_cb.CreateRequest) (*bytes.Buffer, string) {
|
||||||
reqBody := &bytes.Buffer{}
|
reqBody := &bytes.Buffer{}
|
||||||
writer := multipart.NewWriter(reqBody)
|
writer := multipart.NewWriter(reqBody)
|
||||||
defer writer.Close()
|
|
||||||
if req.OidcCertificate != "" {
|
if req.OidcCertificate != "" {
|
||||||
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
||||||
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
||||||
@@ -394,5 +394,7 @@ func createK8sCloudBroker(req k8s_cb.CreateRequest) (*bytes.Buffer, string) {
|
|||||||
_ = writer.WriteField("extnetOnly", strconv.FormatBool(req.ExtNetOnly))
|
_ = writer.WriteField("extnetOnly", strconv.FormatBool(req.ExtNetOnly))
|
||||||
|
|
||||||
ct := writer.FormDataContentType()
|
ct := writer.FormDataContentType()
|
||||||
|
|
||||||
|
writer.Close()
|
||||||
return reqBody, ct
|
return reqBody, ct
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"}
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,6 @@ func (ldc *LegacyDecortClient) do(req *http.Request, ctype string) ([]byte, erro
|
|||||||
func createK8sCloudApiLegacy(req k8s_ca.CreateRequest, token string) (*bytes.Buffer, string) {
|
func createK8sCloudApiLegacy(req k8s_ca.CreateRequest, token string) (*bytes.Buffer, string) {
|
||||||
reqBody := &bytes.Buffer{}
|
reqBody := &bytes.Buffer{}
|
||||||
writer := multipart.NewWriter(reqBody)
|
writer := multipart.NewWriter(reqBody)
|
||||||
defer writer.Close()
|
|
||||||
if req.OidcCertificate != "" {
|
if req.OidcCertificate != "" {
|
||||||
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
||||||
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
||||||
@@ -284,13 +283,14 @@ func createK8sCloudApiLegacy(req k8s_ca.CreateRequest, token string) (*bytes.Buf
|
|||||||
_ = writer.WriteField("authkey", token)
|
_ = writer.WriteField("authkey", token)
|
||||||
|
|
||||||
ct := writer.FormDataContentType()
|
ct := writer.FormDataContentType()
|
||||||
|
writer.Close()
|
||||||
|
|
||||||
return reqBody, ct
|
return reqBody, ct
|
||||||
}
|
}
|
||||||
|
|
||||||
func createK8sCloudBrokerLegacy(req k8s_cb.CreateRequest, token string) (*bytes.Buffer, string) {
|
func createK8sCloudBrokerLegacy(req k8s_cb.CreateRequest, token string) (*bytes.Buffer, string) {
|
||||||
reqBody := &bytes.Buffer{}
|
reqBody := &bytes.Buffer{}
|
||||||
writer := multipart.NewWriter(reqBody)
|
writer := multipart.NewWriter(reqBody)
|
||||||
defer writer.Close()
|
|
||||||
if req.OidcCertificate != "" {
|
if req.OidcCertificate != "" {
|
||||||
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
part, _ := writer.CreateFormFile("oidcCertificate", "ca.crt")
|
||||||
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
_, _ = io.Copy(part, strings.NewReader(req.OidcCertificate))
|
||||||
@@ -399,5 +399,7 @@ func createK8sCloudBrokerLegacy(req k8s_cb.CreateRequest, token string) (*bytes.
|
|||||||
_ = writer.WriteField("authkey", token)
|
_ = writer.WriteField("authkey", token)
|
||||||
|
|
||||||
ct := writer.FormDataContentType()
|
ct := writer.FormDataContentType()
|
||||||
|
|
||||||
|
writer.Close()
|
||||||
return reqBody, ct
|
return reqBody, ct
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -169,6 +169,15 @@ type ItemSnapshot struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List of Snapshots
|
// List of Snapshots
|
||||||
|
type ListInfoSnapshots struct {
|
||||||
|
// Data
|
||||||
|
Data ListSnapshots `json:"data"`
|
||||||
|
|
||||||
|
// EntryCount
|
||||||
|
EntryCount uint64 `json:"entryCount"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// List of Snapshots inside RecordBasicService
|
||||||
type ListSnapshots []ItemSnapshot
|
type ListSnapshots []ItemSnapshot
|
||||||
|
|
||||||
// Main information about Group
|
// Main information about Group
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type SnapshotListRequest struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SnapshotList gets list existing snapshots of the Basic Service
|
// SnapshotList gets list existing snapshots of the Basic Service
|
||||||
func (b BService) SnapshotList(ctx context.Context, req SnapshotListRequest) (ListSnapshots, error) {
|
func (b BService) SnapshotList(ctx context.Context, req SnapshotListRequest) (*ListInfoSnapshots, error) {
|
||||||
err := validators.ValidateRequest(req)
|
err := validators.ValidateRequest(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, validators.ValidationErrors(validators.GetErrors(err))
|
return nil, validators.ValidationErrors(validators.GetErrors(err))
|
||||||
@@ -29,12 +29,12 @@ func (b BService) SnapshotList(ctx context.Context, req SnapshotListRequest) (Li
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
list := ListSnapshots{}
|
list := ListInfoSnapshots{}
|
||||||
|
|
||||||
err = json.Unmarshal(res, &list)
|
err = json.Unmarshal(res, &list)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return list, nil
|
return &list, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type DeleteRequest struct {
|
|||||||
|
|
||||||
// Whether to completely delete the disk, works only with non attached disks
|
// Whether to completely delete the disk, works only with non attached disks
|
||||||
// Required: false
|
// Required: false
|
||||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
|
|
||||||
// Reason to delete
|
// Reason to delete
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type DisksDeleteRequest struct {
|
|||||||
|
|
||||||
// Whether to completely delete the disks, works only with non attached disks
|
// Whether to completely delete the disks, works only with non attached disks
|
||||||
// Required: false
|
// Required: false
|
||||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteDisks deletes multiple disks permanently
|
// DeleteDisks deletes multiple disks permanently
|
||||||
|
|||||||
@@ -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"`
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ type DeleteRequest struct {
|
|||||||
|
|
||||||
// True if cluster is destroyed permanently.
|
// True if cluster is destroyed permanently.
|
||||||
// Otherwise it can be restored from Recycle Bin
|
// Otherwise it can be restored from Recycle Bin
|
||||||
// Required: true
|
// Required: false
|
||||||
Permanently bool `url:"permanently" json:"permanently" validate:"required"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete deletes kubernetes cluster
|
// Delete deletes kubernetes cluster
|
||||||
|
|||||||
@@ -331,9 +331,18 @@ 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
|
||||||
|
|
||||||
type ListAffinityGroups struct {
|
type ListAffinityGroups struct {
|
||||||
// Data
|
// Data
|
||||||
Data []map[string][]uint64 `json:"data"`
|
Data []map[string]ListAffinityGroup `json:"data"`
|
||||||
|
|
||||||
// Entry count
|
// Entry count
|
||||||
EntryCount uint64 `json:"entryCount"`
|
EntryCount uint64 `json:"entryCount"`
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type DeleteRequest struct {
|
|||||||
|
|
||||||
// Whether to completely delete the disk, works only with non attached disks
|
// Whether to completely delete the disk, works only with non attached disks
|
||||||
// Required: false
|
// Required: false
|
||||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
|
|
||||||
// Reason to delete
|
// Reason to delete
|
||||||
// Required: false
|
// Required: false
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type DeleteDisksRequest struct {
|
|||||||
|
|
||||||
// Whether to completely delete the disks, works only with non attached disks
|
// Whether to completely delete the disks, works only with non attached disks
|
||||||
// Required: false
|
// Required: false
|
||||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteDisks deletes multiple disks permanently
|
// DeleteDisks deletes multiple disks permanently
|
||||||
|
|||||||
@@ -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: 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"`
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ type DeleteRequest struct {
|
|||||||
// True if cluster is destroyed permanently.
|
// True if cluster is destroyed permanently.
|
||||||
// Otherwise it can be restored from recycle bin
|
// Otherwise it can be restored from recycle bin
|
||||||
// Required: false
|
// Required: false
|
||||||
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
|
Permanently bool `url:"permanently" json:"permanently"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete deletes kubernetes cluster
|
// Delete deletes kubernetes cluster
|
||||||
|
|||||||
Reference in New Issue
Block a user