ceph/teuthology/task/interactive.py

17 lines
405 B
Python
Raw Normal View History

2011-06-02 22:04:01 +00:00
import code
import readline
import rlcompleter
rlcompleter.__name__ # silence pyflakes
readline.parse_and_bind('tab: complete')
def task(ctx, config):
code.interact(
banner='Ceph test interactive mode, use ctx to interact with the cluster, press control-D to exit...',
# TODO simplify this
local=dict(
ctx=ctx,
config=config,
),
)