RPC: rename get_nvmf_subsystems to nvmf_get_subsystems
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: Ief52fefa547535b23f2a191b1dbc9b9659893c09 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468955 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
8e052bf41b
commit
80a0c5be99
@ -3776,7 +3776,7 @@ Example response:
|
||||
}
|
||||
~~~
|
||||
|
||||
## get_nvmf_subsystems method {#rpc_get_nvmf_subsystems}
|
||||
## nvmf_get_subsystems method {#rpc_nvmf_get_subsystems}
|
||||
|
||||
### Parameters
|
||||
|
||||
@ -3792,7 +3792,7 @@ Example request:
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"method": "get_nvmf_subsystems"
|
||||
"method": "nvmf_get_subsystems"
|
||||
}
|
||||
~~~
|
||||
|
||||
|
@ -299,7 +299,7 @@ dump_nvmf_subsystem(struct spdk_json_write_ctx *w, struct spdk_nvmf_subsystem *s
|
||||
}
|
||||
|
||||
static void
|
||||
spdk_rpc_get_nvmf_subsystems(struct spdk_jsonrpc_request *request,
|
||||
spdk_rpc_nvmf_get_subsystems(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct rpc_get_subsystem req = { 0 };
|
||||
@ -336,7 +336,8 @@ spdk_rpc_get_nvmf_subsystems(struct spdk_jsonrpc_request *request,
|
||||
spdk_jsonrpc_end_result(request, w);
|
||||
free(req.tgt_name);
|
||||
}
|
||||
SPDK_RPC_REGISTER("get_nvmf_subsystems", spdk_rpc_get_nvmf_subsystems, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("nvmf_get_subsystems", spdk_rpc_nvmf_get_subsystems, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(nvmf_get_subsystems, get_nvmf_subsystems)
|
||||
|
||||
struct rpc_subsystem_create {
|
||||
char *nqn;
|
||||
|
@ -528,7 +528,7 @@ class SPDKTarget(Target):
|
||||
adrfam="ipv4")
|
||||
|
||||
self.log_print("SPDK NVMeOF subsystem configuration:")
|
||||
rpc.client.print_dict(rpc.nvmf.get_nvmf_subsystems(self.client))
|
||||
rpc.client.print_dict(rpc.nvmf.nvmf_get_subsystems(self.client))
|
||||
|
||||
def tgt_start(self):
|
||||
self.subsys_no = get_nvme_devices_count()
|
||||
|
@ -1624,13 +1624,13 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
p.add_argument('-t', '--tgt_name', help='The name of the parent NVMe-oF target (optional)', type=str)
|
||||
p.set_defaults(func=get_nvmf_transports)
|
||||
|
||||
def get_nvmf_subsystems(args):
|
||||
print_dict(rpc.nvmf.get_nvmf_subsystems(args.client, tgt_name=args.tgt_name))
|
||||
def nvmf_get_subsystems(args):
|
||||
print_dict(rpc.nvmf.nvmf_get_subsystems(args.client, tgt_name=args.tgt_name))
|
||||
|
||||
p = subparsers.add_parser('get_nvmf_subsystems',
|
||||
p = subparsers.add_parser('nvmf_get_subsystems', aliases=['get_nvmf_subsystems'],
|
||||
help='Display nvmf subsystems')
|
||||
p.add_argument('-t', '--tgt_name', help='The name of the parent NVMe-oF target (optional)', type=str)
|
||||
p.set_defaults(func=get_nvmf_subsystems)
|
||||
p.set_defaults(func=nvmf_get_subsystems)
|
||||
|
||||
def nvmf_subsystem_create(args):
|
||||
rpc.nvmf.nvmf_subsystem_create(args.client,
|
||||
|
@ -1,3 +1,6 @@
|
||||
from .helpers import deprecated_alias
|
||||
|
||||
|
||||
def set_nvmf_target_max_subsystems(client,
|
||||
max_subsystems=None):
|
||||
"""Set NVMe-oF target options.
|
||||
@ -159,7 +162,8 @@ def get_nvmf_transports(client, tgt_name=None):
|
||||
return client.call('get_nvmf_transports', params)
|
||||
|
||||
|
||||
def get_nvmf_subsystems(client, tgt_name=None):
|
||||
@deprecated_alias('get_nvmf_subsystems')
|
||||
def nvmf_get_subsystems(client, tgt_name=None):
|
||||
"""Get list of NVMe-oF subsystems.
|
||||
Args:
|
||||
tgt_name: name of the parent NVMe-oF target (optional).
|
||||
@ -175,7 +179,7 @@ def get_nvmf_subsystems(client, tgt_name=None):
|
||||
'tgt_name': tgt_name,
|
||||
}
|
||||
|
||||
return client.call('get_nvmf_subsystems', params)
|
||||
return client.call('nvmf_get_subsystems', params)
|
||||
|
||||
|
||||
def nvmf_subsystem_create(client,
|
||||
|
@ -68,7 +68,7 @@ class UINVMfSubsystems(UINode):
|
||||
|
||||
def refresh(self):
|
||||
self._children = set([])
|
||||
for subsystem in self.get_root().get_nvmf_subsystems():
|
||||
for subsystem in self.get_root().nvmf_get_subsystems():
|
||||
UINVMfSubsystem(subsystem, self)
|
||||
|
||||
def delete(self, subsystem_nqn):
|
||||
@ -129,7 +129,7 @@ class UINVMfSubsystem(UINode):
|
||||
UINVMfSubsystemNamespaces(self.subsystem.namespaces, self)
|
||||
|
||||
def refresh_node(self):
|
||||
for subsystem in self.get_root().get_nvmf_subsystems():
|
||||
for subsystem in self.get_root().nvmf_get_subsystems():
|
||||
if subsystem.nqn == self.subsystem.nqn:
|
||||
self.subsystem = subsystem
|
||||
self.refresh()
|
||||
@ -173,7 +173,7 @@ class UINVMfSubsystemListeners(UINode):
|
||||
UINVMfSubsystemListener(address, self)
|
||||
|
||||
def refresh_node(self):
|
||||
for subsystem in self.get_root().get_nvmf_subsystems():
|
||||
for subsystem in self.get_root().nvmf_get_subsystems():
|
||||
if subsystem.nqn == self.parent.subsystem.nqn:
|
||||
self.listen_addresses = subsystem.listen_addresses
|
||||
self.refresh()
|
||||
@ -244,7 +244,7 @@ class UINVMfSubsystemHosts(UINode):
|
||||
UINVMfSubsystemHost(host, self)
|
||||
|
||||
def refresh_node(self):
|
||||
for subsystem in self.get_root().get_nvmf_subsystems():
|
||||
for subsystem in self.get_root().nvmf_get_subsystems():
|
||||
if subsystem.nqn == self.parent.subsystem.nqn:
|
||||
self.hosts = subsystem.hosts
|
||||
self.refresh()
|
||||
@ -303,7 +303,7 @@ class UINVMfSubsystemNamespaces(UINode):
|
||||
UINVMfSubsystemNamespace(namespace, self)
|
||||
|
||||
def refresh_node(self):
|
||||
for subsystem in self.get_root().get_nvmf_subsystems():
|
||||
for subsystem in self.get_root().nvmf_get_subsystems():
|
||||
if subsystem.nqn == self.parent.subsystem.nqn:
|
||||
self.namespaces = subsystem.namespaces
|
||||
self.refresh()
|
||||
|
@ -318,11 +318,11 @@ class UIRoot(UINode):
|
||||
|
||||
def list_nvmf_subsystems(self):
|
||||
if self.is_init:
|
||||
self.current_nvmf_subsystems = rpc.nvmf.get_nvmf_subsystems(self.client)
|
||||
self.current_nvmf_subsystems = rpc.nvmf.nvmf_get_subsystems(self.client)
|
||||
|
||||
@verbose
|
||||
@is_method_available
|
||||
def get_nvmf_subsystems(self):
|
||||
def nvmf_get_subsystems(self):
|
||||
if self.is_init:
|
||||
self.list_nvmf_subsystems()
|
||||
for subsystem in self.current_nvmf_subsystems:
|
||||
|
@ -18,7 +18,7 @@ $rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK0000000000000
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
$rpc_py get_nvmf_subsystems
|
||||
$rpc_py nvmf_get_subsystems
|
||||
|
||||
AER_TOUCH_FILE=/tmp/aer_touch_file
|
||||
rm -f $AER_TOUCH_FILE
|
||||
@ -38,7 +38,7 @@ waitforfile $AER_TOUCH_FILE
|
||||
# Add a new namespace
|
||||
$rpc_py bdev_malloc_create 64 4096 --name Malloc1
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1 -n 2
|
||||
$rpc_py get_nvmf_subsystems
|
||||
$rpc_py nvmf_get_subsystems
|
||||
|
||||
wait $aerpid
|
||||
|
||||
|
@ -33,7 +33,7 @@ $rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 \
|
||||
--eui64 "ABCDEF0123456789"
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
$rpc_py get_nvmf_subsystems
|
||||
$rpc_py nvmf_get_subsystems
|
||||
|
||||
$rootdir/examples/nvme/identify/identify -r "\
|
||||
trtype:$TEST_TRANSPORT \
|
||||
|
@ -34,7 +34,7 @@ $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPOR
|
||||
nvme discover -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
echo "Perform nvmf subsystem discovery via RPC"
|
||||
$rpc_py get_nvmf_subsystems
|
||||
$rpc_py nvmf_get_subsystems
|
||||
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
|
||||
|
@ -32,7 +32,7 @@ done
|
||||
nvme discover -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
echo "Perform nvmf subsystem discovery via RPC"
|
||||
$rpc_py get_nvmf_subsystems
|
||||
$rpc_py nvmf_get_subsystems
|
||||
|
||||
for i in $(seq 1 4); do
|
||||
$rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode$i
|
||||
|
Loading…
Reference in New Issue
Block a user