"""Константы интеграции fglair.""" from __future__ import annotations from pyfglair import State from pyfglair.provision import REGIONS as _PROVISION_REGIONS DOMAIN = "fglair" CONF_HOST = "host" CONF_DEVICE_PORT = "device_port" CONF_DSN = "dsn" CONF_LANIP_KEY = "lanip_key" CONF_LANIP_KEY_ID = "lanip_key_id" CONF_MODEL = "model" CONF_TEMPLATE = "template" CONF_NAME = "name" CONF_LISTEN_PORT = "listen_port" CONF_KEEPALIVE_MS = "keepalive_ms" CONF_REGION = "region" CONF_EMAIL = "email" CONF_PASSWORD = "password" CONF_CONFIG_JSON = "config_json" DEFAULT_DEVICE_PORT = 80 DEFAULT_LISTEN_PORT = 10275 DEFAULT_KEEPALIVE_MS = 15000 TRIAL_TIMEOUT = 10.0 REGIONS = sorted(_PROVISION_REGIONS) TRIAL_ERRORS = { "no_slots": "no_slots", "key_mismatch": "key_mismatch", "unreachable": "cannot_connect", "timeout": "timeout", "start_failed": "cannot_connect", } STATE_FAILED = {State.OFFLINE, State.KEY_ERROR}