Commit ce906289 authored by Iustin Pop's avatar Iustin Pop
Browse files

Sort instance list in gnt-group list -opinst_list



The Python code currently sorts this, but the Haskell code not.

This should maybe have a test, but I'm not sure how far we want to
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).
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent c81b97f2
......@@ -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,8 @@ groupFields =
QffNormal)
, (FieldDefinition "pinst_list" "InstanceList" QFTOther
"List of primary instances",
FieldConfig (\cfg -> rsNormal . map instName . fst .
-- FIXME: the niceSort here is not tested
FieldConfig (\cfg -> rsNormal . niceSort . map instName . fst .
getGroupInstances cfg . groupUuid), QffNormal)
] ++
map buildNdParamField allNDParamFields ++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment