feat: add ops center and node onboarding flow
This commit is contained in:
17
domain-api/app/services/ops_command_service.py
Normal file
17
domain-api/app/services/ops_command_service.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
OPS_MULTI_REGION_DIR = "domain-api/deploy/multi-region"
|
||||
|
||||
|
||||
def ops_script_path(script_name: str) -> str:
|
||||
normalized_script_name = str(script_name or "").strip().lstrip("/")
|
||||
if not normalized_script_name:
|
||||
return OPS_MULTI_REGION_DIR
|
||||
return f"{OPS_MULTI_REGION_DIR}/{normalized_script_name}"
|
||||
|
||||
|
||||
def build_bash_command(script_name: str, *args: object) -> str:
|
||||
command_parts = ["bash", ops_script_path(script_name)]
|
||||
command_parts.extend(str(arg or "").strip() for arg in args if str(arg or "").strip())
|
||||
return " ".join(command_parts)
|
||||
Reference in New Issue
Block a user