Rename target_node_add_lun to iscsi_target_node_add_lun
Change-Id: I2f8e453973b8314eab76e59e816f3dd630b75b3c Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467936 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
6d77994169
commit
80494e3f23
@ -105,7 +105,7 @@ In addition to the configuration file, the iSCSI target may also be configured v
|
||||
|
||||
- iscsi_create_target_node -- Add a iSCSI target node.
|
||||
- delete_target_node -- Delete a iSCSI target node.
|
||||
- target_node_add_lun -- Add an LUN to an existing iSCSI target node.
|
||||
- iscsi_target_node_add_lun -- Add an LUN to an existing iSCSI target node.
|
||||
- iscsi_get_target_nodes -- Show information about all available iSCSI target nodes.
|
||||
|
||||
~~~
|
||||
|
@ -255,7 +255,7 @@ Example response:
|
||||
"get_log_print_level",
|
||||
"set_log_print_level",
|
||||
"get_iscsi_global_params",
|
||||
"target_node_add_lun",
|
||||
"iscsi_target_node_add_lun",
|
||||
"iscsi_get_connections",
|
||||
"iscsi_delete_portal_group",
|
||||
"iscsi_create_portal_group",
|
||||
@ -3604,7 +3604,7 @@ Example response:
|
||||
}
|
||||
~~~
|
||||
|
||||
## target_node_add_lun method {#rpc_target_node_add_lun}
|
||||
## iscsi_target_node_add_lun method {#rpc_iscsi_target_node_add_lun}
|
||||
|
||||
Add an LUN to an existing iSCSI target node.
|
||||
|
||||
@ -3628,7 +3628,7 @@ Example request:
|
||||
"bdev_name": "Malloc0"
|
||||
},
|
||||
"jsonrpc": "2.0",
|
||||
"method": "target_node_add_lun",
|
||||
"method": "iscsi_target_node_add_lun",
|
||||
"id": 1
|
||||
}
|
||||
~~~
|
||||
|
@ -971,8 +971,8 @@ static const struct spdk_json_object_decoder rpc_target_lun_decoders[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
spdk_rpc_target_node_add_lun(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
spdk_rpc_iscsi_target_node_add_lun(struct spdk_jsonrpc_request *request,
|
||||
const struct spdk_json_val *params)
|
||||
{
|
||||
struct rpc_target_lun req = {};
|
||||
struct spdk_json_write_ctx *w;
|
||||
@ -1011,7 +1011,8 @@ invalid:
|
||||
"Invalid parameters");
|
||||
free_rpc_target_lun(&req);
|
||||
}
|
||||
SPDK_RPC_REGISTER("target_node_add_lun", spdk_rpc_target_node_add_lun, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER("iscsi_target_node_add_lun", spdk_rpc_iscsi_target_node_add_lun, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iscsi_target_node_add_lun, target_node_add_lun)
|
||||
|
||||
struct rpc_target_auth {
|
||||
char *name;
|
||||
|
@ -865,20 +865,21 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
help='Data Digest should be required for this target node.', action='store_true')
|
||||
p.set_defaults(func=iscsi_create_target_node)
|
||||
|
||||
def target_node_add_lun(args):
|
||||
rpc.iscsi.target_node_add_lun(
|
||||
def iscsi_target_node_add_lun(args):
|
||||
rpc.iscsi.iscsi_target_node_add_lun(
|
||||
args.client,
|
||||
name=args.name,
|
||||
bdev_name=args.bdev_name,
|
||||
lun_id=args.lun_id)
|
||||
|
||||
p = subparsers.add_parser('target_node_add_lun', help='Add LUN to the target node')
|
||||
p = subparsers.add_parser('iscsi_target_node_add_lun', aliases=['target_node_add_lun'],
|
||||
help='Add LUN to the target node')
|
||||
p.add_argument('name', help='Target node name (ASCII)')
|
||||
p.add_argument('bdev_name', help="""bdev name enclosed in quotes.
|
||||
*** bdev name cannot contain space or colon characters ***""")
|
||||
p.add_argument('-i', dest='lun_id', help="""LUN ID (integer >= 0)
|
||||
*** If LUN ID is omitted or -1, the lowest free one is assigned ***""", type=int, required=False)
|
||||
p.set_defaults(func=target_node_add_lun)
|
||||
p.set_defaults(func=iscsi_target_node_add_lun)
|
||||
|
||||
def set_iscsi_target_node_auth(args):
|
||||
rpc.iscsi.set_iscsi_target_node_auth(
|
||||
|
@ -209,7 +209,8 @@ def iscsi_create_target_node(
|
||||
return client.call('iscsi_create_target_node', params)
|
||||
|
||||
|
||||
def target_node_add_lun(client, name, bdev_name, lun_id=None):
|
||||
@deprecated_alias('target_node_add_lun')
|
||||
def iscsi_target_node_add_lun(client, name, bdev_name, lun_id=None):
|
||||
"""Add LUN to the target node.
|
||||
|
||||
Args:
|
||||
@ -226,7 +227,7 @@ def target_node_add_lun(client, name, bdev_name, lun_id=None):
|
||||
}
|
||||
if lun_id:
|
||||
params['lun_id'] = lun_id
|
||||
return client.call('target_node_add_lun', params)
|
||||
return client.call('iscsi_target_node_add_lun', params)
|
||||
|
||||
|
||||
def set_iscsi_target_node_auth(
|
||||
|
@ -146,7 +146,7 @@ class UIISCSIDevices(UINode):
|
||||
"""
|
||||
if lun_id:
|
||||
lun_id = self.ui_eval_param(lun_id, "number", None)
|
||||
self.get_root().target_node_add_lun(
|
||||
self.get_root().iscsi_target_node_add_lun(
|
||||
name=name, bdev_name=bdev_name, lun_id=lun_id)
|
||||
|
||||
def summary(self):
|
||||
|
@ -469,8 +469,8 @@ class UIRoot(UINode):
|
||||
rpc.iscsi.set_iscsi_target_node_auth(self.client, **kwargs)
|
||||
|
||||
@verbose
|
||||
def target_node_add_lun(self, **kwargs):
|
||||
rpc.iscsi.target_node_add_lun(self.client, **kwargs)
|
||||
def iscsi_target_node_add_lun(self, **kwargs):
|
||||
rpc.iscsi.iscsi_target_node_add_lun(self.client, **kwargs)
|
||||
|
||||
@verbose
|
||||
def set_iscsi_discovery_auth(self, **kwargs):
|
||||
|
@ -373,7 +373,7 @@ def verify_target_nodes_rpc_methods(rpc_py, rpc_param):
|
||||
verify(jsonvalues[0]['data_digest'] == rpc_param['data_digest'], 1,
|
||||
"data digest value is {}, expected {}".format(jsonvalues[0]['data_digest'], rpc_param['data_digest']))
|
||||
lun_id = '1'
|
||||
rpc.target_node_add_lun(name, bdev_name, "-i", lun_id)
|
||||
rpc.iscsi_target_node_add_lun(name, bdev_name, "-i", lun_id)
|
||||
output = rpc.iscsi_get_target_nodes()
|
||||
jsonvalues = json.loads(output)
|
||||
verify(jsonvalues[0]['luns'][1]['bdev_name'] == "Malloc" + str(rpc_param['lun_total']), 1,
|
||||
|
Loading…
Reference in New Issue
Block a user