[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH 04/16] Add support for linear device-mapper devices.



> +    def __init__(self, name, format=None, size=None, dmUuid=None,
> +                 exists=None, parents=None, sysfsPath=''):
> +        """ Create a DMLinearDevice instance.
> +
> +            Arguments:
> +
> +                name -- the device name (generally a device node's basename)
> +
> +            Keyword Arguments:
> +
> +                size -- the device's size (units/format TBD)
> +                dmUuid -- the device's device-mapper UUID
> +                sysfsPath -- sysfs device path
> +                format -- a DeviceFormat instance
> +                parents -- a list of required Device instances
> +                exists -- indicates whether this is an existing device
> +        """
> +        if not parents:
> +            raise ValueError("DMLinearDevice requires a backing block device")
> +
> +        dmUuid = "ANACONDA-%s" % name
> +
> +        DMDevice.__init__(self, name, format=format, size=size,
> +                          parents=parents, sysfsPath=sysfsPath,
> +                          exists=exists, target="linear", dmUuid=dmUuid)

Do you really intend to override any dmUuid passed in to __init__ with
the default later on like this?

Otherwise, this looks fine except for all the udev_settle but I suppose
there's nothing we can do about that.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]