ingest.scan.configuration package

Submodules

ingest.scan.configuration.exceptions module

Defines exceptions that can occur when interacting with Scan configuration

exception ingest.scan.configuration.exceptions.InvalidScanConfiguration(description)

Bases: util.exceptions.ValidationException

Exception indicating that the provided Scan configuration was invalid

ingest.scan.configuration.scan_configuration module

Defines the configuration for running an instance of Scan

class ingest.scan.configuration.scan_configuration.ScanConfiguration

Bases: object

Represents the configuration for a running Scan instance. The configuration includes details about mounting the transfer directory, the suffix for identifying files still being transferred, and regular expressions to identify files to ingest and how to store them.

get_recipe()

Returns the recipe type for this Scan configuration

Returns:The recipe type name and version
Return type:(string, string)
get_scanner()

Returns the configured scanner for this Scan configuration

Returns:The configured scanner
Return type:ingest.scan.scanners.scanner.Scanner
get_workspace()

Returns the workspace name to be scanned for this Scan configuration

Returns:The workspace name
Return type:string
load_scanner_configuration(scanner)

Loads the configuration into the given scanner

Parameters:scanner (ingest.scan.scanners.scanner.Scanner) – The configuration as a dictionary
validate()

Validates the Scan configuration

Returns:A list of warnings discovered during validation
Return type:list[:class:`ingest.scan.configuration.scan_configuration.ValidationWarning()]`
:raises ingest.scan.configuration.exceptions.InvalidScanConfiguration: If the configuration is
invalid.
class ingest.scan.configuration.scan_configuration.ValidationWarning(key, details)

Bases: object

Tracks Scan configuration warnings during validation that may prevent the process from working.

Module contents