[PATCH 3/5] Get lv list from lvm in a more straightforward format.
Anne Mulhern
amulhern at redhat.com
Mon Mar 31 14:59:16 UTC 2014
----- Original Message -----
> From: "Vratislav Podzimek" <vpodzime at redhat.com>
> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> Sent: Monday, March 31, 2014 3:45:31 AM
> Subject: Re: [PATCH 3/5] Get lv list from lvm in a more straightforward format.
>
> On Fri, 2014-03-28 at 15:32 -0500, David Lehman wrote:
>
> >
> > - # make a list of indices with mirror volumes up front and
> > snapshots at
> > - # the end
> > - indices = range(len(lv_names))
> > - indices.sort(key=lambda i: lv_attr[i], cmp=lv_attr_cmp)
> > - lv_real_names = [n.replace("[", "").replace("]", "") for n in
> > lv_names]
> > raid = dict([("%s-%s" % (vg_device.name,
> > n.replace("[", "").replace("]", "")),
> > {"copies": 0, "log": Size(bytes=0), "meta":
> > Size(bytes=0)})
> > - for n in lv_names])
> > - lv_data = zip(lv_names, lv_uuids, lv_attr, lv_sizes, lv_types)
> > - for i in range(len(lv_data)):
> > - addLV(*lv_data[i])
> > + for n in lv_info.keys()])
> You can drop those square brackets in the comprehension.
>
> --
> Vratislav Podzimek
>
> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
I like this, because it is simpler overall. It would make sense to toss
in a few tests, to replace the ones that will fail.
- mulhern
More information about the anaconda-patches
mailing list