RPC: rename set_nvmf_target_max_subsystems to nvmf_set_max_subsystems

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I318070b843dddfaa79cf37f1a5d0356fee38e81c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469112
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:29:33 +02:00 committed by Jim Harris
parent 16a47c39be
commit a1a8585c5c
9 changed files with 22 additions and 19 deletions

View File

@ -4172,7 +4172,7 @@ Example response:
}
~~~
## set_nvmf_target_max_subsystems {#rpc_set_nvmf_target_max_subsystems}
## nvmf_set_max_subsystems {#rpc_nvmf_set_max_subsystems}
Set the maximum allowed subsystems for the NVMe-oF target. This RPC may only be called
before SPDK subsystems have been initialized.
@ -4191,7 +4191,7 @@ Example request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "set_nvmf_target_max_subsystems",
"method": "nvmf_set_max_subsystems",
"params": {
"max_subsystems": 1024
}

View File

@ -506,7 +506,7 @@ spdk_nvmf_tgt_write_config_json(struct spdk_json_write_ctx *w, struct spdk_nvmf_
struct spdk_nvmf_transport *transport;
spdk_json_write_object_begin(w);
spdk_json_write_named_string(w, "method", "set_nvmf_target_max_subsystems");
spdk_json_write_named_string(w, "method", "nvmf_set_max_subsystems");
spdk_json_write_named_object_begin(w, "params");
spdk_json_write_named_uint32(w, "max_subsystems", tgt->max_subsystems);

View File

@ -41,8 +41,8 @@ static const struct spdk_json_object_decoder nvmf_rpc_subsystem_tgt_opts_decoder
};
static void
spdk_rpc_set_nvmf_target_max_subsystems(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
spdk_rpc_nvmf_set_max_subsystems(struct spdk_jsonrpc_request *request,
const struct spdk_json_val *params)
{
struct spdk_json_write_ctx *w;
uint32_t max_subsystems = 0;
@ -70,8 +70,9 @@ spdk_rpc_set_nvmf_target_max_subsystems(struct spdk_jsonrpc_request *request,
spdk_json_write_bool(w, true);
spdk_jsonrpc_end_result(request, w);
}
SPDK_RPC_REGISTER("set_nvmf_target_max_subsystems", spdk_rpc_set_nvmf_target_max_subsystems,
SPDK_RPC_REGISTER("nvmf_set_max_subsystems", spdk_rpc_nvmf_set_max_subsystems,
SPDK_RPC_STARTUP)
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(nvmf_set_max_subsystems, set_nvmf_target_max_subsystems)
static int decode_conn_sched(const struct spdk_json_val *val, void *out)
{

View File

@ -30,7 +30,7 @@ iscsi_dict["iscsi_create_target_node"] = []
nvmf_dict = OrderedDict()
nvmf_dict["set_nvmf_target_config"] = []
nvmf_dict["set_nvmf_target_max_subsystems"] = []
nvmf_dict["nvmf_set_max_subsystems"] = []
nvmf_dict["subsystems"] = []
@ -305,7 +305,7 @@ def get_nvmf_options_json(config, section):
})
nvmf_json.append({
"params": to_json_params(params[1:7]),
"method": "set_nvmf_target_max_subsystems"
"method": "nvmf_set_max_subsystems"
})
return nvmf_json

View File

@ -1541,13 +1541,14 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.set_defaults(func=net_get_interfaces)
# NVMe-oF
def set_nvmf_target_max_subsystems(args):
rpc.nvmf.set_nvmf_target_max_subsystems(args.client,
max_subsystems=args.max_subsystems)
def nvmf_set_max_subsystems(args):
rpc.nvmf.nvmf_set_max_subsystems(args.client,
max_subsystems=args.max_subsystems)
p = subparsers.add_parser('set_nvmf_target_max_subsystems', help='Set the maximum number of NVMf target subsystems')
p = subparsers.add_parser('nvmf_set_max_subsystems', aliases=['set_nvmf_target_max_subsystems'],
help='Set the maximum number of NVMf target subsystems')
p.add_argument('-x', '--max-subsystems', help='Max number of NVMf subsystems', type=int, required=True)
p.set_defaults(func=set_nvmf_target_max_subsystems)
p.set_defaults(func=nvmf_set_max_subsystems)
def set_nvmf_target_config(args):
rpc.nvmf.set_nvmf_target_config(args.client,

View File

@ -1,8 +1,9 @@
from .helpers import deprecated_alias
def set_nvmf_target_max_subsystems(client,
max_subsystems=None):
@deprecated_alias('set_nvmf_target_max_subsystems')
def nvmf_set_max_subsystems(client,
max_subsystems=None):
"""Set NVMe-oF target options.
Args:
@ -14,7 +15,7 @@ def set_nvmf_target_max_subsystems(client,
params = {}
params['max_subsystems'] = max_subsystems
return client.call('set_nvmf_target_max_subsystems', params)
return client.call('nvmf_set_max_subsystems', params)
def set_nvmf_target_config(client,

View File

@ -185,7 +185,7 @@
"params": {
"max_subsystems": 1024
},
"method": "set_nvmf_target_max_subsystems"
"method": "nvmf_set_max_subsystems"
},
{
"params": {

View File

@ -91,7 +91,7 @@
"params": {
"max_subsystems": 1024
},
"method": "set_nvmf_target_max_subsystems"
"method": "nvmf_set_max_subsystems"
}
]
},

View File

@ -25,7 +25,7 @@ def filter_methods(do_remove_global_rpcs):
global_rpcs = [
'iscsi_set_options',
'set_nvmf_target_config',
'set_nvmf_target_max_subsystems',
'nvmf_set_max_subsystems',
'nvmf_create_transport',
'bdev_set_options',
'bdev_nvme_set_options',