mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-10-28 21:19:47 +00:00
Add an admin only device wipe API (#4934)
* Add an admin only device wipe API * Fix pylint issue
This commit is contained in:
@@ -96,6 +96,11 @@ class APIOS(CoreSysAttributes):
|
||||
|
||||
await asyncio.shield(self.sys_os.datadisk.migrate_disk(body[ATTR_DEVICE]))
|
||||
|
||||
@api_process
|
||||
def wipe_data(self, request: web.Request) -> Awaitable[None]:
|
||||
"""Trigger data disk wipe on Host."""
|
||||
return asyncio.shield(self.sys_os.datadisk.wipe_disk())
|
||||
|
||||
@api_process
|
||||
async def list_data(self, request: web.Request) -> dict[str, Any]:
|
||||
"""Return possible data targets."""
|
||||
|
||||
Reference in New Issue
Block a user