MCPcopy Create free account
hub / github.com/archlinux/archinstall / show

Method show

archinstall/lib/disk/encryption_menu.py:125–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123
124 @override
125 async def show(self) -> DiskEncryption | None:
126 enc_config = await super().show()
127 if enc_config is None:
128 return None
129
130 enc_type: EncryptionType | None = self._item_group.find_by_key('encryption_type').value
131 enc_password: Password | None = self._item_group.find_by_key('encryption_password').value
132 iter_time: int | None = self._item_group.find_by_key('iter_time').value
133 enc_partitions = self._item_group.find_by_key('partitions').value
134 enc_lvm_vols = self._item_group.find_by_key('lvm_volumes').value
135
136 assert enc_type is not None
137 assert enc_partitions is not None
138 assert enc_lvm_vols is not None
139
140 if enc_type in [EncryptionType.LUKS, EncryptionType.LVM_ON_LUKS] and enc_partitions:
141 enc_lvm_vols = []
142
143 if enc_type == EncryptionType.LUKS_ON_LVM:
144 enc_partitions = []
145
146 if enc_type != EncryptionType.NO_ENCRYPTION and enc_password and (enc_partitions or enc_lvm_vols):
147 return DiskEncryption(
148 encryption_password=enc_password,
149 encryption_type=enc_type,
150 partitions=enc_partitions,
151 lvm_volumes=enc_lvm_vols,
152 hsm_device=enc_config.hsm_device,
153 iter_time=iter_time or DEFAULT_ITER_TIME,
154 )
155
156 return None
157
158 def _preview(self, item: MenuItem) -> str | None:
159 output = ''

Callers 5

select_encryption_typeFunction · 0.45
select_hsmFunction · 0.45
select_iteration_timeFunction · 0.45

Calls 2

DiskEncryptionClass · 0.90
find_by_keyMethod · 0.80

Tested by

no test coverage detected