Commit cebd85d8 authored by Iustin Pop's avatar Iustin Pop
Browse files

Switch RAPI to use same tags listing as CLI

Currently, RAPI uses queries (as in QueryNode with field tags) for
getting the tags, whereas the CLI uses the QueryTags Luxi
command. Since this discrepancy is not good, let's switch RAPI to use
the same method as the CLI.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarAgata Murawska <>
parent 4cd428db
......@@ -1340,16 +1340,7 @@ class _R_Tags(baserlib.OpcodeResource):
raise http.HttpBadRequest("Missing name on tag request")
cl = self.GetClient()
if kind == constants.TAG_INSTANCE:
fn = cl.QueryInstances
elif kind == constants.TAG_NODEGROUP:
fn = cl.QueryGroups
fn = cl.QueryNodes
result = fn(names=[], fields=["tags"], use_locking=False)
if not result or not result[0]:
raise http.HttpBadGateway("Invalid response from tag query")
tags = result[0][0]
tags = list(cl.QueryTags(kind,
elif kind == constants.TAG_CLUSTER:
assert not
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