From 267bc1f4c157df3b9cb2506a9c490594328842c8 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig <aehlig@google.com> Date: Thu, 2 May 2013 14:31:04 +0200 Subject: [PATCH] Make Rapi backed set node tags correctly Since the htools representation of a node now allows adding the node tags, populate this field correctly in the Rapi backend. Signed-off-by: Klaus Aehlig <aehlig@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- src/Ganeti/HTools/Backend/Rapi.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Ganeti/HTools/Backend/Rapi.hs b/src/Ganeti/HTools/Backend/Rapi.hs index ffc6dc2f9..ab495f1c9 100644 --- a/src/Ganeti/HTools/Backend/Rapi.hs +++ b/src/Ganeti/HTools/Backend/Rapi.hs @@ -166,8 +166,10 @@ parseNode ktg a = do dtotal <- extract "dtotal" dfree <- extract "dfree" ctotal <- extract "ctotal" - return $ Node.create name mtotal mnode mfree - dtotal dfree ctotal False spindles guuid' + tags <- extract "tags" + return . flip Node.setNodeTags tags $ + Node.create name mtotal mnode mfree dtotal dfree ctotal False + spindles guuid' return (name, node) -- | Construct a group from a JSON object. -- GitLab