Skip to content

Commit

Permalink
v7 model: Replace device.overall_status offline & idle with disconnec…
Browse files Browse the repository at this point in the history
…ted, reduced-functionality & operational

Change-type: major
  • Loading branch information
otaviojacobi committed Aug 30, 2024
1 parent 64ca509 commit f3f33b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4705,7 +4705,7 @@ The name must be a string; the optional doc argument can have any type.
"cpu_temp": int,
"cpu_id": str,
"is_undervolted": bool,
"overall_status": Any,
"overall_status": Literal["configuring", "inactive", "post-provisioning", "updating", "operational", "disconnected", "reduced-functionality"],
"overall_progress": int,
"is_of__device_type": Union[List[DeviceTypeType], PineDeferred],
"belongs_to__application": Union[List[TypeApplication], PineDeferred],
Expand Down Expand Up @@ -4770,7 +4770,7 @@ The name must be a string; the optional doc argument can have any type.
"cpu_temp": int,
"cpu_id": str,
"is_undervolted": bool,
"overall_status": Any,
"overall_status": Literal["configuring", "inactive", "post-provisioning", "updating", "operational", "disconnected", "reduced-functionality"],
"overall_progress": int,
"is_of__device_type": Union[List[DeviceTypeType], PineDeferred],
"belongs_to__application": Union[List[TypeApplication], PineDeferred],
Expand Down
13 changes: 0 additions & 13 deletions balena/models/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,6 @@ class SupervisorStateType(TypedDict):
download_progress: str


class DeviceStatus:
"""
Balena device statuses.
"""

IDLE = "Idle"
CONFIGURING = "Configuring"
UPDATING = "Updating"
OFFLINE = "Offline"
POST_PROVISIONING = "Post Provisioning"
INACTIVE = "Inactive"


class Device:
"""
This class implements device model for balena python SDK.
Expand Down
11 changes: 10 additions & 1 deletion balena/types/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,16 @@ class TypeDevice(TypedDict):
cpu_id: str
is_undervolted: bool
# This is a computed term
overall_status: Any
overall_status: Literal[
"configuring",
"inactive",
"post-provisioning",
"updating",
"operational",
"disconnected",
"reduced-functionality",
]

# This is a computed term
overall_progress: int

Expand Down

0 comments on commit f3f33b8

Please sign in to comment.