mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-14 04:36:31 +00:00
Rename disk_data to data_disk (#3200)
This commit is contained in:
parent
de880e24ed
commit
eba6da485d
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
ATTR_AGENT_VERSION = "agent_version"
|
ATTR_AGENT_VERSION = "agent_version"
|
||||||
ATTR_BOOT_TIMESTAMP = "boot_timestamp"
|
ATTR_BOOT_TIMESTAMP = "boot_timestamp"
|
||||||
|
ATTR_DATA_DISK = "data_disk"
|
||||||
ATTR_DEVICE = "device"
|
ATTR_DEVICE = "device"
|
||||||
ATTR_DISK_DATA = "disk_data"
|
|
||||||
ATTR_DT_SYNCHRONIZED = "dt_synchronized"
|
ATTR_DT_SYNCHRONIZED = "dt_synchronized"
|
||||||
ATTR_DT_UTC = "dt_utc"
|
ATTR_DT_UTC = "dt_utc"
|
||||||
ATTR_STARTUP_TIME = "startup_time"
|
ATTR_STARTUP_TIME = "startup_time"
|
||||||
|
@ -17,7 +17,7 @@ from ..const import (
|
|||||||
)
|
)
|
||||||
from ..coresys import CoreSysAttributes
|
from ..coresys import CoreSysAttributes
|
||||||
from ..validate import version_tag
|
from ..validate import version_tag
|
||||||
from .const import ATTR_DEVICE, ATTR_DISK_DATA
|
from .const import ATTR_DATA_DISK, ATTR_DEVICE
|
||||||
from .utils import api_process, api_validate
|
from .utils import api_process, api_validate
|
||||||
|
|
||||||
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
_LOGGER: logging.Logger = logging.getLogger(__name__)
|
||||||
@ -38,7 +38,7 @@ class APIOS(CoreSysAttributes):
|
|||||||
ATTR_UPDATE_AVAILABLE: self.sys_os.need_update,
|
ATTR_UPDATE_AVAILABLE: self.sys_os.need_update,
|
||||||
ATTR_BOARD: self.sys_os.board,
|
ATTR_BOARD: self.sys_os.board,
|
||||||
ATTR_BOOT: self.sys_dbus.rauc.boot_slot,
|
ATTR_BOOT: self.sys_dbus.rauc.boot_slot,
|
||||||
ATTR_DISK_DATA: self.sys_os.datadisk.disk_used,
|
ATTR_DATA_DISK: self.sys_os.datadisk.disk_used,
|
||||||
}
|
}
|
||||||
|
|
||||||
@api_process
|
@api_process
|
||||||
|
@ -21,7 +21,7 @@ async def test_api_os_info(api_client):
|
|||||||
"update_available",
|
"update_available",
|
||||||
"board",
|
"board",
|
||||||
"boot",
|
"boot",
|
||||||
"disk_data",
|
"data_disk",
|
||||||
):
|
):
|
||||||
assert attr in result["data"]
|
assert attr in result["data"]
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ async def test_api_os_info_with_agent(api_client, coresys: CoreSys):
|
|||||||
resp = await api_client.get("/os/info")
|
resp = await api_client.get("/os/info")
|
||||||
result = await resp.json()
|
result = await resp.json()
|
||||||
|
|
||||||
assert result["data"]["disk_data"] == "/dev/sda"
|
assert result["data"]["data_disk"] == "/dev/sda"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
Loading…
x
Reference in New Issue
Block a user