support list all agents/tracers
Change-Id: I77de64944895031db5fcf4712174b52c41d4c555
This commit is contained in:
parent
c73eb9cb8d
commit
97b8879739
13
scalpels/cli/actions/agent.py
Normal file
13
scalpels/cli/actions/agent.py
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env python
|
||||
#-*- coding:utf-8 -*-
|
||||
# Author: Kun Huang <academicgareth@gmail.com>
|
||||
|
||||
from scalpels.cli.actions.start import agents_map
|
||||
from prettytable import PrettyTable
|
||||
|
||||
|
||||
def run(config):
|
||||
t = PrettyTable(["tracer", "tracer script"])
|
||||
for ag in agents_map:
|
||||
t.add_row([ag, agents_map[ag]])
|
||||
print t
|
@ -49,6 +49,11 @@ def main():
|
||||
result.add_argument("--html", action="store_true", dest="html", help="report html to stdout instead of pretty print")
|
||||
result.add_argument("--short", action="store_true", dest="short", help="report uuid only")
|
||||
|
||||
# agent command
|
||||
agent = subparsers.add_parser("agent")
|
||||
agent.add_argument("-l", "--list", action="store_true", dest="list", help="list all agents")
|
||||
|
||||
|
||||
parser = rootparser.parse_args()
|
||||
try:
|
||||
run(parser)
|
||||
|
@ -13,6 +13,7 @@ function debug_msg {
|
||||
}
|
||||
|
||||
function basic_test {
|
||||
sca agent -l
|
||||
sca start -a rpc -a rabbit -a traffic
|
||||
|
||||
sca load --storm
|
||||
|
Loading…
x
Reference in New Issue
Block a user