RPC: rename nvmf_subsystem_create to nvmf_create_subsystem
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com> Change-Id: Ic3aa9f168b2e612e461c450ef1e5e1ae81fa5635 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468963 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
80a0c5be99
commit
7538af7034
@ -3836,7 +3836,7 @@ Example response:
|
||||
}
|
||||
~~~
|
||||
|
||||
## nvmf_subsystem_create method {#rpc_nvmf_subsystem_create}
|
||||
## nvmf_create_subsystem method {#rpc_nvmf_create_subsystem}
|
||||
|
||||
Construct an NVMe over Fabrics target subsystem.
|
||||
|
||||
@ -3859,7 +3859,7 @@ Example request:
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1,
|
||||
"method": "nvmf_subsystem_create",
|
||||
"method": "nvmf_create_subsystem",
|
||||
"params": {
|
||||
"nqn": "nqn.2016-06.io.spdk:cnode1",
|
||||
"allow_any_host": false,
|
||||
|
@ -171,7 +171,7 @@ NQN, serial number, and IP address with RDMA transport to your own circumstances
|
||||
|
||||
~~~{.sh}
|
||||
scripts/rpc.py bdev_malloc_create -b Malloc0 512 512
|
||||
scripts/rpc.py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1
|
||||
scripts/rpc.py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1
|
||||
scripts/rpc.py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0
|
||||
scripts/rpc.py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a 192.168.100.8 -s 4420
|
||||
~~~
|
||||
|
@ -380,7 +380,7 @@ spdk_nvmf_write_subsystem_config_json(struct spdk_json_write_ctx *w,
|
||||
|
||||
/* { */
|
||||
spdk_json_write_object_begin(w);
|
||||
spdk_json_write_named_string(w, "method", "nvmf_subsystem_create");
|
||||
spdk_json_write_named_string(w, "method", "nvmf_create_subsystem");
|
||||
|
||||
/* "params" : { */
|
||||
spdk_json_write_named_object_begin(w, "params");
|
||||
|
@ -370,7 +370,7 @@ spdk_rpc_nvmf_subsystem_started(struct spdk_nvmf_subsystem *subsystem,
|
||||
}
|
||||
|
||||
static void
|
||||
spdk_rpc_nvmf_subsystem_create(struct spdk_jsonrpc_request *request,
|
||||
spdk_rpc_nvmf_create_subsystem(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct rpc_subsystem_create *req;
|
||||
@ -441,7 +441,8 @@ invalid_custom_response:
|
||||
}
|
||||
free(req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("nvmf_subsystem_create", spdk_rpc_nvmf_subsystem_create, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("nvmf_create_subsystem", spdk_rpc_nvmf_create_subsystem, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(nvmf_create_subsystem, nvmf_subsystem_create)
|
||||
|
||||
struct rpc_delete_subsystem {
|
||||
char *nqn;
|
||||
|
@ -355,11 +355,11 @@ def get_nvmf_subsystem_json(config, section):
|
||||
"bdev_name": items[0],
|
||||
})
|
||||
# Get parameters: nqn, allow_any_host, serial_number
|
||||
# for nvmf_subsystem_create rpc method
|
||||
# for nvmf_create_subsystem rpc method
|
||||
parameters = to_json_params(params[1:5])
|
||||
nvmf_subsystem_methods.append({
|
||||
"params": parameters,
|
||||
"method": "nvmf_subsystem_create"
|
||||
"method": "nvmf_create_subsystem"
|
||||
})
|
||||
for listen in listen_address:
|
||||
nvmf_subsystem_methods.append({
|
||||
|
@ -517,7 +517,7 @@ class SPDKTarget(Target):
|
||||
nqn = "nqn.2018-09.io.spdk:cnode%s" % c
|
||||
serial = "SPDK00%s" % c
|
||||
bdev_name = "Nvme%sn1" % (c - 1)
|
||||
rpc.nvmf.nvmf_subsystem_create(self.client, nqn, serial,
|
||||
rpc.nvmf.nvmf_create_subsystem(self.client, nqn, serial,
|
||||
allow_any_host=True, max_namespaces=8)
|
||||
rpc.nvmf.nvmf_subsystem_add_ns(self.client, nqn, bdev_name)
|
||||
|
||||
|
@ -1632,8 +1632,8 @@ 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=nvmf_get_subsystems)
|
||||
|
||||
def nvmf_subsystem_create(args):
|
||||
rpc.nvmf.nvmf_subsystem_create(args.client,
|
||||
def nvmf_create_subsystem(args):
|
||||
rpc.nvmf.nvmf_create_subsystem(args.client,
|
||||
nqn=args.nqn,
|
||||
tgt_name=args.tgt_name,
|
||||
serial_number=args.serial_number,
|
||||
@ -1641,7 +1641,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
allow_any_host=args.allow_any_host,
|
||||
max_namespaces=args.max_namespaces)
|
||||
|
||||
p = subparsers.add_parser('nvmf_subsystem_create', help='Create an NVMe-oF subsystem')
|
||||
p = subparsers.add_parser('nvmf_create_subsystem', aliases=['nvmf_subsystem_create'],
|
||||
help='Create an NVMe-oF subsystem')
|
||||
p.add_argument('nqn', help='Subsystem NQN (ASCII)')
|
||||
p.add_argument('-t', '--tgt_name', help='The name of the parent NVMe-oF target (optional)', type=str)
|
||||
p.add_argument("-s", "--serial-number", help="""
|
||||
@ -1653,7 +1654,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
p.add_argument("-a", "--allow-any-host", action='store_true', help="Allow any host to connect (don't enforce host NQN whitelist)")
|
||||
p.add_argument("-m", "--max-namespaces", help="Maximum number of namespaces allowed",
|
||||
type=int, default=0)
|
||||
p.set_defaults(func=nvmf_subsystem_create)
|
||||
p.set_defaults(func=nvmf_create_subsystem)
|
||||
|
||||
def delete_nvmf_subsystem(args):
|
||||
rpc.nvmf.delete_nvmf_subsystem(args.client,
|
||||
|
@ -182,7 +182,8 @@ def nvmf_get_subsystems(client, tgt_name=None):
|
||||
return client.call('nvmf_get_subsystems', params)
|
||||
|
||||
|
||||
def nvmf_subsystem_create(client,
|
||||
@deprecated_alias('nvmf_subsystem_create')
|
||||
def nvmf_create_subsystem(client,
|
||||
nqn,
|
||||
serial_number,
|
||||
tgt_name=None,
|
||||
@ -221,7 +222,7 @@ def nvmf_subsystem_create(client,
|
||||
if tgt_name:
|
||||
params['tgt_name'] = tgt_name
|
||||
|
||||
return client.call('nvmf_subsystem_create', params)
|
||||
return client.call('nvmf_create_subsystem', params)
|
||||
|
||||
|
||||
def nvmf_subsystem_add_listener(client, nqn, trtype, traddr, trsvcid, adrfam, tgt_name=None):
|
||||
|
@ -330,7 +330,7 @@ class UIRoot(UINode):
|
||||
|
||||
@verbose
|
||||
def create_nvmf_subsystem(self, **kwargs):
|
||||
rpc.nvmf.nvmf_subsystem_create(self.client, **kwargs)
|
||||
rpc.nvmf.nvmf_create_subsystem(self.client, **kwargs)
|
||||
|
||||
@verbose
|
||||
def delete_nvmf_subsystem(self, **kwargs):
|
||||
|
@ -195,7 +195,7 @@
|
||||
"model_number": "SPDK_Controller1",
|
||||
"nqn": "nqn.2016-06.io.spdk:cnode1"
|
||||
},
|
||||
"method": "nvmf_subsystem_create"
|
||||
"method": "nvmf_create_subsystem"
|
||||
},
|
||||
{
|
||||
"params": {
|
||||
@ -243,7 +243,7 @@
|
||||
"model_number": "SPDK_Controller2",
|
||||
"nqn": "nqn.2016-06.io.spdk:cnode2"
|
||||
},
|
||||
"method": "nvmf_subsystem_create"
|
||||
"method": "nvmf_create_subsystem"
|
||||
},
|
||||
{
|
||||
"method": "nvmf_subsystem_add_listener",
|
||||
|
@ -34,7 +34,7 @@ $rpc_py nvmf_create_transport -t $TEST_TRANSPORT -u 8192
|
||||
|
||||
$rpc_py bdev_malloc_create -b Malloc0 64 512
|
||||
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$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
|
||||
|
||||
|
@ -66,7 +66,7 @@ $rpc_py start_subsystem_init
|
||||
$rpc_py nvmf_create_transport -t RDMA -u 8192
|
||||
echo "NVMf target has started."
|
||||
bdevs=$($rpc_py bdev_malloc_create 64 512)
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
for bdev in $bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
|
@ -71,7 +71,7 @@ def clear_bdev_subsystem(args, bdev_config):
|
||||
|
||||
|
||||
def get_nvmf_destroy_method(nvmf):
|
||||
delete_method_map = {'nvmf_subsystem_create': "delete_nvmf_subsystem"}
|
||||
delete_method_map = {'nvmf_create_subsystem': "delete_nvmf_subsystem"}
|
||||
try:
|
||||
return delete_method_map[nvmf['method']]
|
||||
except KeyError:
|
||||
|
@ -318,7 +318,7 @@ function create_nvmf_subsystem_config() {
|
||||
tgt_rpc bdev_malloc_create 4 1024 --name MallocForNvmf1
|
||||
|
||||
tgt_rpc nvmf_create_transport -t RDMA -u 8192 -c 0
|
||||
tgt_rpc nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
tgt_rpc nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
tgt_rpc nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 MallocForNvmf0
|
||||
tgt_rpc nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 MallocForNvmf1
|
||||
tgt_rpc nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t RDMA -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT"
|
||||
|
@ -14,7 +14,7 @@ nvmfappstart "-m 0xF"
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py bdev_malloc_create 64 512 --name Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -m 2
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -m 2
|
||||
$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
|
||||
|
||||
|
@ -25,7 +25,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
timing_exit start_nvmf_tgt
|
||||
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$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
|
||||
|
||||
|
@ -28,7 +28,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
timing_exit start_nvmf_tgt
|
||||
|
||||
$rpc_py bdev_malloc_create 64 512 -b Malloc1
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
@ -50,7 +50,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
ls_guid=$($rpc_py bdev_lvol_create_lvstore -c 1073741824 Nvme0n1 lvs_0)
|
||||
get_lvs_free_mb $ls_guid
|
||||
$rpc_py bdev_lvol_create -l lvs_0 lbd_0 $free_mb
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode2 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode2 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode2 lvs_0/lbd_0
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode2 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
fio_nvme $PLUGIN_DIR/example_config.fio --filename="trtype=$TEST_TRANSPORT adrfam=IPv4 \
|
||||
@ -61,7 +61,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
ls_nested_guid=$($rpc_py bdev_lvol_create_lvstore --clear-method none lvs_0/lbd_0 lvs_n_0)
|
||||
get_lvs_free_mb $ls_nested_guid
|
||||
$rpc_py bdev_lvol_create -l lvs_n_0 lbd_nest_0 $free_mb
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode3 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode3 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode3 lvs_n_0/lbd_nest_0
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode3 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
fio_nvme $PLUGIN_DIR/example_config.fio --filename="trtype=$TEST_TRANSPORT adrfam=IPv4 \
|
||||
|
@ -25,7 +25,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
timing_exit start_nvmf_tgt
|
||||
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
# NOTE: This will assign the same NGUID and EUI64 to all bdevs,
|
||||
# but currently we only have one (see above), so this is OK.
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0 \
|
||||
|
@ -25,7 +25,7 @@ if [ -n "$local_nvme_trid" ]; then
|
||||
fi
|
||||
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
for bdev in $bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
done
|
||||
@ -66,7 +66,7 @@ if [ $RUN_NIGHTLY -eq 1 ]; then
|
||||
free_mb=20480
|
||||
fi
|
||||
lb_nested_guid=$($rpc_py bdev_lvol_create -u $ls_nested_guid lbd_nest_0 $free_mb)
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
for bdev in $lb_nested_guid; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
done
|
||||
|
@ -20,7 +20,7 @@ $rpc_py start_subsystem_init
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$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
|
||||
|
||||
|
@ -16,7 +16,7 @@ nvmfappstart "-m 0xF"
|
||||
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$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
|
||||
|
||||
|
@ -20,7 +20,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -c 0
|
||||
|
||||
bdev="$($rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $bdev
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -25,7 +25,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
null_bdevs="$($rpc_py bdev_null_create Null0 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE) "
|
||||
null_bdevs+="$($rpc_py bdev_null_create Null1 $NULL_BDEV_SIZE $NULL_BLOCK_SIZE)"
|
||||
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
for null_bdev in $null_bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 $null_bdev
|
||||
done
|
||||
|
@ -24,7 +24,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
# Use at least 4 subsystems so they spill over to a second discovery log page
|
||||
for i in $(seq 1 4); do
|
||||
$rpc_py bdev_null_create Null$i $NULL_BDEV_SIZE $NULL_BLOCK_SIZE
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK0000000000000$i
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode$i -a -s SPDK0000000000000$i
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Null$i
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
done
|
||||
|
@ -20,7 +20,7 @@ for incapsule in 0 4096; do
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -c $incapsule
|
||||
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc1
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -23,7 +23,7 @@ raid_malloc_bdevs="$($rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_
|
||||
raid_malloc_bdevs+="$($rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
$rpc_py bdev_raid_create -n raid0 -z 64 -r 0 -b "$raid_malloc_bdevs"
|
||||
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
for malloc_bdev in $malloc_bdevs; do
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 "$malloc_bdev"
|
||||
done
|
||||
|
@ -21,7 +21,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
$rpc_py bdev_malloc_create -b Malloc0 64 512
|
||||
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$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
|
||||
|
||||
|
@ -22,7 +22,7 @@ $rpc_py construct_malloc_bdev $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py bdev_delay_create -b Malloc0 -d Delay0 -r 30 -t 30 -w 30 -n 30
|
||||
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Delay0
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -29,7 +29,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
for i in $(seq 1 $NVMF_SUBSYS)
|
||||
do
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
done
|
||||
|
@ -20,12 +20,12 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
|
||||
# Create subsystems
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK1
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK1
|
||||
$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"
|
||||
|
||||
echo "test case1: single bdev can't be used in multiple subsystems"
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode2 -a -s SPDK2
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode2 -a -s SPDK2
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode2 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s "$NVMF_PORT"
|
||||
nmic_status=0
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode2 Malloc0 || nmic_status=$?
|
||||
|
@ -26,7 +26,7 @@ $rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc0
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc1
|
||||
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001 -d SPDK_Controller1
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc0
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
@ -38,7 +38,7 @@ lvs=$($rpc_py bdev_lvol_create_lvstore raid0 lvs)
|
||||
lvol=$($rpc_py bdev_lvol_create -u $lvs lvol $LVOL_BDEV_INIT_SIZE)
|
||||
|
||||
# Create an NVMe-oF subsystem and add the logical volume as a namespace
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode0 -a -s SPDK0
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode0 -a -s SPDK0
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode0 $lvol
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode0 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -43,7 +43,7 @@ trap 'process_shm --id $NVMF_APP_SHM_ID; killprocess $vhostpid nvmftestfini; exi
|
||||
malloc_bdev="$($NVMF_RPC bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE)"
|
||||
|
||||
$NVMF_RPC nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -p 4
|
||||
$NVMF_RPC nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$NVMF_RPC nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$NVMF_RPC nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 "$malloc_bdev"
|
||||
$NVMF_RPC nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
||||
|
@ -56,7 +56,7 @@ MALLOC_BLOCK_SIZE=512
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc1
|
||||
|
||||
# Disallow host NQN and make sure connect fails
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1
|
||||
$rpc_py nvmf_subsystem_allow_any_host -d nqn.2016-06.io.spdk:cnode1
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
@ -85,7 +85,7 @@ $rpc_py delete_nvmf_subsystem nqn.2016-06.io.spdk:cnode1
|
||||
# do frequent add delete of namespaces with different nsid.
|
||||
for i in $(seq 1 $times)
|
||||
do
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -s SPDK00000000000001
|
||||
$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 nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1 -n 5
|
||||
$rpc_py nvmf_subsystem_allow_any_host nqn.2016-06.io.spdk:cnode1
|
||||
@ -103,7 +103,7 @@ done
|
||||
# do frequent add delete.
|
||||
for i in $(seq 1 $times)
|
||||
do
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -s SPDK00000000000001
|
||||
$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 nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Malloc1
|
||||
$rpc_py nvmf_subsystem_allow_any_host nqn.2016-06.io.spdk:cnode1
|
||||
|
@ -57,7 +57,7 @@ rm -rf $testdir/rpcs.txt
|
||||
for i in $(seq 1 $num_subsystems)
|
||||
do
|
||||
echo bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i >> $testdir/rpcs.txt
|
||||
echo nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i >> $testdir/rpcs.txt
|
||||
echo nvmf_create_subsystem nqn.2016-06.io.spdk:cnode$i -a -s SPDK$i >> $testdir/rpcs.txt
|
||||
echo nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i >> $testdir/rpcs.txt
|
||||
echo nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT >> $testdir/rpcs.txt
|
||||
|
||||
|
@ -24,7 +24,7 @@ nvmfappstart "-m 0xF"
|
||||
$rpc_py nvmf_create_transport $NVMF_TRANSPORT_OPTS -u 8192 -s 1024
|
||||
|
||||
for i in $(seq 0 5); do
|
||||
$rpc_py nvmf_subsystem_create nqn.2016-06.io.spdk:cnode$i -a -s SPDK00000000000001
|
||||
$rpc_py nvmf_create_subsystem nqn.2016-06.io.spdk:cnode$i -a -s SPDK00000000000001
|
||||
$rpc_py bdev_malloc_create $MALLOC_BDEV_SIZE $MALLOC_BLOCK_SIZE -b Malloc$i
|
||||
$rpc_py nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode$i Malloc$i
|
||||
$rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode$i -t $TEST_TRANSPORT -a $NVMF_FIRST_TARGET_IP -s $NVMF_PORT
|
||||
|
@ -115,7 +115,7 @@ function migration_tc2_configure_vhost()
|
||||
notice "Configuring nvmf_tgt, vhost devices & controllers via RPC ..."
|
||||
|
||||
# Construct shared bdevs and controllers
|
||||
$rpc_nvmf nvmf_subsystem_create nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_nvmf nvmf_create_subsystem nqn.2016-06.io.spdk:cnode1 -a -s SPDK00000000000001
|
||||
$rpc_nvmf nvmf_subsystem_add_ns nqn.2016-06.io.spdk:cnode1 Nvme0n1
|
||||
$rpc_nvmf nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t rdma -a $nvmf_target_ip -s 4420
|
||||
|
||||
|
@ -111,7 +111,7 @@ function host1_start_nvmf()
|
||||
$rpc_nvmf nvmf_create_transport -t RDMA -u 8192
|
||||
$rootdir/scripts/gen_nvme.sh --json | $rpc_nvmf load_subsystem_config
|
||||
|
||||
$rpc_nvmf nvmf_subsystem_create nqn.2018-02.io.spdk:cnode1 -a -s SPDK01
|
||||
$rpc_nvmf nvmf_create_subsystem nqn.2018-02.io.spdk:cnode1 -a -s SPDK01
|
||||
$rpc_nvmf nvmf_subsystem_add_ns nqn.2018-02.io.spdk:cnode1 Nvme0n1
|
||||
$rpc_nvmf nvmf_subsystem_add_listener nqn.2018-02.io.spdk:cnode1 -t rdma -a $RDMA_TARGET_IP -s 4420
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user