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>
20 lines
578 B
Python
Executable File
20 lines
578 B
Python
Executable File
from client import print_dict, print_array, int_arg
|
|
|
|
|
|
def create_pmem_pool(args):
|
|
num_blocks = (args.total_size * 1024 * 1024) / args.block_size
|
|
params = {'pmem_file': args.pmem_file,
|
|
'num_blocks': num_blocks,
|
|
'block_size': args.block_size}
|
|
args.client.call('create_pmem_pool', params)
|
|
|
|
|
|
def pmem_pool_info(args):
|
|
params = {'pmem_file': args.pmem_file}
|
|
print_dict(args.client.call('pmem_pool_info', params))
|
|
|
|
|
|
def delete_pmem_pool(args):
|
|
params = {'pmem_file': args.pmem_file}
|
|
args.client.call('delete_pmem_pool', params)
|