Skip to content

Commit ae947df

Browse files
committed
chore: auto update client api apecloud/apecloud@4330639
1 parent 93ce52b commit ae947df

File tree

13 files changed

+378
-291
lines changed

13 files changed

+378
-291
lines changed

.generator/schemas/adminapi.yaml

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5089,43 +5089,6 @@ paths:
50895089
- opsrequest
50905090
- shared
50915091
x-codegen-request-body-name: body
5092-
/admin/v1/organizations/{orgName}/clusters/{clusterName}/opsrequests/{opsName}/cancel:
5093-
post:
5094-
description: cancel a OpsRequest
5095-
summary: Cancel OpsRequest
5096-
operationId: cancelOps
5097-
parameters:
5098-
- description: name of the Org
5099-
in: path
5100-
name: orgName
5101-
required: true
5102-
schema:
5103-
type: string
5104-
- description: name of the OpsRequest
5105-
in: path
5106-
name: opsName
5107-
required: true
5108-
schema:
5109-
type: string
5110-
- description: name of the Cluster
5111-
in: path
5112-
name: clusterName
5113-
required: true
5114-
schema:
5115-
type: string
5116-
responses:
5117-
'204':
5118-
content: {}
5119-
description: Returned when project is deleted successfully.
5120-
'401':
5121-
$ref: '#/components/responses/401'
5122-
'403':
5123-
$ref: '#/components/responses/403'
5124-
'404':
5125-
$ref: '#/components/responses/404'
5126-
tags:
5127-
- opsrequest
5128-
- shared
51295092
/admin/v1/organizations/{orgName}/clusters/{clusterName}/volumes/io-quotas:
51305093
post:
51315094
tags:
@@ -12309,6 +12272,34 @@ paths:
1230912272
$ref: '#/components/responses/500'
1231012273
tags:
1231112274
- task
12275+
/admin/v1/tasks/{taskId}/cancel:
12276+
post:
12277+
summary: Cancel a task
12278+
description: Cancel a task by taskID.
12279+
operationId: cancelTask
12280+
parameters:
12281+
- description: ID of the task
12282+
in: path
12283+
name: taskId
12284+
required: true
12285+
schema:
12286+
type: string
12287+
responses:
12288+
'204':
12289+
content: {}
12290+
description: Task cancelled successfully
12291+
'400':
12292+
$ref: '#/components/responses/400'
12293+
'401':
12294+
$ref: '#/components/responses/401'
12295+
'403':
12296+
$ref: '#/components/responses/403'
12297+
'404':
12298+
$ref: '#/components/responses/404'
12299+
'500':
12300+
$ref: '#/components/responses/500'
12301+
tags:
12302+
- task
1231212303
/admin/v1/tasks/{taskId}/log:
1231312304
get:
1231412305
tags:
@@ -20718,6 +20709,10 @@ components:
2071820709
items:
2071920710
type: object
2072020711
$ref: '#/components/schemas/opsParameter'
20712+
schedule:
20713+
$ref: '#/components/schemas/taskSchedule'
20714+
description: Scheduled execution configuration
20715+
nullable: true
2072120716
type: object
2072220717
opsIoQuotas:
2072320718
description: IO Quotas describes IOPS and BPS for volumes of a KubeBlocks cluster
@@ -27338,9 +27333,11 @@ components:
2733827333
category:
2733927334
type: string
2734027335
description: Category of the task type
27341-
workflowEngine:
27342-
type: string
27343-
description: Workflow engine of the task type
27336+
allowActions:
27337+
type: array
27338+
items:
27339+
type: string
27340+
description: Allow actions of the task type
2734427341
resourceType:
2734527342
type: string
2734627343
description: Resource type of the task type
@@ -27354,7 +27351,6 @@ components:
2735427351
description: Update time of the task type
2735527352
required:
2735627353
- name
27357-
- workflowEngine
2735827354
- createdAt
2735927355
- updatedAt
2736027356
taskTypeList:

.generator/schemas/openapi.yaml

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2939,43 +2939,6 @@ paths:
29392939
- opsrequest
29402940
- shared
29412941
x-codegen-request-body-name: body
2942-
/api/v1/organizations/{orgName}/clusters/{clusterName}/opsrequests/{opsName}/cancel:
2943-
post:
2944-
description: cancel a OpsRequest
2945-
summary: Cancel OpsRequest
2946-
operationId: cancelOps
2947-
parameters:
2948-
- description: name of the Org
2949-
in: path
2950-
name: orgName
2951-
required: true
2952-
schema:
2953-
type: string
2954-
- description: name of the OpsRequest
2955-
in: path
2956-
name: opsName
2957-
required: true
2958-
schema:
2959-
type: string
2960-
- description: name of the Cluster
2961-
in: path
2962-
name: clusterName
2963-
required: true
2964-
schema:
2965-
type: string
2966-
responses:
2967-
'204':
2968-
content: {}
2969-
description: Returned when project is deleted successfully.
2970-
'401':
2971-
$ref: '#/components/responses/401'
2972-
'403':
2973-
$ref: '#/components/responses/403'
2974-
'404':
2975-
$ref: '#/components/responses/404'
2976-
tags:
2977-
- opsrequest
2978-
- shared
29792942
/api/v1/organizations/{orgName}/clusters/{clusterName}/volumes/io-quotas:
29802943
post:
29812944
tags:
@@ -6181,6 +6144,40 @@ paths:
61816144
$ref: '#/components/responses/500'
61826145
tags:
61836146
- task
6147+
/api/v1/organizations/{orgName}/tasks/{taskId}/cancel:
6148+
post:
6149+
summary: Cancel a task
6150+
description: Cancel a task by taskID within the organization.
6151+
operationId: cancelTask
6152+
parameters:
6153+
- name: orgName
6154+
in: path
6155+
description: name of the Org
6156+
required: true
6157+
schema:
6158+
type: string
6159+
- description: ID of the task
6160+
in: path
6161+
name: taskId
6162+
required: true
6163+
schema:
6164+
type: string
6165+
responses:
6166+
'204':
6167+
content: {}
6168+
description: Task cancelled successfully
6169+
'400':
6170+
$ref: '#/components/responses/400'
6171+
'401':
6172+
$ref: '#/components/responses/401'
6173+
'403':
6174+
$ref: '#/components/responses/403'
6175+
'404':
6176+
$ref: '#/components/responses/404'
6177+
'500':
6178+
$ref: '#/components/responses/500'
6179+
tags:
6180+
- task
61846181
/api/v1/organizations/{orgName}/clusters/{clusterName}/datasource/{id}:
61856182
get:
61866183
tags:
@@ -16518,6 +16515,10 @@ components:
1651816515
items:
1651916516
type: object
1652016517
$ref: '#/components/schemas/opsParameter'
16518+
schedule:
16519+
$ref: '#/components/schemas/taskSchedule'
16520+
description: Scheduled execution configuration
16521+
nullable: true
1652116522
type: object
1652216523
opsIoQuotas:
1652316524
description: IO Quotas describes IOPS and BPS for volumes of a KubeBlocks cluster
@@ -20325,9 +20326,11 @@ components:
2032520326
category:
2032620327
type: string
2032720328
description: Category of the task type
20328-
workflowEngine:
20329-
type: string
20330-
description: Workflow engine of the task type
20329+
allowActions:
20330+
type: array
20331+
items:
20332+
type: string
20333+
description: Allow actions of the task type
2033120334
resourceType:
2033220335
type: string
2033320336
description: Resource type of the task type
@@ -20341,7 +20344,6 @@ components:
2034120344
description: Update time of the task type
2034220345
required:
2034320346
- name
20344-
- workflowEngine
2034520347
- createdAt
2034620348
- updatedAt
2034720349
taskTypeList:

apecloud

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 67def5e60eba99fd6cbf2bb6df541427407a9f9c
1+
Subproject commit 4330639f0b4281377c9410453ba662a3ab7eda9b

api/kbcloud/admin/api_opsrequest.go

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -17,77 +17,6 @@ import (
1717
// OpsrequestApi service type
1818
type OpsrequestApi common.Service
1919

20-
// CancelOps Cancel OpsRequest.
21-
// cancel a OpsRequest
22-
func (a *OpsrequestApi) CancelOps(ctx _context.Context, orgName string, opsName string, clusterName string) (*_nethttp.Response, error) {
23-
var (
24-
localVarHTTPMethod = _nethttp.MethodPost
25-
localVarPostBody interface{}
26-
)
27-
28-
// Add api info to context
29-
apiInfo := common.APIInfo{
30-
Tag: "opsrequest",
31-
OperationID: "cancelOps",
32-
Path: "/admin/v1/organizations/{orgName}/clusters/{clusterName}/opsrequests/{opsName}/cancel",
33-
Version: "",
34-
}
35-
ctx = context.WithValue(ctx, common.APIInfoCtxKey, apiInfo)
36-
37-
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".OpsrequestApi.CancelOps")
38-
if err != nil {
39-
return nil, common.GenericOpenAPIError{ErrorMessage: err.Error()}
40-
}
41-
42-
localVarPath := localBasePath + "/admin/v1/organizations/{orgName}/clusters/{clusterName}/opsrequests/{opsName}/cancel"
43-
localVarPath = strings.Replace(localVarPath, "{"+"orgName"+"}", _neturl.PathEscape(common.ParameterToString(orgName, "")), -1)
44-
localVarPath = strings.Replace(localVarPath, "{"+"opsName"+"}", _neturl.PathEscape(common.ParameterToString(opsName, "")), -1)
45-
localVarPath = strings.Replace(localVarPath, "{"+"clusterName"+"}", _neturl.PathEscape(common.ParameterToString(clusterName, "")), -1)
46-
47-
localVarHeaderParams := make(map[string]string)
48-
localVarQueryParams := _neturl.Values{}
49-
localVarFormParams := _neturl.Values{}
50-
localVarHeaderParams["Accept"] = "application/json"
51-
52-
common.SetAuthKeys(
53-
ctx,
54-
&localVarHeaderParams,
55-
[2]string{"BearerToken", "authorization"},
56-
)
57-
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
58-
if err != nil {
59-
return nil, err
60-
}
61-
62-
localVarHTTPResponse, err := a.Client.CallAPI(req)
63-
if err != nil || localVarHTTPResponse == nil {
64-
return localVarHTTPResponse, err
65-
}
66-
67-
localVarBody, err := common.ReadBody(localVarHTTPResponse)
68-
if err != nil {
69-
return localVarHTTPResponse, err
70-
}
71-
72-
if localVarHTTPResponse.StatusCode >= 300 {
73-
newErr := common.GenericOpenAPIError{
74-
ErrorBody: localVarBody,
75-
ErrorMessage: localVarHTTPResponse.Status,
76-
}
77-
if localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 {
78-
var v APIErrorResponse
79-
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
80-
if err != nil {
81-
return localVarHTTPResponse, newErr
82-
}
83-
newErr.ErrorModel = v
84-
}
85-
return localVarHTTPResponse, newErr
86-
}
87-
88-
return localVarHTTPResponse, nil
89-
}
90-
9120
// ClusterVolumeExpand Expand cluster volume size.
9221
func (a *OpsrequestApi) ClusterVolumeExpand(ctx _context.Context, orgName string, clusterName string, body OpsVolumeExpand) (OpsRequestName, *_nethttp.Response, error) {
9322
var (

api/kbcloud/admin/api_task.go

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,75 @@ import (
1717
// TaskApi service type
1818
type TaskApi common.Service
1919

20+
// CancelTask Cancel a task.
21+
// Cancel a task by taskID.
22+
func (a *TaskApi) CancelTask(ctx _context.Context, taskId string) (*_nethttp.Response, error) {
23+
var (
24+
localVarHTTPMethod = _nethttp.MethodPost
25+
localVarPostBody interface{}
26+
)
27+
28+
// Add api info to context
29+
apiInfo := common.APIInfo{
30+
Tag: "task",
31+
OperationID: "cancelTask",
32+
Path: "/admin/v1/tasks/{taskId}/cancel",
33+
Version: "",
34+
}
35+
ctx = context.WithValue(ctx, common.APIInfoCtxKey, apiInfo)
36+
37+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".TaskApi.CancelTask")
38+
if err != nil {
39+
return nil, common.GenericOpenAPIError{ErrorMessage: err.Error()}
40+
}
41+
42+
localVarPath := localBasePath + "/admin/v1/tasks/{taskId}/cancel"
43+
localVarPath = strings.Replace(localVarPath, "{"+"taskId"+"}", _neturl.PathEscape(common.ParameterToString(taskId, "")), -1)
44+
45+
localVarHeaderParams := make(map[string]string)
46+
localVarQueryParams := _neturl.Values{}
47+
localVarFormParams := _neturl.Values{}
48+
localVarHeaderParams["Accept"] = "application/json"
49+
50+
common.SetAuthKeys(
51+
ctx,
52+
&localVarHeaderParams,
53+
[2]string{"BearerToken", "authorization"},
54+
)
55+
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
56+
if err != nil {
57+
return nil, err
58+
}
59+
60+
localVarHTTPResponse, err := a.Client.CallAPI(req)
61+
if err != nil || localVarHTTPResponse == nil {
62+
return localVarHTTPResponse, err
63+
}
64+
65+
localVarBody, err := common.ReadBody(localVarHTTPResponse)
66+
if err != nil {
67+
return localVarHTTPResponse, err
68+
}
69+
70+
if localVarHTTPResponse.StatusCode >= 300 {
71+
newErr := common.GenericOpenAPIError{
72+
ErrorBody: localVarBody,
73+
ErrorMessage: localVarHTTPResponse.Status,
74+
}
75+
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 401 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 500 {
76+
var v APIErrorResponse
77+
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
78+
if err != nil {
79+
return localVarHTTPResponse, newErr
80+
}
81+
newErr.ErrorModel = v
82+
}
83+
return localVarHTTPResponse, newErr
84+
}
85+
86+
return localVarHTTPResponse, nil
87+
}
88+
2089
// GetTask Get task detail.
2190
// Get task
2291
func (a *TaskApi) GetTask(ctx _context.Context, taskId string) (Task, *_nethttp.Response, error) {

0 commit comments

Comments
 (0)