Commit 2c49e910 authored by Maciej Wawryk's avatar Maciej Wawryk Committed by Ben Walker
Browse files

RPC: rename rpc get_bdevs to bdev_get_bdevs

parent 326e68fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ command parameter.

# General Purpose RPCs {#bdev_ug_general_rpcs}

## get_bdevs {#bdev_ug_get_bdevs}
## bdev_get_bdevs {#bdev_ug_get_bdevs}

List of currently available block devices including detailed information about
them can be get by using `get_bdevs` RPC command. User can add optional
them can be get by using `bdev_get_bdevs` RPC command. User can add optional
parameter `name` to get details about specified by that name bdev.

Example response
+3 −3
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ Example response:
    "set_iscsi_options",
    "set_bdev_options",
    "set_bdev_qos_limit",
    "get_bdevs",
    "bdev_get_bdevs",
    "bdev_get_iostat",
    "get_subsystem_config",
    "get_subsystems",
@@ -565,7 +565,7 @@ Example response:
}
~~~

## get_bdevs {#rpc_get_bdevs}
## bdev_get_bdevs {#rpc_bdev_get_bdevs}

Get information about block devices (bdevs).

@@ -590,7 +590,7 @@ Example request:
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "get_bdevs",
  "method": "bdev_get_bdevs",
  "params": {
    "name": "Malloc0"
  }
+2 −2
Original line number Diff line number Diff line
@@ -26,14 +26,14 @@ Status 200 with resultant JSON object included on success.

## Client side

Below is a sample python script acting as a client side. It sends `get_bdevs` method with optional `name` parameter and prints JSON object returned from remote_rpc script.
Below is a sample python script acting as a client side. It sends `bdev_get_bdevs` method with optional `name` parameter and prints JSON object returned from remote_rpc script.

~~~
import json
import requests

if __name__ == '__main__':
	payload = {'id':1, 'method': 'get_bdevs', 'params': {'name': 'Malloc0'}}
	payload = {'id':1, 'method': 'bdev_get_bdevs', 'params': {'name': 'Malloc0'}}
	url = 'http://192.168.0.2:8000/'
	req = requests.post(url,
                        data=json.dumps(payload),
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ bdev_lvol_create [-h] [-u UUID] [-l LVS_NAME] [-t] [-c CLEAR_METHOD] lvol_name s
    optional arguments:
    -h, --help  show help
    -c, --clear-method specify data clusters clear method "none", "unmap" (default), "write_zeroes"
get_bdevs [-h] [-b NAME]
bdev_get_bdevs [-h] [-b NAME]
    User can view created bdevs using this call including those created on top of lvols.
    optional arguments:
    -h, --help  show help
+1 −1
Original line number Diff line number Diff line
@@ -1027,7 +1027,7 @@ vbdev_compress_get_io_channel(void *ctx)
	return spdk_get_io_channel(comp_bdev);
}

/* This is the output for get_bdevs() for this vbdev */
/* This is the output for bdev_get_bdevs() for this vbdev */
static int
vbdev_compress_dump_info_json(void *ctx, struct spdk_json_write_ctx *w)
{
Loading