storage/v2: reset
This commit is contained in:
parent
f6c3eb8a43
commit
f4e07e8aba
|
@ -246,6 +246,9 @@ class API:
|
||||||
class guided:
|
class guided:
|
||||||
def POST(choice: GuidedChoice) -> StorageResponseV2: ...
|
def POST(choice: GuidedChoice) -> StorageResponseV2: ...
|
||||||
|
|
||||||
|
class reset:
|
||||||
|
def POST() -> StorageResponseV2: ...
|
||||||
|
|
||||||
class reformat_disk:
|
class reformat_disk:
|
||||||
def POST(disk_id: str) -> StorageResponseV2: ...
|
def POST(disk_id: str) -> StorageResponseV2: ...
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,11 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
||||||
async def v2_POST(self):
|
async def v2_POST(self):
|
||||||
await self.configured()
|
await self.configured()
|
||||||
|
|
||||||
|
async def v2_reset_POST(self) -> StorageResponseV2:
|
||||||
|
log.info("Resetting Filesystem model")
|
||||||
|
self.model.reset()
|
||||||
|
return await self.v2_GET()
|
||||||
|
|
||||||
async def v2_guided_POST(self, choice: GuidedChoice) -> StorageResponseV2:
|
async def v2_guided_POST(self, choice: GuidedChoice) -> StorageResponseV2:
|
||||||
self.guided(choice)
|
self.guided(choice)
|
||||||
return await self.v2_GET()
|
return await self.v2_GET()
|
||||||
|
|
Loading…
Reference in New Issue