Spdk/python/spdk/rpc/pmem.py
Mike Gerdts 555ca7adc0 rpc: fix python style
A bunch of python files in rpc and scripts directories were missing two
blank lines after the opening comments. python3-pycodestyle-2.5.0-2.el8
was unhappy with this

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iee7f2bd4f0ddd96b2be89949a3aa324b2f9ea43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16003
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-12-21 09:32:24 +00:00

35 lines
1.0 KiB
Python

# SPDX-License-Identifier: BSD-3-Clause
# Copyright (C) 2017 Intel Corporation.
# All rights reserved.
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)