Add an admin only device wipe API (#4934)

* Add an admin only device wipe API

* Fix pylint issue
This commit is contained in:
Mike Degatano
2024-02-29 10:29:52 -05:00
committed by GitHub
parent 5126820619
commit 9d4848ee77
11 changed files with 114 additions and 7 deletions

View File

@@ -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."""