Commit a8633d70 authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Add constructor 'TagKindNetwork' to 'TagKind'



Add missing constructor 'TagKindNetwork' to 'Ganeti.Types.TagKind'
which is the counterpart of the Python constant 'TAG_NETWORK'.  This
fixes issue 578.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent 661c765b
......@@ -156,6 +156,9 @@ handleCall cfg (QueryTags kind name) = do
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
return (J.showJSON <$> tags)
handleCall cfg (Query qkind qfields qfilter) = do
......
......@@ -275,6 +275,7 @@ $(THH.declareLADT ''String "TagKind"
, ("TagKindNode", "node")
, ("TagKindGroup", "nodegroup")
, ("TagKindCluster", "cluster")
, ("TagKindNetwork", "network")
])
$(THH.makeJSONInstance ''TagKind)
......
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