orchestration (naas_abi_cli.cli.new.orchestration)
What it is
- A CLI subcommand and helper function to scaffold a new “orchestration” project from bundled templates into a target directory.
Public API
new_orchestration(orchestration_name: str, orchestration_path: str = ".", extra_values: dict = {})- Creates the destination directory (if missing) and copies orchestration templates into it.
- Normalizes
orchestration_nameto PascalCase and passes it to templates asorchestration_name_pascal.
- CLI command:
new orchestration <orchestration_name> [orchestration_path]- Registered as a
clickcommand via@new.command("orchestration"). - Delegates to
new_orchestration(...).
- Registered as a
Configuration/Dependencies
- Dependencies
clickfor CLI command registration.naas_abi_clito locate packaged templates.Copier(naas_abi_cli.cli.utils.Copier.Copier) to copy template files.to_pascal_case(naas_abi_cli.cli.new.utils.to_pascal_case) for name normalization.osfor filesystem operations.
- Templates source path
- Computed as:
<naas_abi_cli package dir>/cli/new/templates/orchestration
- Computed as:
Usage
CLI
naas-abi-cli new orchestration MyOrchestration .
Python
from naas_abi_cli.cli.new.orchestration import new_orchestration
new_orchestration("my_orchestration", orchestration_path=".")
Caveats
- If
orchestration_path=".", the current working directory (os.getcwd()) is used. - The default
extra_valuesargument is a mutable dict ({}); avoid mutating it across calls.