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>
17 lines
533 B
Python
Executable File
17 lines
533 B
Python
Executable File
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}
|
|
return args.client.call('create_pmem_pool', params)
|
|
|
|
|
|
def pmem_pool_info(args):
|
|
params = {'pmem_file': args.pmem_file}
|
|
return args.client.call('pmem_pool_info', params)
|
|
|
|
|
|
def delete_pmem_pool(args):
|
|
params = {'pmem_file': args.pmem_file}
|
|
return args.client.call('delete_pmem_pool', params)
|