Skip to content
Snippets Groups Projects
Commit 277dee55 authored by Seblu's avatar Seblu
Browse files

command tags

fix addtag and deltag usage
parent f66efb4c
No related branches found
No related tags found
No related merge requests found
......@@ -292,8 +292,20 @@ class Command(object):
self.printer.out("%s: %ss"%(o["a"],o["con"]))
cmd_uptime.usage = "uptime [login]"
def cmd_tags(self, argv):
'''List static tags on an account (current by default)'''
if len(argv) == 1:
argv.append(self.cli.settings["login"])
for a in argv:
try:
tl = self.cli.rpc.tags(a)
self.printer.out("%s: %s"%(a, tl))
except RpcError as e:
raise cmdError("RPCError: %s"%str(e))
cmd_tags.usage = "tags [account]"
def cmd_addtag(self, argv):
'''Add/Modify a tag on an account'''
'''Add/Modify a static tag on an account'''
if len(argv) != 4:
raise cmdBadArgument()
try:
......@@ -303,7 +315,7 @@ class Command(object):
cmd_addtag.usage = "addtag <account> <tag> <value>"
def cmd_deltag(self, argv):
'''Delete a tag from an user'''
'''Delete a static tag from an user'''
if len(argv) != 3:
raise cmdBadArgument()
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment