a54e7e584b
Rather than requiring the 'verbose' flag as a parameter to JSONRPCClient.call(), move it to the JSONRPCClient constructor so that it can be set once. This fixes the inconsistency between RPC method wrappers that passed args.verbose and those that didn't; now, rpc.py -v works reliably for all methods. The JSONRPCClient.call() verbose parameter is maintained as well to allow individual calls to be set to verbose if desired. Change-Id: Iee385510cc9eb1d2984d3b9982055789dff188c6 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/398508 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
15 lines
392 B
Python
Executable File
15 lines
392 B
Python
Executable File
from client import print_dict, print_array, int_arg
|
|
|
|
|
|
def kill_instance(args):
|
|
params = {'sig_name': args.sig_name}
|
|
args.client.call('kill_instance', params)
|
|
|
|
def context_switch_monitor(args):
|
|
params = {}
|
|
if args.enable:
|
|
params['enabled'] = True
|
|
if args.disable:
|
|
params['enabled'] = False
|
|
print_dict(args.client.call('context_switch_monitor', params))
|