Re: [PATCH] Add support for reserved space in volume group.

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

 



> @@ -100,3 +120,21 @@ class FC3_VolGroup(KickstartCommand):
>  
>      def dataList(self):
>          return self.vgList
> +
> +class F16_VolGroup(FC3_VolGroup):
> +    def _getParser(self):
> +        op = FC3_VolGroup._getParser(self)
> +        op.add_option("--reserved-space", dest="reserved_space", type="int",
> +                      nargs=1, default=0)
> +        op.add_option("--reserved-percent", dest="reserved_percent", type="int",
> +                      nargs=1, default=0)
> +        return op
> +
> +    def parse(self, args):
> +        vg = FC3_VolGroup.parse(self, args)
> +        if vg.reserved_space < 0:
> +            raise KickstartValueError(formatErrorMsg(vg.lineno, msg="Volume group reserved space must be a positive integer."))
> +        elif 0 < vg.reserved_percent < 100:

               ^

I think you want a "not" right there.  Otherwise:

clumens@exeter:~/src/pykickstart$ echo "volgroup vg pv.01 --reserved-percent=50" > test.ks
clumens@exeter:~/src/pykickstart$ PYTHONPATH=.:pykickstart tools/ksvalidator test.ks
The following problem occurred on line 1 of the kickstart file:

Volume group reserved space percentage must be between 1 and 99.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux