Commit e10c4a69 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic

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: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 410945f1
...@@ -158,12 +158,10 @@ handleCall cdata QueryClusterInfo = ...@@ -158,12 +158,10 @@ handleCall cdata QueryClusterInfo =
handleCall cfg (QueryTags kind name) = do handleCall cfg (QueryTags kind name) = do
let tags = case kind of let tags = case kind of
TagKindCluster -> Ok . clusterTags $ configCluster cfg TagKindCluster -> Ok . clusterTags $ configCluster cfg
TagKindGroup -> groupTags <$> Config.getGroup cfg name TagKindGroup -> groupTags <$> Config.getGroup cfg name
TagKindNode -> nodeTags <$> Config.getNode cfg name TagKindNode -> nodeTags <$> Config.getNode cfg name
TagKindInstance -> instTags <$> Config.getInstance cfg name TagKindInstance -> instTags <$> Config.getInstance cfg name
TagKindNetwork -> Bad $ OpPrereqError TagKindNetwork -> networkTags <$> Config.getNetwork cfg name
"Network tag is not allowed"
ECodeInval
return (J.showJSON <$> tags) return (J.showJSON <$> tags)
handleCall cfg (Query qkind qfields qfilter) = do handleCall cfg (Query qkind qfields qfilter) = do
......
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