Spdk/python/spdk/rpc/pmem.py
Jim Harris 8d515e0243 python: remove unneeded deprecated_alias imports
We removed all of the existing deprecated aliases
recently, but didn't remove the associated imports.

Found by lgtm.com.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2b8526254da26ad4a9b34eb67b155dacfe9a5e57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12862
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-06-03 16:06:33 +00:00

30 lines
931 B
Python

def bdev_pmem_create_pool(client, pmem_file, num_blocks, block_size):
"""Create pmem pool at specified path.
Args:
pmem_file: path at which to create pmem pool
num_blocks: number of blocks for created pmem pool file
block_size: block size for pmem pool file
"""
params = {'pmem_file': pmem_file,
'num_blocks': num_blocks,
'block_size': block_size}
return client.call('bdev_pmem_create_pool', params)
def bdev_pmem_get_pool_info(client, pmem_file):
"""Get details about pmem pool.
Args:
pmem_file: path to pmem pool
"""
params = {'pmem_file': pmem_file}
return client.call('bdev_pmem_get_pool_info', params)
def bdev_pmem_delete_pool(client, pmem_file):
"""Delete pmem pool.
Args:
pmem_file: path to pmem pool
"""
params = {'pmem_file': pmem_file}
return client.call('bdev_pmem_delete_pool', params)