Documentation
¶
Index ¶
- Variables
- func CheckReady(c echo.Context) error
- func ClearTaskInstances(c echo.Context) error
- func CreateTaskComponent(c echo.Context) error
- func CreateWorkflow(c echo.Context) error
- func DeleteTaskComponent(c echo.Context) error
- func DeleteWorkflow(c echo.Context) error
- func GetEventLogs(c echo.Context) error
- func GetImportErrors(c echo.Context) error
- func GetTask(c echo.Context) error
- func GetTaskComponent(c echo.Context) error
- func GetTaskComponentByName(c echo.Context) error
- func GetTaskDirectly(c echo.Context) error
- func GetTaskFromTaskGroup(c echo.Context) error
- func GetTaskGroup(c echo.Context) error
- func GetTaskGroupDirectly(c echo.Context) error
- func GetTaskInstances(c echo.Context) error
- func GetTaskLogDownload(c echo.Context) error
- func GetTaskLogs(c echo.Context) error
- func GetWorkflow(c echo.Context) error
- func GetWorkflowByName(c echo.Context) error
- func GetWorkflowRuns(c echo.Context) error
- func GetWorkflowStatus(c echo.Context) error
- func GetWorkflowTemplate(c echo.Context) error
- func GetWorkflowTemplateByName(c echo.Context) error
- func GetWorkflowVersion(c echo.Context) error
- func ListTask(c echo.Context) error
- func ListTaskComponent(c echo.Context) error
- func ListTaskFromTaskGroup(c echo.Context) error
- func ListTaskGroup(c echo.Context) error
- func ListWorkflow(c echo.Context) error
- func ListWorkflowTemplate(c echo.Context) error
- func ListWorkflowVersion(c echo.Context) error
- func RunScript(c echo.Context) error
- func RunWorkflow(c echo.Context) error
- func SleepTime(c echo.Context) error
- func UpdateTaskComponent(c echo.Context) error
- func UpdateWorkflow(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
var IsReady = false
var OkMessage = model.SimpleMsg{}
Functions ¶
func CheckReady ¶
CheckReady func is for checking Cicada server health.
@ID health-check-readyz
@Summary Check Ready
@Description Check Cicada is ready
@Tags [Admin] System management
@Accept json
@Produce json
@Success 200 {object} model.SimpleMsg "Successfully get ready state."
@Failure 500 {object} common.ErrorResponse "Failed to check ready state."
@Router /readyz [get]
func ClearTaskInstances ¶ added in v0.2.1
ClearTaskInstances godoc
@ID clear-task-instances @Summary Clear taskInstances @Description Clear the task Instance. @Tags [Workflow] @Accept json @Produce json @Param wfId path string true "ID of the workflow." @Param wfRunId path string true "ID of the wfRunId."
@Param request body model.TaskClearOption true "Workflow content" @Success 200 {object} model.TaskInstanceReference "Successfully clear the taskInstances." @Failure 400 {object} common.ErrorResponse "Sent bad request." @Failure 500 {object} common.ErrorResponse "Failed to clear the taskInstances." @Router /workflow/{wfId}/workflowRun/{wfRunId}/range [post]
func CreateTaskComponent ¶
CreateTaskComponent godoc
@ID create-task-component
@Summary Create TaskComponent
@Description Register the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param TaskComponent body model.CreateTaskComponentReq true "task component to create."
@Success 200 {object} model.TaskComponent "Successfully register the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to register the task component"
@Router /task_component [post]
func CreateWorkflow ¶
CreateWorkflow godoc
@ID create-workflow
@Summary Create Workflow
@Description Create a workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param request body model.CreateWorkflowReq true "Workflow content"
@Success 200 {object} model.WorkflowTemplate "Successfully create the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to create workflow."
@Router /workflow [post]
func DeleteTaskComponent ¶
DeleteTaskComponent godoc
@ID delete-task-component
@Summary Delete TaskComponent
@Description Delete the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcId path string true "ID of the task component."
@Success 200 {object} model.SimpleMsg "Successfully delete the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to delete the task component"
@Router /task_component/{tcId} [delete]
func DeleteWorkflow ¶
DeleteWorkflow godoc
@ID delete-workflow
@Summary Delete Workflow
@Description Delete the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Success 200 {object} model.SimpleMsg "Successfully delete the workflow"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to delete the workflow"
@Router /workflow/{wfId} [delete]
func GetEventLogs ¶ added in v0.2.1
GetEventLogs godoc
@ID get-event-logs
@Summary Get Eventlog
@Description Get Eventlog.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param wfRunId query string false "ID of the workflow run."
@Param taskId query string false "ID of the task."
@Success 200 {object} []model.EventLog "Successfully get the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow."
@Router /workflow/{wfId}/eventlogs [get]
func GetImportErrors ¶ added in v0.2.1
GetImportErrors godoc
@ID get-import-errors
@Summary Get importErrors
@Description Get the importErrors.
@Tags [Workflow]
@Accept json
@Produce json
@Success 200 {object} airflow.ImportErrorCollection "Successfully get the importErrors."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the importErrors."
@Router /importErrors [get]
func GetTask ¶ added in v0.2.0
GetTask godoc
@ID get-task
@Summary Get Task
@Description Get the task.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param taskId path string true "ID of the task."
@Success 200 {object} model.Task "Successfully get the task."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task."
@Router /workflow/{wfId}/task/{taskId} [get]
func GetTaskComponent ¶
GetTaskComponent godoc
@ID get-task-component
@Summary Get TaskComponent
@Description Get the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcId path string true "ID of the TaskComponent"
@Success 200 {object} model.TaskComponent "Successfully get the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task component"
@Router /task_component/{tcId} [get]
func GetTaskComponentByName ¶ added in v0.2.0
GetTaskComponentByName godoc
@ID get-task-component-by-name
@Summary Get TaskComponent by Name
@Description Get the task component by name.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcName path string true "Name of the TaskComponent"
@Success 200 {object} model.TaskComponent "Successfully get the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task component"
@Router /task_component/name/{tcName} [get]
func GetTaskDirectly ¶ added in v0.2.0
GetTaskDirectly godoc
@ID get-task-directly
@Summary Get Task Directly
@Description Get the task directly.
@Tags [Workflow]
@Accept json
@Produce json
@Param taskId path string true "ID of the task."
@Success 200 {object} model.TaskDirectly "Successfully get the task."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task."
@Router /task/{taskId} [get]
func GetTaskFromTaskGroup ¶ added in v0.2.0
GetTaskFromTaskGroup godoc
@ID get-task-from-task-group
@Summary Get Task from Task Group
@Description Get the task from the task group.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param tgId path string true "ID of the task group."
@Param taskId path string true "ID of the task."
@Success 200 {object} model.Task "Successfully get the task from the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task from the task group."
@Router /workflow/{wfId}/task_group/{tgId}/task/{taskId} [get]
func GetTaskGroup ¶ added in v0.2.0
GetTaskGroup godoc
@ID get-task-group
@Summary Get TaskGroup
@Description Get the task group.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param tgId path string true "ID of the task group."
@Success 200 {object} model.Task "Successfully get the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task group."
@Router /workflow/{wfId}/task_group/{tgId} [get]
func GetTaskGroupDirectly ¶ added in v0.2.0
GetTaskGroupDirectly godoc
@ID get-task-group-directly
@Summary Get TaskGroup Directly
@Description Get the task group directly.
@Tags [Workflow]
@Accept json
@Produce json
@Param tgId path string true "ID of the task group."
@Success 200 {object} model.Task "Successfully get the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task group."
@Router /task_group/{tgId} [get]
func GetTaskInstances ¶ added in v0.2.1
GetTaskInstances godoc
@ID get-task-instances
@Summary Get taskInstances
@Description Get the task Logs.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param wfRunId path string true "ID of the workflow."
@Success 200 {object} model.TaskInstance "Successfully get the taskInstances."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the taskInstances."
@Router /workflow/{wfId}/workflowRun/{wfRunId}/taskInstances [get]
func GetTaskLogDownload ¶ added in v0.3.1
GetTaskLogDownload godoc
@ID get-task-logs-download
@Summary Download Task Logs
@Description Download the task logs as a file.
@Tags [Workflow]
@Accept json
@Produce text/plain
@Param wfId path string true "ID of the workflow."
@Param wfRunId path string true "ID of the workflowRunId."
@Param taskId path string true "ID of the task."
@Param taskTryNum path string true "ID of the taskTryNum."
@Success 200 {file} file "Log file downloaded successfully."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task Logs."
@Router /workflow/{wfId}/workflowRun/{wfRunId}/task/{taskId}/taskTryNum/{taskTryNum}/logs/download [get]
func GetTaskLogs ¶ added in v0.2.1
GetTaskLogs godoc
@ID get-task-logs
@Summary Get Task Logs
@Description Get the task Logs.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param wfRunId path string true "ID of the workflowRunId."
@Param taskId path string true "ID of the task."
@Param taskTryNum path string true "ID of the taskTryNum."
@Success 200 {object} airflow.InlineResponse200 "Successfully get the task Logs."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the task Logs."
@Router /workflow/{wfId}/workflowRun/{wfRunId}/task/{taskId}/taskTryNum/{taskTryNum}/logs [get]
func GetWorkflow ¶
GetWorkflow godoc
@ID get-workflow
@Summary Get Workflow
@Description Get the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Success 200 {object} model.Workflow "Successfully get the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow."
@Router /workflow/{wfId} [get]
func GetWorkflowByName ¶ added in v0.2.0
GetWorkflowByName godoc
@ID get-workflow-by-name
@Summary Get Workflow by Name
@Description Get the workflow by name.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfName path string true "Name of the workflow."
@Success 200 {object} model.Workflow "Successfully get the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow."
@Router /workflow/name/{wfName} [get]
func GetWorkflowRuns ¶ added in v0.2.1
GetWorkflowRuns godoc
@ID get-workflow-runs
@Summary Get workflowRuns
@Description Get the task Logs.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Success 200 {object} []model.WorkflowRun "Successfully get the workflowRuns."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflowRuns."
@Router /workflow/{wfId}/runs [get]
func GetWorkflowStatus ¶ added in v0.3.1
GetWorkflowStatus godoc
@ID get-WorkflowStatus
@Summary Get WorkflowStatus
@Description Get the WorkflowStatus.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "wfId of the workflow"
@Success 200 {object} []model.WorkflowStatus "Successfully get the WorkflowVersion."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the WorkflowVersion."
@Router /workflow/{wfId}/status [get]
func GetWorkflowTemplate ¶
GetWorkflowTemplate godoc
@ID get-workflow-template
@Summary Get WorkflowTemplate
@Description Get the workflow template.
@Tags [Workflow Template]
@Accept json
@Produce json
@Param wftId path string true "ID of the WorkflowTemplate"
@Success 200 {object} model.GetWorkflowTemplate "Successfully get the workflow template"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow template"
@Router /workflow_template/{wftId} [get]
func GetWorkflowTemplateByName ¶ added in v0.2.0
GetWorkflowTemplateByName godoc
@ID get-workflow-template-by-name
@Summary Get WorkflowTemplate by Name
@Description Get the workflow template by name.
@Tags [Workflow Template]
@Accept json
@Produce json
@Param wfName path string true "Name of the WorkflowTemplate"
@Success 200 {object} model.GetWorkflowTemplate "Successfully get the workflow template"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the workflow template"
@Router /workflow_template/name/{wfName} [get]
func GetWorkflowVersion ¶ added in v0.2.3
GetWorkflowVersion godoc
@ID get-WorkflowVersion
@Summary Get WorkflowVersion
@Description Get the WorkflowVersion.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "wfId of the workflow"
@Param verId path string true "ID of the WorkflowVersion."
@Success 200 {object} model.Workflow "Successfully get the WorkflowVersion."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get the WorkflowVersion."
@Router /workflow/{wfId}/version/{verId} [get]
func ListTask ¶ added in v0.2.0
ListTask godoc
@ID list-task
@Summary List Task
@Description Get a task list of the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Success 200 {object} []model.Task "Successfully get a task list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a task list."
@Router /workflow/{wfId}/task [get]
func ListTaskComponent ¶
ListTaskComponent godoc
@ID list-task-component
@Summary List TaskComponent
@Description Get a list of task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param page query string false "Page of the task component list."
@Param row query string false "Row of the task component list."
@Success 200 {object} []model.TaskComponent "Successfully get a list of task component."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a list of task component."
@Router /task_component [get]
func ListTaskFromTaskGroup ¶ added in v0.2.0
ListTaskFromTaskGroup godoc
@ID list-task-from-task-group
@Summary List Task from Task Group
@Description Get a task list from the task group.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param tgId path string true "ID of the task group."
@Success 200 {object} []model.Task "Successfully get a task list from the task group."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a task list from the task group."
@Router /workflow/{wfId}/task_group/{tgId}/task [get]
func ListTaskGroup ¶ added in v0.2.0
ListTaskGroup godoc
@ID list-task-group
@Summary List TaskGroup
@Description Get a task group list of the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Success 200 {object} []model.TaskGroup "Successfully get a task group list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a task group list."
@Router /workflow/{wfId}/task_group [get]
func ListWorkflow ¶
ListWorkflow godoc
@ID list-workflow
@Summary List Workflow
@Description Get a workflow list.
@Tags [Workflow]
@Accept json
@Produce json
@Param name query string false "Name of the workflow"
@Param page query string false "Page of the workflow list."
@Param row query string false "Row of the workflow list."
@Success 200 {object} []model.Workflow "Successfully get a workflow list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a workflow list."
@Router /workflow [get]
func ListWorkflowTemplate ¶
ListWorkflowTemplate godoc
@ID list-workflow-template
@Summary List WorkflowTemplate
@Description Get a list of workflow template.
@Tags [Workflow Template]
@Accept json
@Produce json
@Param name query string false "Name of the workflow template"
@Param page query string false "Page of the workflow template list."
@Param row query string false "Row of the workflow template list."
@Success 200 {object} []model.WorkflowTemplate "Successfully get a list of workflow template."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a list of workflow template."
@Router /workflow_template [get]
func ListWorkflowVersion ¶ added in v0.2.3
ListWorkflowVersion godoc
@ID list-workflowVersion
@Summary List workflowVersion
@Description Get a workflowVersion list.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "wfId of the workflow"
@Param page query string false "Page of the workflowVersion list."
@Param row query string false "Row of the workflowVersion list."
@Success 200 {object} []model.WorkflowVersion "Successfully get a workflowVersion list."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to get a workflowVersion list."
@Router /workflow/{wfId}/version [get]
func RunScript ¶ added in v0.4.1
RunScript godoc
@ID run-script
@Summary Run script on target
@Description Run script on target with NS ID, MCI ID and VM ID.
@Tags [Cicada Task Component]
@Accept json
@Produce json
@Param request body model.RunScriptReq true "Workflow content"
@Success 200 {object} model.ScriptResult "Result of the script running"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to run script"
@Router /run_script [post]
func RunWorkflow ¶
RunWorkflow godoc
@ID run-workflow
@Summary Run Workflow
@Description Run the workflow.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Success 200 {object} model.SimpleMsg "Successfully run the workflow."
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to run the Workflow"
@Router /workflow/{wfId}/run [post]
func SleepTime ¶ added in v0.4.1
SleepTime godoc
@ID sleep-time
@Summary Run sleep command on cicada
@Description Runs sleep command on cicada and waits for configured time. Wait for 10 seconds if time value is not provided.
@Tags [Cicada Task Component]
@Accept json
@Produce json
@Param request body model.SleepTimeReq true "SleepTime request"
@Success 200 {object} model.ScriptResult "Result of sleep"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to run script"
@Router /sleep_time [post]
func UpdateTaskComponent ¶
UpdateTaskComponent godoc
@ID update-task-component
@Summary Update TaskComponent
@Description Update the task component.
@Tags [Task Component]
@Accept json
@Produce json
@Param tcId path string true "ID of the TaskComponent"
@Param TaskComponent body model.CreateTaskComponentReq true "task component to modify."
@Success 200 {object} model.TaskComponent "Successfully update the task component"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to update the task component"
@Router /task_component/{tcId} [put]
func UpdateWorkflow ¶
UpdateWorkflow godoc
@ID update-workflow
@Summary Update Workflow
@Description Update the workflow content.
@Tags [Workflow]
@Accept json
@Produce json
@Param wfId path string true "ID of the workflow."
@Param Workflow body model.CreateWorkflowReq true "Workflow to modify."
@Success 200 {object} model.Workflow "Successfully update the workflow"
@Failure 400 {object} common.ErrorResponse "Sent bad request."
@Failure 500 {object} common.ErrorResponse "Failed to update the workflow"
@Router /workflow/{wfId} [put]
Types ¶
This section is empty.