storage: replace use of v1 POST reset by v2 POST reset
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
parent
ef047e72b7
commit
2841cd2002
|
@ -301,7 +301,11 @@ class FilesystemController(SubiquityTuiController, FilesystemManipulator):
|
|||
run_bg_task(reset_and_redraw())
|
||||
|
||||
async def _reset(self, refresh_view: bool) -> None:
|
||||
status = await self.endpoint.reset.POST()
|
||||
async def v2_reset_with_v1_response() -> StorageResponse:
|
||||
await self.endpoint.v2.reset.POST()
|
||||
return await self.endpoint.GET()
|
||||
|
||||
status = await v2_reset_with_v1_response()
|
||||
self.app.ui.block_input = False
|
||||
self.model.load_server_data(status)
|
||||
if refresh_view:
|
||||
|
|
|
@ -1004,10 +1004,8 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
|||
await self.configured()
|
||||
return self._done_response()
|
||||
|
||||
async def reset_POST(self, context, request) -> StorageResponse:
|
||||
log.info("Resetting Filesystem model")
|
||||
self.model.reset()
|
||||
return await self.GET(context)
|
||||
async def reset_POST(self) -> StorageResponse:
|
||||
raise NotImplementedError
|
||||
|
||||
async def has_rst_GET(self) -> bool:
|
||||
search = "/sys/module/ahci/drivers/pci:ahci/*/remapped_nvme"
|
||||
|
|
Loading…
Reference in New Issue