Module Contents

flambe.runnable.utils._contains_path(nested_dict) → bool[source]

Whether the nested dict contains any value that could be a path.

Parameters:nested_dict – The nested dict to evaluate
Return type:bool
flambe.runnable.utils.is_dev_mode() → bool[source]

Detects if flambe was installed in editable mode.

For more information: https://pip.pypa.io/en/latest/reference/pip_install/#editable-installs

Return type:bool
flambe.runnable.utils.get_flambe_repo_location() → str[source]

Return where flambe repository is located

Returns:The local path where flambe is located
Return type:str
Raises:ValueError – If flambe was not installed in editable mode
flambe.runnable.utils.get_commit_hash() → str[source]

Get the commit hash of the current flambe development package.

This will only work if flambe was install from github in dev mode.

Returns:The commit hash
Return type:str
Raises:Exception – In case flambe was not installed in dev mode.
flambe.runnable.utils.rsync_hosts(orch_ip: str, factories_ips: List[str], user: str, folder: str, key: str, exclude: List[str]) → None[source]

Rsync the hosts in the cluster.

IMPORTANT: this method is intended to be run in the cluster.

  • orch_ip (str) – The Orchestrator’s IP that is visible by the factories (usually the private IP)
  • factories_ips (List[str]) – The factories IPs that are visible by the Orchestrator (usually the private IPs)
  • user (str) – The username of all machines. IMPORTANT: only machines with same username are supported
  • key (str) – The key that communicate all machines
  • exclude (List[str]) – A list of files to be excluded in the rsync