Commit 92ea7d79 authored by Hrvoje Ribicic's avatar Hrvoje Ribicic
Browse files

Fix RAPI network tag handling



The network tags were absent from an if check used to actually list
tags. The patch fixes the oversight, and adds a proper error message in
case the issue occurs again for a new tag type.
Signed-off-by: default avatarHrvoje Ribicic <riba@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 9d0b521e
......@@ -1500,7 +1500,8 @@ class _R_Tags(baserlib.OpcodeResource):
if kind in (constants.TAG_INSTANCE,
constants.TAG_NODEGROUP,
constants.TAG_NODE):
constants.TAG_NODE,
constants.TAG_NETWORK):
if not self.name:
raise http.HttpBadRequest("Missing name on tag request")
......@@ -1513,6 +1514,9 @@ class _R_Tags(baserlib.OpcodeResource):
ssc = ssconf.SimpleStore()
tags = ssc.GetClusterTags()
else:
raise http.HttpBadRequest("Unhandled tag type!")
return list(tags)
def GetPutOpInput(self):
......
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