mirror of
https://github.com/home-assistant/core.git
synced 2026-09-08 14:41:38 +01:00
25 lines
486 B
Python
25 lines
486 B
Python
"""Constants for the Portainer integration."""
|
|
|
|
DOMAIN = "portainer"
|
|
DEFAULT_NAME = "Portainer"
|
|
|
|
API_MAX_RETRIES = 3
|
|
|
|
CONTAINER_STATE_ACTIONS = {
|
|
"start",
|
|
"stop",
|
|
"die",
|
|
"kill",
|
|
"pause",
|
|
"unpause",
|
|
"restart",
|
|
"oom",
|
|
"update",
|
|
}
|
|
|
|
HEALTH_STATUS_VALUES = ("healthy", "unhealthy", "starting")
|
|
|
|
CONTAINER_STATE_EVENT_TYPES: tuple[str, ...] = tuple(
|
|
sorted(CONTAINER_STATE_ACTIONS)
|
|
) + tuple(f"health_status_{value}" for value in HEALTH_STATUS_VALUES)
|