recipe.configuration package

Submodules

recipe.configuration.configuration module

Defines the class that represents a job configuration

class recipe.configuration.configuration.RecipeConfiguration

Bases: object

Represents the configuration for running a recipe

add_mount(mount_config)

Adds the given mount configuration

Parameters:mount_config (job.configuration.mount.MountConfig) – The mount configuration to add

:raises recipe.configuration.exceptions.InvalidRecipeConfiguration: If the mount is a duplicate

add_output_workspace(output, workspace)

Adds the given output_workspace

Parameters:
  • output (string) – The output name
  • workspace (string) – The workspace name

:raises job.configuration.exceptions.InvalidJobConfiguration: If the output is a duplicate

add_setting(setting_name, setting_value)

Adds the given setting value

Parameters:
  • setting_name (string) – The setting name
  • setting_value (string) – The setting value

:raises recipe.configuration.exceptions.InvalidJobConfiguration: If the setting is a duplicate or invalid

get_mount_volume(mount_name, volume_name, container_path, mode)

Returns the volume that has been configured for the given mount name. If the given mount is not defined in this configuration, None is returned.

Parameters:
  • mount_name (string) – The name of the mount defined in the job type
  • volume_name (string) – The name of the volume
  • container_path (string) – The path within the container onto which the volume will be mounted
  • mode (string) – Either ‘ro’ for read-only or ‘rw’ for read-write
Returns:

The volume that should be mounted into the job container, possibly None

Return type:

job.execution.configuration.volume.Volume

get_output_workspace(output)

Returns the name of the output workspace that is configured to store the products for the given output name, possibly None

Parameters:output (string) – The name of the output
Returns:The name of the workspace for storing the output products, possibly None
Return type:string
get_setting_value(name)

Returns the value of the given setting if defined in this configuration, otherwise returns None

Parameters:name (string) – The name of the setting
Returns:The value of the setting, possibly None
Return type:string
remove_secret_settings(manifest)

Removes and returns the secret setting values from this recipe configuration

Parameters:manifest (job.seed.manifest.SeedManifest) – The Seed manifest
Returns:A dict of secret settings where the key is the setting name and the value is the secret setting value
Return type:dict

recipe.configuration.exceptions module

Defines exceptions that can occur when interacting with job configuration

exception recipe.configuration.exceptions.InvalidRecipeConfiguration(name, description)

Bases: util.exceptions.ValidationException

Exception indicating that the provided recipe configuration was invalid

Module contents