onyo.lib.executors module

onyo.lib.executors.exec_modify_asset(repo, operands)[source]

Executor for the ‘modify_assets’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Item, Item]) – Items of the original and updated asset.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_move_asset(repo, operands)[source]

Executor for the ‘move_assets’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Path, Path]) – Absolute Paths of the source and destination parent.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_move_directory(repo, operands)[source]

Executor for the ‘move_directories’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Path, Path]) – Absolute Paths of the source and destination parent.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_new_asset(repo, operands)[source]

Executor for the ‘new_assets’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Item]) – Asset to create.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_new_directory(repo, operands)[source]

Executor for the ‘new_directories’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Path]) – Absolute Path of directory to create.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_remove_asset(repo, operands)[source]

Executor for the ‘remove_assets’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Item]) – Asset to remove.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_remove_directory(repo, operands)[source]

Executor for the ‘remove_directories’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Item]) – Directory to remove.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_rename_asset(repo, operands)[source]

Executor for the ‘rename_assets’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Path, Path]) – Absolute Paths of the source and destination.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.exec_rename_directory(repo, operands)[source]

Executor for the ‘rename_directories’ operation.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple[Path, Path]) – Absolute Paths of the source and destination.

Return type:

tuple[list[Path], list[Path]]

onyo.lib.executors.generic_executor(func, repo, operands)[source]

Executor for simple FS operations on non-inventory files.

Not intended for direct use. It is called from an Operator, which is assumed to have validated all input passed to this (trusting) executor.

Returns two lists: 1) Paths to be committed 2) Paths to be staged (not previously tracked)

Parameters:
  • func (Callable) – Function to pass operands to.

  • repo (OnyoRepo) – Onyo repository to operate on.

  • operands (tuple) – Operands to pass to func.

Return type:

tuple[list[Path], list[Path]]