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>
16 lines
429 B
Python
Executable File
16 lines
429 B
Python
Executable File
from client import print_dict, print_array, int_arg
|
|
|
|
|
|
def add_ip_address(args):
|
|
params = {'ifc_index': args.ifc_index, 'ip_address': args.ip_addr}
|
|
args.client.call('add_ip_address', params)
|
|
|
|
|
|
def delete_ip_address(args):
|
|
params = {'ifc_index': args.ifc_index, 'ip_address': args.ip_addr}
|
|
args.client.call('delete_ip_address', params)
|
|
|
|
|
|
def get_interfaces(args):
|
|
print_dict(args.client.call('get_interfaces'))
|