spdkcli: fix pmem_pool_info command

`pmem_pool_info` was incorrectly set to invoke
  `delete_pmem_pool` RPC method.

The name of command was also incorrect - "info_pmem_pool"
  instead of "pmem_pool_info", where
  latter is the original name of RPC method.

This patch fixes both issues with `pmem_pool_info`.

This bug has not been caught because
  there are no tests for `pmem_pool_info` command yet.

Change-Id: Icc207bc3a7cf6c817cb079137d7b473f52186a84
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460840
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Vitaliy Mysak 2019-07-08 23:17:50 +00:00 committed by Darek Stojaczyk
parent 0c7ce64f3a
commit 10b8e7cf3e
2 changed files with 8 additions and 3 deletions

View File

@ -437,9 +437,9 @@ class UIPmemBdev(UIBdev):
def ui_command_delete_pmem_pool(self, pmem_file):
self.get_root().delete_pmem_pool(pmem_file=pmem_file)
def ui_command_info_pmem_pool(self, pmem_file):
ret = self.get_root().delete_pmem_pool(pmem_file=pmem_file)
self.shell.log.info(ret)
def ui_command_pmem_pool_info(self, pmem_file):
ret = self.get_root().pmem_pool_info(pmem_file=pmem_file)
self.shell.log.info(json.dumps(ret, indent=2))
def ui_command_create(self, pmem_file, name):
ret_name = self.get_root().create_pmem_bdev(pmem_file=pmem_file,

View File

@ -214,6 +214,11 @@ class UIRoot(UINode):
def delete_pmem_pool(self, **kwargs):
rpc.pmem.delete_pmem_pool(self.client, **kwargs)
@verbose
def pmem_pool_info(self, **kwargs):
response = rpc.pmem.pmem_pool_info(self.client, **kwargs)
return response
@verbose
def create_pmem_bdev(self, **kwargs):
response = rpc.bdev.construct_pmem_bdev(self.client, **kwargs)