storage: get rid of v1 guided_POST
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com> (cherry picked from commit 6716523eb1bc4759c532774ee12887658c485b6c)
This commit is contained in:
parent
2841cd2002
commit
a143cbcdba
|
@ -26,6 +26,7 @@ from subiquity.common.types import (
|
|||
GuidedStorageResponseV2,
|
||||
GuidedStorageTargetManual,
|
||||
ProbeStatus,
|
||||
StorageResponse,
|
||||
StorageResponseV2,
|
||||
)
|
||||
from subiquity.models.filesystem import (
|
||||
|
@ -259,7 +260,11 @@ class FilesystemController(SubiquityTuiController, FilesystemManipulator):
|
|||
raise Exception("could not process action {}".format(action))
|
||||
|
||||
async def _guided_choice(self, choice: GuidedChoiceV2):
|
||||
coro = self.endpoint.guided.POST(choice)
|
||||
async def v2_guided_POST_with_v1_response() -> StorageResponse:
|
||||
await self.endpoint.v2.guided.POST(choice)
|
||||
return await self.endpoint.GET()
|
||||
|
||||
coro = v2_guided_POST_with_v1_response()
|
||||
if not choice.capability.supports_manual_customization():
|
||||
await self.app.next_screen(coro)
|
||||
return
|
||||
|
|
|
@ -998,11 +998,7 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
|||
)
|
||||
|
||||
async def guided_POST(self, data: GuidedChoiceV2) -> StorageResponse:
|
||||
log.debug(data)
|
||||
await self.guided(data)
|
||||
if not data.capability.supports_manual_customization():
|
||||
await self.configured()
|
||||
return self._done_response()
|
||||
raise NotImplementedError
|
||||
|
||||
async def reset_POST(self) -> StorageResponse:
|
||||
raise NotImplementedError
|
||||
|
|
Loading…
Reference in New Issue