rpc: Rename set_iscsi_target_node_auth to iscsi_target_node_set_auth
Change-Id: Iab107a8ebc92deb20dd7ae3aed9e7a12bdf87d43 Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467938 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
80494e3f23
commit
032a8b1c9b
@ -3231,7 +3231,7 @@ Example response:
|
|||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
## set_iscsi_target_node_auth method {#rpc_set_iscsi_target_node_auth}
|
## iscsi_target_node_set_auth method {#rpc_iscsi_target_node_set_auth}
|
||||||
|
|
||||||
Set CHAP authentication to an existing iSCSI target node.
|
Set CHAP authentication to an existing iSCSI target node.
|
||||||
|
|
||||||
@ -3260,7 +3260,7 @@ Example request:
|
|||||||
"mutual_chap": true
|
"mutual_chap": true
|
||||||
},
|
},
|
||||||
"jsonrpc": "2.0",
|
"jsonrpc": "2.0",
|
||||||
"method": "set_iscsi_target_node_auth",
|
"method": "iscsi_target_node_set_auth",
|
||||||
"id": 1
|
"id": 1
|
||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
@ -1037,7 +1037,7 @@ static const struct spdk_json_object_decoder rpc_target_auth_decoders[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_rpc_set_iscsi_target_node_auth(struct spdk_jsonrpc_request *request,
|
spdk_rpc_iscsi_target_node_set_auth(struct spdk_jsonrpc_request *request,
|
||||||
const struct spdk_json_val *params)
|
const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct rpc_target_auth req = {};
|
struct rpc_target_auth req = {};
|
||||||
@ -1078,8 +1078,9 @@ spdk_rpc_set_iscsi_target_node_auth(struct spdk_jsonrpc_request *request,
|
|||||||
exit:
|
exit:
|
||||||
free_rpc_target_auth(&req);
|
free_rpc_target_auth(&req);
|
||||||
}
|
}
|
||||||
SPDK_RPC_REGISTER("set_iscsi_target_node_auth", spdk_rpc_set_iscsi_target_node_auth,
|
SPDK_RPC_REGISTER("iscsi_target_node_set_auth", spdk_rpc_iscsi_target_node_set_auth,
|
||||||
SPDK_RPC_RUNTIME)
|
SPDK_RPC_RUNTIME)
|
||||||
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(iscsi_target_node_set_auth, set_iscsi_target_node_auth)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_rpc_get_iscsi_global_params(struct spdk_jsonrpc_request *request,
|
spdk_rpc_get_iscsi_global_params(struct spdk_jsonrpc_request *request,
|
||||||
|
@ -881,8 +881,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
|||||||
*** If LUN ID is omitted or -1, the lowest free one is assigned ***""", type=int, required=False)
|
*** If LUN ID is omitted or -1, the lowest free one is assigned ***""", type=int, required=False)
|
||||||
p.set_defaults(func=iscsi_target_node_add_lun)
|
p.set_defaults(func=iscsi_target_node_add_lun)
|
||||||
|
|
||||||
def set_iscsi_target_node_auth(args):
|
def iscsi_target_node_set_auth(args):
|
||||||
rpc.iscsi.set_iscsi_target_node_auth(
|
rpc.iscsi.iscsi_target_node_set_auth(
|
||||||
args.client,
|
args.client,
|
||||||
name=args.name,
|
name=args.name,
|
||||||
chap_group=args.chap_group,
|
chap_group=args.chap_group,
|
||||||
@ -890,7 +890,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
|||||||
require_chap=args.require_chap,
|
require_chap=args.require_chap,
|
||||||
mutual_chap=args.mutual_chap)
|
mutual_chap=args.mutual_chap)
|
||||||
|
|
||||||
p = subparsers.add_parser('set_iscsi_target_node_auth', help='Set CHAP authentication for the target node')
|
p = subparsers.add_parser('iscsi_target_node_set_auth', aliases=['set_iscsi_target_node_auth'],
|
||||||
|
help='Set CHAP authentication for the target node')
|
||||||
p.add_argument('name', help='Target node name (ASCII)')
|
p.add_argument('name', help='Target node name (ASCII)')
|
||||||
p.add_argument('-g', '--chap-group', help="""Authentication group ID for this target node.
|
p.add_argument('-g', '--chap-group', help="""Authentication group ID for this target node.
|
||||||
*** Authentication group must be precreated ***""", type=int, default=0)
|
*** Authentication group must be precreated ***""", type=int, default=0)
|
||||||
@ -900,7 +901,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
|||||||
*** Mutually exclusive with --disable-chap ***""", action='store_true')
|
*** Mutually exclusive with --disable-chap ***""", action='store_true')
|
||||||
p.add_argument('-m', '--mutual-chap', help='CHAP authentication should be mutual/bidirectional.',
|
p.add_argument('-m', '--mutual-chap', help='CHAP authentication should be mutual/bidirectional.',
|
||||||
action='store_true')
|
action='store_true')
|
||||||
p.set_defaults(func=set_iscsi_target_node_auth)
|
p.set_defaults(func=iscsi_target_node_set_auth)
|
||||||
|
|
||||||
def add_pg_ig_maps(args):
|
def add_pg_ig_maps(args):
|
||||||
pg_ig_maps = []
|
pg_ig_maps = []
|
||||||
|
@ -230,7 +230,8 @@ def iscsi_target_node_add_lun(client, name, bdev_name, lun_id=None):
|
|||||||
return client.call('iscsi_target_node_add_lun', params)
|
return client.call('iscsi_target_node_add_lun', params)
|
||||||
|
|
||||||
|
|
||||||
def set_iscsi_target_node_auth(
|
@deprecated_alias('set_iscsi_target_node_auth')
|
||||||
|
def iscsi_target_node_set_auth(
|
||||||
client,
|
client,
|
||||||
name,
|
name,
|
||||||
chap_group=None,
|
chap_group=None,
|
||||||
@ -261,7 +262,7 @@ def set_iscsi_target_node_auth(
|
|||||||
params['require_chap'] = require_chap
|
params['require_chap'] = require_chap
|
||||||
if mutual_chap:
|
if mutual_chap:
|
||||||
params['mutual_chap'] = mutual_chap
|
params['mutual_chap'] = mutual_chap
|
||||||
return client.call('set_iscsi_target_node_auth', params)
|
return client.call('iscsi_target_node_set_auth', params)
|
||||||
|
|
||||||
|
|
||||||
def add_iscsi_auth_group(client, tag, secrets=None):
|
def add_iscsi_auth_group(client, tag, secrets=None):
|
||||||
|
@ -179,7 +179,7 @@ class UIISCSIDevice(UINode):
|
|||||||
disable_chap = self.ui_eval_param(d, "bool", None)
|
disable_chap = self.ui_eval_param(d, "bool", None)
|
||||||
require_chap = self.ui_eval_param(r, "bool", None)
|
require_chap = self.ui_eval_param(r, "bool", None)
|
||||||
mutual_chap = self.ui_eval_param(m, "bool", None)
|
mutual_chap = self.ui_eval_param(m, "bool", None)
|
||||||
self.get_root().set_iscsi_target_node_auth(
|
self.get_root().iscsi_target_node_set_auth(
|
||||||
name=self.device.device_name, chap_group=chap_group,
|
name=self.device.device_name, chap_group=chap_group,
|
||||||
disable_chap=disable_chap,
|
disable_chap=disable_chap,
|
||||||
require_chap=require_chap, mutual_chap=mutual_chap)
|
require_chap=require_chap, mutual_chap=mutual_chap)
|
||||||
|
@ -465,8 +465,8 @@ class UIRoot(UINode):
|
|||||||
rpc.iscsi.delete_iscsi_auth_group(self.client, **kwargs)
|
rpc.iscsi.delete_iscsi_auth_group(self.client, **kwargs)
|
||||||
|
|
||||||
@verbose
|
@verbose
|
||||||
def set_iscsi_target_node_auth(self, **kwargs):
|
def iscsi_target_node_set_auth(self, **kwargs):
|
||||||
rpc.iscsi.set_iscsi_target_node_auth(self.client, **kwargs)
|
rpc.iscsi.iscsi_target_node_set_auth(self.client, **kwargs)
|
||||||
|
|
||||||
@verbose
|
@verbose
|
||||||
def iscsi_target_node_add_lun(self, **kwargs):
|
def iscsi_target_node_add_lun(self, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user