Spdk/scripts/rpc/pmem.py
Daniel Verkamp 96dc91d608 scripts/rpc.py: pass client as separate parameter
Split client out of the args object and pass it as the first parameter
to all RPC methods instead.  This is a step toward decoupling the
rpc/*.py interface from the argparse front end.

Change-Id: Ib030862e0c79112e5c9acdde295d68983126a987
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405502
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-30 16:48:47 -04:00

17 lines
542 B
Python
Executable File

def create_pmem_pool(client, 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 client.call('create_pmem_pool', params)
def pmem_pool_info(client, args):
params = {'pmem_file': args.pmem_file}
return client.call('pmem_pool_info', params)
def delete_pmem_pool(client, args):
params = {'pmem_file': args.pmem_file}
return client.call('delete_pmem_pool', params)