RPC: rename set_nvmf_target_config to nvmf_set_config

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id928d48283224ea30760d2cbfcf5b2a3452b3add
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469113
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Maciej Wawryk 2019-09-23 12:35:43 +02:00 committed by Jim Harris
parent a1a8585c5c
commit 93d6b7bef4
9 changed files with 24 additions and 21 deletions

View File

@ -4208,7 +4208,7 @@ Example response:
}
~~~
## set_nvmf_target_config {#rpc_set_nvmf_target_config}
## nvmf_set_config {#rpc_nvmf_set_config}
Set global configuration of NVMe-oF target. This RPC may only be called before SPDK subsystems
have been initialized.
@ -4227,7 +4227,7 @@ Example request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "set_nvmf_target_config",
"method": "nvmf_set_config",
"params": {
"acceptor_poll_rate": 10000
}

View File

@ -98,8 +98,8 @@ static const struct spdk_json_object_decoder nvmf_rpc_subsystem_tgt_conf_decoder
};
static void
spdk_rpc_set_nvmf_target_config(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_set_config(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_nvmf_tgt_conf *conf;
struct spdk_json_write_ctx *w;
@ -139,4 +139,5 @@ spdk_rpc_set_nvmf_target_config(struct spdk_jsonrpc_request *request,
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("set_nvmf_target_config", spdk_rpc_set_nvmf_target_config, SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER("nvmf_set_config", spdk_rpc_nvmf_set_config, SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(nvmf_set_config, set_nvmf_target_config)

View File

@ -528,7 +528,7 @@ spdk_nvmf_subsystem_write_config_json(struct spdk_json_write_ctx *w)
spdk_json_write_array_begin(w);
spdk_json_write_object_begin(w);
spdk_json_write_named_string(w, "method", "set_nvmf_target_config");
spdk_json_write_named_string(w, "method", "nvmf_set_config");
spdk_json_write_named_object_begin(w, "params");
spdk_json_write_named_uint32(w, "acceptor_poll_rate", g_spdk_nvmf_tgt_conf->acceptor_poll_rate);

View File

@ -29,7 +29,7 @@ iscsi_dict["iscsi_create_initiator_group"] = []
iscsi_dict["iscsi_create_target_node"] = []
nvmf_dict = OrderedDict()
nvmf_dict["set_nvmf_target_config"] = []
nvmf_dict["nvmf_set_config"] = []
nvmf_dict["nvmf_set_max_subsystems"] = []
nvmf_dict["subsystems"] = []
@ -301,7 +301,7 @@ def get_nvmf_options_json(config, section):
nvmf_json = []
nvmf_json.append({
"params": to_json_params([params[0]]),
"method": "set_nvmf_target_config"
"method": "nvmf_set_config"
})
nvmf_json.append({
"params": to_json_params(params[1:7]),

View File

@ -1550,18 +1550,19 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument('-x', '--max-subsystems', help='Max number of NVMf subsystems', type=int, required=True)
p.set_defaults(func=nvmf_set_max_subsystems)
def set_nvmf_target_config(args):
rpc.nvmf.set_nvmf_target_config(args.client,
acceptor_poll_rate=args.acceptor_poll_rate,
conn_sched=args.conn_sched)
def nvmf_set_config(args):
rpc.nvmf.nvmf_set_config(args.client,
acceptor_poll_rate=args.acceptor_poll_rate,
conn_sched=args.conn_sched)
p = subparsers.add_parser('set_nvmf_target_config', help='Set NVMf target config')
p = subparsers.add_parser('nvmf_set_config', aliases=['set_nvmf_target_config'],
help='Set NVMf target config')
p.add_argument('-r', '--acceptor-poll-rate', help='Polling interval of the acceptor for incoming connections (usec)', type=int)
p.add_argument('-s', '--conn-sched', help="""'roundrobin' - Schedule the incoming connections from any host
on the cores in a round robin manner (Default). 'hostip' - Schedule all the incoming connections from a
specific host IP on to the same core. Connections from different IP will be assigned to cores in a round
robin manner. 'transport' - Schedule the connection according to the transport characteristics.""")
p.set_defaults(func=set_nvmf_target_config)
p.set_defaults(func=nvmf_set_config)
def nvmf_create_target(args):
print_dict(rpc.nvmf.nvmf_create_target(args.client,

View File

@ -18,9 +18,10 @@ def nvmf_set_max_subsystems(client,
return client.call('nvmf_set_max_subsystems', params)
def set_nvmf_target_config(client,
acceptor_poll_rate=None,
conn_sched=None):
@deprecated_alias('set_nvmf_target_config')
def nvmf_set_config(client,
acceptor_poll_rate=None,
conn_sched=None):
"""Set NVMe-oF target subsystem configuration.
Args:
@ -36,7 +37,7 @@ def set_nvmf_target_config(client,
params['acceptor_poll_rate'] = acceptor_poll_rate
if conn_sched:
params['conn_sched'] = conn_sched
return client.call('set_nvmf_target_config', params)
return client.call('nvmf_set_config', params)
def nvmf_create_target(client,

View File

@ -179,7 +179,7 @@
"params": {
"acceptor_poll_rate": 10000
},
"method": "set_nvmf_target_config"
"method": "nvmf_set_config"
},
{
"params": {

View File

@ -85,7 +85,7 @@
"params": {
"acceptor_poll_rate": 10000
},
"method": "set_nvmf_target_config"
"method": "nvmf_set_config"
},
{
"params": {

View File

@ -24,7 +24,7 @@ def sort_json_object(o):
def filter_methods(do_remove_global_rpcs):
global_rpcs = [
'iscsi_set_options',
'set_nvmf_target_config',
'nvmf_set_config',
'nvmf_set_max_subsystems',
'nvmf_create_transport',
'bdev_set_options',