Skip to content
Snippets Groups Projects
Commit 3ae715ec authored by Seblu's avatar Seblu
Browse files

naive implementation of stop command

parent de561f32
No related branches found
No related tags found
No related merge requests found
......@@ -151,7 +151,7 @@ class Command(object):
cmd_rcmd.desc = "Print remote command list"
def cmd_list(self, argv):
'''List something'''
'''List objects'''
if len(argv) == 1:
argv.append("")
items = self.cli.rpc.list(str.join("", argv[1:]))
......@@ -159,6 +159,18 @@ class Command(object):
pprint.pprint(item)
#for key, val in item.items():
# printer.out("%s: %s "%(key, val))
cmd_list.usage = "list [tags]"
cmd_list.usage = "list [tql]"
cmd_list.desc = "Print information about tags"
def cmd_stop(self, argv):
'''Stop an object'''
if len(argv) == 0:
raise BadArgument()
tql = str.join("", argv[1:])
items = self.cli.rpc.list(tql)
for item in items:
pprint.pprint(item)
if raw_input("Are you sure? (yes/no)") == "yes":
items = self.cli.rpc.stop(tql)
cmd_stop.usage = "stop [tql]"
cmd_stop.desc = "Stop objects"
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