avid.common.cliConnector.URLMappingCLIConnectorBase
- class avid.common.cliConnector.URLMappingCLIConnectorBase(mount_map=None)
Bases:
DefaultCLIConnectorBase Implementation for CLIConnectors that allow the mapping of URLs (e.g. for container connectors).
- __init__(mount_map=None)
- Parameters:
mount_map – Dictionary that contains the mapping between relevant paths outside of the container (those stored in the session) and the pathes that will be known in the container. Needed to properly convert artefact urls. Key of the map is the mount path inside of the container, the value is the respective path outside.
Methods
__init__([mount_map])- param mount_map:
Dictionary that contains the mapping between relevant paths
apply_mount_map(mount_map, filepath)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.