avid.common.cliConnector.DefaultCLIConnector
- class avid.common.cliConnector.DefaultCLIConnector
Bases:
objectDefault implementation of a CLI connector. It is used to abstract between the action logic and the system specific peculiarities for cli the execution (e.g. direct cli call or a call via a container).
- __init__()
Methods
__init__()ensure_file_availability(cli_file_path)Helper used to enusre that a generated cli file is accessable for the execution.
execute(cli_file_path[, log_file_path, ...])generate_cli_file(file_path_base, content)Function generates the CLI file based on the passed file name base (w/o extension, extension will be added) and the content.
Returns the URL extraction delegate that should be used when working with the connector.
get_executable_url(workflow, actionID[, ...])Returns url+executable for a tool_id request that should be used in the cli file.
- static ensure_file_availability(cli_file_path)
Helper used to enusre that a generated cli file is accessable for the execution.
- generate_cli_file(file_path_base, content)
Function generates the CLI file based on the passed file name base (w/o extension, extension will be added) and the content. It returns the full path to the CLI file.
- get_artefact_url_extraction_delegate(action_extraction_delegate=None)
Returns the URL extraction delegate that should be used when working with the connector. :param action_extraction_delegate: If the actions specifies its own delegate it can be passed and will be wrapped accordingly.
- get_executable_url(workflow, actionID, actionConfig=None)
Returns url+executable for a tool_id request that should be used in the cli file. This serves as an abstraction, in order to allow the connector to change the deduction strategy for the executable url. Default implementation just uses the AVIDUrlLocater. :param workflow: session instance that should be used for deducing the executable url :param actionID: tool_id of the action that requests the URL :param actionConfig: action_config specifies if a certain configuration of an action should be used.