Hi!
On Mon, Mar 11, 2013 at 4:23 PM, Iustin Pop <[email protected]> wrote: > The Python code currently sorts this, but the Haskell code not. > > This should maybe have an test, but I'm not sure how far we want to > nit: "_a_ test" > encode such properties in tests… (and the real reason I'm not adding > one is that we don't have a way to generate a random cluster _with_ > instances). > Maybe add a fixme for that? I am sure other tests would benefit from that, too. > > Signed-off-by: Iustin Pop <[email protected]> > --- > src/Ganeti/Query/Group.hs | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/Ganeti/Query/Group.hs b/src/Ganeti/Query/Group.hs > index b28c38d..2e2d2e5 100644 > --- a/src/Ganeti/Query/Group.hs > +++ b/src/Ganeti/Query/Group.hs > @@ -36,6 +36,7 @@ import Ganeti.Objects > import Ganeti.Query.Language > import Ganeti.Query.Common > import Ganeti.Query.Types > +import Ganeti.Utils (niceSort) > > -- | There is no runtime. > data Runtime = Runtime > @@ -77,7 +78,7 @@ groupFields = > QffNormal) > , (FieldDefinition "pinst_list" "InstanceList" QFTOther > "List of primary instances", > - FieldConfig (\cfg -> rsNormal . map instName . fst . > + FieldConfig (\cfg -> rsNormal . niceSort . map instName . fst . > getGroupInstances cfg . groupUuid), QffNormal) > ] ++ > map buildNdParamField allNDParamFields ++ > -- > 1.8.1.3 > > LGTM, thanks
