Newer
Older
'''
from cccli.exception import *
from sjrpc.core.exceptions import *
from cccli.printer import Printer, color
from cccli.command.command import TqlCommand
def __init__(self, cli, argv0):
TqlCommand.__init__(self, cli, argv0)
self.set_usage("%prog [options] <tql> <command>")
self.tql_filter += "&con&r~'host|hv'"
# arg parse
self.parse_args(argv)
if len(self.args) != 2:
self.rpccall("execute", self.args[0], self.args[1], _callback=self._cb_print_output)
def _cb_print_output(self, d):
'''Print output of execute by object'''