Main entry point¶
The main entry point is:
- class vmw.vco.client.Client[source]¶
Implementation of a vCO webservice client. API Calls implemented:
- echo
- echoWorkflow
- answerWorkflowInput
- cancelWorkflow
- executeWorkflow
- find
- findForId
- findRelation
- hasChildrenInRelation
- getAllPlugins
- getAllWorkflows
- getWorkflowForId
- getWorkflowsWithName
- getWorkflowTokenForId
- getWorkflowTokenResult
- getWorkflowTokenStatus
- simpleExecuteWorkflow
- hasRights
- sendCustomEvent
- __init__(self, url, username, password, async=False, **kw)[source]¶
Build a client for target vCO server.
Parameters:
- answerWorkflowInput(token, inputs={})[source]¶
Provide answer for the user interaction the token is waiting on.
Parameters: - token (vmw.vco.client.WorkflowToken) – workflow token to answer to
- inputs (dict) – input parameters to provide as an answer
- cancelWorkflow(token)[source]¶
Cancel specified workflow token.
Parameters: - token (vmw.vco.client.WorkflowToken) – Token to cancel
- echo(msg)[source]¶
Test method. Echo back provided message.
Parameters: - msg (string) – Message to echo.
- echoWorkflow(wf)[source]¶
Test method. Echo back provided workflow.
Parameters: - wf (vmw.vco.client.Workflow) – Workflow to echo.
- executeWorkflow(wf, inputs={})[source]¶
Run a workflow with specified set of inputs.
Parameters: - wf (vmw.vco.client.Workflow) – workflow to run
- inputs (dict) – inputs to run with
- findRelation(type, id, relation)[source]¶
Find children of specific object (defined by its type and unique id), according to specified relation.
- getAllPlugins()[source]¶
Retrieve all plugins installed in the server.
Return type: list of vmw.vco.client.Plugin
- getAllWorkflows()[source]¶
Retrieve all workflows installed in the server.
Return type: list of vmw.vco.client.Workflow
- getWorkflowForId(id)[source]¶
Retrieve workflow with specified id.
Parameters: - id (string) – Workflow id
- getWorkflowTokenForId(token_id)[source]¶
Retrieve a workflow token from its id.
Parameters: - token_id (string) – token id
- getWorkflowTokenResult(token)[source]¶
Get result for workflow token. Only applies when the workflow execution is completed.
Parameters: - token (vmw.vco.client.WorkflowToken) – token to extract result from
- getWorkflowTokenStatus(tokens)[source]¶
Get status for specified list of workflow tokens. Returns a list of status in the same order.
- getWorkflowsWithName(name)[source]¶
Retrieve all workflows with specified name (might be in different categories).
Parameters: - name (string) – Workflow name
- hasChildrenInRelation(type, id, relation)[source]¶
Check if specified object (defined by its type and unique id) has any children according to specified relation.
- simpleExecuteWorkflow(wf, encoded_input)[source]¶
deprecated
Alternate way of executing a workflow. This will encode inputs in an unsafe way, please don’t use.
Parameters: - wf (vmw.vco.client.Workflow) – workflow to run
- inputs (dict) – inputs to run with