Daniel Verkamp df897ed490 scripts/rpc.py: move printing into main rpc.py
The modules in scripts/rpc/*.py should be a generic, reusable library;
the printing should be done by the command-line frontend (rpc.py)
instead of the library code.

Change-Id: Ibeb022a3591f0a140fc43104d8dcf17d7041e48b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/404426
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-26 00:57:53 -04:00

13 lines
384 B
Python
Executable File

def add_ip_address(args):
params = {'ifc_index': args.ifc_index, 'ip_address': args.ip_addr}
return args.client.call('add_ip_address', params)
def delete_ip_address(args):
params = {'ifc_index': args.ifc_index, 'ip_address': args.ip_addr}
return args.client.call('delete_ip_address', params)
def get_interfaces(args):
return args.client.call('get_interfaces')