[PATCH][pykickstart] Add support for lvm thin provisioning.

Brian C. Lane bcl at redhat.com
Tue Jun 25 23:30:42 UTC 2013


On Tue, Jun 25, 2013 at 03:41:05PM -0500, David Lehman wrote:
> This adds a new autopart type and options to the logvol command.
> ---
>  pykickstart/commands/autopart.py | 18 ++++++++------
>  pykickstart/commands/logvol.py   | 54 ++++++++++++++++++++++++++++++++++++++++
>  pykickstart/constants.py         |  1 +
>  pykickstart/handlers/control.py  | 10 ++++----
>  tests/commands/autopart.py       |  2 ++
>  tests/commands/logvol.py         | 34 +++++++++++++++++++++++++
>  6 files changed, 107 insertions(+), 12 deletions(-)
> 
> diff --git a/pykickstart/commands/autopart.py b/pykickstart/commands/autopart.py
> index c31e014..308ff25 100644
> --- a/pykickstart/commands/autopart.py
> +++ b/pykickstart/commands/autopart.py
> @@ -184,7 +184,8 @@ class F17_AutoPart(F16_AutoPart):
>          self.typeMap = { "lvm": AUTOPART_TYPE_LVM,
>                           "btrfs": AUTOPART_TYPE_BTRFS,
>                           "plain": AUTOPART_TYPE_PLAIN,
> -                         "partition": AUTOPART_TYPE_PLAIN }
> +                         "partition": AUTOPART_TYPE_PLAIN,
> +                         "thinp": AUTOPART_TYPE_LVM_THINP }

You already mentioned this. I see it is added in the new class below.

> +        if self.thin_volume:
> +            retval += " --thin --poolname=%s" % self.pool_name

If pool_name is empty somehow is it going to cause problems to have
--poolname=

I'm not sure how the parser handles that.

Looks good otherwise.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130625/85b70a56/attachment.sig>


More information about the anaconda-patches mailing list