Commit 7c17db26 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix gnt-backup list -o node via confd



Currently, the 'node' field is declared as a simple config field, so
when only selecting this fields, the runtime gathering is no longer
run and it's presumed that all nodes have a backup. So the output is
not truthful (instead of just listing the nodes with at least one
export, all are listed).

By simply making it a runtime field, filtering works properly and we
get the same output as the masterd code.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent 40b118d3
......@@ -58,7 +58,7 @@ rpcExtractor node (Left err) = [(node, rpcErrToRs err)]
exportFields :: FieldList Node Runtime
exportFields =
[ (FieldDefinition "node" "Node" QFTText "Node name",
FieldSimple (rsNormal . nodeName), QffHostname)
FieldRuntime (\_ n -> rsNormal $ nodeName n), QffHostname)
, (FieldDefinition "export" "Export" QFTText "Export name",
FieldRuntime (curry fst), QffNormal)
]
......
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