MCPcopy Index your code
hub / github.com/archlinux/archinstall / parse_arg

Method parse_arg

archinstall/lib/models/device.py:1312–1323  ·  view source on GitHub ↗
(cls, arg: _LvmConfigurationSerialization, disk_config: DiskLayoutConfiguration)

Source from the content-addressed store, hash-verified

1310
1311 @classmethod
1312 def parse_arg(cls, arg: _LvmConfigurationSerialization, disk_config: DiskLayoutConfiguration) -> Self:
1313 lvm_pvs = []
1314 for mod in disk_config.device_modifications:
1315 for part in mod.partitions:
1316 # FIXME: 'lvm_pvs' does not seem like it can ever exist in the 'arg' serialization
1317 if part.obj_id in arg.get('lvm_pvs', []): # type: ignore[operator]
1318 lvm_pvs.append(part)
1319
1320 return cls(
1321 config_type=LvmLayoutType(arg['config_type']),
1322 vol_groups=[LvmVolumeGroup.parse_arg(vol_group, disk_config) for vol_group in arg['vol_groups']],
1323 )
1324
1325 def get_all_pvs(self) -> list[PartitionModification]:
1326 pvs = []

Callers

nothing calls this directly

Calls 2

LvmLayoutTypeClass · 0.85
parse_argMethod · 0.45

Tested by

no test coverage detected