From e10c4a69724e21ba44c41a2c68a75a1e10167a13 Mon Sep 17 00:00:00 2001 From: Hrvoje Ribicic <riba@google.com> Date: Tue, 28 Jan 2014 11:19:47 +0100 Subject: [PATCH] Enable network tags in Haskell code Prior to the creation of the 2.10 branch, network tags were broken, and the Haskell code introduced there mistakenly accepted this as the desired functionality. This patch fixes this in a very simple way. Signed-off-by: Hrvoje Ribicic <riba@google.com> Reviewed-by: Klaus Aehlig <aehlig@google.com> --- src/Ganeti/Query/Server.hs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Ganeti/Query/Server.hs b/src/Ganeti/Query/Server.hs index 20ccc4cf4..ffc7ec521 100644 --- a/src/Ganeti/Query/Server.hs +++ b/src/Ganeti/Query/Server.hs @@ -158,12 +158,10 @@ handleCall cdata QueryClusterInfo = handleCall cfg (QueryTags kind name) = do let tags = case kind of TagKindCluster -> Ok . clusterTags $ configCluster cfg - TagKindGroup -> groupTags <$> Config.getGroup cfg name - TagKindNode -> nodeTags <$> Config.getNode cfg name - TagKindInstance -> instTags <$> Config.getInstance cfg name - TagKindNetwork -> Bad $ OpPrereqError - "Network tag is not allowed" - ECodeInval + TagKindGroup -> groupTags <$> Config.getGroup cfg name + TagKindNode -> nodeTags <$> Config.getNode cfg name + TagKindInstance -> instTags <$> Config.getInstance cfg name + TagKindNetwork -> networkTags <$> Config.getNetwork cfg name return (J.showJSON <$> tags) handleCall cfg (Query qkind qfields qfilter) = do -- GitLab