Commit 3fd13dec authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added ability to replace a block device in the install state

parent 1d24f530
......@@ -359,6 +359,17 @@ class IliState:
self._blockdevices[usage] = blockdevice
def replace_blockdevice(self, usage: str, blockdevice: str):
"""Replace a block device."""
if usage not in ['efi', 'boot', 'root']:
raise RuntimeError(f'Unknown blockdevice usage "{usage}"')
if usage not in self._blockdevices:
raise RuntimeError(f'Blockdevice usage "{usage}" not set')
self._blockdevices[usage] = blockdevice
@property
def blockdevices(self):
"""Return the block devices we should create filesystems on."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment