diff --git a/.generator/schemas/adminapi.yaml b/.generator/schemas/adminapi.yaml index fbb3a84a..e1b0df23 100644 --- a/.generator/schemas/adminapi.yaml +++ b/.generator/schemas/adminapi.yaml @@ -4535,7 +4535,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/opsRequestName' + $ref: '#/components/schemas/clusterTask' description: Accepted '401': $ref: '#/components/responses/401' @@ -15113,6 +15113,114 @@ components: hints: kind: interface type: object + clusterTaskProgress: + description: clusterTaskProgressDetail is the information of the task progress + properties: + name: + description: conponent name + type: string + group: + description: group name + type: string + objectKey: + description: the instance name + type: string + message: + description: message of the task progress + type: string + status: + description: status of the task progress + type: string + startTime: + description: start time of the task progress + format: date-time + type: string + endTime: + description: end time of the task progress + format: date-time + type: string + type: object + clusterTaskProgresses: + description: clusterTaskProgresses is a list of task progress detail + properties: + items: + description: Items is the list of task progress detail in the list + items: + $ref: '#/components/schemas/clusterTaskProgress' + type: array + type: object + clusterTaskDetail: + type: object + description: taskCondition is the information of the task condition + properties: + reason: + description: reason of the task condition + type: string + type: + description: type of the task condition + type: string + status: + description: status of the task condition + type: string + message: + description: message of the task condition + type: string + lastTransitionTime: + description: last transition time of the task condition + format: date-time + type: string + clusterTaskDetails: + description: taskConditions is a list of task condition + properties: + items: + description: Items is the list of task condition in the list + items: + $ref: '#/components/schemas/clusterTaskDetail' + type: array + type: object + clusterTask: + type: object + description: task is the information of the operation + required: + - name + - namespace + - status + - taskType + - progress + properties: + id: + description: ID of the task + type: string + name: + description: Name of the task + type: string + namespace: + description: Namespace of the task + type: string + status: + description: status of the task + type: string + taskType: + description: task type + type: string + progress: + description: progress of the task + type: string + taskProgresses: + $ref: '#/components/schemas/clusterTaskProgresses' + taskDetails: + $ref: '#/components/schemas/clusterTaskDetails' + opsLog: + description: pod log of the custom task + type: string + startTime: + type: string + format: date-time + description: Time when the task started + completionTime: + type: string + format: date-time + description: Time when the task completed or failed opsStatus: type: object x-go-name: OpsRequestStatus @@ -21155,111 +21263,6 @@ components: - Failed - Aborted type: string - clusterTaskProgress: - description: clusterTaskProgressDetail is the information of the task progress - properties: - name: - description: conponent name - type: string - group: - description: group name - type: string - objectKey: - description: the instance name - type: string - message: - description: message of the task progress - type: string - status: - description: status of the task progress - type: string - startTime: - description: start time of the task progress - format: date-time - type: string - endTime: - description: end time of the task progress - format: date-time - type: string - type: object - clusterTaskProgresses: - description: clusterTaskProgresses is a list of task progress detail - properties: - items: - description: Items is the list of task progress detail in the list - items: - $ref: '#/components/schemas/clusterTaskProgress' - type: array - type: object - clusterTaskDetail: - type: object - description: taskCondition is the information of the task condition - properties: - reason: - description: reason of the task condition - type: string - type: - description: type of the task condition - type: string - status: - description: status of the task condition - type: string - message: - description: message of the task condition - type: string - lastTransitionTime: - description: last transition time of the task condition - format: date-time - type: string - clusterTaskDetails: - description: taskConditions is a list of task condition - properties: - items: - description: Items is the list of task condition in the list - items: - $ref: '#/components/schemas/clusterTaskDetail' - type: array - type: object - clusterTask: - type: object - description: task is the information of the operation - required: - - name - - namespace - - status - - taskType - - progress - properties: - id: - description: ID of the task - type: string - name: - description: Name of the task - type: string - namespace: - description: Namespace of the task - type: string - status: - description: status of the task - type: string - taskType: - description: task type - type: string - progress: - description: progress of the task - type: string - taskProgresses: - $ref: '#/components/schemas/clusterTaskProgresses' - taskDetails: - $ref: '#/components/schemas/clusterTaskDetails' - startTime: - type: string - format: date-time - description: Time when the task started - completionTime: - type: string - format: date-time - description: Time when the task completed or failed clusterTaskList: description: TaskList is a list of operation task objects properties: diff --git a/.generator/schemas/openapi.yaml b/.generator/schemas/openapi.yaml index 3f88c8d8..bd874a60 100644 --- a/.generator/schemas/openapi.yaml +++ b/.generator/schemas/openapi.yaml @@ -3242,7 +3242,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/opsRequestName' + $ref: '#/components/schemas/clusterTask' description: Accepted '401': $ref: '#/components/responses/401' @@ -12007,6 +12007,9 @@ components: $ref: '#/components/schemas/clusterTaskProgresses' taskDetails: $ref: '#/components/schemas/clusterTaskDetails' + opsLog: + description: pod log of the custom task + type: string startTime: type: string format: date-time diff --git a/apecloud b/apecloud index 0e121194..c7415fc7 160000 --- a/apecloud +++ b/apecloud @@ -1 +1 @@ -Subproject commit 0e1211943880e002cc322ccfde859212bf0123d1 +Subproject commit c7415fc7dd0b9c2b55e1814e36231149c0f6390d diff --git a/api/kbcloud/admin/api_opsrequest.go b/api/kbcloud/admin/api_opsrequest.go index d4c34fa1..5432e760 100644 --- a/api/kbcloud/admin/api_opsrequest.go +++ b/api/kbcloud/admin/api_opsrequest.go @@ -153,11 +153,11 @@ func (a *OpsrequestApi) ClusterVolumeExpand(ctx _context.Context, orgName string } // CustomOps Create custom OpsRequest. -func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (OpsRequestName, *_nethttp.Response, error) { +func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (ClusterTask, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} - localVarReturnValue OpsRequestName + localVarReturnValue ClusterTask ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".OpsrequestApi.CustomOps") diff --git a/api/kbcloud/admin/model_cluster_task.go b/api/kbcloud/admin/model_cluster_task.go index 74cc9d54..36b2b432 100644 --- a/api/kbcloud/admin/model_cluster_task.go +++ b/api/kbcloud/admin/model_cluster_task.go @@ -29,6 +29,8 @@ type ClusterTask struct { TaskProgresses *ClusterTaskProgresses `json:"taskProgresses,omitempty"` // taskConditions is a list of task condition TaskDetails *ClusterTaskDetails `json:"taskDetails,omitempty"` + // pod log of the custom task + OpsLog *string `json:"opsLog,omitempty"` // Time when the task started StartTime *time.Time `json:"startTime,omitempty"` // Time when the task completed or failed @@ -259,6 +261,34 @@ func (o *ClusterTask) SetTaskDetails(v ClusterTaskDetails) { o.TaskDetails = &v } +// GetOpsLog returns the OpsLog field value if set, zero value otherwise. +func (o *ClusterTask) GetOpsLog() string { + if o == nil || o.OpsLog == nil { + var ret string + return ret + } + return *o.OpsLog +} + +// GetOpsLogOk returns a tuple with the OpsLog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterTask) GetOpsLogOk() (*string, bool) { + if o == nil || o.OpsLog == nil { + return nil, false + } + return o.OpsLog, true +} + +// HasOpsLog returns a boolean if a field has been set. +func (o *ClusterTask) HasOpsLog() bool { + return o != nil && o.OpsLog != nil +} + +// SetOpsLog gets a reference to the given string and assigns it to the OpsLog field. +func (o *ClusterTask) SetOpsLog(v string) { + o.OpsLog = &v +} + // GetStartTime returns the StartTime field value if set, zero value otherwise. func (o *ClusterTask) GetStartTime() time.Time { if o == nil || o.StartTime == nil { @@ -335,6 +365,9 @@ func (o ClusterTask) MarshalJSON() ([]byte, error) { if o.TaskDetails != nil { toSerialize["taskDetails"] = o.TaskDetails } + if o.OpsLog != nil { + toSerialize["opsLog"] = o.OpsLog + } if o.StartTime != nil { if o.StartTime.Nanosecond() == 0 { toSerialize["startTime"] = o.StartTime.Format("2006-01-02T15:04:05Z07:00") @@ -367,6 +400,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) { Progress *string `json:"progress"` TaskProgresses *ClusterTaskProgresses `json:"taskProgresses,omitempty"` TaskDetails *ClusterTaskDetails `json:"taskDetails,omitempty"` + OpsLog *string `json:"opsLog,omitempty"` StartTime *time.Time `json:"startTime,omitempty"` CompletionTime *time.Time `json:"completionTime,omitempty"` }{} @@ -390,7 +424,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = common.Unmarshal(bytes, &additionalProperties); err == nil { - common.DeleteKeys(additionalProperties, &[]string{"id", "name", "namespace", "status", "taskType", "progress", "taskProgresses", "taskDetails", "startTime", "completionTime"}) + common.DeleteKeys(additionalProperties, &[]string{"id", "name", "namespace", "status", "taskType", "progress", "taskProgresses", "taskDetails", "opsLog", "startTime", "completionTime"}) } else { return err } @@ -410,6 +444,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.TaskDetails = all.TaskDetails + o.OpsLog = all.OpsLog o.StartTime = all.StartTime o.CompletionTime = all.CompletionTime diff --git a/api/kbcloud/api_opsrequest.go b/api/kbcloud/api_opsrequest.go index a37c8b5e..86527885 100644 --- a/api/kbcloud/api_opsrequest.go +++ b/api/kbcloud/api_opsrequest.go @@ -153,11 +153,11 @@ func (a *OpsrequestApi) ClusterVolumeExpand(ctx _context.Context, orgName string } // CustomOps Create custom OpsRequest. -func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (OpsRequestName, *_nethttp.Response, error) { +func (a *OpsrequestApi) CustomOps(ctx _context.Context, orgName string, clusterName string, body OpsCustom) (ClusterTask, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} - localVarReturnValue OpsRequestName + localVarReturnValue ClusterTask ) localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, ".OpsrequestApi.CustomOps") diff --git a/api/kbcloud/model_cluster_task.go b/api/kbcloud/model_cluster_task.go index 4322430e..3eb0b0f4 100644 --- a/api/kbcloud/model_cluster_task.go +++ b/api/kbcloud/model_cluster_task.go @@ -29,6 +29,8 @@ type ClusterTask struct { TaskProgresses *ClusterTaskProgresses `json:"taskProgresses,omitempty"` // taskConditions is a list of task condition TaskDetails *ClusterTaskDetails `json:"taskDetails,omitempty"` + // pod log of the custom task + OpsLog *string `json:"opsLog,omitempty"` // Time when the task started StartTime *time.Time `json:"startTime,omitempty"` // Time when the task completed or failed @@ -259,6 +261,34 @@ func (o *ClusterTask) SetTaskDetails(v ClusterTaskDetails) { o.TaskDetails = &v } +// GetOpsLog returns the OpsLog field value if set, zero value otherwise. +func (o *ClusterTask) GetOpsLog() string { + if o == nil || o.OpsLog == nil { + var ret string + return ret + } + return *o.OpsLog +} + +// GetOpsLogOk returns a tuple with the OpsLog field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ClusterTask) GetOpsLogOk() (*string, bool) { + if o == nil || o.OpsLog == nil { + return nil, false + } + return o.OpsLog, true +} + +// HasOpsLog returns a boolean if a field has been set. +func (o *ClusterTask) HasOpsLog() bool { + return o != nil && o.OpsLog != nil +} + +// SetOpsLog gets a reference to the given string and assigns it to the OpsLog field. +func (o *ClusterTask) SetOpsLog(v string) { + o.OpsLog = &v +} + // GetStartTime returns the StartTime field value if set, zero value otherwise. func (o *ClusterTask) GetStartTime() time.Time { if o == nil || o.StartTime == nil { @@ -335,6 +365,9 @@ func (o ClusterTask) MarshalJSON() ([]byte, error) { if o.TaskDetails != nil { toSerialize["taskDetails"] = o.TaskDetails } + if o.OpsLog != nil { + toSerialize["opsLog"] = o.OpsLog + } if o.StartTime != nil { if o.StartTime.Nanosecond() == 0 { toSerialize["startTime"] = o.StartTime.Format("2006-01-02T15:04:05Z07:00") @@ -367,6 +400,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) { Progress *string `json:"progress"` TaskProgresses *ClusterTaskProgresses `json:"taskProgresses,omitempty"` TaskDetails *ClusterTaskDetails `json:"taskDetails,omitempty"` + OpsLog *string `json:"opsLog,omitempty"` StartTime *time.Time `json:"startTime,omitempty"` CompletionTime *time.Time `json:"completionTime,omitempty"` }{} @@ -390,7 +424,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) { } additionalProperties := make(map[string]interface{}) if err = common.Unmarshal(bytes, &additionalProperties); err == nil { - common.DeleteKeys(additionalProperties, &[]string{"id", "name", "namespace", "status", "taskType", "progress", "taskProgresses", "taskDetails", "startTime", "completionTime"}) + common.DeleteKeys(additionalProperties, &[]string{"id", "name", "namespace", "status", "taskType", "progress", "taskProgresses", "taskDetails", "opsLog", "startTime", "completionTime"}) } else { return err } @@ -410,6 +444,7 @@ func (o *ClusterTask) UnmarshalJSON(bytes []byte) (err error) { hasInvalidField = true } o.TaskDetails = all.TaskDetails + o.OpsLog = all.OpsLog o.StartTime = all.StartTime o.CompletionTime = all.CompletionTime