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

rapi: fix tag operations

This patch fixes the tag PUT/DELETE operations, and additionally changes
the _Tags_* functions to take only positional and not keyword arguments
(the defaults do not make any sense at all, and they are always called
with all arguments).
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 920a91bf
......@@ -80,7 +80,7 @@ def MapFields(names, data):
return dict(zip(names, data))
def _Tags_GET(kind, name=""):
def _Tags_GET(kind, name):
"""Helper function to retrieve tags.
......@@ -103,18 +103,20 @@ def _Tags_GET(kind, name=""):
return list(tags)
def _Tags_PUT(kind, tags, name=""):
def _Tags_PUT(kind, tags, name, dry_run):
"""Helper function to set tags.
return SubmitJob([opcodes.OpAddTags(kind=kind, name=name, tags=tags)])
return SubmitJob([opcodes.OpAddTags(kind=kind, name=name,
tags=tags, dry_run=dry_run)])
def _Tags_DELETE(kind, tags, name=""):
def _Tags_DELETE(kind, tags, name, dry_run):
"""Helper function to delete tags.
return SubmitJob([opcodes.OpDelTags(kind=kind, name=name, tags=tags)])
return SubmitJob([opcodes.OpDelTags(kind=kind, name=name,
tags=tags, dry_run=dry_run)])
def MapBulkFields(itemslist, fields):
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