swh.vault.cookers package

Submodules:

Module contents:

swh.vault.cookers.get_cooker_cls(bundle_type: str, object_type: swh.model.swhids.ObjectType)[source]
swh.vault.cookers.check_config(cfg: Dict[str, Any]) Dict[str, Any][source]

Ensure the configuration is ok to run a vault worker, and propagate defaults

Raises
  • EnvironmentError if the configuration is not for remote instance

  • ValueError if one of the following keys is missing – vault, storage

Returns

New configuration dict to instantiate a vault worker instance

swh.vault.cookers.get_cooker(bundle_type: str, swhid: swh.model.swhids.CoreSWHID)[source]

Instantiate a cooker class of type bundle_type.

Returns

Cooker class in charge of cooking the bundle_type with id swhid.

Raises
  • ValueError in case of a missing top-level vault key configuration or a storage – key.

  • EnvironmentError in case the vault configuration reference a non remote class.