Review: Approve I'm bikeshedding the function name and when we're done with that please merge.
Diff comments: > diff --git a/curtin/storage_config.py b/curtin/storage_config.py > index 8646a2e..c5a7a13 100644 > --- a/curtin/storage_config.py > +++ b/curtin/storage_config.py > @@ -500,6 +501,27 @@ class ProbertParser(object): > except KeyError: > return False > > + @staticmethod > + def detect_partition_layout(blockdev) -> Optional[str]: naming is hard. to me the obvious choice would have been detect_table_type() or something similar, thoughts? Are you avoiding it because of the ldm detection and abstracting that case as well? layout to me sounds like we're getting a richer answer of what the partitions look like, not just the type. > + ''' Return either: > + * None if the blockdev is not partitioned > + * A type of partition table (as a string) if it is supported > + * "unsupported" if it is not supported. > + ''' > + if 'ID_PART_TABLE_TYPE' not in blockdev: > + return None > + > + ptype = blockdev['ID_PART_TABLE_TYPE'] > + if ptype not in schemas._ptables: > + return schemas._ptable_unsupported > + > + if ProbertParser.looks_like_ldm_disk(blockdev): > + LOG.debug('%s: reassigning ptable property to %s because it' > + ' looks like a dynamic disk', > + blockdev.get('DEVNAME', ''), > schemas._ptable_unsupported) > + return schemas._ptable_unsupported > + return ptype > + > def blockdev_to_id(self, blockdev): > """ Examine a blockdev dictionary and return a tuple of curtin > storage type and name that can be used as a value for -- https://code.launchpad.net/~ogayot/curtin/+git/curtin/+merge/481078 Your team curtin developers is subscribed to branch curtin:master. -- Mailing list: https://launchpad.net/~curtin-dev Post to : curtin-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~curtin-dev More help : https://help.launchpad.net/ListHelp