← Back to team overview

curtin-dev team mailing list archive

Re: [Merge] ~ogayot/curtin:raid+ptable into curtin:master

 


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]:

> Are you avoiding it because of the ldm detection and abstracting that case as well?

Yes, exactly. But I agree that "layout" feels wrong. Maybe "detect_partition_scheme" or "detect_partition_style"?

> +        ''' 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.



References