ArgoWorkflow
Bases: DuploResource
Resource for creating and managing Argo Workflow resources in DuploCloud.
This resource provides commands to interact with Argo Workflows via the DuploCloud proxy. It handles the two-step authentication: first obtaining an Argo token from Duplo, then using that token to communicate with the Argo Workflow API.
auth
create_template
Create Workflow Template
Create a new workflow template.
Basic CLI Use
Contents of thetemplate.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow template specification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The created workflow template object. |
delete_template
Delete Workflow Template
Delete a workflow template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow template to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Deletion confirmation. |
delete_workflow
Delete Workflow
Delete a workflow by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow to delete. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
Deletion confirmation. |
get_template
Get Workflow Template
Retrieve a specific workflow template by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow template. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The workflow template object. |
get_workflow
Get Workflow
Retrieve a specific workflow by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
NAME
|
The name of the workflow. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The workflow object. |
list_templates
list_workflows
submit
Submit Workflow
Submit a new workflow from a workflow spec.
Basic CLI Use
Contents of theworkflow.yaml file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
body
|
BODY
|
The workflow specification. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
dict
|
The created workflow object. |
wait
Wait for Resource
Waits for a the given wait_check callable to complete successfully. If the global wait_timeout is set on the DuploClient, it will override the timeout parameter so that a user can always choose their own timeout for waiting operations. The timeout param for other functions is just a default value for that particular resource operation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
wait_check
|
callable
|
A callable function to check if the resource is ready. |
required |
timeout
|
int
|
The maximum time to wait in seconds. Default is 3600 seconds (1 hour). |
3600
|
poll
|
int
|
The polling interval in seconds. Default is 10 seconds. |
10
|