The top level client is unchanged. This is primarily just moving code around. The client.py file is the only location with new code, which converts the old jsonrpc_call function into a class. Change-Id: I5fb7cd48f77f6affa3d9439128009bf63148acda Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/364316 Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
16 lines
495 B
Python
Executable File
16 lines
495 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, verbose=args.verbose)
|
|
|
|
|
|
def delete_ip_address(args):
|
|
params = {'ifc_index': args.ifc_index, 'ip_address': args.ip_addr}
|
|
args.client.call('delete_ip_address', params, verbose=args.verbose)
|
|
|
|
|
|
def get_interfaces(args):
|
|
print_dict(args.client.call('get_interfaces', verbose=args.verbose))
|