Skip to content
Snippets Groups Projects

Feature/small tweaks

Merged Karel van Klink requested to merge feature/small-tweaks into develop
3 files
+ 23
43
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
5
"""Module that gathers common API responses and data models."""
"""Module that gathers common API responses and data models."""
import enum
import json
import json
import logging
import logging
import threading
import threading
import uuid
import uuid
 
from enum import StrEnum, auto
from pathlib import Path
from pathlib import Path
from typing import Any
from typing import Any
@@ -21,14 +21,13 @@ from lso.config import DEFAULT_REQUEST_TIMEOUT
@@ -21,14 +21,13 @@ from lso.config import DEFAULT_REQUEST_TIMEOUT
logger = logging.getLogger(__name__)
logger = logging.getLogger(__name__)
# enum.StrEnum is only available in python 3.11
class PlaybookJobStatus(StrEnum):
class PlaybookJobStatus(str, enum.Enum):
"""Enumerator for status codes of a playbook job that's running."""
"""Enumerator for status codes of a playbook job that's running."""
#: All is well.
#: All is well.
OK = "ok"
OK = auto()
#: An error has occurred.
#: An error has occurred.
ERROR = "error"
ERROR = auto()
class PlaybookLaunchResponse(BaseModel):
class PlaybookLaunchResponse(BaseModel):
Loading