Skip to content
Snippets Groups Projects

Rework LSO interaction

Merged Karel van Klink requested to merge feature/skip-empty-inventory into develop
All threads resolved!
13 files
+ 104
93
Compare changes
  • Side-by-side
  • Inline
Files
13
+ 13
1
@@ -5,7 +5,7 @@
import json
import logging
from typing import Any
from typing import Any, Literal, TypedDict
import requests
from orchestrator import step
@@ -23,6 +23,18 @@ from gso import settings
logger = logging.getLogger(__name__)
class _LSOState(TypedDict): # noqa: PYI049
"""An expanded state that must contain at least the required keys for the execution of an Ansible playbook."""
playbook_name: str
extra_vars: dict[str, Any]
inventory: dict[Literal["all"], dict[Literal["hosts"], dict[str, Any] | None]]
__extra_values__: Any # This is feature unavailable in python 3.12
LSOState = State # FIXME: Use the above definition when python3.13 is released
def _send_request(parameters: dict, callback_route: str) -> None:
"""Send a request to :term:`LSO`. The callback address is derived using the process ID provided.
Loading