Spaces:
Running
Running
File size: 942 Bytes
e708fb4 c10a804 e708fb4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | from enum import Enum
class WifiState(Enum):
ACTIVE = "active"
INACTIVE = "inactive"
DISABLED = "disabled"
DISABLED_PLANNING = "disabled_planning"
FAILED = "failed"
UNKNOWN = "unknown"
ACTIVE_PLANIF = "active_planif"
@classmethod
def get_by_value(cls, value) -> 'WifiState':
for state in WifiState:
if state.value == value:
return state
return WifiState.UNKNOWN
class WifiPlanningState(Enum):
TRUE = "true"
FALSE = "false"
UNKNOWN = "unknown"
class Endpoint(Enum):
LOGIN = "login/"
WIFI_CONFIG = "wifi/config/"
WIFI_AP = "wifi/ap/"
WIFI_PLANNING = "wifi/planning/"
WIFI_PLANNING_MAPPING = "wifi/planning/mapping/"
WIFI_PLANNING_STATE = "wifi/planning/state/"
WIFI_PLANNING_ACTIVE = "wifi/planning/active/"
LOGIN_AUTHORIZE = "login/authorize/"
LOGIN_SESSION = "login/session/"
LOGIN_LOGOUT = "login/logout/" |